Class SimpleCallout.CalloutInfo

  • Enclosing class:
    SimpleCallout

    protected static class SimpleCallout.CalloutInfo
    extends Object
    Helper class that contains all data to access callout information and servlet information
    • Field Detail

      • vars

        public VariablesSecureApp vars
        Provides the coder friendly methods to retrieve certain environment, session and servlet call variables.
    • Method Detail

      • executeCallout

        public void executeCallout​(SimpleCallout callout)
                            throws javax.servlet.ServletException
        Invokes another SimpleCallout. This method allows to divide callouts functionality into several callout classes
        Parameters:
        callout - SimpleCallout instance to invoke
        Throws:
        javax.servlet.ServletException
      • getLastFieldChanged

        public String getLastFieldChanged()
        Returns:
        The name of field that triggered the callout.
      • getTabId

        public String getTabId()
        Returns:
        The Tab Id that triggered the callout.
      • getWindowId

        public String getWindowId()
        Returns:
        The Window Id that triggered the callout.
      • getStringParameter

        public String getStringParameter​(String param,
                                         RequestFilter filter)
        Parameters:
        param - The name of the field to get the value.
        filter - Filter used to validate the input against list of allowed inputs.
        Returns:
        The value of a field named param as an String. If value is modified previously by a parent callout, updated value is returned.
      • getStringParameter

        public String getStringParameter​(String param)
      • getBigDecimalParameter

        public BigDecimal getBigDecimalParameter​(String param)
                                          throws javax.servlet.ServletException
        Parameters:
        param - The name of the field to get the value.
        Returns:
        The value of a field named param as a BigDecimal.
        Throws:
        javax.servlet.ServletException
      • addSelect

        public void addSelect​(String param)
        Starts the inclusion of values to the combo field with the name passed as parameter.
        Parameters:
        param - The name of the combo field to set the values.
      • addSelectResult

        public void addSelectResult​(String name,
                                    String value)
        Adds an entry to the select field and marks it as unselected.
        Parameters:
        name - The entry name to add.
        value - The entry value to add.
      • removeSelectResult

        public void removeSelectResult​(String id)
        Removes an entry of the combo field.
        Parameters:
        id - The id of the combo entry to be removed.
      • addSelectResult

        public void addSelectResult​(String id,
                                    String identifier,
                                    boolean selected)
        Adds an entry value to the combo field.
        Parameters:
        id - The id of the combo entry to add.
        identifier - The identifier of the combo entry to add
        selected - Whether this entry field is selected or not.
      • endSelect

        public void endSelect()
        Finish the inclusion of values to the combo field.
      • addResult

        public void addResult​(String param,
                              Object value)
        Sets the value of a field named param with the value indicated.
        Parameters:
        param - The name of the field to get the value.
        value - The value to assign to the field.
      • addResult

        public void addResult​(String param,
                              String value)
        Sets the value of a field named param with the value indicated. This method is useful to set numbers like BigDecimal objects.
        Parameters:
        param - The name of the field to get the value.
        value - The value to assign to the field.
      • showMessage

        protected void showMessage​(String value)
        Shows a message in the browser with the value indicated.
        Parameters:
        value - The message to display in the browser.
      • showError

        protected void showError​(String value)
        Shows an error message in the browser with the value indicated.
        Parameters:
        value - The error message to display in the browser.
      • showWarning

        protected void showWarning​(String value)
        Shows a warning message in the browser with the value indicated.
        Parameters:
        value - The warning message to display in the browser.
      • showInformation

        protected void showInformation​(String value)
        Shows an information message in the browser with the value indicated.
        Parameters:
        value - The information message to display in the browser.
      • showSuccess

        protected void showSuccess​(String value)
        Shows a success message in the browser with the value indicated.
        Parameters:
        value - The success message to display in the browser.
      • executeCodeInBrowser

        protected void executeCodeInBrowser​(String value)
        Executes the javascript code indicated in the value in the browser.
        Parameters:
        value - The javascript code to execute in the browser.
      • getResult

        public String getResult()
        Returns the value of the result variable as a String
      • getJSONObjectResult

        public org.codehaus.jettison.json.JSONObject getJSONObjectResult()
        Returns the value of the result variable