BEA Logo BEA WLCS Release 3.5

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

 

   WLCS Documentation   |   Creating Portals and Portlets   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Portal Management JSP Tag Library Reference

 

The Portal Management component includes JSP tags for access to the fundamental data comprising a portal, such as portal and portlet properties.

To import the Portal Management JSP tags, use the following code:
<%@ taglib uri="esp.tld" prefix="esp" %>

Note: 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.

<esp:eval>

The <esp:eval> tag (Table 8-1) is used to evaluate a conditional attribute of a portlet, for example, isMinimizeable. The tag expects a com.beasys.portal.Portlet to be accessible in the session with the key PortalTagConstants.PORTLET. If the conditional attribute evaluates to true, the body of the <esp:eval> tag is processed. Otherwise, it is not.

Table 8-1 <esp:eval>

Tag Attribute

Required

Type

Description

R/C

tag

Yes

String

The name of the portlet attribute to evaluate.

The following attributes can be retrieved:

R

target

No

Portlet

The com.beasys.portal.Portlet to be evaluated.

R

Example

<%@ taglib uri="esp.tld" prefix="esp" %>
.
.
.
<esp:eval tag="isMinimizable">
<% titleBar.include(minimizeButton); %>
</esp:eval>

<esp:get>

The <esp:get> tag (Table 8-2) retrieves a String attribute of a portlet. This tag expects a com.beasys.portal.Portlet to be accessible in the session with the key PortalTagConstants.PORTLET.

Table 8-2 <esp:get>

Tag Attribute

Required

Type

Description

R/C

tag

Yes

String

The name of the portlet attribute to retrieve.

The following attributes can be retrieved:

R

target

No

Portlet

The com.beasys.portal. Portlet to be evaluated.

R


 

Example

<esp:getGroupsForPortal>

The <esp:getGroupsForPortal> tag (Table 8-3) retrieves the names of the groups associated with a Portal. The results are put into the variable declared in the id attribute of the tag, which is a String array.

Table 8-3 <esp:getGroupsForPortal>

Tag Attribute

Required

Type

Description

R/C

id


Yes

String

A resulting string array containing the names of the groups associated with the given Portal.

R

portalName


Yes

String

The name of the Portal to be checked for associated groups.

R



 

Example

<%@ taglib uri="esp.tld" prefix="esp" %>
.
.
.
<esp:getGroupsForPortal id ="groups" portalName="<%=portalName%>">
for (i=0;i<groups.length;i++)
{

String groupName = groups[i];
}
</esp:getGroupsForPortal>

<esp:monitorSession>

The <esp:monitorSession> tag (Table 8-4) can be added to the beginning of any JSP page to disallow access to the page if the session is not valid or if the user is not logged in.

Table 8-4 <esp:monitorSession>

Tag Attribute

Required

Type

Description

R/C

goToPage



No

String

The error page that you want displayed if the page is not accessible.

The default value is portalerror.jsp.

R

loginRequired



No

String

Indicates whether the user is required to be logged in to access the JSP page including the tag.

The default value is false.

R


 

Example

<%@ taglib uri="esp.tld" prefix="esp" %>
.
.
.
<esp:monitorSession loginRequired="true" />

<esp:portalManager>

The <esp:portalManager> tag (Table 8-5) is used to perform create, get, getColumnInfo, update, and remove actions on com.beasys.portal.Portal objects. This tag is an empty tag.

Table 8-5 <esp:portalManager>

Tag Attribute

Required

Type

Description

R/C

id


When action
equals get or
getColumnInfo

String

The name to which resultant information is assigned for subsequent use in the JSP page.

R


action

No

String

The action to perform. Allowed values include:

create: Creates a new portal.

get: (default value) Retrieves an object of type com.beasys.portal.Portal.

getColumnInfo: Retrieves a com.beasys.portal.PortalColumnInformation[]

update: Updates the provided target com.beasys.portal.Portal.

remove: Removes the provided target com.beasys.portal.Portal.

R

portalName

No

String

The name of the portal to retrieve, or whose column information is to be retrieved. The default value is session.getValue(com.beasys.commerce.portal.admin.PortalAdminHelper.qualifiedName(PortalTagConstants.PORTAL_NAME, request))

R

target

When action
equals create, update, or
remove

Portal

The com.beasys.portal.Portal to be created, updated, or removed.


R


 

Example

<%@ taglib uri="esp.tld" prefix="esp" %>
.
.
.
<esp:portalManager id="portal" action="get" portalName="BEAPortal"/>

<esp:portletManager>

The <esp:portletManager> tag(Table 8-6) is used to perform create, get, getArranged, update, and remove actions on com.beasys.portal.Portlet objects. This tag is an empty tag.

Table 8-6 <esp:portletManager>

Tag Attribute

Required

Type

Description

R/C

id

When action
equals get or
getArranged

String

The name to which resultant information is assigned for subsequent use in the JSP page.

R

action

No

String

The action to perform. Allowed values include:

create: Creates a new portlet.

get: Retrieves an object of type com.beasys.portal.Portlet.

getArranged: Retrieves a com.beasys.portal.Portlet[][] that prescribes the row-column layout of portlets for the provided portal-user-group combination.

update (default value): Updates the provided target com.beasys.portal.Portlet.

remove: Removes the provided target com.beasys.portal.Portlet.

R

portalName

No

String

The name of the portal corresponding to the target portlet or to the portlet(s) to be retrieved. The default value is session.getValue(com.beasys.commerce.portal.admin.PortalAdminHelper.qualifiedName(PortalTagConstants.PORTAL_NAME, request)).

R

portletName

No

String

The name of the portlet corresponding to the target portlet or to the portlet(s) to be retrieved.

There is no default value.

R

groupId

No

Long

The name of the group corresponding to the target portlet or to the portlet(s) to be retrieved. The default value is com.beasys.commerce.axiom.jsp.JspHelper.getSessionValue(com.beasys.commerce.user.tags.UserManagerTagConstants.PROFILE_SUCCESSOR_UID, request)

R


userId

No

Long

The name of the user corresponding to the target portlet or to the portlet(s) to be retrieved. The default value is com.beasys.commerce.axiom.jsp.JspHelper.getSessionValue(com.beasys.commerce.user.tags.UserManagerTagConstants.PROFILE_USER_UID, request)

R

target

When action
equals
create,
update, or
remove

Portlet

The com.beasys.portal.Portlet to be created, updated, or removed.


R

scope

No

String

The scope to be applied to the provided action. Allowed values include:

global (default value): Specifies that portlet creation, removal, retrieval, or update should apply across all portals, groups, and users.

portal: Specifies that portlet creation, removal, retrieval, or update applies to the provided portal.

group: Specifies that portlet creation, removal, retrieval, or update applies to the provided portal-group combination.

user: Specifies that portlet creation, removal, retrieval, or update applies to the provided portal-group-user combination.

R


 

Example

<%@ taglib uri="esp.tld" prefix="esp" %>
.
.
.
<esp:portletManager id="arrangedPortlets" action="getArranged" userId="myUser" portalName="myPortal"/>

<esp:props>

The <esp:props> tag (Table 8-7) is used to get a property from the Portal Properties bean. The Portal Properties bean's deployment descriptor contains default values used by the Portal Administration Tool.


 

Table 8-7 <esp:props>

Tag Attribute

Required

Type

Description

R/C

id

Yes

String

A java.lang.String variable name for the property value.

R

propertyName

Yes

String

The name of the property to get in the Portal Property Bean.

R


 

Example

<%@ taglib uri="esp.tld" prefix="esp" %>
.
.
.
<esp:props id="headerURL" propertyName="commerce.default.portal.headerURL" />

 

back to top previous page