Class RedirectPageProcessor

All Implemented Interfaces:
Externalizable, Serializable, TemplateProcessor, ContextHolder, ContextTranslator, ProcessorService, Evolvable

public class RedirectPageProcessor extends GenerateFormProcessor implements ProcessorService
Deprecated.
Deprecation Notice: This class is still valid for this release, however this serves as advance notice that it will be removed in the future. All user interfaces built using the Windchill HTML Template Processing client architecture will be rewritten using a different framework in an upcoming release. This TemplateProcessor processes the page ReDirectTemplate.html to generate an HTML Form with a URL to the "true" response page and information in hidden fields in the HTML Form to be used to help generate the "true" response page.

The Primary goal of this service is to allow the correct URL to appear in the browser relative to the response page.

For example, if you create a document and you want the response page to be the Properties page, without redirecting the Properties page is the response page, but the URL in the browser is to the Create Action. The causes a problem is

  • The user clicks the Reload/Refresh on the browser
  • The user would like to either bookmark the URL or e-mail the URL
By using the redirect service, this can be corrected by having an intermediate page that is the response page. This intermediate page then forwards the browser to the "true" response page. The ideal usage of the redirect service will have the URL in the browser correct to navigate to the response page if the Reload/Refresh button is clicked.

Supported API: true

Extendable: false
See Also:
  • Field Details

    • REDIRECT_HEADER_KEY

      public static final String REDIRECT_HEADER_KEY
      Deprecated.


      Supported API: true
      See Also:
    • REDIRECT_EXCEPTION_KEY

      public static final String REDIRECT_EXCEPTION_KEY
      Deprecated.


      Supported API: true
      See Also:
  • Method Details

    • getOut

      protected PrintWriter getOut()
      Deprecated.
      Gets the value of the attribute: out.

      Supported API: true
      Returns:
      PrintWriter
    • setOut

      protected void setOut(PrintWriter a_Out)
      Deprecated.
      Sets the value of the attribute: out.

      Supported API: true
      Parameters:
      a_Out -
    • setHtmlFormAction

      public void setHtmlFormAction(Properties parameters, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Outputs the URL (with queryString) to appear in the action attribute of the HTML FORM element. The getRedirectUrl method of the RedirectObject is called for this field.

      The correct usage of this call in Windchill script it :

      <FORM name="redirectForm" action=<SCRIPT LANGUAGE=Windchill><!--setHtmlFormAction--></SCRIPT> method=POST>

      The contextObj is required to be an instance of the RedirectObject

      Supported API: true

      Parameters:
      parameters -
      locale -
      os -
      Throws:
      WTException
    • addHiddenFields

      public void addHiddenFields(Properties parameters, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Outputs the hidden fields to appear in the HTML form in the intermediate response page. The information that printed into hidden fields are :
      • The formData from the RedirectObject object
      • The list of localized messages for the Header
      • The list of localized messages for the Footer

      The correct usage of this call in Windchill script it :

      <SCRIPT LANGUAGE=Windchill> <!-- addHiddenFields --> </SCRIPT>

      The contextObj is required to be an instance of the RedirectObject

      Supported API: true

      Parameters:
      parameters -
      locale -
      os -
      Throws:
      WTException
    • showRedirectHeaders

      public void showRedirectHeaders(Properties parameters, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Outputs the Response Headers that were set in the FormTaskDelegate using the addToResponseHeaders method. This method is available from anywhere in the HTML client as it is a ProcessorService call.

      The correct usage of this call in Windchill script it :

      <SCRIPT LANGUAGE=Windchill> <!-- useProcessorService service=wt.templateutil.RedirectPageProcessor method=showRedirectHeaders --> </SCRIPT>



      Supported API: true

      Parameters:
      parameters -
      locale -
      os -
      Throws:
      WTException
    • showRedirectFooters

      public void showRedirectFooters(Properties parameters, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Outputs the Response Headers that were set in the FormTaskDelegate using the addToResponseFooters methods. This method is available from anywhere in the HTML client as it is a ProcessorService call.

      The correct usage of this call in Windchill script it :

      <SCRIPT LANGUAGE=Windchill> <!-- useProcessorService service=wt.templateutil.RedirectPageProcessor method=showRedirectFooters --> </SCRIPT>



      Supported API: true

      Parameters:
      parameters -
      locale -
      os -
      Throws:
      WTException
    • showRedirectExceptions

      public void showRedirectExceptions(Properties parameters, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Outputs the Response Exceptions that were set in the FormTaskDelegate with the addToResponseExceptions method. This method is available from anywhere in the HTML client as it is a ProcessorService call.

      The correct usage of this call in Windchill script it :

      <SCRIPT LANGUAGE=Windchill> <!-- useProcessorService service=wt.templateutil.RedirectPageProcessor method=showRedirectExceptions --> </SCRIPT>



      Supported API: true

      Parameters:
      parameters -
      locale -
      os -
      Throws:
      WTException
    • printHiddenMessages

      public void printHiddenMessages(Vector messages, Properties parameters, Locale locale, OutputStream os, String startsWith)
      Deprecated.
      Prints elements of the Vector, messages, as an HTML form element. The HTML form element is a hidden field. This is done for each element in the Vector. The format for the output for element i in the vector is

      <INPUT TYPE=HIDDEN NAME=" + name + " VALUE=" + value + "<

      Where name = startsWith + i

      and value is either the stackTrace of an Exception, the localized String of a LocalizableMessage, or simply the toString method on the object.

      If the element at position i is null, nothing is printed out.

      The actual printing and formatting of the Hidden Form Element is done by getHiddenField

      Supported API: true

      Parameters:
      messages -
      parameters -
      locale -
      os -
      startsWith -
    • printHiddenExceptions

      public void printHiddenExceptions(Vector messages, Properties parameters, Locale locale, OutputStream os, String startsWith)
      Deprecated.
      Prints elements of the Vector, messages, as an HTML form element. The HTML form element is a hidden field. This is done for each element in the Vector. The format for the output for element i in the vector is

      <INPUT TYPE=HIDDEN NAME=" + name + " VALUE=" + value + "<

      Where name = startsWith + i

      and value is either the stackTrace of an Exception, the localized String of a LocalizableMessage, or simply the toString method on the object.

      If the element at position i is null, nothing is printed out.

      The actual printing and formatting of the Hidden Form Element is done by getHiddenField

      Supported API: true

      Parameters:
      messages -
      parameters -
      locale -
      os -
      startsWith -
    • getHiddenField

      public void getHiddenField(String name, String value)
      Deprecated.


      Supported API: true
      Parameters:
      name -
      value -
    • getState

      public HTTPState getState()
      Deprecated.
      Gets the object for the association that plays role: theState.

      Supported API: true
      Specified by:
      getState in interface ProcessorService
      Overrides:
      getState in class BasicTemplateProcessor
      Returns:
      HTTPState
    • setState

      public void setState(HTTPState a_State)
      Deprecated.
      Sets the object for the association that plays role: theState.

      Supported API: true
      Specified by:
      setState in interface ProcessorService
      Overrides:
      setState in class BasicTemplateProcessor
      Parameters:
      a_State -