Class ObjectBean

java.lang.Object
com.ptc.core.components.beans.ObjectBean
All Implemented Interfaces:
FormDataHolder, Externalizable, Serializable

public class ObjectBean extends Object implements FormDataHolder, Externalizable
A class used to access the form data specific to a single object being created or updated by a HTML wizard and the form data common to all target objects. Also contains the instance of the object created during the processing of the wizard.

See the Windchill Customizers' Guide for more information on wizard processing.

Supported API: true

Extendable: false
See Also:
  • Method Details

    • getChildren

      public List<ObjectBean> getChildren()
      Gets the value of the attribute: children. These are the children of this ObjectBean. They typically represent related objects that are dependent on this object or that should be processed after this object. For example, if this ObjectBean represents a ChangeRequest it might have have children that are the related ChangeActivities.

      Supported API: true
      Returns:
      List
    • setChildren

      public void setChildren(List<ObjectBean> a_Children)
      Sets the value of the attribute: children. These are the children of this ObjectBean. They typically represent related objects that are dependent on this object or that should be processed after this object. For example, if this ObjectBean represents a ChangeRequest it might have have children that are the related ChangeActivities.

      Supported API: true
      Parameters:
      a_Children -
    • getObject

      public Object getObject()
      Gets the value of the attribute: object. This is an instance of the target object whose attributes are set to the values in the form data.

      Supported API: true
      Returns:
      Object
    • setObject

      public void setObject(Object a_Object)
      Sets the value of the attribute: object. This is an instance of the target object whose attributes are set to the values in the form data.

      Supported API: true
      Parameters:
      a_Object -
    • getObjectHandle

      public String getObjectHandle()
      Gets the value of the attribute: objectHandle. This is the string used in form field names to identify the data of the object represented by this ObjectBean.

      Supported API: true
      Returns:
      String
    • getParent

      public ObjectBean getParent()
      Gets the value of the attribute: parent. This is the parent of this ObjectBean. It typically represents a related object on which this object depends or that should be processed before this object. For example, if this ObjectBean represents a ChangeActivity it's parent might be the ChangeRequest with which it is associated.

      Supported API: true
      Returns:
      ObjectBean
    • setParent

      public void setParent(ObjectBean a_Parent)
      Sets the value of the attribute: parent. This is the parent of this ObjectBean. It typically represents a related object on which this object depends or that should be processed before this object. For example, if this ObjectBean represents a ChangeActivity it's parent might be the ChangeRequest with which it is associated.

      Supported API: true
      Parameters:
      a_Parent -
    • addChild

      public void addChild(ObjectBean child)
      Adds a child ObjectBean to this ObjectBean.

      Supported API: true
      Parameters:
      child -
    • hasChildren

      public boolean hasChildren()
      Returns true if this ObjectBean has child ObjectBeans; false otherwise.

      Supported API: true
      Returns:
      boolean
    • toString

      public String toString()
      Dumps the contents of this ObjectBean.

      Supported API: true
      Overrides:
      toString in class Object
      Returns:
      String
    • getAddedItemsByName

      public List getAddedItemsByName(String param_name)
      Returns a the list of NmOids for objects which were added to the component with the name param_name.


      Supported API: true
      Specified by:
      getAddedItemsByName in interface FormDataHolder
      Parameters:
      param_name - The name of the component to which the items were added (for example: table ID)
      Returns:
      a list of oids that are added from the component.

      Supported API: true
    • getChangedComboBox

      public Map<String,List<String>> getChangedComboBox() throws WTException
      Returns the combo box input fields that were modified by the user.

      Supported API: true
      Specified by:
      getChangedComboBox in interface FormDataHolder
      Returns:
      Map - keys are the field names and values are the field values
      Throws:
      WTException
    • getChangedRadio

      public Map<String,String> getChangedRadio() throws WTException
      Returns the radio button input fields that were modified by the user. Buttons must have been rendered by a GuiComponent.

      Supported API: true
      Specified by:
      getChangedRadio in interface FormDataHolder
      Returns:
      Map<String,String>
      Throws:
      WTException
    • getChangedText

      public Map<String,String> getChangedText() throws WTException
      Returns the textbox input fields that were modified by the user.

      Supported API: true
      Specified by:
      getChangedText in interface FormDataHolder
      Returns:
      Map<String,String> - Keys are the field names and values are the field vales
      Throws:
      WTException
    • getChangedTextArea

      public Map<String,String> getChangedTextArea() throws WTException
      Returns the textarea input fields that were modified by the user.

      Supported API: true
      Specified by:
      getChangedTextArea in interface FormDataHolder
      Returns:
      Map<String,String> - keys are the field names, values are the field values
      Throws:
      WTException
    • getChecked

      public Map<String,List<String>> getChecked()
      Returns the checkbox input fields that were checked by the user.

      Supported API: true
      Specified by:
      getChecked in interface FormDataHolder
      Returns:
      Map
    • getNewChecked

      public Map<String,List<String>> getNewChecked() throws WTException


      Supported API: true
      Specified by:
      getNewChecked in interface FormDataHolder
      Returns:
      Map<String,List>
      Throws:
      WTException
    • getRemovedItemsByName

      public List getRemovedItemsByName(String param_name)
      Returns a list of the objects that were removed from a component.

      Supported API: true
      Specified by:
      getRemovedItemsByName in interface FormDataHolder
      Parameters:
      param_name - - the name of the component. E.g., table id.
      Returns:
      List - of NmOids
    • getTextParameter

      public String getTextParameter(String key)
      Gets a HTTP request parameter value in UTF8 format. If there is more than one value for the given key, only the first value will be returned.

      Use this instead of getRequest().getParameter()

      Available in the servlet container and in the Method Server

      Supported API: true
      Specified by:
      getTextParameter in interface FormDataHolder
      Parameters:
      key - - name of parameter to retrieve
      Returns:
      String - value of parameter
    • getTextParameterValues

      public 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
      Specified by:
      getTextParameterValues in interface FormDataHolder
      Parameters:
      key - - name of parameter to retrieve
      Returns:
      String[] - value(s) of parameters
    • getUnChecked

      public Map<String,List<String>> getUnChecked() throws WTException
      Returns a hashMap of all the un-checked checkboxes on the page. Only returns values for fields rendered with checkbox GuiComponents. Keys in returned map are checkbox names and values are optional column names. For example, if one was to make a table of principals to access control permissions, the name would be the user, and the optional column name would be the access control permission.

      Supported API: true
      Specified by:
      getUnChecked in interface FormDataHolder
      Returns:
      Map<String,List>
      Throws:
      WTException
    • getActionOid

      public NmOid getActionOid() throws WTException
      Gets the object that is the target of the action. This could be the elementOid for a row based action or the primaryOid for actions invoked on the details page

      Supported API: true
      Throws:
      WTException
    • getInitialItemsByName

      public List<NmOid> 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
      Specified by:
      getInitialItemsByName in interface FormDataHolder
      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.

      Supported API: true