Class RedirectPageProcessor
- All Implemented Interfaces:
Externalizable,Serializable,TemplateProcessor,ContextHolder,ContextTranslator,ProcessorService,Evolvable
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
Supported API: true
Extendable: false
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.static final StringDeprecated.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, STATUSFields inherited from interface wt.templateutil.processor.ContextTranslator
CONTEXT_LIST_IN, CONTEXT_LIST_OUTFields inherited from interface wt.templateutil.processor.ProcessorService
STATE -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHiddenFields(Properties parameters, Locale locale, OutputStream os) Deprecated.voidgetHiddenField(String name, String value) Deprecated.protected PrintWritergetOut()Deprecated.getState()Deprecated.voidprintHiddenExceptions(Vector messages, Properties parameters, Locale locale, OutputStream os, String startsWith) Deprecated.voidprintHiddenMessages(Vector messages, Properties parameters, Locale locale, OutputStream os, String startsWith) Deprecated.voidsetHtmlFormAction(Properties parameters, Locale locale, OutputStream os) Deprecated.protected voidsetOut(PrintWriter a_Out) Deprecated.voidDeprecated.voidshowRedirectExceptions(Properties parameters, Locale locale, OutputStream os) Deprecated.voidshowRedirectFooters(Properties parameters, Locale locale, OutputStream os) Deprecated.voidshowRedirectHeaders(Properties parameters, Locale locale, OutputStream os) Deprecated.Methods inherited from class wt.templateutil.processor.GenerateFormProcessor
contextualValue, listLifeCyclesMethods inherited from class wt.templateutil.processor.DefaultTemplateProcessor
displayAttributeLabel, displayAttributeVal, getAttributes, getContextPropertyValue, getHtmlTemplateFactory, getPAGE_EXPIRATION, getPageExpirationResource, getTemplate, setContextPropertyValue, setNameProcessor, setPAGE_EXPIRATION, setPageExpirationResourceMethods 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, getWCColorDec, getWCFontFamily, objectActionLink, objectBackground, objectIdentification, objectPropertyName, objectPropertyValue, processSubTemplate, setContextAction, setContextClassName, setContextListIn, setContextListOut, setContextObj, setContextProperties, setFormData, setQueryData, setResponseExceptions, setResponseFooters, setResponseHeaders, setResponseMessages, setResponseString, setStatus, showResponseExceptions, tableServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 Details
-
REDIRECT_HEADER_KEY
Deprecated.
Supported API: true- See Also:
-
REDIRECT_FOOTER_KEY
Deprecated.
Supported API: true- See Also:
-
REDIRECT_EXCEPTION_KEY
Deprecated.
Supported API: true- See Also:
-
-
Method Details
-
getOut
Deprecated.Gets the value of the attribute: out.
Supported API: true- Returns:
- PrintWriter
-
setOut
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. ThegetRedirectUrlmethod 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
-
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
Deprecated.
Supported API: true- Parameters:
name-value-
-
getState
Deprecated.Gets the object for the association that plays role: theState.
Supported API: true- Specified by:
getStatein interfaceProcessorService- Overrides:
getStatein classBasicTemplateProcessor- Returns:
- HTTPState
-
setState
Deprecated.Sets the object for the association that plays role: theState.
Supported API: true- Specified by:
setStatein interfaceProcessorService- Overrides:
setStatein classBasicTemplateProcessor- Parameters:
a_State-
-