Interface FormDataHolder

All Known Implementing Classes:
NmCommandBean, ObjectBean, UIValidationCriteria

public interface FormDataHolder
A FormDataHolder has helper APIs to access all the form data for the current request. Query parameters, form data values (from hidden input fields, text inputs, text areas, checkboxs, radio buttons etc.) If the form fields were rendered by a GuiComponent, the holder will also have info on whether the value was changed and what the old value was.

Supported API: true

Extendable: false
  • Method Details

    • getAddedItemsByName

      List getAddedItemsByName(String param_name)
      Will return the list of NmOids which were selected for addition from the component defined by the component name param_name.


      Supported API: true
      Parameters:
      param_name - The name of the component which the items were added to. (for example: table ID)
      Returns:
      a list of oids that are added from the component.
    • getChangedComboBox

      Map<String,List<String>> getChangedComboBox() throws WTException
      Gets the comboboxes that have changed. Name -> new value

      Supported API: true
      Returns:
      Map
      Throws:
      WTException
    • getChangedRadio

      Map<String,String> getChangedRadio() throws WTException
      Returns a Map of any radio buttons that have changed. Radio buttons needed to have been rendered by gui-comopnents. key,values of the Map are Name of radio -> Optional Column Name so that if one was to make a table of principals to Access control, the name would be the user, and the optional column name would be the access control.

      Supported API: true
      Returns:
      Map
      Throws:
      WTException
    • getChangedText

      Map<String,String> getChangedText() throws WTException
      Gets the textboxes that have changed. Name -> new value

      Supported API: true
      Returns:
      Map
      Throws:
      WTException
    • getChangedTextArea

      Map<String,String> getChangedTextArea() throws WTException
      Gets the textareas that have changed. Name -> new value

      Supported API: true
      Returns:
      Map
      Throws:
      WTException
    • getInitialItemsByName

      List getInitialItemsByName(String param_name)
      Returns the list of initial NmOids for objects which are associated to the component with the name param_name.


      Supported API: true
      Parameters:
      param_name - The name of the component with the initial items (for example: table ID)
      Returns:
      a list of initial oids that are from the component.
    • getNewChecked

      Map<String,List<String>> getNewChecked() throws WTException
      Returns a Map of Name of Checkbox -> Optional Column Name so that if one was to make a table of principals to Access control, the name would be the user, and the optional column name would be the access control.

      Supported API: true
      Returns:
      Map
      Throws:
      WTException
    • getRemovedItemsByName

      List getRemovedItemsByName(String param_name)
      Will return the list of NmOids which were selected for removal from the component defined by the component name param_name.


      Supported API: true
      Parameters:
      param_name - The name of the component which the items were removed from. (for example: table ID)
      Returns:
      a list of oids that are removed from the component.
    • getTextParameter

      String getTextParameter(String key)
      Gets a HTTP request parameter value in UTF8 format. Works in both Servlet engine and Method Server code. Use this instead of getRequest().getParameter()

      Available in the servlet container and in the Method Server

      Supported API: true
      Parameters:
      key -
      Returns:
      String
    • getTextParameterValues

      String[] getTextParameterValues(String key)
      Gets all the HTTP request parameter values for the given key in UTF8 format.

      Available in the servlet container and in the Method Server

      Supported API: true
      Parameters:
      key -
      Returns:
      String[]
    • getUnChecked

      Map<String,List<String>> getUnChecked() throws WTException
      Returns a Map of all the un-checked checkboxes on the page. Only returns values that were originally rendered with checkbox gui-components. Name of Checkbox -> Optional Column Name so that if one was to make a table of principals to Access control, the name would be the user, and the optional column name would be the access control.

      Supported API: true
      Returns:
      Map
      Throws:
      WTException