Introduction to ZK WebUI

From ADempiere ERP Wiki
Revision as of 13:24, 21 March 2013 by Sarafudheen (talk | contribs) (Initial Edit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

We can create custom window By using ZK Code in Adempiere instead of using Window, Tab & Field

These are the Steps to Create Custom Window

1. First Create One Class to Write Window Configuration Code in this specified package org.adempiere.webui.apps.form. 2. Now login as System/SystemAdministrator , a ) go to "Application Dictionary" and Find " Form " Window . b ) Now create New Form , find for " class name " widget in "Form" window, there we can specify Class Location like org.adempiere.webui.apps.form.VendorPaymentBalance c ) Save This Form. 3. Create New Menu , In " Action " widget specity " form " , Now we get the " Special Form " Widget in Menu Widow Here we specify form name that we have created in Step 2. 4. Now we can add this Menu to the Specified Role to whom we are going to give access permission.

Now it will act as Adempiere window

In case it is not Visible after doing all the steps .login as System/SystemAdministrator 1 . Open Role window , select Role to which we have given access permission a ) For This Role select " form access " tab ,search for form that we have created if it is not there b ) create new record in " form access" tab ,in special form add recently created form. Now it will appear.

Sample Class

 package org.adempiere.webui.apps.form;

 import org.adempiere.webui.component.*;
 import org.adempiere.webui.panel.ADForm;
 import org.compiere.util.CLogger;
 import org.zkoss.zk.ui.event.EventListener;

 import com.imedia.webui.advt.AdvTotalPage;

 public class WSampleWebUIWindow extends ADForm implements EventListener {

	 * Generated serial number
	private static final long serialVersionUID = 7328729344548442180L;
	/** Logger. */
	private static CLogger log = CLogger

	protected void initForm() {

        Button but = new Button("Test Button");
	this.appendChild(but );