Hey Isomorphic,
I've recently (almost, obviously) successfully upgraded SmartGWT from 3.1 to 4.0, but encountered a strange occurrence that seems strange enough to be a bug.
I am using a SelectItem which is placed as a member inside of a DynamicForm. A ListGrid serves as the SelectItem's PickList to format the dropdown cells' appearance and the SelectItem is given event handlers to change what is displayed on the page dependent upon which cell is selected in the SelectItem --- All of this works as expected.
The issue occurs when I try to display the currently selected cell's information as the SelectItem's text - only very specific strings are displayed when I use the setValue() function, with all other strings being set as the value *but not displayed on-screen as the item's text!* The only strings that *are* displayed are retrieved from the item I set as the SelectItem's ValueField. Is this intentional? If so, how can I design a workaround?
SmartGwt 4.0p - build 12/26/2013
All browsers affected.
Code below, as minimal as possible. Thanks!
----
Would you like any other pieces of code? I'm not sure what will be relevant to your investigation.
I've recently (almost, obviously) successfully upgraded SmartGWT from 3.1 to 4.0, but encountered a strange occurrence that seems strange enough to be a bug.
I am using a SelectItem which is placed as a member inside of a DynamicForm. A ListGrid serves as the SelectItem's PickList to format the dropdown cells' appearance and the SelectItem is given event handlers to change what is displayed on the page dependent upon which cell is selected in the SelectItem --- All of this works as expected.
The issue occurs when I try to display the currently selected cell's information as the SelectItem's text - only very specific strings are displayed when I use the setValue() function, with all other strings being set as the value *but not displayed on-screen as the item's text!* The only strings that *are* displayed are retrieved from the item I set as the SelectItem's ValueField. Is this intentional? If so, how can I design a workaround?
SmartGwt 4.0p - build 12/26/2013
All browsers affected.
Code below, as minimal as possible. Thanks!
Code:
accountCombo.setWidth(450);
accountCombo.setPickListWidth(450);
accountCombo.setShowTitle(false);
accountCombo.setValueField("valueField");
accountCombo.setSortField("accountNumber"); accountCombo.setCellStyle("doublePickListCell"); accountCombo.setPickListBaseStyle("doublePickList");
Code:
accountCombo.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
String valueField = (String) event.getValue();
List<CustomerAccountServiceLocationRpc> rpcs = rpcMap.get(valueField);
if (rpcs != null && rpcs.get(0) != null) {
updateContext(rpcs.get(0));
accountCombo.setTooltip(getTooltipFormat(hoveredRecord));
if(hoveredRecord !=null){
String testRetrieval = hoveredRecord.getAttribute("displayField"); //Sets value but does not display
String testRetrieval3 = hoveredRecord.getAttribute("valueField"); //Works
accountCombo.setValue(testRetrieval);
accountCombo.setValue(testRetrieval3);
}else{
accountCombo.setValue("Error retrieving account information");
}
}
}
});
Would you like any other pieces of code? I'm not sure what will be relevant to your investigation.