psdi.webclient.beans.designer

Class DesignerAppBean

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.http.HttpSessionBindingListener, DataBeanListener


    public class DesignerAppBean
    extends AppBean
    • Field Detail

      • palleteLabelsOn

        protected boolean palleteLabelsOn
      • modifiedFlag

        protected boolean modifiedFlag
      • currentControlid

        protected java.lang.String currentControlid
      • lastControlid

        protected java.lang.String lastControlid
      • copyHash

        protected java.util.Hashtable copyHash
      • PROPERTIES_DIALOG_PREFIX

        public static final java.lang.String PROPERTIES_DIALOG_PREFIX
        See Also:
        Constant Field Values
      • PROPERTIES_DIALOG_NOCONTROL

        public static final java.lang.String PROPERTIES_DIALOG_NOCONTROL
        See Also:
        Constant Field Values
      • TOOLBOX_ID_PREFIX

        public static final java.lang.String TOOLBOX_ID_PREFIX
        See Also:
        Constant Field Values
      • DROP_BEFOREBEGIN

        public static final java.lang.String DROP_BEFOREBEGIN
        See Also:
        Constant Field Values
      • DROP_INVALIDTARGET

        public static final java.lang.String DROP_INVALIDTARGET
        See Also:
        Constant Field Values
      • NEWAPP_SECURITY_GROUP_PROPERTY

        public static final java.lang.String NEWAPP_SECURITY_GROUP_PROPERTY
        See Also:
        Constant Field Values
      • DESIGNER_SELECTED_CLASS

        public static final java.lang.String DESIGNER_SELECTED_CLASS
        See Also:
        Constant Field Values
    • Constructor Detail

      • DesignerAppBean

        public DesignerAppBean()
    • Method Detail

      • initializeApp

        public void initializeApp()
                           throws MXException,
                                  java.rmi.RemoteException
        Description copied from class: AppBean
        This method is called when the presentations "main" page is initalized and before the page is rendered. It can be called multiple times to "reinitialize" the applicaiton, for example when the existing query is reset.

        Only on the first initialize the method also checks for these mutually exclusiive special conditions:

      • if there is a particular record the app needs to jump to (using uniqueid from the loadapp or gotoapp event) the result set is restricted to that record only
      • if there is a startup query sent through the launch in context as a startup where clause it is set as a user where clause
      • if there is an additional ecent "insert" a new record is inserted

        A subsequent call to initializeApp() will not check for these conditions, causing the default reset to happen

Overrides:
initializeApp in class AppBean
Throws:
MXException
java.rmi.RemoteException
  • initializeReferences

    public void initializeReferences()
    method to re-initialize references to controls used by designer each time a new app is loaded. don't want references to old controls being used. method is called by canvas.jsp
  • SHOWALLCTL

    public int SHOWALLCTL()
                   throws java.rmi.RemoteException
    toggle the showing of all controls. some controls do not show up in app designer by default, such as datasrc, defaultvalue etc. turning on toggle show all controls will display those controls. this method toggles the feature on and off
    Returns:
    Throws:
    java.rmi.RemoteException
  • SHOWCONDUI

    public int SHOWCONDUI()
                   throws java.rmi.RemoteException
    toggle the showing of the conditional ui indicator. when a control has conditional security associated with it, the conditional ui icon will appear if show conditional ui is turned on. this method toggles the feature on and off.
    Returns:
    EVENT_HANDLED
    Throws:
    java.rmi.RemoteException
  • designcontextmenu

    public int designcontextmenu()
    Handles the context menus in designer. the inner session control is right-clicked, and the event comes here to the outer session. the control is selected, and the showmenu event is sent back into the inner session.
    Returns:
  • PROPERTIES

    public int PROPERTIES()
                   throws java.rmi.RemoteException,
                          MXException
    if properties are closed, open them... if they're open, close them.
    Returns:
    Throws:
    java.rmi.RemoteException
    MXException
  • CONTROLS

    public int CONTROLS()
                 throws java.rmi.RemoteException
    if controls are closed, open them... if they're open, close them.
    Returns:
    Throws:
    java.rmi.RemoteException
  • APPCONTENT

    public int APPCONTENT()
                   throws java.rmi.RemoteException
    if app content is closed, open it... if it's open, close it
    Returns:
    Throws:
    java.rmi.RemoteException
  • closepropertydialog

    public void closepropertydialog()
                             throws java.rmi.RemoteException
    Throws:
    java.rmi.RemoteException
  • closewindows

    public void closewindows()
                      throws java.rmi.RemoteException
    Throws:
    java.rmi.RemoteException
  • IMPORT

    public int IMPORT()
    Handles the Import button on the toolbar
  • DELETENODE

    public int DELETENODE()
                   throws MXException,
                          java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • CUTNODE

    public int CUTNODE()
                throws MXException,
                       java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • COPYNODE

    public int COPYNODE()
                 throws MXException,
                        java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • PASTENODE

    public int PASTENODE()
                  throws MXException,
                         java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • EXPORT

    public int EXPORT()
    Handles the Export button on the toolbar
  • newapp

    public int newapp()
               throws MXException,
                      java.rmi.RemoteException
    Used to create a new application in the designer. The method will be called and an app will be created using the xml hierarchy from toolbox.xml whose id matches appType. In the designer.xml, this value is put in the value field of the button where the mxevent=newapp. For example, in the designer.xml, the following button is added to the insert dialog: therefore, when that button is clicked, a new app will be created based on the template retrieved from toolbox.xml where the id="ctrl_selfservice"
    Returns:
    Throws:
    MXException
    java.rmi.RemoteException
  • DUPLICATE

    public int DUPLICATE()
                  throws MXException,
                         java.rmi.RemoteException
    Duplicates the current App in Screen Designer.
    Overrides:
    DUPLICATE in class AppBean
    Returns:
    Throws:
    MXException - Maximo Exception
    java.rmi.RemoteException - Remote Exception
  • cancelinsert

    public int cancelinsert()
                     throws MXException,
                            java.rmi.RemoteException
    Cancels insert App in the Screen Designer. See description for cancelduplicate()
    Returns:
    Throws:
    MXException - Maximo Exception
    java.rmi.RemoteException - Remote Exception
  • cancelduplicate

    public int cancelduplicate()
                        throws MXException,
                               java.rmi.RemoteException
    Cancels Duplicate App in the Screen Designer. This is needed because we must call insert/duplicate before any other actions and we must reset to not be on the new Mbo when cancel is clicked.
    Returns:
    Throws:
    MXException - Maximo Exception
    java.rmi.RemoteException - Remote Exception
  • duplicateappnow

    public int duplicateappnow()
    Used to duplicate a new application in the designer. The MXDUtility.duplicateApp(SessionContext) method will be called and an app will be created using the xml hierarchy from the current app in the Designer
    Returns:
    Throws:
    MXException - Maximo Exception
    java.rmi.RemoteException - Remote Exception
  • duplicateapp

    public int duplicateapp()
                     throws MXException,
                            java.rmi.RemoteException
    Throws:
    MXException
    java.rmi.RemoteException
  • setModifiedFlag

    public void setModifiedFlag(boolean modified)
    the modified flag is used to determine when the xml has changed. we cannot use the standard mbo framework code here so we must create our own code to ensure that the saveYesNoCheck() can tell when a user has changed an app definition.
    Parameters:
    modified -
  • getModifiedFlag

    public boolean getModifiedFlag()
  • saveYesNoInteractionCheck

    public boolean saveYesNoInteractionCheck()
                                      throws MXException
    Description copied from class: AppBean
    Checks the AppBean to see if it needs to be saved. If it does then it throw an MXException ("jspmessages", "savecontinue"). If the user selects YES then the AppBean is saved, if the user selects NO the AppBean is reset (throwing away the changes). Returns false if the user select Cancel or longop has started. This method will be called again when longop is complete.
    Overrides:
    saveYesNoInteractionCheck in class AppBean
    Returns:
    true means continue, false means stop what was going to happen
    Throws:
    MXApplicationYesNoCancelException - Thrown with "jspmessages" and one of "savecontinue", "interactioncontinue", or "saveinteractioncontinue" if the user has unsaved changes and or is in the middle of a workflow interaction.
    MXException
  • saveYesNoCheck

    public boolean saveYesNoCheck()
                           throws MXException
    Description copied from class: AppBean
    Checks the AppBean to see if it needs to be saved. If it does then it throw an MXException ("jspmessages", "savecontinue"). If the user selects YES then the AppBean is saved, if the user selects NO the AppBean is reset (throwing away the changes). Returns false if the user select Cancel.
    Overrides:
    saveYesNoCheck in class AppBean
    Returns:
    true means continue, false means stop what was going to happen
    Throws:
    MXApplicationYesNoCancelException - Thrown with "jspmessages" and one of "savecontinue", "interactioncontinue", or "saveinteractioncontinue" if the user has unsaved changes and or is in the middle of a workflow interaction.
    MXException
  • isPalleteLabelsOn

    public boolean isPalleteLabelsOn()
    Returns true of the control labels are to be shown or hidden in the pallete
    Returns:
    Returns the controlsLabelsOn.
  • setcontrollablestate

    public int setcontrollablestate()
    Sets the state of the control labels pallete
    Parameters:
    controlsLabelsState. -
  • getCurrentControl

    public ControlInstance getCurrentControl()
    Used to get the currently selected control
    Returns:
    the currentControl
  • getCopyId

    public java.lang.String getCopyId(java.lang.String id)
  • insertcontrol

    public int insertcontrol()
    FROM CANVAS Creates a new control and inserts it before the target Insert a new control into the control hierarchy and the ui. must check to be sure the target that the new control is dropped on is valid, and must be sure to update ui to show new control
    Returns:
    Throws:
    MXException
  • setRefreshCanvas

    public void setRefreshCanvas()
  • movecontrol

    public int movecontrol()
                    throws MXException
    FROM CANVAS Moves the control to a specific target
    Returns:
    Throws:
    MXException
  • selectcontrol

    public int selectcontrol()
    FROM CANVAS Selects the current control. This is the method called by the event handler code.
    Returns:
    Throws:
    MXExceptionunselect
  • selecttab

    public int selecttab()
    Event sent when a user clicks on a tab in the designer canvas, to change to that tab. So basically setting that tab as the current tab and viewing it's contents
    Returns:
    WebClientBean.EVENT_HANDLED
  • selectControl

    public ControlInstance selectControl(java.lang.String id)
  • selectControl

    public ControlInstance selectControl(java.lang.String id,
                                         boolean warn)
    select the control specified by id. note that the control selected may be null (no control)
    Parameters:
    wsc -
    id -
  • getDesignControl

    protected ControlInstance getDesignControl(java.lang.String controlId)
    get the specified control handler from the design canvas control hierarchy method is essentially the same as WebClientSession.findControl() except it will not search for a control in the library
    Parameters:
    id -
    Returns:
  • getDomainName

    protected java.lang.String getDomainName(java.lang.String ctrlDatasrc,
                                             java.lang.String ctrlDataAttribute)
                                      throws MXException,
                                             java.rmi.RemoteException
    get the domain name for the given datasrc and attribute
    Throws:
    MXException
    java.rmi.RemoteException
  • addControlLabelsToCache

    public void addControlLabelsToCache(ControlInstance source)
  • validateContainer

    public boolean validateContainer(java.lang.String newControlType,
                                     java.lang.String toContainerType)
  • isPropertyDialogOpen

    public boolean isPropertyDialogOpen()
  • setvalue

    public int setvalue()
                 throws MXException,
                        java.rmi.RemoteException
    this setvalue is here so that we can catch the setting of Viewport and update the xml element when the non-persistent viewport attribute is changed.
    Overrides:
    setvalue in class DataBean
    Throws:
    MXException
    java.rmi.RemoteException
  • setValue

    public void setValue(int nRow,
                         java.lang.String attribute,
                         java.lang.String value,
                         long accessModifier)
                  throws MXException
    this setvalue is here so that we can catch the setting of ismobile and update the xml element when the non-persistent ismobile attribute is changed.
    Overrides:
    setValue in class DataBean
    Throws:
    MXException
  • setmobilefields

    public int setmobilefields()
                        throws MXException,
                               java.rmi.RemoteException
    this method handles a 'setmobilefields' event sent by the page when an app is loaded in designer. it sets the viewport and ismobile fields on the main designer record.
    Returns:
    Throws:
    MXException
    java.rmi.RemoteException
  • TOGGLEVP

    public int TOGGLEVP()
                 throws MXException
    Toggle Viewport Display ON or OFF in app designer, and cause page to rerender
    Returns:
    Throws:
    MXException
  • getViewport

    public java.lang.String getViewport()
    returns the viewport size set in the presentation
    Returns:
    String