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
Hi Joshi
ReplyDeletedataList.addToSelection(dataList.get(0));
This should be fine for example. But assume you know the value of "a" only, for example, you want to select "a2", CAN WE do without loop
You can use below code
ReplyDelete@Senthil Check the post i added code there i think google not allowed code in comment section due to security reason
Delete