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

No comments:

Post a Comment