SmartGWT Pro 2.3
GWT 2.0.3
Tested with Firefox 3.6, IE7 and Chrome 6.0.472.62
DevMode
I have an IntegerItem that has a FormItemIcon attached to it. Depending on whether or not the field has data in it, I want to change the source of FormItemIcon (to show enable/disabled state).
For some reason this doesn't work... here is the code:
The code is executing correctly in that I can see the debug statements. But the call to rtTicketIcon.setSrc doesn't change anything visually.
The weird this is that I'm basically doing the same thing when the record loads (in an overriden editRecord() method on the Form) and there it DOES work:
GWT 2.0.3
Tested with Firefox 3.6, IE7 and Chrome 6.0.472.62
DevMode
I have an IntegerItem that has a FormItemIcon attached to it. Depending on whether or not the field has data in it, I want to change the source of FormItemIcon (to show enable/disabled state).
For some reason this doesn't work... here is the code:
Code:
HandlerRegistration rtTicketChangedReg = rtTicketNumber.addChangedHandler(new ChangedHandler(){ @Override public void onChanged(ChangedEvent event) { if(rtTicketNumber.getValue()!= null) { Log.debug("Enabling RT Ticket Icon"); rtTicketIcon.setSrc(GraphicalAsset.RT_ICON.getPath()); } else { Log.debug("Disabling RT Ticket Icon"); rtTicketIcon.setSrc(GraphicalAsset.RT_ICON.getDisabled()); } } });
The weird this is that I'm basically doing the same thing when the record loads (in an overriden editRecord() method on the Form) and there it DOES work:
Code:
@Override public void editRecord(Record record) { if(record!= null) { //check whether to enable the RTTicket button if(record.getAttribute(DIDOrderField.RT_TICKET_NUMBER.getName())!= null) { rtTicketIcon.setSrc(GraphicalAsset.RT_ICON.getPath()); } else { rtTicketIcon.setSrc(GraphicalAsset.RT_ICON.getDisabled()); } } }
Comment