proc retrieve_mappings {mapping file} {
set buffer [ GuidoExecServer inSiteGetMappings {}]
set status [GuidoGetParamBufferValue $buffer status]
$mapping removeAllItems
if {$status >= 0} {
$mapping setInputAllowed true
$mapping requestFocus
set mappingSize [ GuidoGetParamBufferValue $buffer "mappingCount" ]
if {$mappingSize > 0} {
for {set i 0} {$i < $mappingSize} {incr i} {
set next "mapping($i)"
$mapping  addItem [ GuidoGetParamBufferValue $buffer $next ]
if {$i == 0} {
$mapping setCurrentValue [ GuidoGetParamBufferValue $buffer $next ]
}
}
$file setInputAllowed true
$mapping setExclusive true
} else {
GuidoMessage warning INSITE_NO_MAPPINGS
$mapping setInputAllowed false
$file setInputAllowed false
}
} else {
$mapping setInputAllowed false
$file setInputAllowed false
GuidoMessage warning INSITE_VALIDATION_ERROR3
}
}
GuidoForm frm00102 {
-default_buttons
-label "Upload to InSite"
-tip INSITE_UPLOAD_FORM_TIP
-layout CentreLineLayout
GuidoComboBox mapping {
-display_length 20
-label "Mapping"
-max_length 255
-null false
-tip INSITE_UPLOAD_MAPPING_TIP
-exclusive false
-value_in "Retrieving mappings from InSite..."
-default "Retrieving mappings from InSite..."
-input false
}
GuidoFileBrowserField file {
-label "File"
-display_length 22.6
-file_mask *.*
-format none
-max_length 255
-file_access read
-null false
-tip INSITE_UPLOAD_FILE_TIP
-input false
}
-action initial {[retrieve_mappings $mapping $file]}
}
