Changing the background color of textbox java UiBinder

I want to change the background color of a textbox as an indicator that it is being validated.\[code\]<ui:style> .textBoxColor { background-color: #FF6EB4; }</ui:style>\[/code\]and then\[code\]if(firstName.equals("")) { txtFirstName.setStyleName("textBoxColor"); }\[/code\]This is however not giving the expected result.How can I achieve the change in color?Kind regards
 
Back
Top