Package org.adempiere.webui.adwindow
Class GridTabRowRenderer
java.lang.Object
org.adempiere.webui.adwindow.GridTabRowRenderer
- All Implemented Interfaces:
org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
,org.zkoss.zul.RendererCtrl
,org.zkoss.zul.RowRenderer<Object[]>
,org.zkoss.zul.RowRendererExt
public class GridTabRowRenderer
extends Object
implements org.zkoss.zul.RowRenderer<Object[]>, org.zkoss.zul.RowRendererExt, org.zkoss.zul.RendererCtrl, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
Row renderer for GridTab grid.
- Author:
- hengsin, Teo Sarca, teo.sarca@gmail.com
- BF [ 2996608 ] GridPanel is not displaying time https://sourceforge.net/p/adempiere/zk-web-client/420/
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
Cell div component attribute to hold field column name valuestatic final String
Editor component attribute to store row index (absolute)Fields inherited from interface org.zkoss.zul.RowRendererExt
DETACH_ON_RENDER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
doTry()
void
Enter edit mode for current focus row.protected void
focusToEditor
(WEditor toFocus) Set focus to editorvoid
Set focus to first writable field editor (or default focus field editor if it is writable).
If no field editor is writable, set focus to first visible field editor.void
focusToNextEditor
(WEditor ref) Set focus to next writable editor from refint
getColumnIndex
(GridField field) Get column index for fieldint
org.zkoss.zul.Row
Get current rowint
getDisplayText
(Object value, GridField gridField, int rowIndex) CallgetDisplayText(Object, GridField, int, boolean)
with isForceGetValue = falseprotected String
getDisplayTextWithEditorCheck
(Object value, GridField gridField, int rowIndex) Check existence of readonly editor and return display textGet editor listboolean
Is current row in edit modeorg.zkoss.zk.ui.Component
newCell
(org.zkoss.zul.Row row) org.zkoss.zul.Row
newRow
(org.zkoss.zul.Grid grid) void
onEvent
(org.zkoss.zk.ui.event.Event event) void
Render data for row.void
setADWindowPanel
(AbstractADWindowContent windowPanel) Set AD window content part that own this renderer.
buttonListener
need this to callAbstractADWindowContent.actionPerformed(ActionEvent)
.protected void
setComponentStyle
(org.zkoss.zk.ui.HtmlBasedComponent component, String style) Set component's style, sclass or zclass propertyvoid
setCurrentRow
(org.zkoss.zul.Row row) Set current rowvoid
setGridPanel
(GridView gridPanel) SetGridView
that own this renderer.void
setPaging
(org.zkoss.zul.Paging paging) Set paging componentvoid
stopEditing
(boolean updateCellLabel) Detach all editor and optionally set the current value of the editor as cell label.
-
Field Details
-
COLUMN_NAME_ATTR
Cell div component attribute to hold field column name value- See Also:
-
GRID_ROW_INDEX_ATTR
Editor component attribute to store row index (absolute)- See Also:
-
-
Constructor Details
-
GridTabRowRenderer
- Parameters:
gridTab
-windowNo
-
-
-
Method Details
-
getColumnIndex
Get column index for field- Parameters:
field
-- Returns:
- column index for field, -1 if not found
-
getDisplayTextWithEditorCheck
Check existence of readonly editor and return display text- Parameters:
value
-gridField
-rowIndex
-- Returns:
- display text
-
getDisplayText
CallgetDisplayText(Object, GridField, int, boolean)
with isForceGetValue = false- Parameters:
value
-gridField
-rowIndex
-- Returns:
- display text
-
setComponentStyle
Set component's style, sclass or zclass property- Parameters:
component
-style
- "@sclass=" for sclass for "@zclass=" for zclass. default to style if there's no prefix.
-
getEditors
Get editor list- Returns:
- field editor list
-
setPaging
public void setPaging(org.zkoss.zul.Paging paging) Set paging component- Parameters:
paging
-
-
stopEditing
public void stopEditing(boolean updateCellLabel) Detach all editor and optionally set the current value of the editor as cell label.- Parameters:
updateCellLabel
-
-
render
Render data for row. -
setCurrentRow
public void setCurrentRow(org.zkoss.zul.Row row) Set current row- Parameters:
row
-
-
getCurrentRow
public org.zkoss.zul.Row getCurrentRow()Get current row- Returns:
- current
Row
-
getCurrentRowIndex
public int getCurrentRowIndex()- Returns:
- current row index ( absolute )
-
editCurrentRow
public void editCurrentRow()Enter edit mode for current focus row. -
getControls
public int getControls()- Specified by:
getControls
in interfaceorg.zkoss.zul.RowRendererExt
- See Also:
-
RowRendererExt.getControls()
-
newCell
public org.zkoss.zk.ui.Component newCell(org.zkoss.zul.Row row) - Specified by:
newCell
in interfaceorg.zkoss.zul.RowRendererExt
- See Also:
-
RowRendererExt.newCell(Row)
-
newRow
public org.zkoss.zul.Row newRow(org.zkoss.zul.Grid grid) - Specified by:
newRow
in interfaceorg.zkoss.zul.RowRendererExt
- See Also:
-
RowRendererExt.newRow(Grid)
-
doCatch
- Specified by:
doCatch
in interfaceorg.zkoss.zul.RendererCtrl
- Throws:
Throwable
- See Also:
-
RendererCtrl.doCatch(Throwable)
-
doFinally
public void doFinally()- Specified by:
doFinally
in interfaceorg.zkoss.zul.RendererCtrl
- See Also:
-
RendererCtrl.doFinally()
-
doTry
public void doTry()- Specified by:
doTry
in interfaceorg.zkoss.zul.RendererCtrl
- See Also:
-
RendererCtrl.doTry()
-
focusToFirstEditor
public void focusToFirstEditor()Set focus to first writable field editor (or default focus field editor if it is writable).
If no field editor is writable, set focus to first visible field editor. -
focusToEditor
Set focus to editor- Parameters:
toFocus
-
-
focusToNextEditor
Set focus to next writable editor from ref- Parameters:
ref
-
-
setGridPanel
SetGridView
that own this renderer.- Parameters:
gridPanel
-
-
isEditing
public boolean isEditing()Is current row in edit mode- Returns:
- true if current row is in edit mode, false otherwise
-
setADWindowPanel
Set AD window content part that own this renderer.
buttonListener
need this to callAbstractADWindowContent.actionPerformed(ActionEvent)
.- Parameters:
windowPanel
-
-
onEvent
- Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Throws:
Exception
-