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
FieldsModifier and TypeFieldDescriptionprotected static final StringCell div component attribute to hold field column name valuestatic final StringEditor component attribute to store row index (absolute)Fields inherited from interface org.zkoss.zul.RowRendererExt
DETACH_ON_RENDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoiddoTry()voidEnter edit mode for current focus row.protected voidfocusToEditor(WEditor toFocus) Set focus to editorvoidSet 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.voidfocusToNextEditor(WEditor ref) Set focus to next writable editor from refintgetColumnIndex(GridField field) Get column index for fieldintorg.zkoss.zul.RowGet current rowintgetDisplayText(Object value, GridField gridField, int rowIndex) CallgetDisplayText(Object, GridField, int, boolean)with isForceGetValue = falseprotected StringgetDisplayTextWithEditorCheck(Object value, GridField gridField, int rowIndex) Check existence of readonly editor and return display textGet editor listbooleanIs current row in edit modeorg.zkoss.zk.ui.ComponentnewCell(org.zkoss.zul.Row row) org.zkoss.zul.RownewRow(org.zkoss.zul.Grid grid) voidonEvent(org.zkoss.zk.ui.event.Event event) voidRender data for row.voidsetADWindowPanel(AbstractADWindowContent windowPanel) Set AD window content part that own this renderer.
buttonListenerneed this to callAbstractADWindowContent.actionPerformed(ActionEvent).protected voidsetComponentStyle(org.zkoss.zk.ui.HtmlBasedComponent component, String style) Set component's style, sclass or zclass propertyvoidsetCurrentRow(org.zkoss.zul.Row row) Set current rowvoidsetGridPanel(GridView gridPanel) SetGridViewthat own this renderer.voidsetPaging(org.zkoss.zul.Paging paging) Set paging componentvoidstopEditing(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:
getControlsin interfaceorg.zkoss.zul.RowRendererExt- See Also:
-
RowRendererExt.getControls()
-
newCell
public org.zkoss.zk.ui.Component newCell(org.zkoss.zul.Row row) - Specified by:
newCellin interfaceorg.zkoss.zul.RowRendererExt- See Also:
-
RowRendererExt.newCell(Row)
-
newRow
public org.zkoss.zul.Row newRow(org.zkoss.zul.Grid grid) - Specified by:
newRowin interfaceorg.zkoss.zul.RowRendererExt- See Also:
-
RowRendererExt.newRow(Grid)
-
doCatch
- Specified by:
doCatchin interfaceorg.zkoss.zul.RendererCtrl- Throws:
Throwable- See Also:
-
RendererCtrl.doCatch(Throwable)
-
doFinally
public void doFinally()- Specified by:
doFinallyin interfaceorg.zkoss.zul.RendererCtrl- See Also:
-
RendererCtrl.doFinally()
-
doTry
public void doTry()- Specified by:
doTryin 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
SetGridViewthat 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.
buttonListenerneed this to callAbstractADWindowContent.actionPerformed(ActionEvent).- Parameters:
windowPanel-
-
onEvent
- Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>- Throws:
Exception
-