psdi.webclient.controls

Class Dialog

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    Action, Messagebox


    public class Dialog
    extends PageInstance
    Implements specific functionality for the dialog boxes
    • Constructor Detail

      • Dialog

        public Dialog()
    • Method Detail

      • instantiatedatasrc

        public void instantiatedatasrc()
        Description copied from class: DatasrcInstance
        this method will set up the datasource on the control. any controls that need to create a datasource should be an instance of this class. if the datasource is not already created, one will be created and stored in the appropriate place (app or page).
        Overrides:
        instantiatedatasrc in class DatasrcInstance
      • initialize

        public void initialize()
        Description copied from class: BaseInstance
        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.
        Overrides:
        initialize in class ControlInstance
      • advancedlongop

        public int advancedlongop()
        Handler for the dialogok event, associated with the usetr pressing OK on a dialog. This is the handler that runs an action associated with this dialog. Compare with dialogyes(), which will only dismiss the dialog

        If the OK is not handled yet (i.e. the handler spawned a long operation), this dialog is kept alive until that operation completes and handles again the interrupted dialogok event as it finishes.

        Returns:
        WebClientBean.EVENT_HANDLED
        See Also:
        Dialog.dialogyes(), WebClientSession.handleDialogOK(), AsyncProcess.longOpCleanup()
      • dialogok

        public int dialogok()
      • dialogok

        public int dialogok(boolean advancedLongOp)
      • dolongop

        public int dolongop()
        The dolongop event is identical to dialogok except that dolongop forces the event handler to run in an asynchronous thread (a.k.a. long operation). The special handling of dolongop is hardcoded in WebClientSession.handleDialogOK().
        See Also:
        WebClientSession.handleDialogOK()
      • dialogyes

        public int dialogyes()
        The default dialogyes event only closes the dialog. It is used to obtain an interactive response from the interactive user
        See Also:
        Dialog.dialogok()
      • dialogno

        public int dialogno()
        The default dialogno event only closes the dialog. It is used to obtain an interactive response from the interactive user
        See Also:
        Dialog.dialogok()
      • dialogcancel

        public int dialogcancel()
        Call the cancelDialog() handler on the dialog bean then close the dialog
        See Also:
        Dialog.dialogclose()
      • dialogclose

        public int dialogclose()
        Close the dialog without taking any action
        See Also:
        Dialog.dialogcancel()
      • closelongop

        public int closelongop()
      • longopcheck

        public int longopcheck()
                        throws java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException,
                               java.lang.NoSuchMethodException
        Called periodically from the client (default interval is 4s) to check if the running long operation has completed
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
        java.lang.NoSuchMethodException
      • longopquerycheck

        public int longopquerycheck()
                             throws java.lang.IllegalAccessException,
                                    java.lang.reflect.InvocationTargetException,
                                    java.lang.NoSuchMethodException
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
        java.lang.NoSuchMethodException
      • dialogtoggle

        public int dialogtoggle()
        Toggle between minimized and normal display of the dialog
      • renderDialogBody

        public void renderDialogBody()
                              throws java.lang.NoSuchMethodException,
                                     java.lang.IllegalAccessException,
                                     java.lang.reflect.InvocationTargetException
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • renderDialogBottom

        public void renderDialogBottom()
                                throws java.lang.NoSuchMethodException,
                                       java.lang.IllegalAccessException,
                                       java.lang.reflect.InvocationTargetException
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • nextdialog

        public int nextdialog()
                       throws java.rmi.RemoteException
        Processing nextdialog follows the following rules:
      • If there is no datasource, just close dialog
      • Otherwise, first call callMethod(event) on the datasource then close the dialog.

        If the called method spawns an asynchronous thread (a.k.a. a long operation), this dialog is kept alive until that operation completes and handles again the interrupted nextdialog event as it finishes.

Throws:
java.rmi.RemoteException
  • getProperty

    public java.lang.String getProperty(java.lang.String key)
    Provides special processing for the properties positionX and positionY
    Overrides:
    getProperty in class ControlInstance
    Returns:
    the property, or null if key is not found or if it is found empty
  • setposition

    public int setposition()
  • isExpanded

    public java.lang.String isExpanded()
  • toggleExpand

    public java.lang.String toggleExpand()
  • 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 PageInstance
    Throws:
    java.lang.NoSuchMethodException
    java.lang.IllegalAccessException
    java.lang.reflect.InvocationTargetException
  • setLabelRenderId

    public void setLabelRenderId(java.lang.String id)
    Provides a way to set the label renderid for tabindex looping within a dialog NOTE: If the component structure of a dialog or it's header change in the registry this may need to be updated.
    Parameters:
    String - id
  • getLabelRenderId

    public java.lang.String getLabelRenderId()
    Provides a way to get the label renderid for tabindex looping within a dialog NOTE: If the component structure of a dialog or it's header change in the registry this may need to be updated.
    Returns:
    String render id of the dialog label