Tuesday, January 29, 2013

ZK GroupBox facts

How to use Model for ZK GroupsModel... This way you can get groupName with Listitem if you will not use template model:group for rendering grouping object then it will directly look for model and rendered according to that.

Friday, January 18, 2013

ZK Framework Notify Programmatically

Today i was working on Listbox Reordering Component so i customized my class so that ZUL will take model for listbox and other variables from another class rather than Direct from View Model So My Listbox will be something like this... Here you can check i am not directly accessing variables from Viewmodel rather than i am calling varaibles from another class called ListboxViewModel.java and code for this... Now You Know My ViewModel class is MyListViewModel.java but i am accessing variables from another class in ZUL pages(from this class ListboxViewModel .java) and in ViewModel i created a object of ListboxViewModel.java class with get and set method. Now i will want to Notify the variables define in ListboxViewModel.java .So what i have to do ...I have to call this method.. Or You can do like this.. As you all know In NotifyChange we can Notify more than one variables or all variables , something like this But postNotifyChange method have no such feature may be in future ZK team will think add this feature also. For more information you can browse ZK Official blog

ZK Listbox With Column Reordering in ZUL

Let us start with some new feature of ZK Listbox. Today i am sharing how we can implement Reordering in Listbox , you can download running war file from Here .Before this logic i did the Zk listbox reordering with the help of getitemrendered() but the main drawback of that approach was that user have to do binding in Java code which is looking very bad also lots of line code increase so it will be headache in future for me and my team. So i got some idea from Ben bai and created this example. See Video help

Wednesday, January 9, 2013

Friday, January 4, 2013

ZK PhoneMasking

How can someone use ZK Textbox for phone masking ? As i searched in ZK website they are using This Masking plugin with textbox .Now how can we use this plugin with ZK? We have to make some modification for this. Let me explain you all things Step by Step 1-Firstly download the masking plugin from This website 2-Put this file into your web project webapps directory in my case i put this file into this directory /webapps/resources/js 3- Go to /WEB-INF/lang-addon.xml file and add this line..
<javascript src="/resource/js/jquery.maskedinput-1.3.js" />
I modified the code of jquery.maskedinput-1.3.js You can copy-paste below code. 4- And you have to extend textbox to create a new textbox to add masking attribute. 5-As you defined a new Class ExtendTextbox So you have create this class.. Have a look here i have created the variable phonemasking and get and set method for this variable and in setmethod i added the logic to call jquery method for masking As you can see i have added a variable here it is nothing but a attribute for textbox component so in ZUL file you have add a attribute in textbox for phonemasking How to call Jquery method from Java Code in ZK taken help from Here