Monday, April 20, 2015

ZK Framework and HTML Escape

Many time we have saved HTML code in database but when we are going to display that saved value in zk page it show HTML code as well with data .

To resolve this issue we have to use HTML escape there are plenty of way to fix this

You can do it on Java side as well zul page and here is simple way how you can achieve in the zul page

Friday, October 17, 2014

How to Use Eclipse Code formatter from your own Java code?

I am looking a solution how Eclipse code formatted used formatting the code in eclipse ? Can we use same for-matter for our own use and i found the answer is yes .
If you will use Maven it will be great so need following dependency in pom.xml file

Now here is the Java code for formatting the code

Here you can check why i added

If you will not add above code and format a code which contain generics formatting will not work .

Thursday, September 25, 2014

How to get value of Comboxbox and Textbox In JavaScript/Jquery code

Here is the sample example

Monday, September 1, 2014

How to show Customize message with ZK Constraint?

Here is the code you can follow

Here two condition added

Textbox should not be empty .

Textbox not allow any space trailing and leading spaces.

Friday, August 29, 2014

How to use regular expression in ZK textbox Which not allowed spaces ?

I have a requirement for ZK TextBox

1- Not Allow any space when nothing entered in textbox
2- Not allow space before and after the string.
3- Allow Space in between two keyword like Ram Singh should be valid
4- Only Ram Should be also valid

for above these requirements which not allow trailing/white spaces you can below textbox with regular expression

Monday, May 26, 2014

ZK Include : How to pass and get parameter with zk include


In above code you can check it pass argument with URL here test is argument name and value=5

In this page we used ${param.test} to get the parameter passed in index.zul

Another way to pass Argument and And get it back
Let Us suppose you included menu_component.zul in parent.zul file

Now in menu_component.zul you can get parameter like this

Now use data anywhere in zul and pass value to View Model

Tuesday, May 13, 2014

How to Notify Single Item or Record or Single Column from ZK ListBox Not Whole ListBox?

Here is Demo code for this

ZUL file
Please share if you found any better solution