Tuesday, 31 March 2015

ZK 7 Project Start-up Kit – Dynamic Menu

Well, You have learned the basics of ZK Framework and now you are ready to go to develop a Complete commercial Application or Sample Application. But how to start ? You might be end with lot of questions such as “Is there any template available ?”, “any support available for the project template”?, etc.

Here it is. I have developed a small Project start up kit with the following features

1. Menus are Dynamic for N Level support. What does it mean ? Well, in the modern Web application, you might want to visible/invisible Menu by each users type (aka Dynamic Menu). This template has that option . All the Menu caption and levels are Stored in MySQL Database and after login , it will retrieve the menus assigned only for the user.

2. Apart from Menu, You might be interested in giving permission to add/delete/edit for CRUD Based screens. Using this template, you can also control by each user.

3. For all the CRUD Based screens, Export to Excel option template is provided.

4. Sample CRUD Screen are Provided to ready to start.

5. Integrated with Spring Security

6. Integrated with Spring Hibernate Security.

7. Base DAO and DAO implementation classes are provided.

8. Utilising ZK's MVVM databinding.

Version 2 also available. For more details, please check here

Apart from the above, the Most important option is “ Support!!!!!!!”. Users who buying this kit, unlimited support will be provided to help them to understand the structure. If you are interested in buying this start up kit, please email to me at
vbsenthilinnet@gmail.com

Project Screenshots

Login Screen

image

Landing Page with Dynamic Menus

image

Assigning Role Based Rights including CRUD Options

image

User Creation

image


Global Error Handler Includes MySQL Errors

image


Project Structure

image

Sample Code

<zk>
<window id="userslist" border="none"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('com.product.webapp.admin.UsersListVM')">
<separator />
<div width="96%">
<span width="100%">
<div sclass="screenheader">
<separator />
<label id="lcaption" sclass="screenheaderlabel"
value="Users List" />
</div>
</span>
<div id="buttonsDiv" sclass="screenheaderbuts">
<button label="Add New"
visible="@load(vm.menu.canAdd eq 1)"
onClick="@command('onAddNew')">
</button>
</div>
<div sclass="clearboth"></div>
<div sclass="sectionSeperator"></div>
</div>
<separator />
<separator />
<div width="96%" sclass="sectionpadding">
<label value="User Name" />
<space />
<textbox id="name" cols="30"
value="@bind(vm.dataFilter.name)" onChange="@command('doFilter')"
instant="true" maxlength="30" />
<space spacing="20px" />
<checkbox id="activechk" label="Show only active"
value="@bind(vm.dataFilter.showOnlyActive)"
checked="@bind(vm.dataFilter.showOnlyActive)"
onCheck="@command('doFilter')" />
<space spacing="20px" />
<image sclass="fImageExcel"
onClick="@command('onExcelExport')" />
<div sclass="floatright">
<paging id="pagenavi" pageSize="@load(vm.pageSize)"
sclass="floatright" pageIncrement="1" detailed="true">
</paging>
</div>
<div sclass="clearboth"></div>
</div>
<separator />
<panel width="95%" sclass="sectionpadding">
<panelchildren>
<listbox id="" mold="paging" paginal="${pagenavi}"
sclass="mylist" selectedItem="@bind(vm.selectedItem)"
model="@load(vm.dataSet)">
<listhead sizable="true">
<listheader label="User Name"
sortDirection="ascending" sort="auto(userName)" />
<listheader label="First Name"
sort="auto(firstName)" />
<listheader label="Last Name"
sort="auto(lastName)" />
<listheader label="Role"
sort="auto(p1.userRole.roleName)" />
<listheader label="Action" />
</listhead>
<template name="model" var="p1">
<listitem
sclass="@load(p1.active eq 0 ?'inactiveRecord':'')">
<listcell label="@load(p1.userName)"
onClick="@command('onlinkOpen',record=p1)"
sclass="highlightcell" />
<listcell label="@load(p1.firstName)" />
<listcell label="@load(p1.lastName)" />
<listcell
label="@load(p1.userRole.roleName)" />
<listcell>
<hbox spacing="20px">
<image sclass="fimageActive"
onClick="@command('onDeactivate')"
visible="@load( (vm.menu.canDelete eq 1) and (p1.active ==1) and (p1.system == 0 ))" />
<image sclass="fimageInactive"
onClick="@command('onActivate')"
visible="@load((vm.menu.canDelete eq 1) and (p1.active !=1) and (p1.system == 0 ))" />
<image sclass="fimageDelete"
visible="@load( (vm.menu.canDelete eq 1) and (p1.system eq 0))"
onClick="@command('onDelete')" />
<image sclass="fimageedit"
visible="@load( (vm.menu.canEdit eq 1 ) and p1.system eq 0)"
onClick="@command('onEdit')" />
</hbox>
</listcell>
</listitem>
</template>
</listbox>
</panelchildren>
</panel>
</window>
</zk>


Export to Excel

image


Menus are Dynamically Loaded from the MYSQL Table

image



To buy this start-up kit, please email me at vbsenthilinnet@gmail.com

Video Demo

4 comments:

  1. Nice this post, i really support and want to join your blog community thanks

    ReplyDelete
  2. You may start your day with several essential oil with www.aosproduct.com where you will see such natural details that are mostly useful in your regular life like tea tree, Jojoba, Avocado and eucalyptus oil etc.

    ReplyDelete
  3. Microsoft office has a different version, and the entire version has the different setup file. Some of the version is Office 2013, Office 2016 and Office 365 etc. Go to www.office.com/setup and redeem your key. Office Com Setup is one of the most popular productivity programs around. If you have your product key handy, you don't even need a disc to start installing Office just visit office setup help. Norton is one of the most reliable antivirus providers in the market to download visit www.norton.com/setup . There are multiple manufacturers making printers for home and office use with varied range as printer series per the need and affordability of different customers. Printer Tech Support. It has become one of the most useful computer hardware devices that allow people to convert computer generated typescript into a physical printed document.

    ReplyDelete