We will see here how to validate all the input elements and show all the message in one window after submit button is clicked. This can be done using ZK Data binding and CreateComponents method.This example is based on Executions.CreateComponents. For more example, please check here.Project StructureStep 1:ValidationMessage.Javapackage MyDomain;public class ValidationMessage { private String message; public String getMessage() { ...
Thursday, 31 May 2012
Wednesday, 30 May 2012
ZK Executions.createComponents
Posted on 08:17 by Unknown
Example 1: Using MVC, we will see how we can call another ZUL File and pass arguments to the ZUL File Step : 1 Demo.Zul file <?page title="new page title" contentType="text/html;charset=UTF-8"?><zk> <window title="new page title" border="normal" apply="myUI.DemoComposer"> <button id="Create" label="Show Window" onClick="" /> </window></zk> Step : 2DemoComposer.javapackage myUI;import...
Tuesday, 29 May 2012
List Item Connected with Hibernate and Search Parameter
Posted on 10:22 by Unknown
SummaryThis example contains one list box with First name and Last Name as search Field. If the user do not give any values for first name and last name, then clicking Go Button will list all the records from the DB.If the user enters either first name or last name or both, then using like operator, it will retrieve accordingly. EnvironmentEclipse 3.7 Indigo IDE Hibernate 4.1.1 JavaSE 1.6 MySQL 5.1 Step 1:Set up ZK Project with Hibernate....
ZK Hibernate Setup
Posted on 09:07 by Unknown
This post will explain how to set up the Hibernate for a ZK Project Environment Eclipse 3.7 Indigo IDE Download Hibernate 4.1.1 Download JavaSE 1.6 Download MySQL 5.1 Download JDBC Driver for MySQL ((MySQL-connector-java-5.1.19.zip)) Download ZK 6 CE Version Extract the Hibernate, MySql driver files in a separate folder Step 1: In the Eclipse, Select File –> New –> ZK Project and give Project Name as <AnyNameAsYouWish> ...
Window Title Change Color
Posted on 05:59 by Unknown
Reference URLhttp://books.zkoss.org/wiki/ZK_Style_Guide/XUL_Component_Specification/Window/Default_(embedded)Zul File<?page title="Auto Generated index.zul"?><zk> <style> .z-window-embedded-tl,.z-window-embedded-tr,.z-window-embedded-hl,.z-window-embedded-hr, .z-window-embedded-hm { background-image:none; background-color:#94D3D3; } .z-window-embedded-cnt {...
Monday, 28 May 2012
List item Data Binding
Posted on 21:54 by Unknown
Now let us see how we can load the items in the list item using Data binding. Step 1: Create a Zul Project as follows Step 2 : Create Person POJO Class Java Code package mydomain;public class Person { private String _firstName = ""; private String _lastName = ""; // getter and setters public void setFirstName(String firstName) { _firstName = firstName; } public String getFirstName() { return _firstName;...
ZK Data Binding
Posted on 02:08 by Unknown
This is based on ZK 5 Data binding using Data Bind Manager org.zkoss.zkplus.databind.AnnotateDataBinderInitData binding is a mechanism that automates the data-copy plumbing code (CRUD) between UI components and the data source. Application developers only have to tell the data binding manager about the associations between UI components and the data source. Then, the data -binding manager will do all the loading (loading data from the data...
Subscribe to:
Posts (Atom)