wt.templateutil.processor
Class RedirectPageProcessor

java.lang.Object
  extended by wt.enterprise.BasicTemplateProcessor
      extended by wt.templateutil.processor.DefaultTemplateProcessor
          extended by wt.templateutil.processor.GenerateFormProcessor
              extended by wt.templateutil.processor.RedirectPageProcessor
All Implemented Interfaces:
Externalizable, Serializable, TemplateProcessor, ContextHolder, ContextTranslator, ProcessorService, Evolvable

Deprecated.

public class RedirectPageProcessor
extends GenerateFormProcessor
implements ProcessorService

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

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:
Serialized Form

Field Summary
static String REDIRECT_EXCEPTION_KEY
          Deprecated.  
static String REDIRECT_FOOTER_KEY
          Deprecated.  
static String REDIRECT_HEADER_KEY
          Deprecated.  
 
Fields inherited from interface wt.templateutil.processor.ProcessorService
STATE
 
Fields inherited from interface wt.templateutil.processor.ContextHolder
CONTEXT_ACTION, CONTEXT_CLASS_NAME, CONTEXT_OBJ, CONTEXT_PROPERTIES, FORM_DATA, QUERY_DATA, RESPONSE_EXCEPTIONS, RESPONSE_FOOTERS, RESPONSE_HEADERS, RESPONSE_MESSAGES, RESPONSE_STRING, STATUS
 
Fields inherited from interface wt.templateutil.processor.ContextTranslator
CONTEXT_LIST_IN, CONTEXT_LIST_OUT
 
Method Summary
 void addHiddenFields(Properties parameters, Locale locale, OutputStream os)
          Deprecated.  
 void getHiddenField(String name, String value)
          Deprecated.  
protected  PrintWriter getOut()
          Deprecated.  
 HTTPState getState()
          Deprecated.  
 void printHiddenExceptions(Vector messages, Properties parameters, Locale locale, OutputStream os, String startsWith)
          Deprecated.  
 void printHiddenMessages(Vector messages, Properties parameters, Locale locale, OutputStream os, String startsWith)
          Deprecated.  
 void setHtmlFormAction(Properties parameters, Locale locale, OutputStream os)
          Deprecated.  
protected  void setOut(PrintWriter a_Out)
          Deprecated.  
 void setState(HTTPState a_State)
          Deprecated.  
 void showRedirectExceptions(Properties parameters, Locale locale, OutputStream os)
          Deprecated.  
 void showRedirectFooters(Properties parameters, Locale locale, OutputStream os)
          Deprecated.  
 void showRedirectHeaders(Properties parameters, Locale locale, OutputStream os)
          Deprecated.  
 
Methods inherited from class wt.templateutil.processor.GenerateFormProcessor
contextualValue, listLifeCycles
 
Methods inherited from class wt.templateutil.processor.DefaultTemplateProcessor
displayAttributeLabel, displayAttributeVal, getAttributes, getContextPropertyValue, getHtmlTemplateFactory, getPAGE_EXPIRATION, getPageExpirationResource, getTemplate, setContextPropertyValue, setNameProcessor, setPAGE_EXPIRATION, setPageExpirationResource
 
Methods inherited from class wt.enterprise.BasicTemplateProcessor
addHTMLHelpLink, addToResponseExceptions, addToResponseFooters, addToResponseHeaders, addToResponseMessages, createActionsBar, createGlobalNavigationBar, createNavigationBar, currentTimestamp, getContextAction, getContextClassName, getContextListIn, getContextListOut, getContextObj, getContextProperties, getEncoding, getFormData, getHTMLHelpURL, getHTMLTableService, getLocalizedPrintWriter, getObjectIcon, getPrintWriter, getQueryData, getResourceString, getResponseExceptions, getResponseFooters, getResponseHeaders, getResponseMessages, getResponseString, getStatus, getURLProcessorLink, getWCColor, getWCColor, getWCColorDec, getWCFontFamily, getWCFontFamily, objectActionLink, objectBackground, objectIdentification, objectPropertyName, objectPropertyValue, processSubTemplate, setContextAction, setContextClassName, setContextListIn, setContextListOut, setContextObj, setContextProperties, setFormData, setQueryData, setResponseExceptions, setResponseFooters, setResponseHeaders, setResponseMessages, setResponseString, setStatus, showResponseExceptions, tableService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wt.templateutil.processor.ContextHolder
addToResponseExceptions, addToResponseFooters, addToResponseHeaders, addToResponseMessages, getContextAction, getContextClassName, getContextObj, getContextProperties, getFormData, getQueryData, getResponseExceptions, getResponseFooters, getResponseHeaders, getResponseMessages, getResponseString, getStatus, setContextAction, setContextClassName, setContextObj, setContextProperties, setFormData, setQueryData, setResponseExceptions, setResponseFooters, setResponseHeaders, setResponseMessages, setResponseString, setStatus
 

Field Detail

REDIRECT_HEADER_KEY

public static final String REDIRECT_HEADER_KEY
Deprecated. 


Supported API: true

See Also:
Constant Field Values

REDIRECT_FOOTER_KEY

public static final String REDIRECT_FOOTER_KEY
Deprecated. 


Supported API: true

See Also:
Constant Field Values

REDIRECT_EXCEPTION_KEY

public static final String REDIRECT_EXCEPTION_KEY
Deprecated. 


Supported API: true

See Also:
Constant Field Values
Method Detail

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 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
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
Parameters:
a_State -