psdi.webclient.system.controller

Class BaseInstance

  • java.lang.Object
    • psdi.webclient.system.controller.BaseInstance
    • Field Detail

      • EXCEPTION_REQUIREDFIELD

        public static final int EXCEPTION_REQUIREDFIELD
        See Also:
        Constant Field Values
      • PROMPT_WHEN_WARNING_EXIST

        public static final int PROMPT_WHEN_WARNING_EXIST
        See Also:
        Constant Field Values
      • properties

        protected java.util.Map properties
      • type

        protected java.lang.String type
      • changedProperties

        protected java.util.ArrayList changedProperties
      • presentationTags

        public java.util.HashMap presentationTags
        Deprecated. 
    • Constructor Detail

      • BaseInstance

        public BaseInstance()
    • Method Detail

      • getId

        public java.lang.String getId()
        Returns:
        Returns the id.
      • getSafeId

        public java.lang.String getSafeId()
        Dojo/js does not allow "-" in variable id's but to keep them unique, we need to use the id. This method replaces the "-" with "_" so we can use it
        Returns:
        String - ID with all "-" replaced with "_"
      • setRenderId

        public void setRenderId(java.lang.String id)
      • getRenderId

        public java.lang.String getRenderId()
      • addChild

        public void addChild(BaseInstance child,
                             int index)
      • getChildren

        public java.util.List getChildren()
      • clearChildren

        public void clearChildren()
      • getParentInstance

        public BaseInstance getParentInstance()
        Returns:
        Returns the parent.
      • setParent

        public void setParent(BaseInstance parent)
        Parameters:
        parent - The parent to set.
      • hasLocalProperty

        public boolean hasLocalProperty(java.lang.String key)
      • isOnTableRow

        public boolean isOnTableRow()
      • getRowNum

        public java.lang.String getRowNum()
      • getPropertyNames

        public final java.lang.String[] getPropertyNames()
      • getProperty

        @TraceDisabled
        public java.lang.String getProperty(java.lang.String key)
      • initProperty

        public void initProperty()
      • canSetProperty

        protected boolean canSetProperty(java.lang.String key,
                                         boolean conditional,
                                         boolean showWarning)
        Return whether or not the property can be set on the instance. This method will return false if the property is not in the instance's descriptor property list, or the property is marked final and already has a value, or the conditional parameter is true and the property is flagged as a nonconditional property. (Nonconditional property basically means the property can't be changed by the conditional UI functionality).
        Parameters:
        key - The property to check
        conditional - If true and the property is a nonconditional property, don't allow the the property change
        Returns:
        true if you can set the property, false you can't
      • setProperty

        public boolean setProperty(java.lang.String key,
                                   java.lang.String value,
                                   boolean systemCheck,
                                   boolean showWarnings)
        Sets a property on the instance. Returns true is the property was set, false if not.
        Parameters:
        key - - the property to set
        value - - the value of the property
        systemCheck - - If true and the property is a system property, don't a allow the setting
        showWarnings - - If true will show debug warnings (if debug level is 1 or greater) as to why the peroperty was not set.
        Returns:
        true if the property was set, false if not
      • setProperty

        public void setProperty(java.lang.String key,
                                java.lang.String value)
        Sets a property on the instance. Returns true is the property was set, false if not.
        Parameters:
        key - - the property to set
        value - - the value of the property
      • removeProperty

        public void removeProperty(java.lang.String key)
      • getString

        public java.lang.String getString(java.lang.String key)
        Deprecated. use getProperty() instead
      • getBoolean

        public boolean getBoolean(java.lang.String property)
        Returns a property as a boolean value. Returns false if the property was not found
        Parameters:
        property - Property to get the value for
        Returns:
        boolean value of the property
      • getInt

        public int getInt(java.lang.String property,
                          int defaultValue)
        Returns a property as a integer. Returns defaultValue if the property was not found
        Parameters:
        property - Property to get the value for
        defaultValue - Default value to return if no value found
        Returns:
        integer value of the property (or default value)
      • getParent

        public ControlHandler getParent()
        Deprecated. FIREFOX - use getParentInstance() instead
      • handleEvent

        public int handleEvent(WebClientEvent event)
                        throws java.lang.NoSuchMethodException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • handleEvent

        public int handleEvent(java.lang.String methodName,
                               WebClientEvent event)
                        throws java.lang.NoSuchMethodException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • initialize

        public void initialize()
        should be extended to do any setup required by the instance. for example, the DatasrcInstance will call initialize to create data sources found in the bind list.
      • getDescriptor

        public BaseDescriptor getDescriptor()
        Returns:
        Returns the descriptor.
      • setDescriptor

        public void setDescriptor(BaseDescriptor descriptor)
        Parameters:
        descriptor - The descriptor to set.
      • getType

        public java.lang.String getType()
        Returns:
        Returns the type.
      • getLocalizedType

        public java.lang.String getLocalizedType()
        Returns:
        Returns the localized type from the maxmessages table.
      • setType

        public void setType(java.lang.String type)
        Sets the type.
      • getChildCount

        public int getChildCount()
      • setConsiderInDesigner

        public void setConsiderInDesigner(boolean flag)
      • getConsiderInDesigner

        public boolean getConsiderInDesigner()
      • clearProperties

        public void clearProperties()
      • clone

        public java.lang.Object clone(java.lang.String newId)
      • clone

        public java.lang.Object clone(java.lang.String newId,
                                      java.lang.String childIdAppend)
      • cleanup

        public void cleanup()
      • hasPropertyChanged

        public boolean hasPropertyChanged(java.lang.String property)
        Checks to see if the passed in property has changed on the control since the last time the control was rendered or 'refreshed'.
        Parameters:
        property - - The property to check
        Returns:
        true the property has changed, false it has not.
      • hasAnyPropertyChanged

        public boolean hasAnyPropertyChanged()
        Checks to see if any property has changed on the control since the last time the control was rendered or 'refreshed'.
        Returns:
        true if a property has changed, false it has not.
      • propertyChanged

        protected void propertyChanged(java.lang.String property)
        Adds the property to the changed property list if not already there.
        Parameters:
        property - - the property that was changed
      • getChangedProperties

        protected java.util.ArrayList getChangedProperties()
        Returns an ArrayList of properties that have been changed since render was last called on the instance.
        Returns:
        - ArrayList of changed properties
      • clearPropChangeList

        protected void clearPropChangeList()
        Clears the list of changed properties
      • isVisible

        public boolean isVisible()
        Return whether or not the instance is visible or not (Whether or not it should be shown) Each control or component will handle visibility in it's own way.
        Returns:
        true - visible, false - not visible
      • getPage

        public PageInstance getPage()
        Get the PageInstance that this control belongs to.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • addRefreshListener

        public void addRefreshListener(java.lang.String componentId)
        Adds to list of listeners for when this refreshes (used to destroy widgets, etc...)
        Parameters:
        component -
      • isDynamicContainer

        public boolean isDynamicContainer()
      • getRefreshListeners

        public java.lang.String getRefreshListeners()
        Returns a list of listeners to notify when this refreshes (used to destroy widgets, etc...)
        Parameters:
        component -
      • setDynamicContainer

        public void setDynamicContainer(boolean isDynamic)
      • maintainControlId

        public boolean maintainControlId()
      • getChildIndex

        public int getChildIndex()
      • getIdExtension

        public java.lang.String getIdExtension()
      • setOnTable

        public void setOnTable(boolean isOnTable)
      • isOnTable

        public boolean isOnTable()