BEA Logo BEA WebLogic Portal Release 4.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Portal Documentation   |   Portals and Portlets   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Portal Management JSP Tag Library Reference

 

WebLogic Portal includes a set of JSP tags designed to facilitate the development of portals and portlets. Use these predefined tags to reduce the amount of Java code required in your JSP page. This topic explains how to import each set of tags into your Web pages, and describes the purpose of each tag.

In the following tables, the Required column specifies if the attribute is required (yes) or optional (no). In the R/C column, C means that the attribute is a Compile time expression, and R means that the attribute can be either a Request time expression or a Compile time expression.

This topic includes the following sections:

 


Importing Tag Libraries

To use these tags you must import them into each JSP page. Import the JSP tags described in this document by including the following code in your JSP page:

 


Portlet Tag Libraries

The following section describes the portlet tags and their attributes.

<portlet:createWebflowURL>

The <portlet:createWebflowURL> tag is used in a portlet to dynamically create a Webflow URL in a JSP. The Webflow URL may include the protocol, domain name, port, Web application URI, WebflowServlet URI, and query string.

Table 6-1 <portlet:createWebflowURL>

Tag Attribute

Required

Type

Description

R/C

pageName

No

String

The page from which the event is generated.

R

portletName

No

String

The relevant portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

event

Yes

String

Webflow will use this in combination with the origin to resolve a destination in the supplied namespace XML file.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

C

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

C

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

C

Example

The following code sample illustrates how to use the <portlet:createWebflowURL> JSP tag:

<%@ taglib uri="portlet.tld" prefix="portlet" %>...

<center>
<font size="6" color="green">Portlet 2 - Page 1</font><BR>
<p>
<p>
Portlet Webflow Test:
<p>
<a href="<portlet:createWebflowURL event="switch"/>">Next Page</a>
<p>
</center>

<portlet:form>

The <portlet:form> tag is used in a JSP to dynamically generate an HTML form tag. This tag is not as sophisticated as the <portlet:validatedForm> tag, but is simpler. For more information about the <portlet:validatedForm> tag, refer to the next section.

Table 6-2 <portlet:form>

Tag Attribute

Required

Type

Description

R/C

pageName

No

String

The page from which the event is generated.

R

portletName

No

String

The relevant portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

event

yes

String

Webflow will use this in combination with the origin to resolve a destination in the supplied namespace XML file.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

C

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

C

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not except cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not except cookies.

C

hide

No

String

If set to false, the namespace, origin, and event will be displayed on the command line instead of as hidden form fields.
Valid values are true and false. The default value is true.

C

method

No

String

The method to be used for the form. Valid values are get and post. The default value is post.

C

name

No

String

The name of the form.

C

<portlet:validatedForm>

The <portlet:validatedForm> tag is used to dynamically generate HTML forms that can be validated. When a Web site visitor enters invalid information, the visitor's input is preserved and redisplayed with an appropriate error message..

Table 6-3 <portlet:ValidatedForm>

Tag Attribute

Required

Type

Description

R/C

pageName

No

String

The page from which the validated form URL is generated

R

portletName

No

String

The relevant portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

event

yes

String

Webflow will use this in combination with the origin to resolve a destination in the supplied namespace XML file.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

C

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

C

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

C

hide

No

String

If set to false, the namespace, origin, and event will be displayed on the command line instead of as hidden form fields.
Valid values are true and false. The default value is true.

C

method

No

String

The method to be used for the form. Valid values are get and post. The default value is post.

C

name

No

String

The name of the form.

C

validStyle

No

String

The style used to format the HTML field when it is valid.

R

invalidStyle

No

String

The style used to format the HTML field or the message when the field is invalid.

R

unspecifiedStyle

No

String

Used to specify the initial style of the HTML field before validation occurs.

R

styleId

No

String

Scripting variable that will be set to one of invalidStyle, unSpecifiedStyle, or validStyle, depending on the field's status: valid, invalid, unspecified. Can be used for finer control of formatting the HTML form.

R

applyStyle

No

String

Applies the associated style as indicated by the field status to the message, the field, or to none. Therefore, valid values are message, field, and none. The default value is message.

C

messageAlign

No

String

Indicates whether to align the error message above the field, to the right of the field, or below the field. Therefore, value values are top, right, and bottom. The default value is right.

C

Example

The following code sample illustrates how to use the <portlet:validatedForm> JSP tag:

<%@ taglib uri="portlet.tld" prefix="portlet" %>
<%@ taglib uri="webflow.tld" prefix="webflow" %>
<center>
<% String validStyle="color: black; font-family: Arial"; %>
<% String invalidStyle="color: darkred; font-style: Arial"; %>
<%-- If there was an InvalidFormDataException thrown display the message --%>
<font size="3" color="darkred"><portlet:getException/></font>
<br>
<webflow:getProperty id="welcomeStr" property="WELCOME_STRING"
type="java.lang.String" scope="request" namespace="portlet3"/>
<% if (welcomeStr == null || welcomeStr.length() < 1)
{
%>
<portlet:validatedForm event="button.go" applyStyle="message" messageAlign="right"
validStyle="<%=validStyle%>" invalidStyle="<%=invalidStyle%>"
unspecifiedStyle="<%=validStyle%>" >
<p>
Welcome :
<webflow:text name="welcome" value="Hello" size="15" maxlength="30" /> <br>
<input type="submit" name="Submit"/> </portlet:validatedForm>
<br>
<%
}
else
{
%>
<font size="5" color="green"><%= welcomeStr %></font>
<%
}
%>
</center>
<p>

<portlet:createPortletEditURL>

The <portlet:createPortletEditURL> tag generates a webflow URL that represents editing a portlet.

Table 6-4 <portlet:createPortletEditURL>

Tag Attribute

Required

Type

Description

R/C

pageName

No

String

The page from which the edit URL is generated.

R

portletName

No

String

The relevant portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.


R

Example

The following code sample illustrates how to use the <portlet:createPortletEditURL> JSP tag:

        }
if (PortletRenderHelper.isEditable(request))
{
%>

<td width="1%" valign="middle"><a href="<portlet:createPortletEditURL httpsInd='http'/>">
<img src="<webflow:createResourceURL resource='<%=imagesPath+"portlet_edit.gif"%>'/>" hspace="1" vspace="2" border="0" alt="Edit" align="absmiddle"></a></td>
<%

<portlet:createPortletUneditURL>

The <createPortletUneditURL> JSP Tag generates a webflow URL that represents leaving the edit URL and moving to another page.

Table 6-5 <portlet:createPortletUneditURL>

Tag Attribute

Required

Type

Description

R/C

pageName

No

String

The page from which the unedit URL is generated.

R

portletName

No

String

The portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

<portlet:createPortletMinimizeURL>

The <portlet:createPortletMinimizeURL> JSP Tag generates a webflow URL that represents minimizing a portlet.

Table 6-6 <portlet:createPortletMinimizeURL>

Tag Attribute

Required

Type

Description

R/C

pageName

no

String

The page from which the minimize URL is generated.

R

portletName

No

String

The portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

Example

The following code sample illustrates how to use the <portlet:createPortletMinimizeURL> JSP tag:

        }
if (PortletRenderHelper.isMinimizable(request))
{
%>

<td width="1%" valign="middle"><a href="<portlet:createPortletMinimizeURL httpsInd='http'/>">
<img src="<webflow:createResourceURL resource='<%=imagesPath+"portlet_min.gif"%>'/>" hspace="1" vspace="2" border="0" alt="Minimize" align="absmiddle"></a></td>
<%

<portlet:createPortletUnminimizeURL>

The <portlet:createPortletUnminimizeURL> tag generates a webflow URL that represents unminimizing a portlet.

Table 6-7 <portlet:createPortletUnminimizeURL>

Tag Attribute

Required

Type

Description

R/C

pageName

no

String

The page from which the unminimize URL is generated.

R

portletName

No

String

The portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

Example

The following code sample illustrates how to use the <portlet:createPortletUnminimizeURL> JSP tag:

%>
<%-- Create a link to unminimize the portlet --%>
<td width="1%" valign="middle"><a href="<portlet:createPortletUnminimizeURL/>"><img src="<webflow:createResourceURL resource='<%=imagesPath+"portlet_unmin.gif"%>'/>" hspace="1" vspace="2" border="0" alt="Restore" align="absmiddle"></a></td>

<portlet:createPortletMaximizeURL>

The <portlet:createPortletMaximizeURL> JSP Tag generates a webflow URL that represents maximizing a portlet.

Table 6-8 <portlet:createPortletMaximizeURL>

Tag Attribute

Required

Type

Description

R/C

pageName

no

String

The page from which the maximize URL is generated.

R

portletName

No

String

The portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

Example

The following code sample illustrates how to use the <portlet:createPortletMaximizeURL> JSP tag:

<%
}
if (PortletRenderHelper.isMaximizable(request))
{
%>

<td width="1%" valign="middle">
<%-- Create the link to maximize the portlet --%>
<a href="<portlet:createPortletMaximizeURL httpsInd='http'/>"><img src="<webflow:createResourceURL resource='<%=imagesPath+"portlet_max.gif"%>'/>" hspace="1" vspace="2" border="0" alt="Maximize" align="absmiddle"></a></td>
<%

<portlet:createPortletUnmaximizeURL>

The <portlet:createPortletUnmaximizeURL> JSP Tag generates a webflow URL that represents unmaximizing a portlet.

Table 6-9 <portlet:createPortletUnmaximizeURL>

Tag Attribute

Required

Type

Description

R/C

pageName

no

String

The page from which the unmaximize URL is generated.

R

portletName

No

String

The portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

Example

The following code sample illustrates how to use the <portal:createPortletUnamximizeURL> JSP tag:

    <%--  Create a link to unmaximize the portlet --%>
<td width="1%" valign="middle"><a href="<portlet:createPortletUnmaximizeURL/>"><img src="<webflow:createResourceURL resource='<%=imagesPath+"portlet_unmax.gif"%>'/>" hspace="1" vspace="2" border="0" alt="Unmaximize"></a></td>

<portlet:createPortletFloatURL>

The <portlet:createPortletFloatURL> tag generates a webflow URL that represents creating a `floating' portlet, which is a portlet that appears in an independent window..

Table 6-10 <portlet:createPortletFloatURL>

Tag Attribute

Required

Type

Description

R/C

pageName

no

String

The page from which the float URL is generated.

R

portletName

No

String

The portlet ID. This is usually automatically generated, but can be modified.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

Example

The following code sample illustrates how to use the <portal:createPortletFloatURL> JSP tag:

<%
}
if (PortletRenderHelper.isFloatable(request))
{
url = portletState.getUrl(Portlet.URL_CONTENT);
%>
<util:validURL url="<%=url%>">
<% request.setAttribute( "fullscreenPortletURL", url); %>


<td width="1%" valign="middle"><a href="javascript:submitForm();"
onClick="openBrWindow('<portlet:createPortletFloatURL httpsInd='http'/>',
'<%= portletWindowName%>', 'scrollbars=yes,width=780,height=550'); return false;">
<img src="<webflow:createResourceURL resource='<%=imagesPath+"portlet_float.gif"%>'/>" hspace="1" vspace="2" border="0" alt="Float" align="absmiddle"></a></td>
</util:validURL>
<%

<portlet:getException>

The <portlet:getException> tag is used to retrieve the exception or message thrown by a webflow processor. This can be the message associated with a InvalidFormFieldException or ProcessingException. This tag can be inlined in which it calls getMessage() on the exception or return a scripting variable representing the exception itself.

Table 6-11 <portlet:getException>

Tag Attribute

Required

Type

Description

R/C

id

no

String

java scripting variable, can be used to retrieve an instance of the exception.

R

type

No

String

java class name, can be used to cast your exception.

R

 


Portal Tag Libraries

The following sections describe the portal tags and their attributes.

<portal:createWebflowURL>

The <portal:createWebflowURL> tag is used in a JSP to dynamically create a Webflow URL in a JSP. The Webflow URL may include the protocol, domain name, port, Web application URI, WebflowServlet URI, and query string.

Table 6-12 <portal:createWebflowURL>

Tag Attribute

Required

Type

Description

R/C

pageName

no

String

The page for which the Webflow URL is being generated.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

event

yes

String

Webflow will use this in combination with the origin to resolve a destination in the supplied namespace XML file.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

Example

<portal:form>

The <portal:form> tag is used in a JSP to dynamically generate an HTML form tag. This tag is not as sophisticated as the <portal:validatedForm> tag, but is simpler. For more information about the <portal:validatedForm> tag, refer to the next section.

Table 6-13 <portal:form>

Tag Attribute

Required

Type

Description

R/C

pageName

no

String

The page for which the form is being generated.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

event

yes

String

Webflow will use this in combination with the origin to resolve a destination in the supplied namespace XML file.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here.

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not except cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not except cookies.

R

hide

No

String

If set to false, the namespace, origin, and event will be displayed on the command line instead of as hidden form fields.
Valid values are true and false. The default value is true.

R

method

No

String

The method to be used for the form. Valid values are get and post. The default value is post.

R

name

No

String

The name of the form.

R

<portal:validatedForm>

The <portal:validatedForm> tag is used to dynamically generate HTML forms that can be validated. When a Web site visitor enters invalid information, the visitor's input is preserved and redisplayed with an appropriate error message.

Table 6-14 <portal:validatedForm>

Tag Attribute

Required

Type

Description

R/C

pageName

No

String

The page from which the validated form is being generated.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

event

yes

String

Webflow will use this in combination with the origin to resolve a destination in the supplied namespace XML file.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

hide

No

String

If set to false, the namespace, origin, and event will be displayed on the command line instead of as hidden form fields.
Valid values are true and false. The default value is true.

R

method

No


The method to be used for the form. Valid values are get and post. The default value is post.

R

name

No

String

The name of the form.

R

validStyle

No

String

The style used to format the HTML field when it is valid.

R

invalidStyle

No

String

The style used to format the HTML field or the message when the field is invalid.

R

unspecifiedStyle

No

String

Used to specify the initial style of the HTML field before validation occurs.

R

styleId

No

String

Scripting variable that will be set to one of invalidStyle, unSpecifiedStyle, or validStyle, depending on the field's status: valid, invalid, unspecified. Can be used for finer control of formatting the HTML form.

R

applyStyle

No

String

Applies the associated style as indicated by the field status to the message, the field, or to none. Therefore, valid values are message, field, and none. The default value is message.

R

messageAlign

No

String

Indicates whether to align the error message above the field, to the right of the field, or below the field. Therefore, value values are top, right, and bottom. The default value is right.

R

<portal:createPortalPageChangeURL>

The <portal:createPortalPageChangeURL> tag generates a webflow URL for a page change event.

Table 6-15 <portlet:createPortalPageChangeURL>

Tag Attribute

Required

Type

Description

R/C

pageName

No

String

The page for which the event will generated.

R

origin

No

String

The node where the event will be coming from. Origins follow the node-name.node-type format. This may or may not be equal to the page name. If omitted, then the JSP page name is used.

R

domainName

No

String

Used to change the domain name or IP address of the URL. This may be used if Webflow is fronted by a proxy server and that server resides on another machine.

R

pathprefix

No

String

Used to prefix the path information. This string will be placed in front of the Web application URI. This can be used when the proxy server is located on the same machine.

Note: The proxy must strip the path prefix before forwarding the request to Webflow.

R

pathsuffix

No

String

Used to suffix the path information. The additional path information will be placed after the WebflowServlet URI. This information can then be retrieved via the request.getPathInfo() method.

R

extraParams

No

String

Used to supply additional request parameters as name/value pairs.

R

doRedirect

No

String

Causes the WebflowServlet to perform a redirect instead of a forward to a presentation node. Valid values are true and false. The default is false (not to redirect).

R

httpsInd

No

String

Tells Webflow to calculate the protocol or use HTTPS or HTTP. Therefore, valid values are calculate, http, and https. The default value is http.

Calculate will yield HTTPS if any node in the origin/event branch chain list is matched under the HTTPS_URL_PATTERNS context parameter in the application's META-INF/web.xml file. Calculate is more dynamic and expensive, but if the protocol needs to be forced you can specify it here

R

encode

No

String

Tells Webflow to encode the URL. URLs need to be encoded if you wish to maintain session state and the browser does not accept cookies. Valid values are true and false. The default value is true, as URLs will only need to be encoded if the browser does not accept cookies.

R

Example

The following code sample illustrates how to use the <portal:createPortalPageChangeURL> JSP tag:

     if (DISPLAY_TEXT_LINKS)
{
if (portalPageName.equals(selectedPage))
            		{
%>
<td class="tabselected" nowrap align="center">
<b>&nbsp;
<a href="<ptl:createPortalPageChangeURL pageName='<%= portalPageName %>'/>"><span class="tabselected"><%=portalPageName%></span></a></b></td>
<td class="tabselected" WIDTH="2"><b>&nbsp;</b></td>
<% }
else
{
%> <td class="tabunselected" nowrap align="center">
<b>&nbsp;
<a href="<ptl:createPortalPageChangeURL pageName='<%= portalPageName %>'/>"><span class="tabunselected"><%=portalPageName%></span></a></b></td>
<td class="tabunselected" WIDTH="2"><b>&nbsp;</b></td>
<% }

 


Utility Tag Libraries

The following section describes the utility tags and their attributes.

<utility:validURL>

Processes the body if the supplied url is not null and greater then 3 characters long.

Table 6-16 <utility:validURL>

Tag Attribute

Required

Type

Description

R/C

URL

yes

String

The supplied URL that is processed if it is valid.

R

<utility:invalidURL>

The <utility:invalidURL> tag processes the body if the supplied url is null or less then 4 characters long.

Table 6-17 <utility:invalidURL>

Tag Attribute

Required

Type

Description

R/C

URL

yes

String

The supplied URL.

R

Example

The following code sample illustrates how to use the <utility:invalidURL> as well as the <utility:validURL> JSP tag:

<%
	// First try for an alternate header if one doesn't exist use the 
     	// regular header
	url =  portletState.getUrl(Portlet.URL_ALTERNATE_HEADER); 
	debug.out("Alternate header: " + url);
%>
       	<util:invalidURL url="<%=url %>">
	<% url = portletState.getUrl(Portlet.URL_HEADER); %>
       	</util:invalidURL>
       	<util:validURL url="<%=url %>">
       <table cellpadding="4" cellspacing="0" width="100%" class="portletheader">
       <tr>
       	<td width="100%">
       <jsp:include page="<%=url%>"/>
        	</td>
        </tr>
        </table>
       	</util:validURL>
<%

 

back to top previous page next page