Here is Demo code for this
ZUL file
Please share if you found any better solution
This blog is dedicated to ZK Framework which is a Ajax based framework and you can make application with the help of MVC and MVVM Framework.
Showing posts with label listbox. Show all posts
Showing posts with label listbox. Show all posts
Tuesday, May 13, 2014
Friday, August 16, 2013
ZK Listbox MouseOver CSS Overriding or Remove Hover
See the below code for this.
Thursday, July 25, 2013
ZK Listbox selecteditem vs selecteditems
Today i am going to discuss about two attributes of zk Listbox, one is selectedItem and another is selectedItems both looking same but do not think like that here we can say selectedItems means Single selection or multiple selection both thing supported here but in case of selectedItem only one item of Listbox will be selected.
May be above comparison will be not clear to everyone, so we have to digg more and go to the depth of these attributes, lets go to ZK Official Documentation and see what they are saying about these two attributes
Here you can see selectedItem means only one item will be selected and bind from ViewModel
While selectedItems means multiple items could be selected and bind with one variables but you have to remember that in your zul you have to add multiple="true" attribute in Listbox inside ZUL file and in your ViewModel you have to call setMultiple(true) function.
May be above comparison will be not clear to everyone, so we have to digg more and go to the depth of these attributes, lets go to ZK Official Documentation and see what they are saying about these two attributes
For single selection state, ZK provides 2 kind of state. One is selected index and another is selected item of a model. We can create 2 properties in ViewModel for them respectively.
Here you can see selectedItem means only one item will be selected and bind from ViewModel
Some components support multiple selections, but it needs to be enabled before using it. The way to enable multiple selections depends on property's type you bind with "model" attribute. If the property type is Java Collection type such as List, Set, or Map , we should specify multiple="true" on the component to enable multiple selections. If a property's type is ListModel and it implements Selectable, we should call setMultiple(true) to enable it.
While selectedItems means multiple items could be selected and bind with one variables but you have to remember that in your zul you have to add multiple="true" attribute in Listbox inside ZUL file and in your ViewModel you have to call setMultiple(true) function.
Wednesday, July 3, 2013
ZK Listbox Filtering
Today i am going to tell you how can we do Filtering in the Zk Listbox ..Its Simple Basic demo example to apply the filtering in zk Listbox any one can get idea and added more well defined way to apply filtering in Zk Listbox
ZUL code for this listbox filtering example
And ViewModel or Java Code for Listbox filtering
You can download the above code from This link. Suggestion and updates invited :)
ZUL code for this listbox filtering example
And ViewModel or Java Code for Listbox filtering
You can download the above code from This link. Suggestion and updates invited :)
Tuesday, June 25, 2013
ZK Listbox Data Filter Demo
ZK Provide Data Filter in Listbox,Grid I have created a Very Basic Demo application to apply Filters in Listbox.
ZUL file Code
And View Model Or Java Class
Its a Very basic developer can modify the code as their requirement.
ZUL file Code
And View Model Or Java Class
Its a Very basic developer can modify the code as their requirement.
Monday, June 3, 2013
Zk Delete Selected Item from Listbox
As today i am trying to answer someone question in ZK forum how we can delete selected item or items from the Listbox i have created a demo example for this ...
Java Code for this
And ZUL Code for this Example..
You can ask more question in comment section :)
Java Code for this
And ZUL Code for this Example..
You can ask more question in comment section :)
Labels:
add,
delete,
listbox,
selecteditems,
selecteitem,
ZK
Monday, March 11, 2013
ZK Listbox ItemRendered Example
Here is Simple Demo example how we can use Itemrendered in ZK With Listbox You can follow the Below Demo Code for this ZK Feature...
The Code for ZUL Page is. And code For Java Class file..
The Code for ZUL Page is. And code For Java Class file..
Tuesday, February 5, 2013
ZK Set desire selection in Listbox model
If someone want when a Zk listbox render in browser a item will be default selected for achieving this you can run this demo code..
ZUL file.....
And Viewmodel or Java class for this demo example...
In this example you can see this code..
this method will do selection the item in listbox which you would like ...
For more Information you can refer..ZK Official document
For Senthil Question
For Senthil Question
Monday, February 4, 2013
ZK Listbox add a new item
Today we will see how can we add a new item when user click on a button for this you can follow this example...
ZUL file code for this
And Java class or viewmodel for this...
for any issue please leave a comment.
Subscribe to:
Posts (Atom)