-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I'm trying to set the onClick handler of a Row conditionally as follows:
<row> <attribute name="onClick" if="${vm.condition == true}"> @command('setEditable', target=each) </attribute> <label value="test value"/> </row>
However, I'm getting the exception below and I'm guessing this is not supported with @command as value? If not, how can I request this as a feature?
org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: `` @command('setEditable', target=each);'' Token Parsing Error: Lexical error at line 21, column 2. Encountered: "c" (99), after : "@": <at unknown="" location="">
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_112]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_112]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_112]
perhaps just :
<button onClick="@command(vm.condition?'setEditable':'')" />
Chill.
Asked: 2017-01-18 13:26:43 +0800
Seen: 29 times
Last updated: Jan 18 '17