Class FormResult

java.lang.Object
com.ptc.core.components.forms.FormResult
All Implemented Interfaces:
Serializable

public class FormResult extends Object implements Serializable
A class used to pass feedback from one form processor to another or from a form processor back to the WizardServlet after processing completes. This class contains status and nextAction flags to indicate what the disposition of the wizard window should be and how the parent window should be refreshed. It can contain feedback messages for the user and javascript to be executed in the response page.

This class also contains methods that are called by the WizardServlet to write the wizard response page.



Supported API: true

Extendable: false
See Also:
  • Constructor Details

    • FormResult

      public FormResult(FormProcessingStatus status)
      Create an instance with FormProcessingStatus argument Supported API: true
  • Method Details

    • setStatus

      public void setStatus(FormProcessingStatus status)


      Supported API: true
    • getStatus

      public FormProcessingStatus getStatus()


      Supported API: true
    • setNextAction

      @Deprecated public void setNextAction(com.ptc.core.components.forms.FormResultAction action)
      Deprecated.
      (since 10.1 M010) Use of FormResultAction should be removed from FormProcessors. Instead, the FormProcessor should return a list of the Oids that were affected by the action (if any), and let the components displayed in the UI request updates from the server, as necessary.



      Supported API: true
    • getNextAction

      @Deprecated public com.ptc.core.components.forms.FormResultAction getNextAction()
      Deprecated.
      (since 10.1 M010) Use of FormResultAction should be removed from FormProcessors. Instead, the FormProcessor should return a list of the Oids that were affected by the action (if any), and let the components displayed in the UI request updates from the server, as necessary.



      Supported API: true
    • setURL

      @Deprecated public void setURL(String urlString)
      Deprecated.
      (since 10.2 M030, FormResultAction already deprecated since 10.1 M010)
      The url is used if FormResult was setup with deprecated next action FormResultAction.LOAD_OPENER_URL. All FormResultActions have been deprecated since 10.1 M010. Use of FormResultAction should be removed from FormProcessors. Instead, the FormProcessor should return a list of the Oids that were affected by the action (if any), and let the components displayed in the UI request updates from the server, as necessary. If more data than just the oids may be needed for the page to decide how to handle the action. There is an extraData map which could contain such extra info.


      Supported API: true
    • getURL

      @Deprecated public String getURL()
      Deprecated.
      (since 10.2 M030, FormResultAction already deprecated since 10.1 M010)
      The url is used if FormResult was setup with deprecated next action FormResultAction.LOAD_OPENER_URL. All FormResultActions have been deprecated since 10.1 M010. Use of FormResultAction should be removed from FormProcessors. Instead, the FormProcessor should return a list of the Oids that were affected by the action (if any), and let the components displayed in the UI request updates from the server, as necessary. If more data than just the oids may be needed for the page to decide how to handle the action. There is an extraData map which could contain such extra info.


      Supported API: true
    • setJavascript

      @Deprecated public void setJavascript(String javascriptString)
      Deprecated.
      (since 10.2 M030, FormResultAction already deprecated since 10.1 M010)
      The javascript is only used if FormResult was setup with deprecated next action FormResultAction.JAVASSCRIPT. All FormResultActions have been deprecated since 10.1 M010. Use of FormResultAction should be removed from FormProcessors. Instead, the FormProcessor should return a list of the Oids that were affected by the action (if any), and let the components displayed in the UI request updates from the server, as necessary. If more data than just the oids may be needed for the page to decide how to handle the action. There is an extraData map which could contain such extra info.


      Supported API: true
      Parameters:
      javascriptString -
    • setJavascript

      @Deprecated public void setJavascript(String javascriptString, boolean isJavascriptStringEncoded)
      Deprecated.


      Supported API: true
      Parameters:
      javascriptString -
      isJavascriptStringEncoded - flag indicates whether the provided javascript is already encoded or not
    • getJavascript

      @Deprecated public String getJavascript()
      Deprecated.
      (since 10.2 M030, FormResultAction already deprecated since 10.1 M010)
      The javascript is only used if FormResult was setup with deprecated next action FormResultAction.JAVASSCRIPT. All FormResultActions have been deprecated since 10.1 M010. Use of FormResultAction should be removed from FormProcessors. Instead, the FormProcessor should return a list of the Oids that were affected by the action (if any), and let the components displayed in the UI request updates from the server, as necessary. If more data than just the oids may be needed for the page to decide how to handle the action. There is an extraData map which could contain such extra info.


      Supported API: true
    • setDynamicRefreshInfo

      public void setDynamicRefreshInfo(ArrayList<DynamicRefreshInfo> info)


      Supported API: true
    • addDynamicRefreshInfo

      public void addDynamicRefreshInfo(DynamicRefreshInfo info)


      Supported API: true
    • addFeedbackMessage

      public void addFeedbackMessage(FeedbackMessage mess)


      Supported API: true
    • getFeedbackMessages

      public List<FeedbackMessage> getFeedbackMessages()


      Supported API: true
    • addException

      public void addException(Throwable t)


      Supported API: true
    • getExceptions

      public List<Throwable> getExceptions()


      Supported API: true
    • mergeResults

      public void mergeResults(FormResult sourceResult)
      Adds the messages and exceptions from a source FormResult to this FormResult. The source FormResult will typically be that returned by a processing subtask or phase and this FormResult will be a cumulative result for multiple tasks or phases.

      If the status of the sourceResult is of higher error severity than the status of this FormResult, also sets the status of this result will be set to that of the sourceResult, as shown below.

      Status of this result on entry Status of sourceResult on entry Status of this result on exit
      FAILURE any FAILURE
      NON_FATAL_ERROR FAILURE FAILURE
      NON_FATAL_ERROR NON_FATAL_ERROR, SUCCESS NON_FATAL_ERROR
      SUCCESS FAILURE FAILURE
      SUCCESS NON_FATAL_ERROR NON_FATAL_ERROR
      SUCCESS SUCCESS SUCCESS


      Supported API: true