Hi,
I came across the following issue: when adding styled entries via the datasource descriptor, the values appear styled in the dropdown list...
but when selecting a value from the list, I get the value with the HTML tags instead of the "applied" styled value (see screenshot).
After some investigation, I found out that the issue can be traced to the use of the comboBoxItem (iso the selectItem as in the showcase example).
http://www.smartclient.com/smartgwt/...bobox_category
I have added a standalone test case below.
I came across the following issue: when adding styled entries via the datasource descriptor, the values appear styled in the dropdown list...
but when selecting a value from the list, I get the value with the HTML tags instead of the "applied" styled value (see screenshot).
After some investigation, I found out that the issue can be traced to the use of the comboBoxItem (iso the selectItem as in the showcase example).
http://www.smartclient.com/smartgwt/...bobox_category
I have added a standalone test case below.
Code:
public class Standalone implements EntryPoint { private static Canvas masterPanel = null; /** * TEST CASE 4: styled ComboBoxItem * * * @sofhistory * 24-feb-2011 bade initial version * * @see com.google.gwt.core.client.EntryPoint#onModuleLoad() * */ public void onModuleLoad() { //masterPanel should be a Layout masterPanel = new Canvas(); masterPanel.setHeight100(); masterPanel.setWidth100(); masterPanel.setStyleName("pageBackground"); //background style from skin ComboBoxItem comboBox = new ComboBoxItem(); comboBox.setTitle("Select"); comboBox.setHint("<nobr>A ComboBox with styled entries</nobr>"); LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); valueMap.put("1", "<span style='color:#FF0000;'>Red</span>"); valueMap.put("2", "<span style='color:#00FF00;'>Green</span>"); valueMap.put("3", "<span style='color:#0000FF;'>Blue</span>"); comboBox.setValueMap(valueMap); //the order list grid DynamicForm form = new DynamicForm(); form.setHeight(170); form.setWidth(500); form.setFields(comboBox); masterPanel.addChild(form); masterPanel.draw(); } }
Comment