Package org.adempiere.webui.part
Class AbstractUIPart
java.lang.Object
org.adempiere.webui.part.AbstractUIPart
- All Implemented Interfaces:
ISupportMask,UIPart
- Direct Known Subclasses:
AbstractADTabbox,AbstractADWindowContent,AbstractDesktop,ADWindow,MultiTabPart,WindowContainer,WLogin
Abstract base class for UI block controller
- Author:
- Low Heng Sin
-
Field Summary
FieldsFields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.zkoss.zk.ui.ComponentcreatePart(Object parent) Create UI block hosted by parentprotected abstract org.zkoss.zk.ui.ComponentdoCreatePart(org.zkoss.zk.ui.Component parent) Sub class override this to create root UI block or child UI blockorg.zkoss.zk.ui.ComponentReturn self if is a component or return component it manage.
AbstractUIPartsubclasses that implement this interface should returnUIPart.getComponent().Return cache Mask or create new Mask and return.voidhideMask()Hide mask.voidshowMask()Show mask over this component.
When override, remember to callComponent.setAttribute(String, Object, int)with nameISupportMask.READY_SHOW_MASK_FLAG, value Integer(1) and scopeComponent.REQUEST_SCOPE.
Call byLayoutUtils.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.adempiere.webui.part.UIPart
getComponent
-
Field Details
-
page
protected org.zkoss.zk.ui.Page page -
showMaskWrapper
-
-
Constructor Details
-
AbstractUIPart
public AbstractUIPart()
-
-
Method Details
-
createPart
Create UI block hosted by parent- Specified by:
createPartin interfaceUIPart- Parameters:
parent- Component or Page- Returns:
- Component
-
doCreatePart
protected abstract org.zkoss.zk.ui.Component doCreatePart(org.zkoss.zk.ui.Component parent) Sub class override this to create root UI block or child UI block- Parameters:
parent- parent Component or null for root UI block- Returns:
- Component
-
showMask
public void showMask()Show mask over this component.
When override, remember to callComponent.setAttribute(String, Object, int)with nameISupportMask.READY_SHOW_MASK_FLAG, value Integer(1) and scopeComponent.REQUEST_SCOPE.
Call byLayoutUtils.- Specified by:
showMaskin interfaceISupportMask
-
hideMask
public void hideMask()Hide mask. With ISupportMask return from showMask, call this function in handle close event of window.
When override, remember check exists of keyISupportMask.READY_SHOW_MASK_FLAGat scopeComponent.REQUEST_SCOPEin attribute. If flag exists, don't hide mask.
Call byLayoutUtils.- Specified by:
hideMaskin interfaceISupportMask
-
getMaskObj
Return cache Mask or create new Mask and return.- Specified by:
getMaskObjin interfaceISupportMask- Returns:
Mask
-
getMaskComponent
public org.zkoss.zk.ui.Component getMaskComponent()Return self if is a component or return component it manage.
AbstractUIPartsubclasses that implement this interface should returnUIPart.getComponent(). knowIssue: becauseIDesktop.getComponent()returnBorderLayout, don't append window to child list of it, in this case we must get parent of BorderLayout- Specified by:
getMaskComponentin interfaceISupportMask- Returns:
Component
-