psdi.webclient.system.controller

Class PageInstance

    • Field Detail

      • markForDesigner

        public boolean markForDesigner
      • menuHandlerId

        public java.lang.String menuHandlerId
      • processTabIndex

        public java.util.Map processTabIndex
      • DOMAINS

        public java.lang.String DOMAINS
      • SHARED_ATTRIBUTES

        public java.lang.String SHARED_ATTRIBUTES
      • LOOKUP_RENDERID

        public static java.lang.String LOOKUP_RENDERID
    • Constructor Detail

      • PageInstance

        public PageInstance()
    • Method Detail

      • get

        public java.lang.Object get(java.lang.Object key)
      • render

        public int render()
                   throws java.lang.NoSuchMethodException,
                          java.lang.IllegalAccessException,
                          java.lang.reflect.InvocationTargetException
        Description copied from class: ControlInstance
        Render this control's components
        Overrides:
        render in class DatasrcInstance
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • clearMenus

        public void clearMenus()
      • togglewebreplay

        public int togglewebreplay()
      • showWebReplay

        public int showWebReplay()
        Turn on the Web Replay if it is enabled
      • hideWebReplay

        public int hideWebReplay()
        Hide Web Replay
      • put

        public java.lang.Object put(java.lang.Object key,
                                    java.lang.Object value)
      • remove

        public java.lang.Object remove(java.lang.Object key)
      • setReloadAutoFillInfo

        public void setReloadAutoFillInfo(boolean bool)
      • shouldReloadAutoFillInfo

        public boolean shouldReloadAutoFillInfo()
      • containsKey

        public boolean containsKey(java.lang.Object key)
      • initialize

        public void initialize(WebClientSession wcs,
                               AppInstance ai,
                               org.w3c.dom.Element page)
        creates page instance takes care of instantiating ControlInstance objects for each control in the page (page/dialog/etc) we do this at a page scope as required.
      • addSharedAttributes

        public java.lang.String addSharedAttributes(UIERMAttribute ermAttr,
                                                    java.lang.String renderId)
      • getIndexForErmName

        public java.lang.Integer getIndexForErmName(UIERMAttribute ermAttr)
      • getAutoFillInfo

        public com.ibm.json.java.JSONObject getAutoFillInfo()
      • processTabs

        public void processTabs(WebClientSession wcs,
                                org.w3c.dom.Element tabs,
                                java.lang.String tabName,
                                DatasrcInstance parent,
                                boolean init)
      • isThisTabProcessed

        public boolean isThisTabProcessed(java.lang.String tabName)
      • gotoTab

        public int gotoTab(java.lang.String tabType)
        Finds the first (and supposedly the only) tab group that has property style set to "form" and sets the current tab to be the first tab of tabType. This cannot be done during initialization as when startab is set the page is wholly initialized; it is necessary to go this way as there are app beans that set the property, while setting it has a result of setting another property that is queried in app beans

        The method can be called at any time to change the current tab

        The method is intended to be used on only the main page of an application, not in dialogs

        Parameters:
        tabType - the type of the tab to go to, such as "list", "insert"
      • getBeans

        public java.util.ArrayList getBeans()
        Returns:
        an ArrayList of all the DataBeans created on the page
      • getPageId

        public java.lang.String getPageId()
        Deprecated. FIREFOX
        TO REPLACE: use getId()
        See Also:
        psdi.webclient.system.controller.PageInstance.getId()
      • createControlInstances

        public void createControlInstances(org.w3c.dom.Element element,
                                           ControlInstance parent)
        Method that instantiates a control instance based on the class defined in the control descriptor (and in turn, a hierarchical structure of component instance objects according to the component-list in the control descriptor). when the instances are created they are stored in a flat index that is kept by the page instance. this index is used to quickly return the instance for a particular id. both the control instance index AND the component instance index return a control instance. this method is recursive and will create an entire control instance structure when the element passed has children. in practical use, a page element is passed to this method and an entire control instance structure is built for it.
        See Also:
        the component instance index resolves to a control because events will be sent from the browser and the target id will be the component id, but the framework exercises the event on the control
      • createControlInstances

        public void createControlInstances(org.w3c.dom.Element element,
                                           ControlInstance parent,
                                           int index)
      • createRuntimeControlInstance

        public ControlInstance createRuntimeControlInstance(java.lang.String id,
                                                            java.lang.String type,
                                                            ControlInstance parent)
        this method will create individual control instances (and the related component structure) on the fly and add them to the control hierarchy the control instances are created AFTER the xml for the app is loaded, so if any properties need to be set on the control and passed down to the components (normally happens when the app instance is built), reloadComponentProperties() will have to be called
        Parameters:
        id - of the control to be created
        type - of the control to be created
        parent - of the control to be created @ de precated - should use the one that takes ControlProperties as a parameter... it does all the initialization for you
        See Also:
        ControlInstance.reloadComponentProperties()
      • createDesignerControlInstances

        public void createDesignerControlInstances(org.w3c.dom.Element element,
                                                   ControlInstance parent)
        Method that instantiates a control instance based on the class defined in the control descriptor (and in turn, a hierarchical structure of component instance objects according to the component-list in the control descriptor). when the instances are created they are stored in a flat index that is kept by the page instance. this index is used to quickly return the instance for a particular id. both the control instance index AND the component instance index return a control instance. This method is recursive and will create an entire control instance structure when the element passed has children. in practical use, a page element is passed to this method and an entire control instance structure is built for it.
        See Also:
        the component instance index resolves to a control because events will be sent from the browser and the target id will be the component id, but the framework exercises the event on the control
      • createDesignerControlInstances

        public java.lang.String createDesignerControlInstances(org.w3c.dom.Element element,
                                                               ControlInstance parent,
                                                               int idx)
      • createControlInstance

        public ControlInstance createControlInstance(org.w3c.dom.Element element,
                                                     ControlInstance parent)
        used to create individual control instances based on an element and have them added to the instance index. will create component instances for the control as well.
      • getControlInstance

        public ControlInstance getControlInstance(java.lang.String id)
        method to return a particular ControlInstance from the PageInstance
      • setControlInstance

        public void setControlInstance(java.lang.String id,
                                       BaseInstance ci)
        MM method to set particular ControlInstance from the PageInstance
      • getComponentInstance

        public ComponentInstance getComponentInstance(java.lang.String id)
        method to return a particular ComponentInstance from the PageInstance
      • setComponentInstance

        public void setComponentInstance(java.lang.String id,
                                         BaseInstance coi)
        MM method to set particular ComponentInstance from the PageInstance
      • stopFocus

        public void stopFocus()
      • focus

        public boolean focus()
      • focusOnLast

        public void focusOnLast()
        Sets focus to the field on the current page which was last changed.
      • removeControl

        public boolean removeControl(java.lang.String id)
      • setMarkForDesigner

        public void setMarkForDesigner(boolean flag)
      • addControlInstanceToIndex

        public void addControlInstanceToIndex(java.lang.String id,
                                              ControlInstance controlInst)
      • getMenuHandlerId

        public java.lang.String getMenuHandlerId()
      • getFocusableList

        public java.util.ArrayList getFocusableList()
        Returns an ArrayList of focusable Components in the order in which they were created on the page.
      • getFocusRenderId

        public java.lang.String getFocusRenderId()
      • getFocusRenderId

        public java.lang.String getFocusRenderId(boolean last)
      • resetwizard

        public int resetwizard()
        Resets the wizard tabgroup back the the first tab.
      • toggleViewport

        public void toggleViewport()
        toggle the showViewport boolean page.jsp will call showViewport() to determine whether to show the viewport in designer
      • showViewport

        public boolean showViewport()
        called by page.jsp to determine whether to show the viewport in designer
        Returns:
        bool if true, show viewport
      • removeAttributeError

        public void removeAttributeError(ERMAttributeError attributeError)
        Removes the ERMAttributeError from the page's list.
      • setAttributeError

        public void setAttributeError(ERMAttributeError attributeError)
        Add the ERMAttributeError to the page's list.
      • getErrorLevel

        public int getErrorLevel()
        Returns the error level of the page
        Overrides:
        getErrorLevel in class ControlInstance
        Returns:
      • addChangedErrorContainer

        public void addChangedErrorContainer(java.lang.String id,
                                             java.lang.String errorType)
        Used to add to the list of containers that can show errors within themselves
      • getChangedErrorContainers

        public java.util.Map getChangedErrorContainers()
        Used to get the list of containers that can show errors within themselves
      • clearChangedErrorContainers

        public void clearChangedErrorContainers()
        Used to clear the list so next time it will only contain ones that have actually changed.
      • addDataStoreForAutoFill

        public void addDataStoreForAutoFill(DataStoreInfo dataStoreInfo)
        Adds the DataStoreInfo to the list of datastores that will need to be written out in the AutoFill JSON structure sent to the client
      • getPageAutoFillId

        public java.lang.String getPageAutoFillId()
      • setPageAutoFillId

        public void setPageAutoFillId(java.lang.String autoFillId)
        Parameters:
        autoFillId - the autoFillId to set
      • addDataBeanToSiteOrgList

        public void addDataBeanToSiteOrgList(DataBean dataBean)
        Adds the DataBean to the page's list of DataBean that have domains that filter on siteid and/or orgid so the page can write out the values in the autofillinfo object to be used by the datastores for filtering.
        Parameters:
        dataBean - The DataBean to add to the list
      • setMainTab

        public void setMainTab(java.lang.String tabGroupId)
      • getMainTabId

        public java.lang.String getMainTabId()
      • setDialogDataStores

        public void setDialogDataStores(java.util.List createdDataStores)
      • getDialogDataStores

        public java.util.List getDialogDataStores()
      • isLookup

        public boolean isLookup()
      • clearFocusContainer

        public void clearFocusContainer()
      • getCountForBBIcon

        public int getCountForBBIcon()
                              throws MXException,
                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException