SmartClient Version: v11.0p_2016-11-04/AllModules Development Only (built 2016-11-04)
Hi,
I've come across a situation where I had two screens with identical select lists that were rendered differently on each screen. After investigating I found that one of the select lists was being rendered before its valuemap was set and the other afterwards.
The example code below shows two select lists, the first with a valuemap and the second without. Pressing the button will set a valuemap on the second select list. I expected to two lists to have the same appearance.
The main difference is the size of the list. The one that is rendered with a valuemap displays 6 rows while the other only displays 4 rows. I couldn't find any way to control the height of the displayed select list. Is there one?
There are a couple of other differences that I've noticed, but which are not especially important to me:
Hi,
I've come across a situation where I had two screens with identical select lists that were rendered differently on each screen. After investigating I found that one of the select lists was being rendered before its valuemap was set and the other afterwards.
The example code below shows two select lists, the first with a valuemap and the second without. Pressing the button will set a valuemap on the second select list. I expected to two lists to have the same appearance.
The main difference is the size of the list. The one that is rendered with a valuemap displays 6 rows while the other only displays 4 rows. I couldn't find any way to control the height of the displayed select list. Is there one?
There are a couple of other differences that I've noticed, but which are not especially important to me:
- the select list example that I started with included some markup that made some values bold. This markup is ignored in one of my lists and rendered as text in the other.
- using google chrome on linux (Version 54.0.2840.90 (64-bit)), the background color of the second list is grey, whereas on all other browsers (including chrome on windows) it is white. This may well be a linux / google chrome problem rather than a smartclient problem.
Code:
list2Values = {
"IT" : "Italy",
"RS" : "Russia",
"BR" : "<b>Brazil</b>",
"CA" : "Canada",
"MX" : "Mexico",
"SP" : "Spain",
"NZ" : "New Zealand"
};
isc.VLayout.create({
membersMargin:10,
members:[
isc.DynamicForm.create({
width: 200,
fields: [{
title: "List 1", type: "select",
multiple: true,
multipleAppearance: "grid",
valueMap: {
"US" : "<b>United States</b>",
"CH" : "China",
"JA" : "<b>Japan</b>",
"IN" : "India",
"GM" : "Germany",
"FR" : "France",
"AU" : "Australia"
}
},{
title: "List 2", type: "select",
ID: "field2",
multiple: true,
multipleAppearance: "grid"
}]
}),
isc.IButton.create({
title: "Set 'List 2' Values",
click: "field2.setValueMap(list2Values)"
})
]
});
Comment