SlideShare uma empresa Scribd logo
1 de 10
ZK Framework
(http://www.zkoss.org/)




                      Rupalli Das
                       Developer
                MESTECH Services Pvt. Ltd
                 Phone No: 8446309467
What is ZK ?
•   ZK framework is a highly productive open source Java framework for building amazing enterprise web and
    mobile applications.
•   ZK's architecture is based on units of modularization which are pluggable and replaceable, enabling developers
    to extend and customize.
•   ZK uses ZK User Interface Markup Language (ZUML) makes the design of rich user interfaces as simple as
    authoring HTML pages. ZUML is a variant of XUL inheriting all features available to XML, and separates the UI
    definition from the run-time logic.
•   ZUML also allows developers to automate CRUD between UI components and the data source with
    annotations, data binding and MVVM.
•   The main idea behind ZK is to introduce event-handling programming to web applications.
•   ZK refers to the description language as "ZUL."

    System requirements :

•   JRE version 1.4 or later
•   A Web server supporting Servlet 2.3 or later
How to use the ZK
                     framework ?
• To use the framework, copy libraries from the ZK distribution
  (directories dist/lib and dist/zkforge) into a directory WEB-
  INF/lib in your project. Then configure file web.xml by defining:

a)   A servlet for handling requests for displaying new pages.
b)   A servlet for intercepting events that happened on the pages.
c)   A listener for performing cleanup work after session timeout.
d)   The servlets zkLoader and auEngine (Listing One) are
     responsible for "double-track" service of HTTP requests arriving
     from a browser.
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="ZKdemo" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>ZKdemo</display-name>
    <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.zul</welcome-file>
    </welcome-file-list>

    <servlet>
            <description>ZK loader for evaluating ZK pages</description>
            <servlet-name>zkLoader</servlet-name>
            <servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
                         <!— Must. Specifies URI of the update engine (DHtmlUpdateServlet). —>
            <init-param>
                         <param-name>update-uri</param-name>
                         <param-value>/zkau</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup><!— MUST —>
    </servlet>
<servlet>
             <description>The asynchronous update engine for ZK</description>
             <servlet-name>auEngine</servlet-name>
             <servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
    </servlet>

    <servlet-mapping>
             <servlet-name>zkLoader</servlet-name>
             <url-pattern>*.zul</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
             <servlet-name>zkLoader</servlet-name>
             <url-pattern>*.zhtml</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
             <servlet-name>auEngine</servlet-name>
             <url-pattern>/zkau/*</url-pattern>
    </servlet-mapping>

    <listener>
             <description>Used to cleanup when a session is destroyed</description>
             <display-name>ZK Session Cleaner</display-name>
             <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
    </listener>

</web-app>
Create a new ZK Project
•   Click [File]/[New]/[Other...]/[ZK Project] in Eclipse main menu.

•   Type the project name. Eclipse will automatically include the default ZK package configured in the ZK
    Package preferences, however, you can select any other installed ZK package by selecting it from the
    combo box. Then, click Next.

•   You can modify the Source folders and Default output folder if you like. Then, click Next.

•   You can modify Context root or Content directory if you like. Then, Click Finish.

•   After clicking Finish, the New Project Wizard will setup the ZK Project ready for development.

•   [you will find a top right icon includes a ZK mark to show that the project has ZK Studio support]
Creating a New ZUL File

•   You can create new ZUL file using the [File]/[New]/[File] command in Eclipse's main menu.

•   However, you have to write the ".zul" extension yourself and the newly create zul file will not contain any
    template code.

•   Click [File]/[New]/[Other] in Eclipse's main menu and then using the wizard to filter zul. Select zul from
    the listbox and then click Next.

•   Type the file name and optional page title name, click Finish.

•   The newly created ZUL File will be opened in ZUL Editor.
Running the ZK Project

•   Configuring Apache Tomcat for Eclipse
     – You are required to create a valid Apache Tomcat Server configuration. Configuration of Apache with
         Eclipse is done in the Server/Runtime Environments preference page.

•   To create a server instance to run a web application the server needs to be defined.
EXAMPLE FOR DESIGNING COMBOBOX

•   <hbox pack="center" align="top" width="100%" height="400px">

          <div height="278px" width="443px">
                    <separator spacing="40px" />
                    <hbox width="440px>
                               <vlayout>
                                          <separator spacing="20px" />
                                          <label value="Color/>
                                          <combobox id="cmbColor" width="150px">
                                          <comboitem label="@load(each)“
                                          image="@load(vm.getIconImage(each))" />
                                          </combobox>
                               </ vlayout>

                    </hbox>
          </div>
•   </hbox>
Zk doc1

Mais conteúdo relacionado

Mais procurados

MuleSoft ESB Scripting Example
MuleSoft ESB Scripting ExampleMuleSoft ESB Scripting Example
MuleSoft ESB Scripting Exampleakashdprajapati
 
"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем ТритякFwdays
 
Bundle your modules with Webpack
Bundle your modules with WebpackBundle your modules with Webpack
Bundle your modules with WebpackJake Peyser
 
Mule esb
Mule esbMule esb
Mule esbKhan625
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIBrian Hogg
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOSKevin Decker
 
Packing for the Web with Webpack
Packing for the Web with WebpackPacking for the Web with Webpack
Packing for the Web with WebpackThiago Temple
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJSPhilipp Burgmer
 
A New Vue for Web Development
A New Vue for Web DevelopmentA New Vue for Web Development
A New Vue for Web DevelopmentChad Campbell
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vueDavid Ličen
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpackNodeXperts
 
006. React - Redux framework
006. React - Redux framework006. React - Redux framework
006. React - Redux frameworkBinh Quan Duc
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationDavid Amend
 
Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express jsAhmed Assaf
 
Building and Managing Projects with Maven
Building and Managing Projects with MavenBuilding and Managing Projects with Maven
Building and Managing Projects with MavenKhan625
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularizationstbaechler
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack IntroductionAnjali Chawla
 

Mais procurados (20)

MuleSoft ESB Scripting Example
MuleSoft ESB Scripting ExampleMuleSoft ESB Scripting Example
MuleSoft ESB Scripting Example
 
"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк
 
Bundle your modules with Webpack
Bundle your modules with WebpackBundle your modules with Webpack
Bundle your modules with Webpack
 
Mule esb
Mule esbMule esb
Mule esb
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
 
Codegen2021 blazor mobile
Codegen2021 blazor mobileCodegen2021 blazor mobile
Codegen2021 blazor mobile
 
Webpack
WebpackWebpack
Webpack
 
Packing for the Web with Webpack
Packing for the Web with WebpackPacking for the Web with Webpack
Packing for the Web with Webpack
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
 
A New Vue for Web Development
A New Vue for Web DevelopmentA New Vue for Web Development
A New Vue for Web Development
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vue
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
006. React - Redux framework
006. React - Redux framework006. React - Redux framework
006. React - Redux framework
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express js
 
Building and Managing Projects with Maven
Building and Managing Projects with MavenBuilding and Managing Projects with Maven
Building and Managing Projects with Maven
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularization
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 

Destaque

Statsground: The First 9 Months Retrospective
Statsground: The First 9 Months RetrospectiveStatsground: The First 9 Months Retrospective
Statsground: The First 9 Months RetrospectiveRogier van Duyn
 
Press Releases Business Development
Press Releases Business DevelopmentPress Releases Business Development
Press Releases Business Developmentjdouglass2
 
Hotpots practice for_ced
Hotpots practice for_cedHotpots practice for_ced
Hotpots practice for_cedJoan Ripoll
 
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion Roma
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion RomaBest Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion Roma
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion RomaLuca Degli Esposti
 
Statsground Introduction
Statsground IntroductionStatsground Introduction
Statsground IntroductionRogier van Duyn
 
ตารางสอบกลางภาค156
ตารางสอบกลางภาค156ตารางสอบกลางภาค156
ตารางสอบกลางภาค156Npr Punsiri
 
22 cross bordner-knowledge-transfer
22 cross bordner-knowledge-transfer22 cross bordner-knowledge-transfer
22 cross bordner-knowledge-transferLTGnetrade
 

Destaque (10)

Statsground: The First 9 Months Retrospective
Statsground: The First 9 Months RetrospectiveStatsground: The First 9 Months Retrospective
Statsground: The First 9 Months Retrospective
 
Press Releases Business Development
Press Releases Business DevelopmentPress Releases Business Development
Press Releases Business Development
 
Hotpots practice for_ced
Hotpots practice for_cedHotpots practice for_ced
Hotpots practice for_ced
 
Asia Map Powerpoint Map - SlideWorld
Asia Map Powerpoint Map - SlideWorldAsia Map Powerpoint Map - SlideWorld
Asia Map Powerpoint Map - SlideWorld
 
Justin deskin
Justin deskinJustin deskin
Justin deskin
 
Justneed.ppt
Justneed.pptJustneed.ppt
Justneed.ppt
 
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion Roma
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion RomaBest Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion Roma
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion Roma
 
Statsground Introduction
Statsground IntroductionStatsground Introduction
Statsground Introduction
 
ตารางสอบกลางภาค156
ตารางสอบกลางภาค156ตารางสอบกลางภาค156
ตารางสอบกลางภาค156
 
22 cross bordner-knowledge-transfer
22 cross bordner-knowledge-transfer22 cross bordner-knowledge-transfer
22 cross bordner-knowledge-transfer
 

Semelhante a Zk doc1

Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaAgile Testing Alliance
 
Weblogic Console Customization labs
Weblogic Console Customization labsWeblogic Console Customization labs
Weblogic Console Customization labsPeter van Nes
 
Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows webservicesm
 
12c weblogic installation steps for Windows
12c weblogic installation steps for Windows12c weblogic installation steps for Windows
12c weblogic installation steps for WindowsCognizant
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to JqueryGurpreet singh
 
Developing Series 40 web apps with Nokia Web Tools 2.0
Developing Series 40 web apps with Nokia Web Tools 2.0Developing Series 40 web apps with Nokia Web Tools 2.0
Developing Series 40 web apps with Nokia Web Tools 2.0Microsoft Mobile Developer
 
Embedding Oracle Weblogic Server 1871199
Embedding Oracle Weblogic Server 1871199Embedding Oracle Weblogic Server 1871199
Embedding Oracle Weblogic Server 1871199cwspeaks
 
Unlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureUnlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureMatt Nolan
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...Frank Munz
 

Semelhante a Zk doc1 (20)

Lect06 tomcat1
Lect06 tomcat1Lect06 tomcat1
Lect06 tomcat1
 
Tomcat server
 Tomcat server Tomcat server
Tomcat server
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
treeview
treeviewtreeview
treeview
 
treeview
treeviewtreeview
treeview
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh Gundecha
 
Weblogic Console Customization labs
Weblogic Console Customization labsWeblogic Console Customization labs
Weblogic Console Customization labs
 
Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows
 
12c weblogic installation steps for Windows
12c weblogic installation steps for Windows12c weblogic installation steps for Windows
12c weblogic installation steps for Windows
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
Developing Series 40 web apps with Nokia Web Tools 2.0
Developing Series 40 web apps with Nokia Web Tools 2.0Developing Series 40 web apps with Nokia Web Tools 2.0
Developing Series 40 web apps with Nokia Web Tools 2.0
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
Camel as a_glue
Camel as a_glueCamel as a_glue
Camel as a_glue
 
Embedding Oracle Weblogic Server 1871199
Embedding Oracle Weblogic Server 1871199Embedding Oracle Weblogic Server 1871199
Embedding Oracle Weblogic Server 1871199
 
Oracle autovue
Oracle autovueOracle autovue
Oracle autovue
 
Unlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureUnlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin Architecture
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
 

Último

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Último (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

Zk doc1

  • 1. ZK Framework (http://www.zkoss.org/) Rupalli Das Developer MESTECH Services Pvt. Ltd Phone No: 8446309467
  • 2. What is ZK ? • ZK framework is a highly productive open source Java framework for building amazing enterprise web and mobile applications. • ZK's architecture is based on units of modularization which are pluggable and replaceable, enabling developers to extend and customize. • ZK uses ZK User Interface Markup Language (ZUML) makes the design of rich user interfaces as simple as authoring HTML pages. ZUML is a variant of XUL inheriting all features available to XML, and separates the UI definition from the run-time logic. • ZUML also allows developers to automate CRUD between UI components and the data source with annotations, data binding and MVVM. • The main idea behind ZK is to introduce event-handling programming to web applications. • ZK refers to the description language as "ZUL." System requirements : • JRE version 1.4 or later • A Web server supporting Servlet 2.3 or later
  • 3. How to use the ZK framework ? • To use the framework, copy libraries from the ZK distribution (directories dist/lib and dist/zkforge) into a directory WEB- INF/lib in your project. Then configure file web.xml by defining: a) A servlet for handling requests for displaying new pages. b) A servlet for intercepting events that happened on the pages. c) A listener for performing cleanup work after session timeout. d) The servlets zkLoader and auEngine (Listing One) are responsible for "double-track" service of HTTP requests arriving from a browser.
  • 4. <?xml version="1.0" encoding="UTF-8"?> <web-app id="ZKdemo" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>ZKdemo</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.zul</welcome-file> </welcome-file-list> <servlet> <description>ZK loader for evaluating ZK pages</description> <servlet-name>zkLoader</servlet-name> <servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class> <!— Must. Specifies URI of the update engine (DHtmlUpdateServlet). —> <init-param> <param-name>update-uri</param-name> <param-value>/zkau</param-value> </init-param> <load-on-startup>1</load-on-startup><!— MUST —> </servlet>
  • 5. <servlet> <description>The asynchronous update engine for ZK</description> <servlet-name>auEngine</servlet-name> <servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zul</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zhtml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>auEngine</servlet-name> <url-pattern>/zkau/*</url-pattern> </servlet-mapping> <listener> <description>Used to cleanup when a session is destroyed</description> <display-name>ZK Session Cleaner</display-name> <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class> </listener> </web-app>
  • 6. Create a new ZK Project • Click [File]/[New]/[Other...]/[ZK Project] in Eclipse main menu. • Type the project name. Eclipse will automatically include the default ZK package configured in the ZK Package preferences, however, you can select any other installed ZK package by selecting it from the combo box. Then, click Next. • You can modify the Source folders and Default output folder if you like. Then, click Next. • You can modify Context root or Content directory if you like. Then, Click Finish. • After clicking Finish, the New Project Wizard will setup the ZK Project ready for development. • [you will find a top right icon includes a ZK mark to show that the project has ZK Studio support]
  • 7. Creating a New ZUL File • You can create new ZUL file using the [File]/[New]/[File] command in Eclipse's main menu. • However, you have to write the ".zul" extension yourself and the newly create zul file will not contain any template code. • Click [File]/[New]/[Other] in Eclipse's main menu and then using the wizard to filter zul. Select zul from the listbox and then click Next. • Type the file name and optional page title name, click Finish. • The newly created ZUL File will be opened in ZUL Editor.
  • 8. Running the ZK Project • Configuring Apache Tomcat for Eclipse – You are required to create a valid Apache Tomcat Server configuration. Configuration of Apache with Eclipse is done in the Server/Runtime Environments preference page. • To create a server instance to run a web application the server needs to be defined.
  • 9. EXAMPLE FOR DESIGNING COMBOBOX • <hbox pack="center" align="top" width="100%" height="400px"> <div height="278px" width="443px"> <separator spacing="40px" /> <hbox width="440px> <vlayout> <separator spacing="20px" /> <label value="Color/> <combobox id="cmbColor" width="150px"> <comboitem label="@load(each)“ image="@load(vm.getIconImage(each))" /> </combobox> </ vlayout> </hbox> </div> • </hbox>