-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
I'm upgrading a fairly large application from ZK3 to ZK5. All my forms validate fields, for example on onChange of a textbox. The forms created in Java (not in ZUL) have event handlers.
I noticed that this works:
public void onEvent(Event e) throws Exception
{
<...>
Textbox t = (Textbox)e.getTarget();
t.setValue( "Any text" );
}
SUCCESS: I see "Any text" on the textbox after onEvent returns.
But the code below DOES NOT WORK:
public void onEvent(Event e) throws Exception
{
<...>
Textbox t = (Textbox)e.getTarget();
t.setStyle("background-color: LightSalmon");
}
FAIL: I don't see the background color change after onEvent returns.
This used to work on ZK3, and now all my forms are broken. How do I make setStyle() work on Java event handling please?
Asked: 2011-12-30 20:43:55 +0800
Seen: 202 times
Last updated: Jan 02 '12