Hello,
We are using SmartClient_80_Pro.
I have a value map for a select form item, where the display of one item equals the value of another item:
var map = new Object();
map["39"]="144";
map["144"]="ARM"
When "ARM" is selected, the selectItem.getValue() will show "39" instead of "144".
Here is a test case:
<HTML><HEAD>
<SCRIPT>var isomorphicDir="../isomorphic/";</SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=../isomorphic/skins/TreeFrog/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
try {
sfsForm.show();
} catch (err) {
isc.DynamicForm.create({
autoDraw:true,
cellPadding:2,
cellBorder:0,
numCols:3,
ID:"sfsForm",
titleOrientation:"top",
wrapItemTitles:false,
fields: [
{name: "sfsFormType",
ID:"sfsFormType",
title:"Form Type",
defaultToFirstOption:true,
type:"select",
multiple:true,
multipleAppearance:"grid",
width:240,
height:100,
startRow:false,
endRow:true
},
{
name:"sfsSubmitBtn",
ID: "sfsSubmitBtn",
title:"Search",
_constructor:"SubmitItem",
startRow:false,
endRow:true,
width:80,
click: function(){
alert(sfsFormType.getValue());
alert(sfsFormType.getDisplayValue());
},
showTitle:false
}
]
});
}
var map = new Object();
map["39"]="144";
map["144"]="ARM"
sfsFormType.setValueMap(map);
</SCRIPT>
</BODY></HTML>
Any suggestions on how to get around this?
Thanks!
We are using SmartClient_80_Pro.
I have a value map for a select form item, where the display of one item equals the value of another item:
var map = new Object();
map["39"]="144";
map["144"]="ARM"
When "ARM" is selected, the selectItem.getValue() will show "39" instead of "144".
Here is a test case:
<HTML><HEAD>
<SCRIPT>var isomorphicDir="../isomorphic/";</SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=../isomorphic/skins/TreeFrog/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
try {
sfsForm.show();
} catch (err) {
isc.DynamicForm.create({
autoDraw:true,
cellPadding:2,
cellBorder:0,
numCols:3,
ID:"sfsForm",
titleOrientation:"top",
wrapItemTitles:false,
fields: [
{name: "sfsFormType",
ID:"sfsFormType",
title:"Form Type",
defaultToFirstOption:true,
type:"select",
multiple:true,
multipleAppearance:"grid",
width:240,
height:100,
startRow:false,
endRow:true
},
{
name:"sfsSubmitBtn",
ID: "sfsSubmitBtn",
title:"Search",
_constructor:"SubmitItem",
startRow:false,
endRow:true,
width:80,
click: function(){
alert(sfsFormType.getValue());
alert(sfsFormType.getDisplayValue());
},
showTitle:false
}
]
});
}
var map = new Object();
map["39"]="144";
map["144"]="ARM"
sfsFormType.setValueMap(map);
</SCRIPT>
</BODY></HTML>
Any suggestions on how to get around this?
Thanks!
Comment