Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.provider.v2.render
Class PortletRendererUtil

java.lang.Object
  extended by oracle.portal.provider.v2.render.PortletRendererUtil
Direct Known Subclasses:
HttpPortletRendererUtil

public class PortletRendererUtil
extends java.lang.Object

Contains utilities useful for rendering.


Field Summary
static int BACK_LINK
           
static int DESIGN_LINK
           
static int EVENT_LINK
           
static int LOGIN_LINK
           
static int PAGE_LINK
           
static java.lang.String PORTLET_PARAMETER_PREFIX
          prefix used for url parameters that correspond to private portlet parameters.
static int REQUEST_LINK
           
 
Constructor Summary
PortletRendererUtil()
           
 
Method Summary
static java.lang.String absoluteLink(PortletRenderRequest pr, java.lang.String relativePath)
          Deprecated. use UrlUtils.absoluteLink(PortletRenderRequest, String)
static java.lang.String constructDetailLink(PortletRenderRequest pr, NameValue[] params, boolean encodeParams, boolean replaceParams)
          Deprecated. use UrlUtils.constructDetailHTMLLink(oracle.portal.provider.v2.render.PortletRenderRequest, oracle.portal.utils.NameValue[], java.lang.String, java.lang.String, boolean, boolean)
static java.lang.String constructHelpLink(PortletRenderRequest pr, NameValue[] params, boolean encodeParams, boolean replaceParams)
          Deprecated. use UrlUtils.constructHelpHTMLLink(oracle.portal.provider.v2.render.PortletRenderRequest, oracle.portal.utils.NameValue[], java.lang.String, java.lang.String, boolean, boolean)
static java.lang.String constructLink(PortletRenderRequest pr, java.lang.String link, NameValue[] params, boolean encodeParams, boolean replaceParams)
          Deprecated. use UrlUtils.constructLink( PortletRenderRequest, String, NameValue[], boolean, boolean)
static java.lang.String emitHiddenField(java.lang.String name, java.lang.String value)
          Deprecated. use UrlUtils.emitHiddenField(String, String)
static java.lang.String encodeParameter(java.lang.String param, PortletRenderRequest pr)
          Deprecated. use UrlUtils.encodeParameter(String, PortletRenderRequest)
static java.lang.Object getEditData(PortletRenderRequest pr)
          Utility for getting the customization data for a particular edit request.
static java.lang.Object getEditDefaultData(PortletRenderRequest pr)
          Returns the edit defaults data for a particular edit request.
static java.lang.String getEditFormParameter(PortletRenderRequest pr)
          Retrieves the RenderManager defaulted/set customize form action parameter name.
static java.lang.String getModeName(int mode)
          Returns the name of the render mode given its value.
static java.lang.String getModeTitle(PortletRenderRequest request)
          gets the default title for a portlet based on the mode being rendered
static int getModeValue(java.lang.String name)
          Returns the render mode for the given render mode name.
static java.lang.String getShortTitle(PortletRenderRequest pr)
          Retrieves the short title of this portlet.
static java.lang.String getTitle(PortletRenderRequest pr)
          Retrieves the title of this portlet.
static java.lang.String htmlFormActionLink(PortletRenderRequest pr, int linkType)
          Deprecated. use UrlUtils.htmlFormActionLink(PortletRenderRequest, int)
static java.lang.String htmlFormActionLink(java.lang.String ref)
          Deprecated. use UrlUtils.htmlFormActionLink(String)
static java.lang.String htmlFormHiddenFields(PortletRenderRequest pr, int linkType)
          Deprecated. use UrlUtils.htmlFormHiddenFields(PortletRenderRequest, int)
static java.lang.String htmlFormHiddenFields(java.lang.String ref)
          Deprecated. use UrlUtils.htmlFormHiddenFields(String)
static java.lang.String parameterizeLink(PortletRenderRequest pr, int linkType, java.lang.String queryString)
          Deprecated. use UrlUtils.parameterizeLink(PortletRenderRequest, int, String)
static java.lang.String parameterizeLink(java.lang.String link, java.lang.String queryString)
          Deprecated. use UrlUtils.parameterizeLink(String, String)
static java.lang.String portletParameter(PortletRenderRequest request, java.lang.String param)
          Utility that turns a query string parameter name into fully qualified (unique) name.
static void renderCustomizeFormFooter(PortletRenderRequest request, java.io.Writer writer)
          Deprecated. use PortletContainerRenderer.renderEditFooter()
static void renderCustomizeFormHeader(PortletRenderRequest request, java.io.Writer writer, java.lang.String title, java.lang.String actionParam, java.lang.String additionalHidden, java.lang.String helpURL)
          Deprecated. use DefaultContainerRenderer.renderEditHeader()
static void renderError(PortletRenderRequest request, java.io.Writer writer, java.util.Locale locale, java.lang.String errorText)
          Convenience method to display a single error message using the standard Portal style sheet
static void renderErrorFooter(PortletRenderRequest request, java.io.Writer writer)
          Utility to display a standard footer for error messages.
static void renderErrorHeader(PortletRenderRequest request, java.io.Writer writer)
          Utility to display a standard header before any error text.
static void renderErrorLine(PortletRenderRequest request, java.io.Writer writer, java.util.Locale locale, java.lang.String errorText)
          Utility to display a single error message using the standard Portal style sheet.
static void renderInformationFormFooter(PortletRenderRequest request, java.io.Writer writer)
          Deprecated. use DefaultContainerRenderer.renderInformationFormFooter()
static void renderInformationFormHeader(PortletRenderRequest request, java.io.Writer writer, java.lang.String formName, java.lang.String title, java.lang.String actionParam, java.lang.String helpURL)
          Deprecated. use DefaultContainerRenderer.renderInformationFormHeader()
static void renderPortletFooter(PortletRenderRequest request, boolean renderCustomize)
          Deprecated. use PortletContainerRenderer.renderPortletFooter()
static void renderPortletFooter(PortletRenderRequest request, java.io.Writer writer)
          Deprecated. use PortletContainerRenderer.renderPortletFooter()
static void renderPortletHeader(PortletRenderRequest request, boolean renderCustomize, java.lang.String param)
          Deprecated. use PortletContainerRenderer.renderPortletHeader()
static void renderPortletHeader(PortletRenderRequest request, java.io.Writer writer, java.lang.String title)
          Deprecated. use PortletContainerRenderer.renderPortletHeader()
static void renderPortletHeader(PortletRenderRequest request, java.io.Writer writer, java.lang.String title, int renderMode)
          Deprecated. use PortletContainerRenderer.renderPortletHeader()
static void renderPortletTitlebar(PortletRenderRequest request, java.io.Writer writer, java.lang.String title)
          Renders a portlet's titlebar.
static void renderPortletTitlebar(PortletRenderRequest request, java.io.Writer writer, java.lang.String title, int renderMode)
          Renders a portlet's titlebar.
static void submitEditData(PortletRenderRequest pr, java.lang.Object o)
          Utility for submitting the customization data for a particular edit request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGE_LINK

public static final int PAGE_LINK
See Also:
Constant Field Values

DESIGN_LINK

public static final int DESIGN_LINK
See Also:
Constant Field Values

REQUEST_LINK

public static final int REQUEST_LINK
See Also:
Constant Field Values

LOGIN_LINK

public static final int LOGIN_LINK
See Also:
Constant Field Values

BACK_LINK

public static final int BACK_LINK
See Also:
Constant Field Values

EVENT_LINK

public static final int EVENT_LINK
See Also:
Constant Field Values

PORTLET_PARAMETER_PREFIX

public static final java.lang.String PORTLET_PARAMETER_PREFIX
prefix used for url parameters that correspond to private portlet parameters.

See Also:
Constant Field Values
Constructor Detail

PortletRendererUtil

public PortletRendererUtil()
Method Detail

renderCustomizeFormHeader

public static void renderCustomizeFormHeader(PortletRenderRequest request,
                                             java.io.Writer writer,
                                             java.lang.String title,
                                             java.lang.String actionParam,
                                             java.lang.String additionalHidden,
                                             java.lang.String helpURL)
                                      throws java.io.IOException
Deprecated. use DefaultContainerRenderer.renderEditHeader()

Utility method for rendering the Customize form. This method should be used in conjunction with renderCustomizeFormFooter() to work correctly. This routine emits the proper html FORM tag, appropriate hidden fields, the standard look/feel for the Form container, and the customize form 'APPLY', 'OK', and 'Cancel' button. A submitted form (via 'OK' or 'APPLY') will recall the same portlet renderer with the same mode (EDIT or EDIT_DEFAULTS) passing the action in the hidden field named via actionParam. Clients check the value of actionParam to determine if an 'OK' or 'APPLY' was clicked. A cancelled form isn't resubmitted to the renderer. Rather the "Cancel" button links directly back to the page from whence the customize was invoked.

Parameters:
request - the portlet render request.
writer - the response writer used to output the customize form header.
title - the to display in the header (titlebar)
actionParam - the name of the hidden field that will hold the value that indicates which button was clicked. The value is 'OK' if the OK button was clicked. The value is 'APPLY' if the APPLY button is clicked
additionalHidden - a String containing the HTML for additional hidden fields needed by the client.
helpURL - a URL to this customize form's help screen. If null the help link is not displayed.
Throws:
java.io.IOException

renderCustomizeFormFooter

public static void renderCustomizeFormFooter(PortletRenderRequest request,
                                             java.io.Writer writer)
                                      throws java.io.IOException
Deprecated. use PortletContainerRenderer.renderEditFooter()

Utility method for completing the rendering of the Customize form. This method should be used in conjunction with renderCustomizeFormHeader() to work correctly. This routine emits the proper html tags to close the FORM including the standard look/feel for the Form container.

Parameters:
request - the portlet render request.
writer - the response writer used to output the customize form header.
Throws:
java.io.IOException

renderInformationFormHeader

public static void renderInformationFormHeader(PortletRenderRequest request,
                                               java.io.Writer writer,
                                               java.lang.String formName,
                                               java.lang.String title,
                                               java.lang.String actionParam,
                                               java.lang.String helpURL)
                                        throws java.io.IOException
Deprecated. use DefaultContainerRenderer.renderInformationFormHeader()

Utility method for rendering the About/Help form. This method should be used in conjunction with renderInformationFormFooter() to work correctly. This routine emits the proper html FORM tag, appropriate hidden fields, the standard look/feel for the Form container, and the customize form 'Close' button.

Throws:
java.io.IOException

renderInformationFormFooter

public static void renderInformationFormFooter(PortletRenderRequest request,
                                               java.io.Writer writer)
                                        throws java.io.IOException
Deprecated. use DefaultContainerRenderer.renderInformationFormFooter()

Utility method for completing the rendering of the Help/About information form. This method should be used in conjunction with renderInformationFormHeader() to work correctly. This routine emits the proper html tags to close the FORM including the standard look/feel for the Form container.

Parameters:
request - the portlet render request.
writer - the response writer used to output the customize form header.
Throws:
java.io.IOException

renderPortletHeader

public static void renderPortletHeader(PortletRenderRequest request,
                                       java.io.Writer writer,
                                       java.lang.String title)
                                throws java.io.IOException
Deprecated. use PortletContainerRenderer.renderPortletHeader()

Opens rendering of the portlet's container. Portlets are responsible for rendering their container. This method used in conjunction with renderPortletFooter renders the standard container including borders and titlebar. Use the methods as bookends. renderPortletHeader should be called before the portlet renders (its body) and renderPortletFooter should be called after the portlet renders (its body).

Parameters:
request - the portlet render request
title - the titlebar label. If null the portlet's static title is used.
Throws:
java.io.IOException

renderPortletHeader

public static void renderPortletHeader(PortletRenderRequest request,
                                       java.io.Writer writer,
                                       java.lang.String title,
                                       int renderMode)
                                throws java.io.IOException
Deprecated. use PortletContainerRenderer.renderPortletHeader()

Opens rendering of the portlet's container. Portlets are responsible for rendering their container. This method used in conjunction with renderPortletFooter renders the standard container including borders and titlebar. Use the methods as bookends. renderPortletHeader should be called before the portlet renders (its body) and renderPortletFooter should be called after the portlet renders (its body).

Parameters:
request - the portlet render request
title - the titlebar label. If null the portlet's static title is used.
renderMode - the mode currently being rendered. Used to control rendering of the title bar so it does not include active links in preview mode
Throws:
java.io.IOException

renderPortletFooter

public static void renderPortletFooter(PortletRenderRequest request,
                                       java.io.Writer writer)
                                throws java.io.IOException
Deprecated. use PortletContainerRenderer.renderPortletFooter()

Closes rendering of the portlet container. Portlets are responsible for rendering their container. This method used in conjunction with renderPortletHeader renders the standard container including borders and titlebar. Use the methods as bookends. renderPortletHeader should be called before the portlet renders (its body) and renderPortletFooter should be called after the portlet renders (its body).

Parameters:
request - the portlet render request
Throws:
java.io.IOException

renderPortletTitlebar

public static void renderPortletTitlebar(PortletRenderRequest request,
                                         java.io.Writer writer,
                                         java.lang.String title)
                                  throws java.io.IOException
Renders a portlet's titlebar. Portlets are responsible for rendering their container. This method renders the standard portlet titlebar using information from the request and Portlet meta-data. Typically, clients will not use this method. Rather they wil rely on renderPortletBegin() to render the entire container including the titlebar. If however, renderPortletBegin is not used, this method is provided for convenience.

Parameters:
request - the portlet render request
title - the label that should be displayed as the title. if null then the method will render the static title retrieved via Portlet.getTitle();
Throws:
java.io.IOException

renderPortletTitlebar

public static void renderPortletTitlebar(PortletRenderRequest request,
                                         java.io.Writer writer,
                                         java.lang.String title,
                                         int renderMode)
                                  throws java.io.IOException
Renders a portlet's titlebar. Portlets are responsible for rendering their container. This method renders the standard portlet titlebar using information from the request and Portlet meta-data. Typically, clients will not use this method. Rather they wil rely on renderPortletBegin() to render the entire container including the titlebar. If however, renderPortletBegin is not used, this method is provided for convenience.

Parameters:
request - the portlet render request
title - the label that should be displayed as the title. if null then the method will render the static title retrieved via Portlet.getTitle();
Throws:
java.io.IOException

renderPortletHeader

public static void renderPortletHeader(PortletRenderRequest request,
                                       boolean renderCustomize,
                                       java.lang.String param)
                                throws AccessControlException,
                                       java.io.IOException
Deprecated. use PortletContainerRenderer.renderPortletHeader()

Renders the appropriate header based on the render mode contained within the PortletRenderRequest. Setting renderCustomize to false will give the developer control over rendering the header for the edit and edit defaults modes. If the developer chooses to let this method render the customize headers, a String must be supplied for the action parameter.

Parameters:
request - a PortletRenderRequest.
renderCustomize - boolean flag indicating whether or not to render the header for the customize modes.
param - the name of the action parameter for the customize forms.
Throws:
AccessControlException
java.io.IOException

renderPortletFooter

public static void renderPortletFooter(PortletRenderRequest request,
                                       boolean renderCustomize)
                                throws AccessControlException,
                                       java.io.IOException
Deprecated. use PortletContainerRenderer.renderPortletFooter()

Renders the appropriate footer based on the render mode contained within the PortletRenderRequest. Setting renderCustomize to false will give the developer control over rendering the footer for the edit and edit defaults modes.

Parameters:
request - a PortletRenderRequest.
renderCustomize - boolean flag indicating whether or not to render the footer for the customize modes.
Throws:
AccessControlException
java.io.IOException

parameterizeLink

public static java.lang.String parameterizeLink(PortletRenderRequest pr,
                                                int linkType,
                                                java.lang.String queryString)
                                         throws java.lang.IllegalArgumentException
Deprecated. use UrlUtils.parameterizeLink(PortletRenderRequest, int, String)

Adds new parameters to an existing link. There are various links available to the portlet for use while rendering its response. This utility method conveniently adds parameters to one of these links. The method overrides existing parameters is they exist. I.e. existing (queryString) parameters will be removed if it duplicates (by name) a new parameter.

Parameters:
pr - the request.
linkType - the id for the link we want to parameterize. ID constants are defined in PortletRendererUtil.
queryString - the parameters to be added in properly encodes queryString form. the String should begin with the first parameter name not a "?".
Throws:
java.lang.IllegalArgumentException

parameterizeLink

public static java.lang.String parameterizeLink(java.lang.String link,
                                                java.lang.String queryString)
Deprecated. use UrlUtils.parameterizeLink(String, String)

Adds new parameters to an existing link. There are various links available to the portlet for use while rendering its response. This utility method conveniently adds parameters to one of these links. The method overrides existing parameters is they exist. I.e. existing (queryString) parameters will be removed if it duplicates (by name) a new parameter.

Parameters:
link - the link to add parameters to.
queryString - the parameters to be added in properly encodes queryString form. the String should begin with the first parameter name not a "?".

absoluteLink

public static java.lang.String absoluteLink(PortletRenderRequest pr,
                                            java.lang.String relativePath)
Deprecated. use UrlUtils.absoluteLink(PortletRenderRequest, String)

Returns a fully-qualified URI for a path relative to the current request. As Web (Http) Portlets are called indirectly via the portal the client browser's current path is to the portal not to the portlet. Because of this all HREFs must be expressed using fully qualified paths vs. the traditional relative paths. This method allows you to properly encode a relative path. Note: this is equivalent to portletLink(). I.e the method only differs when the renderer is reached via a "forward" as is the case with a servlet or JSP.

Parameters:
pr - the PortletRenderRequest
relativePath - the path we want to make absolute

htmlFormActionLink

public static java.lang.String htmlFormActionLink(java.lang.String ref)
Deprecated. use UrlUtils.htmlFormActionLink(String)

Transforms a URI into the appropriate form to be used in a FORM action tag.

Parameters:
ref - the URI to be transformed

htmlFormActionLink

public static java.lang.String htmlFormActionLink(PortletRenderRequest pr,
                                                  int linkType)
                                           throws java.lang.IllegalArgumentException
Deprecated. use UrlUtils.htmlFormActionLink(PortletRenderRequest, int)

Transforms one of the various URIs known to the request into the appropriate form to be used in a FORM action tag.

Parameters:
pr - the PortletRenderRequest
linkType - the link in this request that should be used.
Throws:
java.lang.IllegalArgumentException

htmlFormHiddenFields

public static java.lang.String htmlFormHiddenFields(PortletRenderRequest pr,
                                                    int linkType)
                                             throws java.lang.IllegalArgumentException
Deprecated. use UrlUtils.htmlFormHiddenFields(PortletRenderRequest, int)

Encodes the parameters in the query string of the passed URL as hidden form fields. When "linking" back to the portlet via a form, the URI parameters must be added as hidden fields. These parameters are found in the querystring of your URI. This utility method generates the hidden field tags from this URL and returns them as a String.

Parameters:
pr - the request
linkType - the link to use. Constants representing these types are defined in PortletRendererUtil.
Throws:
java.lang.IllegalArgumentException

htmlFormHiddenFields

public static java.lang.String htmlFormHiddenFields(java.lang.String ref)
Deprecated. use UrlUtils.htmlFormHiddenFields(String)

Encodes the parameters in the query string of the passed URL as hidden form fields. When "linking" back to the portlet via a form, the URI parameters must be added as hidden fields. These parameters are found in the querystring of your URI. This utility method generates the hidden field tags from this URL and returns them as a String.

Parameters:
ref - the URI

constructDetailLink

public static java.lang.String constructDetailLink(PortletRenderRequest pr,
                                                   NameValue[] params,
                                                   boolean encodeParams,
                                                   boolean replaceParams)
                                            throws PortletException
Deprecated. use UrlUtils.constructDetailHTMLLink(oracle.portal.provider.v2.render.PortletRenderRequest, oracle.portal.utils.NameValue[], java.lang.String, java.lang.String, boolean, boolean)

Create a parameterized link for a portlet detail page By default, a portlet can have a single "detail" page that allows you to view portlet information in a full-screen mode. This methods allows you to create many "detail" links with different sets of parameters. You can use these links anywhere in the body of your portlet to create a portlet that has more than one detail page. When a user clicks on a detail link within your portlet, your portlet will be called and the renderer associated with "detail" mode will be invoked. You can use the parameters you add to the detail link to determine which "detail page" the renderer should emit.

Parameters:
pr - the render request.
params - an array of NameValue objects representing the parameter names and associated values. Names cannot be NULL
encodeParams - flag indicating whether the parameter names and values should be URL encoded using the multibyte URL encoder.
Throws:
PortletException

constructHelpLink

public static java.lang.String constructHelpLink(PortletRenderRequest pr,
                                                 NameValue[] params,
                                                 boolean encodeParams,
                                                 boolean replaceParams)
                                          throws PortletException
Deprecated. use UrlUtils.constructHelpHTMLLink(oracle.portal.provider.v2.render.PortletRenderRequest, oracle.portal.utils.NameValue[], java.lang.String, java.lang.String, boolean, boolean)

Create a parameterized link for a portlet help page By default, a portlet can have a single "help" page that allows you to display help information for your portlet in a full-screen mode. This methods allows you to create many "help" links with different sets of parameters. You can use these links anywhere in the body of your portlet to create context sensitive help pages. When a user clicks on a help link within your portlet, your portlet will be called and the renderer associated with "help" mode will be invoked. You can use the parameters you add to the detail link to determine which "help page" the renderer should emit.

Parameters:
pr - the render request.
params - an array of NameValue objects representing the parameter names and associated values. Names cannot be NULL
encodeParams - flag indicating whether the parameter names and values should be URL encoded using the multibyte URL encoder.
Throws:
PortletException

constructLink

public static java.lang.String constructLink(PortletRenderRequest pr,
                                             java.lang.String link,
                                             NameValue[] params,
                                             boolean encodeParams,
                                             boolean replaceParams)
                                      throws java.lang.IllegalArgumentException,
                                             java.io.IOException
Deprecated. use UrlUtils.constructLink( PortletRenderRequest, String, NameValue[], boolean, boolean)

Generic utility to append parameters to a link.

Parameters:
pr - render request
link - the link to be parameterized
params - array of NameValue objects representing the parameters
encodeParams - flag indicating whether parameter names and values should be encoded
replaceParams - flag indicating whether parameters contained in the params array should replace existing parameters of the same name. true = replace or overwrite existing parameters. false = simply add parameters
Returns:
original link with additional parameters.
Throws:
java.lang.IllegalArgumentException
java.io.IOException

getModeName

public static java.lang.String getModeName(int mode)
                                    throws java.lang.IllegalArgumentException
Returns the name of the render mode given its value.

Parameters:
mode - render mode value
Returns:
render mode name
Throws:
java.lang.IllegalArgumentException

getModeValue

public static int getModeValue(java.lang.String name)
                        throws java.lang.IllegalArgumentException
Returns the render mode for the given render mode name.

Parameters:
name - render mode name
Returns:
the render mode
Throws:
java.lang.IllegalArgumentException

getEditData

public static java.lang.Object getEditData(PortletRenderRequest pr)
                                    throws PortletNotFoundException,
                                           java.io.IOException,
                                           AccessControlException
Utility for getting the customization data for a particular edit request. Hides the details of when to use the system/default vs. user customization.

Parameters:
pr - the request.
Throws:
PortletNotFoundException
java.io.IOException
AccessControlException

getEditDefaultData

public static java.lang.Object getEditDefaultData(PortletRenderRequest pr)
                                           throws PortletNotFoundException,
                                                  java.io.IOException,
                                                  AccessControlException
Returns the edit defaults data for a particular edit request.

Parameters:
pr - the request.
Throws:
PortletNotFoundException
java.io.IOException
AccessControlException

renderError

public static void renderError(PortletRenderRequest request,
                               java.io.Writer writer,
                               java.util.Locale locale,
                               java.lang.String errorText)
                        throws java.io.IOException
Convenience method to display a single error message using the standard Portal style sheet

Throws:
java.io.IOException

renderErrorHeader

public static void renderErrorHeader(PortletRenderRequest request,
                                     java.io.Writer writer)
                              throws java.io.IOException
Utility to display a standard header before any error text. Use in conjunction with renderErrorHeader and renderErrorLine

Throws:
java.io.IOException

renderErrorLine

public static void renderErrorLine(PortletRenderRequest request,
                                   java.io.Writer writer,
                                   java.util.Locale locale,
                                   java.lang.String errorText)
                            throws java.io.IOException
Utility to display a single error message using the standard Portal style sheet. Use in conjunction with renderErrorHeader() and renderErrorFooter() when you need to display multiple error messages.

Throws:
java.io.IOException

renderErrorFooter

public static void renderErrorFooter(PortletRenderRequest request,
                                     java.io.Writer writer)
                              throws java.io.IOException
Utility to display a standard footer for error messages. Use in conjunction with renderErrorHeader and renderErrorLine

Throws:
java.io.IOException

submitEditData

public static void submitEditData(PortletRenderRequest pr,
                                  java.lang.Object o)
                           throws java.io.IOException,
                                  AccessControlException
Utility for submitting the customization data for a particular edit request. Takes care of creating the customization if necessary.

Parameters:
pr - the request.
o - object holding the customization data.
Throws:
java.io.IOException
AccessControlException

portletParameter

public static java.lang.String portletParameter(PortletRenderRequest request,
                                                java.lang.String param)
Utility that turns a query string parameter name into fully qualified (unique) name. Portlets on the same page share request parameters. To ensure each Portlet can locate its specific parameters, query string parameter names must be fully qualified. Note: Url parameter names generated via this method should be later retrieved using getQualifiedParameter/getQualifiedParameterValues which takes unqualified names. getParameter/getParameterValues using a fully qualified name will not work in general.

Parameters:
request - the current request.
param - the name of the parameter to be qualified.

getEditFormParameter

public static java.lang.String getEditFormParameter(PortletRenderRequest pr)
Retrieves the RenderManager defaulted/set customize form action parameter name. If this Portlet does not use RenderManager as its PortletRenderer, null is returned.

Parameters:
pr - a PortletRenderRequest
Returns:
edit form parameter name.

getTitle

public static java.lang.String getTitle(PortletRenderRequest pr)
                                 throws AccessControlException
Retrieves the title of this portlet. If a customized title exists for the current user, this is returned. If not, the default title for the current locale is returned.

Parameters:
pr - a PortletRenderRequest.
Returns:
the portlet's title.
Throws:
AccessControlException

getShortTitle

public static java.lang.String getShortTitle(PortletRenderRequest pr)
                                      throws AccessControlException
Retrieves the short title of this portlet. If a customized short title exists for the current user, this is returned. If not, the default title for the current locale is returned.

Parameters:
pr - a PortletRenderRequest.
Returns:
the portlet's title. If there is no short title then null is returned.
Throws:
AccessControlException

getModeTitle

public static java.lang.String getModeTitle(PortletRenderRequest request)
gets the default title for a portlet based on the mode being rendered


encodeParameter

public static java.lang.String encodeParameter(java.lang.String param,
                                               PortletRenderRequest pr)
                                        throws java.io.IOException
Deprecated. use UrlUtils.encodeParameter(String, PortletRenderRequest)

Encodes a parameter for inclusion in a URL. Parameter is encoded using the same character set that was used when the portal encoded the request parameters. The character sets must be the same so that parameters that may be intended for another portlet implemented in pl/sql can decode them correctly.

Parameters:
param - the parameter to be encoded
pr - PortletRenderRequest object for this request
Returns:
encoded parameter, suitable for inclusion in a URL
Throws:
java.io.IOException

emitHiddenField

public static java.lang.String emitHiddenField(java.lang.String name,
                                               java.lang.String value)
Deprecated. use UrlUtils.emitHiddenField(String, String)

Utility to emit a single HTML hidden field with a specified name and value.

Parameters:
name - the name of the hidden field
value - the value of the hidden field
Returns:
a string containing the HTML hidden field markup

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.