Package org.adempiere.webui.adwindow
Interface IADTabpanel
- All Superinterfaces:
Cloneable
,org.zkoss.zk.ui.Component
,Evaluatee
,org.zkoss.zk.ui.ext.Scope
,Serializable
- All Known Implementing Classes:
ADSortTab
,ADTabpanel
Interface for AD_Tab UI (with all the AD_Fields definition)
- Author:
- Low Heng Sin
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Component boolean attribute to indicate ON_ACTIVATE_EVENT have been posted for the current execution cyclestatic final String
Activate/Deactivate event for IADTabpanel.Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(boolean b) Activate/deactivate this IADTabpanel instance.void
afterSave
(boolean onSaveEvent) Handle after save eventvoid
createUI()
Layout fields of the tab panelboolean
dataSave
(boolean onSaveEvent) Save changes.void
dynamicDisplay
(int col) Dynamic update of every field's UI properties ( visibility, filter and mandatory ).int
int
int
getTabNo()
getTitle()
List<org.zkoss.zul.Button>
void
init
(AbstractADWindowContent winPanel, GridTab gridTab) boolean
boolean
boolean
default boolean
Get is detail pane visibleboolean
default boolean
boolean
boolean
boolean
needSave
(boolean rowChange, boolean onlyRealChange) boolean
Handle enter key eventvoid
query()
Execute query through the backedGridTab
instance.void
query
(boolean currentRows, int currentDays, int maxRows) void
refresh()
Refresh data through the backedGridTab
instance.void
Reset detail data grid when parent tab current record is new and not saved yet.void
setDetailPane
(DetailPane detailPane) Set theDetailPane
part that own this IADTabpanel instancevoid
setDetailPaneMode
(boolean detailMode) Turn on/off detail mode, i.e either tab panel is currently a header or detail tab of the UI.void
setTabNo
(int tabNo) Set tab number/sequence within an AD_Windowvoid
Switch between grid/list and form viewvoid
updateDetailToolbar
(org.zkoss.zul.Toolbar toolbar) Enabled/DisabledDetailPane
toolbar buttonsvoid
updateToolbar
(ADWindowToolbar toolbar) Enabled/Disabled ADWindowToolbar buttonsMethods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getDefinition, getDesktop, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getShadowVariable, getShadowVariable, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, query, queryAll, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride
Methods inherited from interface org.compiere.util.Evaluatee
get_ValueAsString
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Field Details
-
ON_ACTIVATE_EVENT
Activate/Deactivate event for IADTabpanel. Fire for init or after tab selection changed.- See Also:
-
ATTR_ON_ACTIVATE_POSTED
Component boolean attribute to indicate ON_ACTIVATE_EVENT have been posted for the current execution cycle- See Also:
-
-
Method Details
-
init
- Parameters:
winPanel
-gridTab
-
-
getDisplayLogic
String getDisplayLogic()- Returns:
- display logic
-
getTabLevel
int getTabLevel()- Returns:
- tab level
-
getTableName
String getTableName()- Returns:
- table name from GridTab
-
getRecord_ID
int getRecord_ID()- Returns:
- record ID of current row
-
isCurrent
boolean isCurrent()- Returns:
- true if refresh is not needed
-
getTitle
String getTitle()- Returns:
- title of tab
-
createUI
void createUI()Layout fields of the tab panel -
getGridTab
GridTab getGridTab()- Returns:
GridTab
instance that back this IADTabpanel instance
-
activate
void activate(boolean b) Activate/deactivate this IADTabpanel instance. Call by init or after tab selection changed.- Parameters:
b
-
-
query
void query()Execute query through the backedGridTab
instance. -
refresh
void refresh()Refresh data through the backedGridTab
instance. -
query
void query(boolean currentRows, int currentDays, int maxRows) - Parameters:
currentRows
-currentDays
-maxRows
-
-
switchRowPresentation
void switchRowPresentation()Switch between grid/list and form view -
dynamicDisplay
void dynamicDisplay(int col) Dynamic update of every field's UI properties ( visibility, filter and mandatory ).- Parameters:
col
- optional column name
-
afterSave
void afterSave(boolean onSaveEvent) Handle after save event- Parameters:
onSaveEvent
-
-
onEnterKey
boolean onEnterKey()Handle enter key event- Returns:
- true if the event is process
-
isGridView
boolean isGridView()- Returns:
- true if current presentation of the tab panel is grid/list view
-
isActivated
boolean isActivated()- Returns:
- true if the tab panel have been activated
-
setDetailPaneMode
void setDetailPaneMode(boolean detailMode) Turn on/off detail mode, i.e either tab panel is currently a header or detail tab of the UI.- Parameters:
detailMode
-
-
isDetailPaneMode
boolean isDetailPaneMode()- Returns:
- true if the panel is in detail mode (i.e a detail tab in DetailPane)
-
getGridView
GridView getGridView()- Returns:
GridView
instance
-
needSave
boolean needSave(boolean rowChange, boolean onlyRealChange) - Parameters:
rowChange
-onlyRealChange
-- Returns:
- true if there are pending changes
-
dataSave
boolean dataSave(boolean onSaveEvent) Save changes. CallGridTab.dataSave(boolean)
- Parameters:
onSaveEvent
-- Returns:
- true if the save operation completed successfully
-
setTabNo
void setTabNo(int tabNo) Set tab number/sequence within an AD_Window- Parameters:
tabNo
-
-
getTabNo
int getTabNo()- Returns:
- tab no ( ad_tab.tabno )
-
setDetailPane
Set theDetailPane
part that own this IADTabpanel instance- Parameters:
detailPane
-
-
getDetailPane
DetailPane getDetailPane()- Returns:
- the
DetailPane
part that own this IADTabpanel instance
-
resetDetailForNewParentRecord
void resetDetailForNewParentRecord()Reset detail data grid when parent tab current record is new and not saved yet. CallGridTab.resetDetailForNewParentRecord()
-
getTreePanel
ADTreePanel getTreePanel()- Returns:
ADTreePanel
instance
-
isEnableQuickFormButton
boolean isEnableQuickFormButton()- Returns:
- true if Quick Form Button is Enabled
-
isDetailVisible
default boolean isDetailVisible()Get is detail pane visible- Returns:
- true if the containing
DetailPane
instance is visible
-
getToolbarButtons
List<org.zkoss.zul.Button> getToolbarButtons()- Returns:
- List of toolbar buttons
-
isEnableCustomizeButton
boolean isEnableCustomizeButton()- Returns:
- true if customize grid button is enabled
-
isEnableProcessButton
default boolean isEnableProcessButton()- Returns:
- true if process Button is Enabled
-
updateToolbar
Enabled/Disabled ADWindowToolbar buttons- Parameters:
toolbar
- -ADWindowToolbar
-
updateDetailToolbar
void updateDetailToolbar(org.zkoss.zul.Toolbar toolbar) Enabled/DisabledDetailPane
toolbar buttons- Parameters:
toolbar
- -Toolbar
-