Class InfoPanel

java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Window
org.adempiere.webui.component.Window
org.adempiere.webui.panel.InfoPanel
All Implemented Interfaces:
Serializable, Cloneable, WTableModelListener, ISupportMask, IHelpContext, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.IdSpace, org.zkoss.zk.ui.sys.ComponentCtrl, org.zkoss.zul.ext.Framable, org.zkoss.zul.ext.Sortable<Object>
Direct Known Subclasses:
InfoAssetPanel, InfoAssignmentPanel, InfoBPartnerPanel, InfoCashLinePanel, InfoGeneralPanel, InfoInOutPanel, InfoInvoicePanel, InfoOrderPanel, InfoPaymentPanel, InfoProductPanel, InfoWindow

public abstract class InfoPanel extends Window implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, WTableModelListener, org.zkoss.zul.ext.Sortable<Object>, IHelpContext
Abstract base class for info panel and info window.
Info window that works in two mode.
Lookup mode: Popup dialog for a field. Search and return selection to lookup field.
Viewing mode: Independent popup or embedded window. Search and view search results. Optional support for execution of process.
Author:
Sendy Yagambrum, Elaine
See Also:
  • Field Details

    • ON_USER_QUERY_ATTR

      protected static final String ON_USER_QUERY_ATTR
      See Also:
    • INFO_QUERY_TIME_OUT_ERROR

      protected static final String INFO_QUERY_TIME_OUT_ERROR
      See Also:
    • COLUMN_VISIBLE_ORIGINAL

      protected static final String COLUMN_VISIBLE_ORIGINAL
      See Also:
    • ROW_CTX_VARIABLE_PREFIX

      protected static final String ROW_CTX_VARIABLE_PREFIX
      See Also:
    • ROW_ID_CTX_VARIABLE_NAME

      protected static final String ROW_ID_CTX_VARIABLE_NAME
      See Also:
    • btProcessList

      protected List<Button> btProcessList
    • editorMap

      protected Map<String,WEditor> editorMap
      Column:WEditor
    • PROCESS_ID_KEY

      protected static final String PROCESS_ID_KEY
      See Also:
    • ON_RUN_PROCESS

      protected static final String ON_RUN_PROCESS
      See Also:
    • ON_SELECT_ALL_RECORDS

      protected static final String ON_SELECT_ALL_RECORDS
      See Also:
    • ATT_INFO_PROCESS_KEY

      protected static final String ATT_INFO_PROCESS_KEY
      See Also:
    • pageSize

      protected int pageSize
    • m_values

      KeyNamePair/ValueNamePair:[Column:Value]
    • relatedInfoList

      protected InfoRelatedVO[] relatedInfoList
    • isIgnoreCacheAll

      protected boolean isIgnoreCacheAll
    • numPagePreLoad

      protected int numPagePreLoad
    • extra_max_row

      protected int extra_max_row
    • keyColumnOfView

      protected MInfoColumn keyColumnOfView
      MInfoColumn with isKey = true. In case no column has isKey = true, keyColumnOfView will be null and we use p_keyColumn
    • indexKeyOfView

      protected int indexKeyOfView
      index of keyColumnOfView in data model, set when prepare listbox
    • isIDColumnKeyOfView

      protected boolean isIDColumnKeyOfView
    • hasRightQuickEntry

      protected boolean hasRightQuickEntry
    • isHasNextPage

      protected boolean isHasNextPage
    • recordSelectedData

      protected Map<Object,List<Object>> recordSelectedData
      Value of Key Column:Values of Row.
      Store selected rows.
      If there's no key column of view, use value of p_keyColumn.
      Zk6.x listview deosn't send event when user click header checkbox to select all rows, so we can't manage selectedRecord all the time.
      Each time change page, we will update this list with current selected records of current page
      by calling function updateListSelected(). When move to zk7, enough to just handle onclick only.
      Because of the issue above, don't use recordSelectedData directly, call getSelectedRowInfo() instead.
    • isRequeryByRunSuccessProcess

      protected boolean isRequeryByRunSuccessProcess
      When re-query but don't want to clear selected record (example after run process), set this flag to true to run sync selected record. See also syncSelectedAfterRequery()
    • m_lookup

      protected boolean m_lookup
      true for lookup mode
    • m_infoWindowID

      protected int m_infoWindowID
      AD_InfoWindow_ID
    • confirmPanel

      protected ConfirmPanel confirmPanel
    • p_WindowNo

      protected int p_WindowNo
      Lookup mode: parent window number. Non lookup mode: register desktop tab number for this window
    • p_tableName

      protected String p_tableName
      Table Name
    • p_keyColumn

      protected String p_keyColumn
      Key Column Name
    • p_multipleSelection

      protected boolean p_multipleSelection
      Enable more than one selection
    • p_whereClause

      protected String p_whereClause
      Initial WHERE Clause
    • statusBar

      protected StatusBarPanel statusBar
    • p_layout

      protected ColumnInfo[] p_layout
      Layout of contentPanel
    • m_sqlMain

      protected String m_sqlMain
      Main SQL Statement
    • m_sqlCount

      protected String m_sqlCount
      Count SQL Statement
    • m_sqlOrder

      protected String m_sqlOrder
      Order By Clause
    • indexOrderColumn

      protected int indexOrderColumn
    • sqlOrderColumn

      protected String sqlOrderColumn
      sql column name of infocolumn (can be alias)
    • isColumnSortAscending

      protected Boolean isColumnSortAscending
    • p_loadedOK

      protected boolean p_loadedOK
      Loading success indicator
    • infoWindow

      protected MInfoWindow infoWindow
    • log

      protected transient CLogger log
      Logger
    • contentPanel

      protected WListbox contentPanel
    • paging

      protected org.zkoss.zul.Paging paging
    • pageNo

      protected int pageNo
    • m_count

      protected int m_count
    • m_gridfield

      protected GridField m_gridfield
    • isQueryByUser

      protected boolean isQueryByUser
      If false, use saved where clause. IDEMPIERE-1979
    • isAutoComplete

      protected boolean isAutoComplete
      true for auto complete call from lookup field
    • queryTimeout

      protected int queryTimeout
    • useQueryTimeoutFromSysConfig

      protected boolean useQueryTimeoutFromSysConfig
    • autoCompleteSearchColumn

      protected String autoCompleteSearchColumn
      column name for auto complete call
    • queryValue

      protected String queryValue
    • prevWhereClause

      protected String prevWhereClause
      saved where clause of previous query
    • prevParameterValues

      protected List<Object> prevParameterValues
      saved value of previous query parameters
    • prevQueryOperators

      protected List<String> prevQueryOperators
    • prevRefParmeterEditor

      protected List<WEditor> prevRefParmeterEditor
    • infoProcessList

      protected MInfoProcess[] infoProcessList
      Info processes of this infoWindow
    • haveProcess

      protected boolean haveProcess
      flag detect exists info process
    • infoProcessBtList

      protected List<MInfoProcess> infoProcessBtList
      Info process with style = button
    • infoProcessDropList

      protected List<MInfoProcess> infoProcessDropList
      Info process with style = drop down list
    • infoProcessMenuList

      protected List<MInfoProcess> infoProcessMenuList
      Info process with style = menu
    • m_viewIDMap

      protected Collection<NamePair> m_viewIDMap
      saved selected id and viewID
    • columnDataIndex

      protected Map<Integer,Integer> columnDataIndex
      AD_InfoColumn_ID:Index Column Sequence
      Store index of infoColumn that have been added.Index increase from 0.
    • isMustUpdateColumnIndex

      protected boolean isMustUpdateColumnIndex
      After loading of first record, set this to false.
      When need to update columnDataIndex, set this to true.
    • indexColumnCount

      protected int indexColumnCount
      Number of index column that have been added to columnDataIndex.
    • lsReadedColumn

      protected List<Integer> lsReadedColumn
      Before the start of reading of a row, reset this list.
      After reading of each column, store id of infoColumn to this list to prevent duplicate.
    • btCbbProcess

      protected Button btCbbProcess
      IDEMPIERE-1334 button and combobox when layout process button as dropdown list
    • cbbProcess

      protected Combobox cbbProcess
    • btMenuProcess

      protected Button btMenuProcess
    • m_rowSelectionOrder

      protected ArrayList<Object> m_rowSelectionOrder
      Contains the keys of the selected rows in the order of selection
    • m_selectedCount

      protected int m_selectedCount
      Number of selected rows
    • paraCtxValues

      protected HashMap<String,Object> paraCtxValues
      Parameter Name:Value Values that will be put into the context on re-query
    • VK_ENTER

      public static final int VK_ENTER
      See Also:
    • VK_ESCAPE

      public static final int VK_ESCAPE
      See Also:
  • Constructor Details

    • InfoPanel

      protected InfoPanel(int WindowNo, String tableName, String keyColumn, boolean multipleSelection, String whereClause)
      Parameters:
      WindowNo - WindowNo
      tableName - tableName
      keyColumn - keyColumn
      multipleSelection -
      whereClause - whereClause
    • InfoPanel

      protected InfoPanel(int WindowNo, String tableName, String keyColumn, boolean multipleSelection, String whereClause, boolean lookup)
      Parameters:
      WindowNo -
      tableName -
      keyColumn -
      multipleSelection -
      whereClause -
      lookup -
    • InfoPanel

      protected InfoPanel(int WindowNo, String tableName, String keyColumn, boolean multipleSelection, String whereClause, boolean lookup, int ADInfoWindowID)
      Parameters:
      WindowNo -
      tableName -
      keyColumn -
      multipleSelection -
      whereClause -
      lookup -
      ADInfoWindowID -
    • InfoPanel

      protected InfoPanel(int WindowNo, String tableName, String keyColumn, boolean multipleSelection, String whereClause, boolean lookup, int ADInfoWindowID, String queryValue)
      Parameters:
      WindowNo - WindowNo
      tableName - tableName
      keyColumn - keyColumn
      multipleSelection -
      whereClause - whereClause
      lookup -
      ADInfoWindowID -
      queryValue -
  • Method Details

    • create

      public static InfoPanel create(int WindowNo, String tableName, String keyColumn, String value, boolean multiSelection, String whereClause)
      Parameters:
      WindowNo -
      tableName -
      keyColumn -
      value -
      multiSelection -
      whereClause -
      Returns:
      InfoPanel
    • showPanel

      public static void showPanel(String tableName)
      Show panel based on tablename (non modal and not lookup)
      Parameters:
      tableName -
    • parseQueryValue

      protected void parseQueryValue()
      parse query value from calling input element
    • setFixedQueryTimeout

      public void setFixedQueryTimeout(int timeout)
      set fixed query timeout value, overwrite the value from sysconfig
      Parameters:
      timeout -
    • loadedOK

      public boolean loadedOK()
      Loaded correctly
      Returns:
      true if loaded OK
    • setStatusLine

      public void setStatusLine(String text, boolean error)
      Set Status Line
      Parameters:
      text - text
      error - error
    • setStatusDB

      public void setStatusDB(String text)
      Set status text for DB
      Parameters:
      text - text
    • setStatusSelected

      public void setStatusSelected()
      Set status text for selected rows
    • prepareTable

      protected void prepareTable(ColumnInfo[] layout, String from, String where, String orderBy)
      set up list box and construct sql clause
      Parameters:
      layout -
      from -
      where -
      orderBy -
    • isLoadPageNumber

      protected boolean isLoadPageNumber()
      Returns:
      true if number of page will be determined through record count.
    • executeQuery

      protected void executeQuery()
      Execute Query
    • appendDataForViewID

      protected void appendDataForViewID(ResultSet rs, List<Object> data, List<Integer> listReadedColumn) throws SQLException
      Append viewID column in infoProcessList to data.
      When override readData(ResultSet), should include call to this method. IDEMPIERE-1970
      Parameters:
      rs - result set to read data
      data - data line to append
      listReadedColumn - list of columns appended
      Throws:
      SQLException
    • appendDataForParentLink

      protected void appendDataForParentLink(ResultSet rs, List<Object> data, List<Integer> listReadedColumn) throws SQLException
      Append id column in related info list to data.
      When override readData(ResultSet), should include call to this method. IDEMPIERE-2152
      Parameters:
      rs -
      data -
      listReadedColumn -
      Throws:
      SQLException
    • appendDataForKeyView

      protected void appendDataForKeyView(ResultSet rs, List<Object> data, List<Integer> listReadedColumn) throws SQLException
      Append keyColumnOfView to data.
      When override readData(ResultSet), should include call to this method. IDEMPIERE-1970
      Parameters:
      rs - record set to read data
      data - data line to append
      listReadedColumn - list column is appended
      Throws:
      SQLException
    • appendInfoColumnData

      protected void appendInfoColumnData(ResultSet rs, List<Object> data, IInfoColumn[] listModelHasInfoColumn, List<Integer> listReadedColumn) throws SQLException
      Append value of infoColumn in listModelHaveInfoColumn to data.
      Parameters:
      rs - record set to read data
      data - data line to append
      listModelHasInfoColumn -
      listReadedColumn - list of columns appended
      Throws:
      SQLException
    • renderItems

      protected void renderItems()
      render list box items
    • autoHideEmptyColumns

      protected void autoHideEmptyColumns()
      auto hide empty columns
    • isAutoHideEmptyColumns

      protected boolean isAutoHideEmptyColumns()
      Returns:
      true if info window should auto hide empty columns
    • updateStatusBar

      protected void updateStatusBar(int no)
      update info window status text
      Parameters:
      no -
    • validateEndPage

      protected void validateEndPage()
      After query from database, validate paging (when paging is dynamic, ie isLoadPageNumber()==false)
      If end page include in cache, calculate total record read.
      If current page is out of cache, process query count to detect end page.
    • getSubList

      protected List<Object> getSubList(int fromIndex, int toIndex, List<Object> line)
      fromIndex and toIndex is calculate base on result from testCount().
      For example after testCount, the calculated number of page is 6 page.
      When user navigate to page 4. something change in database and we just get 5 page with current query parameter.
      So when user navigate to page 6. user will face with index issue (out of index or start index > end index).
      This function include fix for it.
      Parameters:
      fromIndex -
      toIndex -
      line -
      Returns:
      sub list from line
    • getOverIntValue

      protected int getOverIntValue(long value)
      When calculating value at bound of integer datatype, sometime value will overflow. This function calculate with higher data type to avoid the overflow issue.
      Parameters:
      value -
      Returns:
      int
    • getOverIntValue

      protected int getOverIntValue(long value, int extra)
      see getOverIntValue(long). when value >= max_value, set it near or equal to max_value.
      Parameters:
      value -
      extra - extra value to minus from max_value
      Returns:
      int
    • buildDataSQL

      protected String buildDataSQL(int start, int end)
      build sql clause with paging
      Parameters:
      start -
      end -
      Returns:
      sql clause
    • validateOrderIndex

      protected void validateOrderIndex()
      column index of grid isn't fix, it can change by display logic of column each time after loading of data InfoWindow.prepareTable(ColumnInfo[], String, String, String), so need to validate it by comparing the sql of current sort column
    • getUserOrderClause

      protected String getUserOrderClause()
      build order clause of current sort column, and save it to m_sqlUserOrder
      Returns:
      order clause
    • getUserOrderClause

      protected String getUserOrderClause(int col)
      Build order clause of given column index.
      If call init list will raise NPE.
      Parameters:
      col -
      Returns:
      order clause
    • getAlias

      public String getAlias(String tableName)
      Get alias of the table, or the table name
      Returns:
      String alias
    • insertPagingComponent

      protected void insertPagingComponent()
      add paging component for list box
    • getColumnHeader

      public Vector<String> getColumnHeader(ColumnInfo[] p_layout)
      Parameters:
      p_layout -
      Returns:
      column headers
    • testCount

      protected boolean testCount()
      Test Row Count
      Returns:
      true if display
    • saveSelection

      protected void saveSelection()
      Save Selection - Called by dispose
    • getSelectedRowKey

      protected <T extends Serializable> T getSelectedRowKey()
      Get the key of currently selected row
      Returns:
      selected key
    • getIntSelectedRowKey

      protected Integer getIntSelectedRowKey(int tableId)
      Get the integer key of currently selected row
      Parameters:
      tableId -
      Returns:
      selected key
    • getSelectedRowKeys

      protected <T extends Serializable> List<T> getSelectedRowKeys()
      Get the keys of selected rows
      Returns:
      selected IDs or UUIDs
    • getSelectedKeysCollection

      public Collection<Object> getSelectedKeysCollection()
      Deprecated.
      use getSaveKeys
      Get selected Keys as Collection
      Returns:
      selected keys (Integers)
    • getSaveKeys

      public Collection<NamePair> getSaveKeys(int infoColumnId)
      Add view id column (infoColumnId) to m_viewIDMap.
      Parameters:
      infoColumnId - view id column
    • isNeedAppendKeyViewData

      protected boolean isNeedAppendKeyViewData()
      need override at infoWindow to check isDisplay
      Returns:
      true if need to append keyColumnOfView to columnDataIndex
    • isIDColumn

      protected boolean isIDColumn(Object keyData, boolean isCheckNull)
      Check type of object is IDColumn
      Parameters:
      keyData -
      isCheckNull - when true, raise exception when data is null
      Returns:
      true if keyData is instanceof IDColumn
    • isIDColumn

      protected boolean isIDColumn(Object keyData)
      call isIDColumn(Object, boolean) without null check
      Parameters:
      keyData -
      Returns:
      true if keyData is instanceof IDColumn
    • updateListSelected

      protected void updateListSelected()
      Get all selected record of current page and update to recordSelectedData.
      Remove unselected record and add new selected record.
      We maintain value of key, and extra value append by appendInfoColumnData(ResultSet, List, IInfoColumn[], List)
    • getIndexKeyColumnOfView

      protected int getIndexKeyColumnOfView()
      get column index of keyView
      Returns:
      index of key column
    • restoreSelectedInPage

      protected void restoreSelectedInPage()
      go through all data record, in case key value is in recordSelectedData, mark it as selected record
    • onRestoreSelectedItemIndexInPage

      public boolean onRestoreSelectedItemIndexInPage(Object keyViewValue, int rowIndex, Object row)
      Hook to intercept 'restore selection' actions
      Parameters:
      keyViewValue - row view key
      rowIndex - row index
      row - row
      Returns:
      false to skip restore selection
    • getKeyNullException

      protected AdempiereException getKeyNullException()
    • getColumnValue

      protected Object getColumnValue(int rowIndex)
      Get keyView value at rowIndex.
      Exception is raise if value is null.
      Parameters:
      rowIndex -
      Returns:
      value of key column
    • syncSelectedAfterRequery

      protected void syncSelectedAfterRequery()
      Maintain selected record after re-query (for example after success run of a process).
      We must sync selected row, because some selected row maybe missing after re-query (change by process and no longer match with current query). TODO:rewrite, current code just reset isRequeryByRunSuccessProcess flag and didn't do anything else.
    • getSelectedRowInfo

      public Map<Object,List<Object>> getSelectedRowInfo()
      Returns:
      recordSelectedData after update
    • getSelectedKeys

      public Object[] getSelectedKeys()
      Get selected Keys
      Returns:
      selected keys (Integers)
    • getSelectedKey

      public Object getSelectedKey()
      Get (first) selected Key
      Returns:
      selected key
    • isCancelled

      public boolean isCancelled()
      Is cancelled? - if pressed Cancel = true - if pressed OK or window closed = false
      Returns:
      true if cancelled
    • getSelectedSQL

      public String getSelectedSQL()
      Get where clause for (first) selected key
      Returns:
      WHERE Clause
    • loadInfoWindowData

      protected void loadInfoWindowData()
      query ADInfoWindow from ADInfoWindowID
    • getTableName

      protected String getTableName()
      Get Table name Synonym
      Returns:
      table name
    • getKeyColumn

      protected String getKeyColumn()
      Get Key Column Name
      Returns:
      column name
    • getEvents

      public String[] getEvents()
      Returns:
      list of events
    • enableButtons

      protected void enableButtons()
      enable all control button or disable all depends on whether there are selected records.
    • enableButtons

      protected void enableButtons(boolean enable)
      enable or disable all control button Enable OK, History, Zoom if row/s selected --- Changes: Changed the logic for accommodating multiple selection author ashley
    • getSQLWhere

      protected abstract String getSQLWhere()
      Get dynamic WHERE part of SQL.
      When override this method, please take isQueryByUser and prevWhereClause into consideration.
      Returns:
      WHERE clause
    • setParameters

      protected abstract void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
      Set Parameters for Query.
      When override this method, please take isQueryByUser and prevWhereClause into consideration.
      Parameters:
      pstmt - statement
      forCount - for counting records
      Throws:
      SQLException
    • showHistory

      protected void showHistory()
      Show history dialog
    • hasHistory

      protected boolean hasHistory()
      Has History (default false). Override this and showHistory() method to add history dialog support.
      Returns:
      true if it has history (default false)
    • hasProcess

      protected boolean hasProcess()
      Returns:
      true if support running of process.
    • customize

      protected void customize()
      Show Customize dialog
    • hasCustomize

      protected boolean hasCustomize()
      Has Customize dialog (default false). Override this and customize() method to add customize dialog support.
      Returns:
      true if it has customize (default false)
    • hasZoom

      protected boolean hasZoom()
      Has Zoom support (default false)
      Returns:
      true if it has zoom support (default false)
    • hasNew

      protected boolean hasNew()
      Support create new record (default false)
      Returns:
      true if support create new record
    • saveSelectionDetail

      protected void saveSelectionDetail()
      Save Selection Details.
      This method is call when user close an info window.
      By default, infoWindow will set value of all column of current selected record to environment context with Env.TAB_INFO.
      Sub class can override this method to do more.
    • getAD_Window_ID

      protected int getAD_Window_ID(String tableName, boolean isSOTrx)
      Get Zoom Window
      Parameters:
      tableName - table name
      isSOTrx - sales trx
      Returns:
      AD_Window_ID
    • onEvent

      public void onEvent(org.zkoss.zk.ui.event.Event event)
      Specified by:
      onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
    • onCancel

      protected void onCancel()
      handle cancel event
    • onUserQuery

      public void onUserQuery()
      Call query when user click to query button enter in parameter field
    • validateParameters

      public boolean validateParameters()
      validate parameter before run query
      Returns:
      true if parameters pass validation
    • initParameters

      protected void initParameters()
      Call after loading of parameter panel to set initial value. Can call to reset parameters.
    • updateSubcontent

      protected void updateSubcontent()
      Update related info when selection in contentPanel change.
    • updateSubcontent

      protected void updateSubcontent(int targetRow)
      Update related info for a specific row. If targetRow < 0, update using selected row.
      Parameters:
      targetRow -
    • resetParameters

      protected void resetParameters()
      Reset parameter to default value or to empty value.
    • preRunProcess

      protected void preRunProcess(Integer processId)
      Before running of process
      Parameters:
      processId -
    • runProcess

      protected void runProcess(Object processIdObj)
      Run a process.
      Before start process, save id of record selected.
      After run of process, show process message report result.
      Parameters:
      processIdObj -
    • saveResultSelection

      protected void saveResultSelection(int infoColumnId)
      Save selected rows to m_values
      Parameters:
      infoColumnId - AD_InfoProcess.AD_InfoColumn_ID. Use as key column if > 0
    • createT_Selection_InfoWindow

      public void createT_Selection_InfoWindow(int AD_PInstance_ID)
      Insert selected rows to T_Selection_InfoWindow
      Parameters:
      AD_PInstance_ID -
    • getInfoColumnIDFromProcess

      protected int getInfoColumnIDFromProcess(int processId)
      Get InfoColumnID of infoProcess
      Parameters:
      processId -
      Returns:
      AD_InfoColumn_ID, -1 if processId not in infoProcessList
    • correctHeaderOrderIndicator

      protected void correctHeaderOrderIndicator()
      Set sort direction indicator
    • onQueryCallback

      public void onQueryCallback(org.zkoss.zk.ui.event.Event event)
      handle echo from query event
      Parameters:
      event - null to indicate reset instead of echo from query event
    • bindInfoProcess

      protected void bindInfoProcess()
      Evaluate display logic of processes. Implemented by sub class.
    • onOk

      protected void onOk()
      handle ok event
    • onDoubleClick

      protected void onDoubleClick()
      handle double click on row event
    • tableChanged

      public void tableChanged(WTableModelEvent event)
      Description copied from interface: WTableModelListener
      Notify listeners the exact range of cells, rows, or columns that have changed.
      Specified by:
      tableChanged in interface WTableModelListener
      Parameters:
      event - table model event
    • zoom

      public void zoom()
      zoom to record
    • newRecordAction

      protected void newRecordAction()
      Handle user click on new record button.
    • addValueChangeListener

      public void addValueChangeListener(ValueChangeListener listener)
      Parameters:
      listener -
    • fireValueChange

      public void fireValueChange(ValueChangeEvent event)
      Fire ValueChangeEvent event.
      Parameters:
      event -
    • dispose

      public void dispose(boolean ok)
      Dispose and save Selection
      Parameters:
      ok - true if OK pressed
    • sort

      public void sort(Comparator<Object> cmpr, boolean ascending)
      Specified by:
      sort in interface org.zkoss.zul.ext.Sortable<Object>
      Parameters:
      cmpr - WListItemRenderer.ColumnComparator
      ascending -
    • isLookup

      public boolean isLookup()
      Returns:
      true if this is a lookup dialog
    • scrollToSelectedRow

      public void scrollToSelectedRow()
      scroll selected row into view (i.e make sure it is visible)
    • getSortDirection

      public String getSortDirection(Comparator<Object> cmpr)
      Specified by:
      getSortDirection in interface org.zkoss.zul.ext.Sortable<Object>
    • getWindowNo

      public int getWindowNo()
      Returns:
      window no
    • getRowCount

      public int getRowCount()
      Returns:
      row count
    • getFirstRowKey

      public Object getFirstRowKey()
      Returns:
      first row key/id
    • getRowKeyAt

      public Object getRowKeyAt(int row)
      Parameters:
      row -
      Returns:
      row key/id
    • getCacheStart

      protected int getCacheStart()
      Returns:
      the cacheStart
    • getCacheEnd

      protected int getCacheEnd()
      Returns:
      the cacheEnd
    • isUseDatabasePaging

      protected boolean isUseDatabasePaging()
      Returns:
      true if using database paging feature
    • onPageAttached

      public void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
      Specified by:
      onPageAttached in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      onPageAttached in class org.zkoss.zk.ui.AbstractComponent
    • onPageDetached

      public void onPageDetached(org.zkoss.zk.ui.Page page)
      Specified by:
      onPageDetached in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      onPageDetached in class Window
    • getGridfield

      public GridField getGridfield()
      field call this info panel as search editor null in case info window open in stand-alone window (from menu, fav,...)
      Returns:
      GridField
    • setGridfield

      public void setGridfield(GridField m_gridfield)
      Parameters:
      m_gridfield -
    • getPageSize

      public int getPageSize()
      Returns:
      page size (number of rows per page)
    • isCloseAfterExecutionOfProcess

      public boolean isCloseAfterExecutionOfProcess()
      Returns:
      true if dialog should auto close after successful execution of process
    • setCloseAfterExecutionOfProcess

      public void setCloseAfterExecutionOfProcess(boolean closeAfterExecutionOfProcess)
      Set whether dialog should auto close after successful execution of process
      Parameters:
      closeAfterExecutionOfProcess -
    • setMultipleSelection

      public void setMultipleSelection(boolean multipleSelection)
      Parameters:
      multipleSelection -
    • getStatusLinesWidget

      public String getStatusLinesWidget()
      Widget support Depending on Window/Tab returns widget lines info
      Returns:
      info
    • updateRowSelectionOrder

      protected void updateRowSelectionOrder()
      Update row selection order
    • updateContext

      protected void updateContext(boolean checkQueryCriteria)
      Put values from the selected row into the context
    • setContext

      protected void setContext(String columnName, Object value)
      Set context
      Parameters:
      columnName -
      value -
    • getSelectedIDsForCtx

      protected String getSelectedIDsForCtx()
      Get a comma-separated string of selected IDs
      Returns:
      String ctx value
    • getLastSelectedRow

      protected List<Object> getLastSelectedRow()
      Get last selected row
      Returns:
      List