Class InfoWindow

    • Constructor Detail

      • InfoWindow

        public InfoWindow​(int WindowNo,
                          String tableName,
                          String keyColumn,
                          String queryValue,
                          boolean multipleSelection,
                          String whereClause,
                          int AD_InfoWindow_ID)
        Parameters:
        WindowNo -
        tableName -
        keyColumn -
        multipleSelection -
        whereClause -
      • InfoWindow

        public InfoWindow​(int WindowNo,
                          String tableName,
                          String keyColumn,
                          String queryValue,
                          boolean multipleSelection,
                          String whereClause,
                          int AD_InfoWindow_ID,
                          boolean lookup)
        Parameters:
        WindowNo -
        tableName -
        keyColumn -
        multipleSelection -
        whereClause -
        lookup -
      • InfoWindow

        public InfoWindow​(int WindowNo,
                          String tableName,
                          String keyColumn,
                          String queryValue,
                          boolean multipleSelection,
                          String whereClause,
                          int AD_InfoWindow_ID,
                          boolean lookup,
                          GridField field)
        Parameters:
        WindowNo -
        tableName -
        keyColumn -
        queryValue -
        multipleSelection -
        whereClause -
        AD_InfoWindow_ID -
        lookup -
        field -
      • InfoWindow

        public InfoWindow​(int WindowNo,
                          String tableName,
                          String keyColumn,
                          String queryValue,
                          boolean multipleSelection,
                          String whereClause,
                          int AD_InfoWindow_ID,
                          boolean lookup,
                          GridField field,
                          String predefinedContextVariables)
        Parameters:
        WindowNo -
        tableName -
        keyColumn -
        queryValue -
        multipleSelection -
        whereClause -
        AD_InfoWindow_ID -
        lookup -
        field -
        predefinedContextVariables -
    • Method Detail

      • updateSubcontent

        protected void updateSubcontent​(int row)
        Update relate info for a specific row, if targetRow < 0 update using selected row
        Overrides:
        updateSubcontent in class InfoPanel
      • initInfoProcess

        protected void initInfoProcess()
        IDEMPIERE-1334 load info process info separate by layout type init drop list and menu control set status of haveProcess flag
      • bindInfoProcess

        protected void bindInfoProcess()
        evaluate display logic of button process empty method. implement at child class extend
        Overrides:
        bindInfoProcess in class InfoPanel
      • bindInfoProcessBt

        protected void bindInfoProcessBt()
        evel display logic of process info button set visible of button base in display logic when two button set for same process, two button can hiden too, or display too. this is bug of implementor by never have this case
      • bindInfoProcessDropDown

        protected void bindInfoProcessDropDown()
        recreate drop down item by recreate model to set hiden, display of drop down item when all item is hiden, hiden combobox and process button too
      • bindInfoProcessMenu

        protected void bindInfoProcessMenu()
        recreate menu item by set hiden, display of menu item when all menu item is hiden, hiden process menu button too
      • processQueryValue

        protected void processQueryValue()
      • loadInfoWindowData

        protected void loadInfoWindowData()
        Description copied from class: InfoPanel
        query ADInfoWindow from ADInfoWindowID
        Overrides:
        loadInfoWindowData in class InfoPanel
      • loadInfoDefinition

        protected boolean loadInfoDefinition()
      • loadInfoRelatedTabs

        protected boolean loadInfoRelatedTabs()
      • prepareTable

        protected void prepareTable()
      • getSQLWhere

        protected String getSQLWhere()
        Description copied from class: InfoPanel
        Get dynamic WHERE part of SQL To be overwritten by concrete classes When override this method, please consider isQueryByUser and prevWhereClause
        Specified by:
        getSQLWhere in class InfoPanel
        Returns:
        WHERE clause
      • isParameteChangeValue

        protected boolean isParameteChangeValue()
        Check has new parameter is change or new input in case first time search, return true
        Returns:
      • setParameters

        protected void setParameters​(PreparedStatement pstmt,
                                     boolean forCount)
                              throws SQLException
        Description copied from class: InfoPanel
        Set Parameters for Query To be overwritten by concrete classes When override this method, please consider isQueryByUser and prevWhereClause
        Specified by:
        setParameters in class InfoPanel
        Parameters:
        pstmt - statement
        forCount - for counting records
        Throws:
        SQLException
      • setParameter

        protected void setParameter​(PreparedStatement pstmt,
                                    int parameterIndex,
                                    Object value,
                                    String queryOperator)
                             throws SQLException
        set parameter for statement. not need check null for value
        Parameters:
        pstmt -
        parameterIndex -
        value -
        queryOperator -
        Throws:
        SQLException
      • addViewIDToQuery

        protected void addViewIDToQuery()
        add all ViewID in each MInfoProcess to query if main query have subquery in SELECT, it will beak or incorrect
      • addKeyViewToQuery

        protected void addKeyViewToQuery()
        if InfoPanel.keyColumnOfView not null and not display, add query to query it's value
      • isNeedAppendKeyViewData

        public boolean isNeedAppendKeyViewData()
        Description copied from class: InfoPanel
        need overrider at infoWindow to check isDisplay
        Overrides:
        isNeedAppendKeyViewData in class InfoPanel
        Returns:
      • addMoreColumnToQuery

        protected String addMoreColumnToQuery​(String sqlMain,
                                              IInfoColumn[] listInfoColumn)
        because data of infoColumn have isDisplay = false not load, just display column is load to show in List. Some function receive data from hidden column as viewID in infoProcess or parentLink of infoRelateWindow. this function just add column name of hidden infoWindow to end of query
        Parameters:
        sqlMain - main sql to append column
        listInfoColumn - list of PO contain infoColumnID, this infoColumnID will add to query
        Returns:
        sql after append column
      • renderWindow

        protected void renderWindow()
      • renderFooter

        protected void renderFooter​(org.zkoss.zul.South south)
      • renderContentPane

        protected void renderContentPane​(org.zkoss.zul.Center center)
      • renderParameterPane

        protected void renderParameterPane​(org.zkoss.zul.North north)
      • createParameterPanel

        protected void createParameterPanel()
      • layoutParameterGrid

        protected void layoutParameterGrid​(boolean update)
      • evalDisplayLogic

        protected void evalDisplayLogic()
      • addSelectionColumn

        protected void addSelectionColumn​(InfoColumnVO infoColumn,
                                          GridField mField)
        Add Selection Column to first Tab
        Parameters:
        infoColumn -
        mField - field
      • addSearchParameter

        protected void addSearchParameter​(Label label,
                                          org.zkoss.zk.ui.Component fieldEditor)
      • getNoOfParameterColumns

        protected int getNoOfParameterColumns()
      • createAndCheckbox

        protected void createAndCheckbox()
      • findColumnIndex

        protected int findColumnIndex​(String columnName)
      • saveSelectionDetail

        protected void saveSelectionDetail()
        Save Selection Details Get Location/Partner Info
        Overrides:
        saveSelectionDetail in class InfoPanel
      • hasZoom

        protected boolean hasZoom()
        Description copied from class: InfoPanel
        Has Zoom (false) To be overwritten by concrete classes
        Overrides:
        hasZoom in class InfoPanel
        Returns:
        true if it has zoom (default false)
      • dynamicDisplay

        protected void dynamicDisplay​(WEditor editor)
      • 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>
        Overrides:
        onEvent in class InfoPanel
      • 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 InfoPanel
      • onClientInfo

        protected void onClientInfo()
      • testCount

        protected boolean testCount()
        Test Row Count
        Overrides:
        testCount in class InfoPanel
        Returns:
        true if display
      • testCount

        protected boolean testCount​(boolean promptError)
        Test Row Count
        Returns:
        true if display
      • getInfoColumnslayout

        public ArrayList<ColumnInfo> getInfoColumnslayout​(MInfoWindow info)
        author xolali IDEMPIERE-1045 getInfoColumnslayout(MInfoWindow info)
        Parameters:
        info -
        Returns:
      • reset

        protected void reset​(EmbedWinInfo relatedInfo)
        reset to empty
        Parameters:
        relatedInfo -
      • getGridField

        protected GridField getGridField​(InfoColumnVO infoColumn)
        author xolali IDEMPIERE-1045 GridField getGridField(InfoColumnVO infoColumn)
        Parameters:
        infoColumn -
        Returns:
      • validateParameters

        public boolean validateParameters()
        validate parameter before run query eval input value of mandatory field, if null show field in red color
        Overrides:
        validateParameters in class InfoPanel
        Returns:
      • validateField

        protected boolean validateField​(WEditor wEditor)
        valid mandatory of a not null, display field display red color when a mandatory field is not input
        Parameters:
        wEditor -
        Returns:
      • hasNew

        protected boolean hasNew()
        Description copied from class: InfoPanel
        Has new function for create new record (false) To be overwritten by concrete classes
        Overrides:
        hasNew in class InfoPanel
        Returns:
      • getADWindowID

        protected int getADWindowID()
        Get id of window link with main table of this info window
        Returns:
      • newRecordAction

        protected void newRecordAction()
        Description copied from class: InfoPanel
        process action when user click to new button
        Overrides:
        newRecordAction in class InfoPanel
      • setSouthVisible

        protected void setSouthVisible​(boolean visible)
        Allow to show or hide the sub panel (detail) programmatically
      • getRowaAsCtx

        public Properties getRowaAsCtx​(int row,
                                       int editingColumn,
                                       Object editingValue)
      • restoreOriginalValues

        protected void restoreOriginalValues​(int rowIndex)
      • cacheOriginalValues

        protected void cacheOriginalValues​(int rowIndex)
      • onQueryCallback

        public void onQueryCallback​(org.zkoss.zk.ui.event.Event event)
        Overrides:
        onQueryCallback in class InfoPanel
      • onRestoreSelectedItemIndexInPage

        public boolean onRestoreSelectedItemIndexInPage​(Integer keyViewValue,
                                                        int rowIndex,
                                                        Object oRow)
        Description copied from class: InfoPanel
        Hook to intercept 'restore selection' actions
        Overrides:
        onRestoreSelectedItemIndexInPage in class InfoPanel
        Parameters:
        keyViewValue - row view key
        rowIndex - row index
        oRow - row
        Returns:
        false to skip restore selection
      • initExport

        protected void initExport()
      • enableExportButton

        protected void enableExportButton()