setting CSS style Uibinder Gwt

m@ruthi

New Member
I want to change the color of a g:label using java code on a onBlur event.I am using eclipse, UIBinder. This is what I have in mind although it doesn't work.In my StandardDocumentDownload.ui.xml file\[code\]<ui:style> .testStyle { } .styleRequiredData { color:red; } </ui:style>\[/code\]this is the event in my standardDocumentDownload.java file\[code\]@UiHandler("comboTitle")void onComboTitleBlur(BlurEvent event) { int title = comboTitle.getSelectedIndex(); if(title == 0) { labTitleReq.setText("Please enter a value"); labTitle.addStyleName("styleRequiredData"); } else { labTitleReq.setText(""); }}\[/code\]How could I add the color red to the existing style of the label upon the firing of the event.Kind regards
 
Back
Top