Secure ZK Component Events"

From Documentation
Line 7: Line 7:
 
[[File:ZKSpringEssentials_SecurityExampleHome.jpg]]
 
[[File:ZKSpringEssentials_SecurityExampleHome.jpg]]
  
This table lists links to different pages that users can visit. Top two rows in this table provides a way to access Account Listings pages. On the account listings pages there are buttons to credit or debit certain amount from the specific user's account but only users logged in with either ROLE_TELLER or ROLE_ADMINISTRATOR are allowed to perform those operations. If users of this application are not logged in Spring Security is configured to request users for logon. First row account listings page presents a simple login page for logon whereas second row account listings page presents an ajax login popup. In this article we will talk about first account listings listAccounts1.zul page and the next article will describe second account listings listAccount2.zul page and its Ajax login popup feature.
+
This table lists links to different pages that users can visit. Here First row provides a way to access Account Listings page. On the account listings page there are buttons to credit or debit certain amount from the specific user's account but only those users who are logged in and have either ROLE_TELLER or ROLE_ADMINISTRATOR role are allowed to perform those operations. If users of this application are not logged in Spring Security is configured to request users to logon. On clicking any of the +$5,-$5,+$20 or -$20 buttons on account listings page presents an ajax login popup. but how does one configure for certain button click event and set certain role based access to the operation performed by button click? We will describe it below but before that lets see the account listing page and login popup
  
 
Here is the account listings page screen.
 
Here is the account listings page screen.

Revision as of 03:37, 23 February 2011

Purpose

Secure certain ZK component event such as Button onClick event.

Example

This Example is borrowed from the standard Spring Security tutorial sample and has been modified to work with ZK using ZK Spring Security. You can download the example codes from ZK Spring Essentials Google Code source repository here. You can see this example in action by deploying ZK Spring Essentials web archive and hitting example home page at http://localhost:8080/zkspringessentials/home.zul and you will see following screen. home.zul page is configured to be accessible to anyone.

ZKSpringEssentials SecurityExampleHome.jpg

This table lists links to different pages that users can visit. Here First row provides a way to access Account Listings page. On the account listings page there are buttons to credit or debit certain amount from the specific user's account but only those users who are logged in and have either ROLE_TELLER or ROLE_ADMINISTRATOR role are allowed to perform those operations. If users of this application are not logged in Spring Security is configured to request users to logon. On clicking any of the +$5,-$5,+$20 or -$20 buttons on account listings page presents an ajax login popup. but how does one configure for certain button click event and set certain role based access to the operation performed by button click? We will describe it below but before that lets see the account listing page and login popup

Here is the account listings page screen.

ZKSpringEssentials SecurityExampleListAccounts2.jpg

Secure component events