-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I bind function to checkbox when it is checked and it works well but i want also to bind function if the checkbox is unchecked. It should work like this: when chcekbox is checked-> list all items(this works fine atm), when its unchecked list only active items (which doesnt work). I am looking forward for your help.
relevant part of my code...
zul file:
<checkbox onCheck=@command('changeToAll') label="Show all items"/>
viewmodel file:
@Command
@NotifyChange("kundeList")
public void changeToAll(){
kundeList = kundeService.changeToAll();
}
so my question how to bind checkbox to other @Command when its unchecked?
You can code like this...
<checkbox checked="@bind(myViewmodel.bindCheckBox)" onCheck="@command('onCheckedAndUnchecked')" />
What the issue here onCheckedAndUnchecked method will call on both condtion when you will click on Checkbox and when you will unchecked it again
Asked: 2013-05-28 08:44:47 +0800
Seen: 51 times
Last updated: May 28 '13
Problem binding values to a composite component
How to access static member field of a class in zul without zscript
How can i load a constant in .zul
MVVM Validator: class not found ? [closed]
MVVM tab box - delay @load until tab pane displayed?
mvvm, load or save with after or before for seach command
how to fire an event when a variable value loaded through VM
is there any event trigger from zk component on binding ?
ZK team plans to dispose of Composer EventQueues no longer in scope? [closed]
Got it, thx!
demizon ( 2013-05-28 11:18:54 +0800 )edit