BEA Logo BEA WLCS Release 3.5

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

 

   WLCS Documentation   |   Building Personalized Applications   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Personalization Server JSP Tag Library Reference

 

The JSP tags included with WebLogic Personalization Server allow developers to create personalized applications without having to program using Java.

Note: The es: prefix stands for e-commerce services.
The esp: prefix stands for e-commerce services portal.
The pz: prefix stands for personalization.

This topic includes the following sections:

<ad:adTarget>

<cm:getProperty>

<cm:printDoc>

<cm:printProperty>

<cm:select>

<cm:selectById>

<fm:getApplicationURI>

<fm:getCachedAttribute>

<fm:getSessionAttribute>

<fm:setCachedAttribute>

<fm:setSessionAttribute>

<fm:removeCachedAttribute>

<fm:removeSessionAttribute>

<i18n:localize>

<i18n:getMessage>

<pz:contentQuery>

<pz:contentSelector>

<pz:div>

<ph:placeholder>

<ps:getPropertyNames>

<ps:getPropertySetNames>

<um:getProfile>

<um:getProperty>

<um:getPropertyAsString>

<um:removeProperty>

<um:setProperty>

<um:addGroupToGroup>

<um:addUserToGroup>

<um:changeGroupName>

<um:createGroup>

<um:createUser>

<um:getChildGroupNames>

<um:getChildGroups>

<um:getGroupNamesForUser>

<um:getParentGroupName>

<um:getTopLevelGroups>

<um:getUsernames>

<um:getUsernamesForGroup>

<um:removeGroup>

<um:removeGroupFromGroup>

<um:removeUser>

<um:removeUserFromGroup>

<um:login>

<um:logout>

<um:setPassword>

<es:counter>

<es:date>

<es:forEachInArray>

<es:isNull>

<es:monitorSession>

<es:notNull>

<es:simpleReport>

<es:simpleReport>

<es:transposeArray>

<es:uriContent>

<wl:process>

<wl:repeat>

<wl:cache>

 


Ads

The Ad tag queries the content management system and displays ads.

Use the following code to import the utility tag library:
<%@ taglib uri="ad.tld" prefix="ad" %>

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.

<ad:adTarget>

The <ad:adTarget> (Table 4-1) uses the Ad Service to send an ad query to the content management system. Unlike the <ph:placeholder> tag, the query in the <ad:adTarget> tag does not compete with other queries in an ad placeholder.

Use this tag if you need to make sure that a given ad displays to customers in a specific location. Depending on how narrowly you construct the query, you might have to remove or modify this tag when you want to display a different ad.

If the ad query returns more than one ad, the Ad Service uses the adWeight attribute of each ad to determine which ad to display.

Table 4-1 <ad:adTarget>

Tag Attribute

Req'd

Type

Description

R/C

query

Yes

String

Contains a query that the Ad Service uses to find content. Use the query syntax described in the Javadoc API documentation for com.beasys.commerce.util.ExpressionHelper

R

height

No

int

Specifies the height (in pixels) that the placeholder uses when generating the HTML that the browser requires to display a document.

The placeholder uses this value only for content types to which display dimensions apply and only if other attributes have not already defined dimensions for a given document.

If you do not specify this value and other attributes have not already been defined, the browser behavior determines the height of the document.

R

width

No

int

Specifies the width (in pixels) that the placeholder uses when generating the HTML that the browser requires to display a document.

The placeholder uses this value only for content types to which display dimensions apply and only if other attributes have not already defined dimensions for a given document.

If you do not specify this value and other attributes have not already been defined, the browser behavior determines the height of the document.

R


 

 


Content Management

The Content Management component includes four JSP tags. These tags allow a JSP developer to include non-personalized content in a HTML-based page. The cm:select and cm:selectbyid tags support content caching for content searches. Note that none of the tags support or use a body.

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

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.

<cm:getProperty>

The <cm:get Property> tag (Table 4-2) retrives the value of the specified content metadata property into a variable specified by resultId. It does not have a body. If resultId is not specified, the value will be inlined into the page, similar to the <cm:printProperty> tag. This tag operates on any ConfigurableEntity, not just the Content object. However, it does not support ConfigurableEntity successors.

Table 4-2 <cm:getProperty>

Tag Attribute

Required

Type

Description

R/C

id


No

String

The JSP script variable name which contains the Content instance from which to get the properties.

R

entity



No

ConfigurableEntity


Specifies the com.beasys.commerce.foundation. ConfigurableEntity object from which to get the property. If this is specified and non-null, id is ignored. Otherwise, id will be used.

R


name

Yes

String

The name of the property to print.

R

scope


No

String

The scope name for the property to get. If not specified, null is passed in, which is what Document objects expect.

R

resultId

no

String

The name of the JSP script variable which will be populated with the value of the property. If this is not specified, then the value of the property will be inlined into the body of the JSP. If this is specified, then encode, default, maxLength, dateFormat, and numFormat are ignored.

C

resultType

no

String

The Java type of the property. If this is not specified, then java.lang.Object is used.

C

encode

No

String

Either html, url, or none:

R

default



No

String

The value to print if the property is not found or has a null value. If this is not specified and the property value is null, nothing is printed.

R

maxLength


No

String, int


The maximum length of the property's value to print. If specified, values longer than this will be truncated.

R

failOnError




No

String, Boolean


This attribute can have one of two values:

False (default value): Handles JSP processing errors gracefully and prints nothing if an error occurs.

True: Throws an exception. You can handle the exception in the code, let the page proceed to the normal error page, or let the application server handle it less gracefully.

R

dateFormat



No

String

The java.text.SimpleDateFormat string to use to print the property, if it is a java.util.Date. If the property is not a Date, this is ignored. If this is not set, the Date's default toString method is used.

R

numFormat





No

String

The java.text.DecimalFormat string to use to print the property, if it is a java.lang.Number. If the property is not a Number, this is ignored. If this is not set, the Number's default toString method is used.

R


 

Example

Get the String value of the name property from the Content object stored at doc and place it in the contentName variable:

<%@ taglib uri="cm.tld" prefix="cm" %>
.
.
.
<cm:getProperty resultId="contentName" resultType="String"
id="content" name="name" />
<es:notNull item="<%=contentName%>">
The name is not null.
</es:notNull>

<cm:printDoc>

The <cm:printDoc> tag (Table 4-3) inlines the raw bytes of a Document object into the JSP output stream. This tag does not support a body and only supports Document objects. It does not differentiate between text and binary data.

Table 4-3 <cm:printDoc>

Tag Attribute

Required

Type

Description

R/C

id


No

String

The JSP script variable name which contains the Content instance from which to get the properties.

R

blockSize


No

String, int


The size of the blocks of data to read. The default is 8K. Use 0 or less to read the entire block of bytes in one operation.

R


start


No

String, int


Specifies the index in the bytes where to start reading. Defaults to 0.

R

end


No

String, int

Specifies the index in the bytes where to stop reading. The default is to read to the end of the bytes.

R


encode




No

String

Either html, url, or none:

R


document




No

Document

Specifies the com.beasys.commerce.axiom.document.Document to use. If this is specified and non-null, id will be ignored. Otherwise, id will be used.

R

failOnError





No

String, Boolean


This attribute can have one of two values:

False (default value): Handles JSP processing errors gracefully and prints nothing if an error occurs.

True: Throws an exception. You can handle the exception in the code, let the page proceed to the normal error page, or let the application server handle it less gracefully.

R

baseHref

No

String

The URL of the document's BASE HREF. This can be either an absolute URL or a relative URL.

R


 

Note: If baseHref is provided, then the <cm:printDoc> tag will output a starting <BASE HREF> using the value of the baseHref parameter. If baseHref is not a fully complete URL, the missing parts will be filled in based upon the URL of the outermost page. Additionally, the <cm:printDoc> will use the FlowManagerHelper.getAppliactionFlowManager() method to determine if the tag is operating under a FlowManager instance (a personalized application, a WebFlowed application, a portal).

Additionally, if baseHref is provided, then, after printing the document, the <cm:printDoc> tag will output a <BASE HREF> based upon the URL of the outermost page.

Example

To get a Document object from an id in the request attributes and inline the Document's text (which might contain relative links):

<%@ taglib uri="cm.tld" prefix="cm" %>
.
.
.
.<% String contentId = request.getParameter("contentId"); %>
<cm:selectById contentId="<%=contentId%>" id="doc" />
<cm:printDoc id="doc" blockSize="1000" baseHref="/ShowDocServlet" />

<cm:printProperty>

The <cm:printProperty> tag (Table 4-4) inlines the value of the specified content metadata property as a string. It does not have a body. This tag operates on any ConfigurableEntity, not just the Content object. However, it does not support ConfigurableEntity successors.

Table 4-4 <cm:printProperty>

Tag Attribute

Required

Type

Description

R/C

id


No

String

The JSP script variable name which contains the Content instance from which to get the properties.

R

name

Yes

String

The name of the property to print.

R

entity




No

ConfigurableEntity

Specifies the com.beasys.commerce.foundation. ConfigurableEntity object from which to get the property. If this is specified and non-null, id is ignored. Otherwise, id will be used.

R


scope


No

String

The scope name for the property to get. If not specified, null is passed in, which is what Document objects expect.

R

encode

No

String

Either html, url, or none:

R

default



No

String

The value to print if the property is not found or has a null value. If this is not specified and the property value is null, nothing is printed.

R

maxLength


No

String, int


The maximum length of the property's value to print. If specified, values longer than this will be truncated.

R

failOnError




No

String, Boolean


This attribute can have one of two values:

False (default value): Handles JSP processing errors gracefully and prints nothing if an error occurs.

True: Throws an exception. You can handle the exception in the code, let the page proceed to the normal error page, or let the application server handle it less gracefully.

R

dateFormat



No

String

The java.text.SimpleDateFormat string to use to print the property, if it is a java.util.Date. If the property is not a Date, this is ignored. If this is not set, the Date's default toString method is used.

R

numFormat




No

String

The java.text.DecimalFormat string to use to print the property, if it is a java.lang.Number. If the property is not a Number, this is ignored. If this is not set, the Number's default toString method is used.

R


 

Example

To have a text input field's default value be the first 75 characters of the subject of a Content object stored at doc:

<%@ taglib uri="cm.tld" prefix="cm" %>
.
.
.
<form action="javascript:void(0)">
Subject: <input type="text" size="75" name="subject"
value="<cm:printProperty id="doc" name="Subject" maxLength="75"
encode="html"/>" >
</form>

<cm:select>

This tag uses only the search expression query syntax to select content. It does not support or use a body. After this tag has returned the <es:forEachInArray> tag (see <es:forEachInArray>), zero can be used to iterate over the array of Content objects. This tag (Table 4-5) supports generic Content via a ContentManager interface.

Table 4-5 <cm:select>

Tag Attribute

Required

Type

Description

R/C

contentHome




No

String

The JNDI name of the ContentManager EJB Home to use to find content. The object in JNDI at this name must implement a create method which returns an object which implements the ContentManager interface. If not specified, the system searches the default content home.

R

max


No

String, long


Limits the maximum number of content items returned. If not present, or zero or less, it returns all of the content items found.

R

sortBy




No

String

A list of document attributes by which to sort the content. The syntax follows the SQL order by clause. The sort specification is limited to a list of the metadata attribute names and the keywords ASC and DESC.

Examples:

sortBy="creationDate"

sortBy="creationDate ASC, title DESC"

R

failOnError



No

String, Boolean


This attribute can have one of two values:

False (default value): Handles JSP processing errors gracefully and returns an empty array if an error occurs.

True: Throws an exception that causes the JSP page to stop. You can handle the exception in the code, let the page proceed to the normal error page, or let the application server handle it less gracefully.

R

id


Yes

String

The JSP script variable name that will contain the array of Content objects after this tag finishes.

C

query



No

String

A content query string used to search for content.

Example: query="mimetype contains 'text' && author='Proulx'"

R

expr




No

Expression

The com.beasys.commerce.foundation.expression.Expression object to use to search for content. If this is null or not specified, then query must be specified. Otherwise, query is ignored.

R


useCache




No

String, Boolean


Determines whether Content is cached.

This attribute can have one of two values:

False (default value): ContentCache is not used. If false (not specified), the cacheId, cacheScope and cacheTimeout settings are ignored.

True: ContentCache is used.

R

cacheId




No

String

The identifier name used to cache the Content. Internally, the cache is implemented as a Map; this will become the key. If not specified, the id attribute of the tag is used.

R

cacheTimeout




No

String, long


The time, in milliseconds, for which the cached Content is valid. If more than this amount of time has passed since the Content was cached, the cached Content will be cleared, retrieved, and placed back into the cache.

Use -1 for no-timeout (always use the cached Content). Default = -1.

R

cacheScope






No

String

Specifies the lifecycle scope of the content cache. Similar to <jsp:useBean>.

Possible values:

R

readOnly




No

String, Boolean


This attribute can have one of two values:

If true, the ContentManager (specified via the ContentHome attribute) will try to return only lightweight (non-EJB) objects where possible.

If false (not specified), the default value is used.

Default= ContentHelper.DEF_CONTENT_READONLY (which is loaded from the commerce.content.defaultReadOnly property in the weblogiccommerce.properties file).

R


 

Example

To find the first five text Content objects that are marked as news items for the evening using the ContentCache, and print out the titles in a list:

<%@ taglib uri="cm.tld" prefix="cm" %>
.
.
.
<cm:select contentHome="<%=ContentHelper.DEF_CONTENT_MANAGER_HOME%>" max="5" useCache="true" cacheTimeout="300000" cacheId="Evening News" sortBy="creationDate ASC, title ASC" query="
type = `News' && timeOfDay = `Evening' && mimetype like
`text/*' " id="newsList"/>
<ul>
<es:forEachInArray array="<%=newsList%>" id="newsItem"
type="com.beasys.commerce.axiom.content.Content">
<li><cm:printProperty id="newsItem" name="Title"
encode="html" />
</es:forEachInArray>
</ul>

<cm:selectById>

The <cm:selectById> tag (Table 4-6) retrieves content using the Content's unique identifier. This tag does not have a body. This tag is basically a wrapper around the select tag. It works against any Content object which has a string-capable primary key.

Table 4-6 <cm:selectById>

Tag Attribute

Required

Type

Description

R/C

contentHome




No

String

The JNDI name of the ContentManager EJB Home to use to find content. The object in JNDI at this name must implement a create method which returns an object that implements the ContentManager interface. If not specified, the system searches the default content home.

R

contentId

Yes

String

The string identifier of the piece of content.

R

failOnError




No

String, Boolean


This attribute can have one of two values:

False (default value): Handles JSP processing errors gracefully and returns null if an error occurs.

True: Throws an exception that causes the JSP page to stop. You can handle the exception in the code, let the page proceed to the normal error page, or let the application server handle it less gracefully.

R

id



Yes

String

The JSP script variable name that contains the Content object after this tag finishes. If the Content object with the specified identifier does not exist, it contains null.

C

useCache




No

String, Boolean


Determines whether Content is cached.

This attribute can have one of two values:

False (default value): ContentCache is not used. If false (not specified), the cacheId, cacheScope and cacheTimeout settings are ignored.

True: ContentCache is used.

R

cacheId





No

String

The identifier name used to cache the Content. Internally, the cache is implemented as a Map; this will become the key.

If not specified, the id attribute of the tag is used.

R

cacheTimeout




No

String, long


The time, in milliseconds, for which the cached Content is valid. If more than this amount of time has passed since the Content was cached, the cached Content will be cleared, retrieved, and placed back into the cache.

Use -1 for no-timeout (always use the cached Content). Default = -1.

R

cacheScope





No

String

Specifies the lifecycle scope of the content cache. Similar to <jsp:useBean>.

Possible values:

R

readOnly

No

String, Boolean

This attribute can have one of two values:

If true, the ContentManager (specified via the ContentHome attribute) will try to return only lightweight (non-EJB) objects where possible.

If false (not specified), the default value is used.

Default= ContentHelper.DEF_CONTENT_READONLY (which is loaded from the commerce.content.defaultReadOnly property in the weblogiccommerce.properties file).

R


 

Example

To fetch the Document (using ContentCaching) with an identifier of 1234 and inline its content:

<%@ taglib uri="cm.tld" prefix="cm" %>
.
.
.
<cm:selectById contentHome="<%=ContentHelper.DEF_CONTENT_MANAGER_HOME%>"
contentId="contentportlet/sports1.htm"
id="doc" useCache="true" cacheTimeout="300000" cacheId="1234" />
<cm:printDoc id="doc" />

 


Flow Manager

Thr Flow Manager tags are used for accessing the session, session cache, or the global cache. For scalability reasons, it is best to limit what gets placed into the session. For large sessions, session replication across servers is very costly. This tag library will give the user the ability to write to data that can be scoped to the application or across applications.

<fm:getApplicationURI>

The <fm:getApplicationURI> tag (Table 4-7) gets the application
from the URL: http://localhost:7001/portals/application/exampleportal.

When includeContext="true", the tag returns /context/path/pathinfo, for example: /portals/application/exampleportal. This is required when a client browser needs to address the Web application context, for example, when using a form.

When includeContext="false", the tag returns /path/pathinfo, for example /application/exampleportal. This is required when using Web applications and server side processing.

Table 4-7 <fm:getApplicationURI>

Tag Attribute

Required

Type

Description

R/C

id

Yes

String

The application as referenced by the Flow Manager. It can either get the value with the context or without. When used within a Web application, you must get the value without the context when using <jsp:forward>.

C

includeContext

No

boolean

Determines whether or not to include the servlet context with the application name.
Defaults to true.

R


 

Example

<%@ taglib uri="fm.tld" prefix="fm" %>
<%@ taglib uri="weblogic.tld" prefix="wl" %>
.
.
.
<wl:process name="formSubmit">
<fm:getApplicationURI id="uri" includeContext="false"/>
<jsp:forward page="<%=uri%>"/>
</wl:process>

<fm:getCachedAttribute>

The <fm:getCachedAttribute> tag (Table 4-8) gets an attribute out of the session/global cache. This value can be scoped to the application or not.

Table 4-8 <fm:getCachedAttribute>

Tag Attribute

Required

Type

Description

R/C

id

Yes

Object

The variable to store the retrieved value.

C

name

Yes

String

The name of the name/value pair.

R

scoped

No

boolean

The name/value pair scoped to the application.

Defaults to true.

R

global

No

boolean

The value scoped to the session or the global scope.

Defaults to false.

R


 

Example

<%@ taglib uri="fm.tld" prefix="fm" %>
.
.
.
<%Portal portal = null;%>
<fm:getCachedAttribute id="tportal"
name="<%=PortalTagConstants.CACHED_PORTAL%>"
global="true" />
<es:isNull item="<%=tportal%>" >
<esp:portalManager action="get" id="myPortal"
portalName="<%=portalName%>"/>
<%tportal=myPortal;%>
<fm:setCachedAttribute
name="<%=PortalTagConstants.CACHED_PORTAL%>" value="<%=myPortal%>" global="true" />
</es:isNull>
<%portal=(Portal)tportal;%>

<fm:getSessionAttribute>

The <fm:getSessionAttribute> tag (Table 4-9) gets an attribute out of the HttpSession. The attribute may be scoped to the application (by default).

Table 4-9 <fm:getSessionAttribute>

Tag Attribute

Required

Type

Description

R/C

id

Yes

Object

The variable to store the retrieved value.

C

name

Yes

String

The name of the name/value pair.

R

scoped

No

boolean

The name/value pair scoped to the application.

Defaults to true.

R


 

Example

<%@ taglib uri="fm.tld" prefix="fm" %>
.
.
.
<fm:getSessionAttribute id="username" name="portal.username"
scoped="true" />

The name is: <%=username%>

<fm:removeCachedAttribute>

The <fm:removeCachedAttribute> tag (Table 4-10) removes an attribute from the session/global cache. This value can be scoped to the application or not.

Table 4-10 <fm:removeCachedAttribute>

Tag Attribute

Required

Type

Description

R/C

name

Yes

String

The name of the name/value pair.

R

scoped

No

boolean

The name/value pair scoped to the application.

Defaults to true.

R

global

No

boolean

The value scoped to the session or the global scope.

Defaults to false.

R


 

Example

<%@ taglib uri="fm.tld" prefix="fm" %>
.
.
.
<fm:removeCachedAttribute
name="<%=PortalTagConstants.CACHED_PORTAL%>" global="true" />

<fm:removeSessionAttribute>

The <fm:removeSessionAttribute> tag (Table 4-11) removes an attribute from the HttpSession. The attribute may be scoped to the application (by default).

Table 4-11 <fm:removeSessionAttribute>

Tag Attribute

Required

Type

Description

R/C

name

Yes

String

The name of the name/value pair.

R

scoped

No

boolean

The name/value pair scoped to the application.

Defaults to true.

R


 

Example

<%@ taglib uri="fm.tld" prefix="fm" %>
.
.
.
<fm:removeSessionAttribute name="portal.username" scoped="true" />

<fm:setCachedAttribute>

The <fm:setCachedAttribute> tag (Table 4-12) sets an attribute in the session/global cache. This value can be scoped to the application or not.

Table 4-12 <fm:setCachedAttribute>

Tag Attribute

Required

Type

Description

R/C

name

Yes

String

The name of the name/value pair.

R

scoped

No

boolean

The name/value pair scoped to the application.

Defaults to true.

R

global

No

boolean

The value scoped to the session or the global scope.

Defaults to false.

R

value

Yes

Object

The value to set.

R


 

Example

<%@ taglib uri="fm.tld" prefix="fm" %
.
.
.
<%Portal portal = null;%>
<fm:getCachedAttribute id="tportal"
name="<%=PortalTagConstants.CACHED_PORTAL%>"
global="true" />
<es:isNull item="<%=tportal%>" >
<esp:portalManager action="get" id="myPortal"
portalName="<%=portalName%>"/>
<%tportal=myPortal;%>
<fm:setCachedAttribute
name="<%=PortalTagConstants.CACHED_PORTAL%>"
value="<%=myPortal%>" global="true" />
</es:isNull>
<%portal=(Portal)tportal;%>

<fm:setSessionAttribute>

The <fm:setSessionAttribute> tag (Table 4-13) sets an attribute in the HttpSession. The attribute may be scoped to the application (by default).

Table 4-13 <fm:setSessionAttribute>

Tag Attribute

Required

Type

Description

R/C

name

Yes

String

The name of the name/value pair.

R

scoped

No

boolean

The name/value pair scoped to the application.

Defaults to true.

R

value

Yes

Object

The value to set.

R


 

Example

<%@ taglib uri="fm.tld" prefix="fm" %>
.
.
.
<% String val = "joe developer"; %>
<fm:setSessionAttribute name="portal.username"
value="<%= val %>" scoped="true" />

 


Internationalization

These tags are used in the localization of JSP pages that have an internationalization requirement.

Use the following code to import the utility tag library:
<%@ taglib uri="i18n.tld" prefix="i18n" %>

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.

<i18n:localize>

This tag allows you to define the language, country, variant, and base bundle name to be used throughout a page when accessing resource bundles via the <i18n:getmessage> tag.

This tag (Table 4-14) also specifies a character encoding and content type to be specified for a JSP page. Because of this, the tag should be used as early in the page as possible-before anything is written to the output stream-so that the bytes are properly encoded.

Note: When an HTML page is included in a larger page, only the larger page can use the <i18n:localize> tag. This is because the <i18n:localize> tag sets the encoding for the page, and the encoding must be set in the parent (including) page before any bytes are written to the response's output stream. The parent page must set an encoding that is sufficient for all the content on that page as well as any included pages.

Note: Do not use the <i18n:localize> tag in conjunction with the <%@ page contentType="<something>" > page directive defined in the JSP specification. The directive is unnecessary if you are using this tag, and can result in inconsistent or wrong contentType declarations.

Table 4-14 <i18n:localize>

Tag Attribute

Required

Type

Description

R/C

bundleName

No

String

The base name of the MessageBundle is used to retrieve localized text for a JSP page.

R

language




No

String
or
String []


A String-two character ISO Language Code-denoting the user's preferred language, or a String[] containing a list of preferred language codes for a user, with stronger preferences indexed lower (earlier) in the array.

R

country




No


String

The two character ISO Country Code for a country. For example, this code would be used to look for a MessageBundle containing text localized to English speaking users in the U.S. as opposed to English speaking users in the U.K.

R

variant




No

String

A String representing a locale's variant. The variant is used when localization demands a more specific locale than can be denoted by having just language and a country.

R

locale




No

java.util.Locale


Instead of specifying language, country, and variant as Strings, a java.util.Locale object can be provided. If provided, the values in the Locale's language, country, and variant fields will negate any of the other language, country, and variant values passed to the tag as Strings.

R

charset




No

String

The name of the character encoding set to use for this page. Defaults to "UTF-8" if no encoding can be determined for the chosen language, otherwise an encoding approprite for the chosen language is used.

R

contentType

No

String

The type of content contained in the page, defaults to "text/html".

R


 

Example

<%@ taglib uri="i18n.tld" prefix="i18n" %>
.
.
.
<%
// Array that defines two languages preferences - English and
// Spanish in that order of preference.
String[] languages = new String[] { "en", "es" };

// Definition of a single language preference 
String language = "en";
%>
<i18n:localize language="<%=language%>" bundleName="i18nExampleResourceBundle"/> 
<html>
<body>
<i18n:getMessage messageName="greeting"/>
</body>
</html>

<i18n:getMessage>

This tag (Table 4-15) is used in conjunction with the <i18:localize> tag to retrieve localized static text or messages from a JspMessageBundle.

Table 4-15 <i18n:getMessage>

Tag Attribute

Required

Type

Description

R/C

id

No

String

Holds the value of the label (or message) in the JSP page.

C

messageName

Yes

String

The key for the message bundle.

R

messageArgs

No

Object []

The arguments to the message bundle. If no args are provided, it is assumed that static text (not a message) is to be returned.

For example, {"Wednesday", "78"}; might be used to construct the message "Today is Wednesday, and the temperature is 78 degrees Fahrenheit."

R

bundleName

No

String

If properly initialized in the <i18n:localize> tag, there is no need to pass this tag attribute unless it is desired to use a different bundle for a particular tag invocation

R

language

No

String

If properly initialized in the <i18n:localize> tag, there is no need to pass this tag attribute, unless it is desired to use a different language for a particular tag invocation.

R

country

No

String

If properly initialized in the <i18n:localize> tag, there is no need to pass this tag attribute, unless it is desired to use a different country for a particular tag invocation.

R

variant

No

String

If properly initialized in the <i18n:localize> tag, there is no need to pass this tag attribute, unless it is desired to use a different variant for a particular tag invocation.

R

locale

No

java.util.Locale

If properly initialized in the <i18n:localize> tag, there is no need to pass this tag attribute, unless it is desired to use a different locale (language, country, and variant) for a particular tag invocation.

R


 

Example

JSP File

This code produces this output:
Welcome To This Page! 14 out of 100 files have been saved.

<%@ taglib uri="i18n.tld" prefix="i18n" %>
.
.
.
<%
// Definition of a single language preference
String language = "en";
// Creation of message arguments 
Object[] args = new Object[]
{
new Integer(14),
new Integer(100)
};
%>
<i18n:localize language="<%=language%>" bundleName="i18nExampleResourceBundle"/> 
<html>
<body>
<i18n:getMessage messageName="greeting"/>
<i18n:getMessage messageName="message" messageArgs="<%=args%>"/>
</body>
</html>

Properies file

Here are the entries in the properties file named "i18nExampleResourceBundle.properties":
greeting=Welcome To This Page!
message={0} out of {1} files have been saved.

 


Personalization Tags

The <pz:div> tag, <pz:contentSelector> tag, and <pz:contentQuery> tag use the Advisor to classify the user, select content, and retreive content, respectively.

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

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.

<pz:contentQuery>

The <pz:contentQuery> tag (Table 4-16) performs a content attribute search for content in a content manager. If the useCache attribute is set to true, the results of a content management query will be cached. The tag only has a begin tag and does not have a body or end tag. It returns an array of Content objects as determined by the Advisor.

Personalization content tags required for JSP developers to access the Content object returned might include:

An object array iterator tag. This tag provides a way to iterate over the Content objects in the array. Use the <es:forEachInArray> tag to iterate over an array of Objects. (See <es:forEachInArray> for more information.)

Example

<%@ taglib uri="es.tld" prefix="es" %>
<%@ taglib uri="cm.tld" prefix="cm" %>
<%@ taglib uri="pz.tld" prefix="pz" %>
<%@ page input="com.beasys.commerce.content.ContentHelper" %>
.
.
.
<pz:contentQuery id="docs" contentHome="<%=ContentHelper.DEF_DOCUMENT_MANAGER_HOME%>"
query="author = 'Hemingway'" />
<ul>
 <es:forEachInArray array="<%=docs%>" id="aDoc"
type="com.beasys.commerce.axiom.content.Content">
<li>The document title is: <cm:printProperty id="aDoc"
name="Title" encode="html" />
</es:forEachInArray>
</ul>

<pz:contentSelector>

The <pz:contentSelector> tag (Table 4-17) allows arbitrary personalized content to be recommended based on a content selector rule.

A content selector rule first determines whether a user fits the specified classification (for example, high income), and then selects content based on another qualifier (such as productType = sports cars.) It then evaluates a set of conditions that you define in the E-Business Control Center.

Note: Rules are created in the E-Business Control Center. This GUI tool is designed to allow Business Analysts to develop their own segmentation. Because the Business Analysts are not exposed to the concept of rules, you will see content selector rules called simply "content selectors" and classifer rules referred to as "customer segmentation."

To cache the results of the content selector rule, set the useCache attribute to true. If the cache has not timed out, subsequent calls to the contentSelector tag will return the cached results without re-evaluating the rule and content query.

The <pz:contentSelector> tag only has a begin tag and does not have a body or end tag. It returns an array of Content objects as determined by the Advisor.

Tags possibly required for JSP developers to access the Content objects returned might include:

Specify a Value for contentHome

The content selector tag must use the contentHome attribute to specify the JNDI home of the content management system. If you use the reference content management system or a third-party integration, you can use a scriptlet to refer to the default content home. Because the scriptlet uses the ContentHelper class, you must first use the following tag to import the class into the JSP:

<%@ page import="com.beasys.commerce.content.ContentHelper"%>

Then, when you use the content selector tag, specify the contentHome as follows:

<pz:contentSelector
contentHome="<%=ContentHelper.DEF_DOCUMENT_MANAGER_HOME %>"
... />

If you create your own content management system, you must specify the JNDI home for your system instead of using the ContentHelper scriptlet. In addition, if your content management system provides a JNDI home, you can specify that one instead of using the ContentHelper scriptlet.

Example

<%@ taglib uri="es.tld" prefix="es" %>
<%@ taglib uri="cm.tld" prefix="cm" %>
<%@ taglib uri="pz.tld" prefix="pz" %>
<%@ page input="com.beasys.commerce.content.ContentHelper" %>
.
.
.
<pz:contentSelector rule="PremierCustomerSpotlight"
contentHome="<%=ContentHelper.DEF_DOCUMENT_MANAGER_HOME %>"
id="docs" />
<ul>
<es:forEachInArray array="<%=docs%>" id="aDoc"
type="com.beasys.commerce.axiom.content.Content">
<li>The document title is: <cm:printproperty id="aDoc"
name="Title" encode="html" />
</es:forEachInArray>
</ul>

Note: The sortBy attribute, when used in conjunction with the max attribute, works differently for explicit (system-defined) and implicit (user-defined) attributes. If you sort on explicit attributes (identifier, mimeType, size, version, author, creationDate, modifiedBy, modifiedDate, lockedBy, description, or comments) the sort is done on the database; therefore if you combine max="10" and sortBy, the system will perform the sort and then get the first 10 items. If you sort on implicit attributes, the sort is done after the max have been selected.

For more information about using this tag, see the section "Using Content-Selector Tags and Associated JSP Tags" in Working with Content Selectors, in this guide.

<pz:div>

The <pz:div> tag (Table 4-18) allows a piece of content to be conditionally included as a result of a classifier rule being executed by a rules advislet. If the user's profile matches the classification specified in the E-Business Control Center, then the conditional content is included. This tag has a begin tag, a body, and an end tag. The tag returns a list of Classification objects that the user belongs to.

Table 4-18 <pz:div>

Tag Attribute

Required

Type

Description

R/C

rule


Yes

String

The name of the classifier rule in the customer segment definitions created in the E-Business Control Center.

R

id

No

String

A collection that contains the Classification objects that apply to the user.

C


 

Example

<%@ taglib uri="pz.tld" prefix="pz" %>
.
.
.
<pz:div id="classifications" rule="PremierCustomer">
<% 
//if the user is classified as a Premier Customer, a list with one entry should be returned//
java.util.Iterator iterator=classifications.iterator();
while (iterator.hasNext())
{
Classification classification=(Classification) iterator.next();
out.println (classification.getName());
}
%>
   <p>Please check out our new Premier Customer bonus program.<p>
</pz:div>

 


Placeholders

The placeholder tag is a named location on a JSP. You use the E-Business Control Center to define the behavior of a placeholder.

Use the following code to import the utility tag library:
<%@ taglib uri="ph.tld" prefix="ph" %>

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.

<ph:placeholder>

The <ph:placeholder> tag (Table 4-19) implements a placeholder, which describes the behavior for a location on a JSP page.

You use the E-Business Control Center to define a placeholder. For more information, see "Displaying Ads" in Using the E-Business Control Center.

Multiple placeholder tags can refer to the same placeholder. Each instance of a placeholder tag invokes its placeholder definition separately. If the placeholder definition specifies multiple queries, each placeholder tag instance can display different ads, even though each instance shares the same definition.

When WebLogic Personalization Server receives a request for a JSP that contains an ad placeholder, the placeholder tag contacts the Ad Service, a session EJB that invokes business logic to determine which ad to display. For more information, see the section "How Placeholders Select and Display Ads" in Working with Content Selectors, in this guide.

For information on a related tag, see <ad:adTarget>.

Table 4-19 <ph:placeholder>

Tag Attribute

Req'd

Type

Description

R/C

name


Yes


String


A string that refers to a placeholder definition.

R

height

No

int

Specifies the height (in pixels) that the placeholder uses when generating the HTML that the browser requires to display a document.

The placeholder uses this value only for content types to which display dimensions apply and only if other attributes have not already defined dimensions for a given document.

If you do not specify this value and other attributes have not already been defined, the browser behavior determines the height of the document.

R

width

No

int

Specifies the width (in pixels) that the placeholder uses when generating the HTML that the browser requires to display a document.

The placeholder uses this value only for content types to which display dimensions apply and only if other attributes have not already defined dimensions for a given document.

If you do not specify this value and other attributes have not already been defined, the browser behavior determines the height of the document.

R


 

 


Property Sets

The Property Set tags allow access to the list of available properties and property sets. Manipulation of property sets can be done either programatically or through the administration tools.

Use the following code to import the utility tag library:
<%@ taglib uri="ps.tld" prefix="ps" %>

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.

<ps:getPropertyNames>

The <ps:getPropertyNames> tag (Table 4-20) is used to get a list of property names given a property set.


 

Table 4-20 <ps:getPropertyNames>

Tag Attribute

Required

Type

Description

R/C

propertySet

Yes

String

The name of the property set to add the new search.

R

schemaGroupName

Yes

String

Type of property set to search (as defined in com.beasys.commerce.foundation.property.
SchemaManagerConstants).

R

id

Yes

String

The id of the variable to hold the list of property names, as a String array.

C

result

no

String

The identifier of an Integer variable that will be created and initialized with the result of the operation.

Possible values:

Query is successful:
PropertySetTagConstants.PROPERTY_SEARCH_OK

Problem getting the list of property names:
PropertySetTagConstants.PROPERTY_SEARCH_FAILED

Property set named by propertySetName and schemaGroupName could not be found:
PropertySetTagConstants.INVALID_PROPERTY_SET

C


 

Example

<%@ taglib uri="ps.tld" prefix="ps" %>
.
.
.
<ps:getPropertyNames propertySet="<%myPropertySet%>"
schemaGroupName="<%SchemaManagerConstants.USER_TYPE%>"
id="propertyNames" result="myResult"/>

<ps:getPropertySetNames>

The <ps:getPropertySetNames> tag (Table 4-21) is used to get a list of property sets given a property set type.

Table 4-21 <ps:getPropertySetNames>

Tag Attribute

Required

Type

Description

R/C

schemaGroupName

Yes

String

The type of the property set to search (as defined in com.beasys.commerce.foundation.property.
SchemaManagerConstants).

R

id

Yes

String

The identifier of the variable to hold the list of property names, as a String array.

C

result



No

String

The identifier of an Integer variable that will be created and initialized with the result of the operation.

Possible values:

Query is successful:
PropertySetTagConstants.PROPERTY_SET_SEARCH_OK

Problem getting the list of property names:
PropertySetTagConstants.PROPERTY_SET_SEARCH_FAILED

Property set named by propertySetName and schemaGroupName could not be found:
PropertySetTagConstants.INVALID_PROPERTY_SET

C


 
 

 


User Management:
Profile Management Tags

User Management tags allow access to user and group profile information, as well as operations such as creating and deleting users and groups, and managing user-group relationships.

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

All User Management tags send results to the same file. If you are checking for results, include this import directive at the top of the page:
<%@ page import="com.beasys.commerce.user.jsp.tags.UserManagerTagConstants" %>

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.

<um:getProfile>

The <um:getProfile> tag (Table 4-22) retrieves the profile corresponding to the provided profile key and profile type. The tag has no enclosed body. The retrieved profile can be treated simply as a com.beasys.commerce.foundation.ConfigurableEntity, or can be cast to the particular implementation of ConfigurableEntity that it is. Along with the profile key and profile, an explicit successor key and successor type can be specified, as specified by the profileType attribute. This successor will then be used, along with the retrieved profile, in subsequent invocations of the <um:getProperty> tag to ensure property inheritance from the successor. If no successor is retrieved, standard ConfigurableEntity successor search patterns will apply to retrieved properties.

Table 4-22 <um:getProfile>

Tag Attribute

Required

Type

Description

R/C

profileKey


Yes

String

A unique identifier that can be used to retrieve the profile which is sought.

Example: "<%=username%>"

R

successorKey


No

String

A unique identifier that can be used to retrieve the profile successor.

Example: "<%=defaultGroup%>"

R

successorType


No

String

The profile successor type to be retrieved. If specified, this profile type must correspond to a profile type registered via the Unified Profile Type tool in the User Management suite of administration tools, and its bean must conform to the rules of Unified User Profile creation.

By default, the tag retrieves a profile of type com.beasys.commerce.axiom.contact.Group, unless otherwise specified.

Example: "AcmeGroup"

C

scope


No

String

The HTTP scope of the retreived profile. Pass "request" or "session" as the values.

Defaults to session.

C

groupOnly


No

String

Specifies to retrieve a com.beasys.commerce.axiom.contact.Group, rather than com.beasys.commerce.axiom.contact.User, for the default profile type. No successor will be retrieved when this value is true.

Defaults to false.

C

profileId


No

String

A variable name from which the retrieved profile is available for the duration of the JSP's page scope.

C

profileType

No

String

Allows theJSP developer to specify what type of User profile object to return. If the given profileKey refers to a baseUser object, this attribute should be left blank. Otherwise, if it returns to an extended User object defined by a Unified Profile Type, the name of the Unified Profile Type should be supplied in this field.

C

successorId


No

String

A variable name from which the retrieved successor is available for the duration of the JSP's page scope.

C

result


No

String

A variable name from which the result of the operation is available.

Possible values:

Success: UserManagerTagConstants.GET_PROFILE_OK

Error encountered: UserManagerTagConstants.GET_PROFILE_FAILED

UserManagerTagConstants.NO_SUCH_PROFILE

UserManagerTagConstants.NO_SUCH_SUCCESSOR


C


 

Example 1

This example shows a profile of type AcmeUser being retrieved with no successor specified, and an explicitly-supplied session scope.

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getProfile profileKey="bob" profileType="AcmeUser"
profileId="myProfile" scope="session"/>

Example 2

This example shows a default profile type (com.beasys.commerce.axiom.contact.User) being retrieved with a default successor type (com.beasys.commerce.axiom.contact.Group), and an explicitly-supplied request scope.

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getProfile profileKey="bob" successorKey="engineering" scope="request"/>

Example 3

This example shows a profile type of AcmeUser being retrieved with a successor type of AcmeGroup, and an implicitly-supplied session scope.

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getProfile profileKey="bob" profileType="AcmeUser"
successorKey="engineering" successorType="AcmeGroup"
profileId="myProfile"/>

<um:getProperty>

The <um:getProperty> tag (Table 4-23) retrieves the property value for a specified property set-property name pair. The tag has no enclosed body. The value returned is an Object. In typical cases, this tag is used after the <um:getProfile> tag is invoked to retrieve a profile for session use. The property to be retrieved is retrieved from the session profile. If the <um:getProfile> tag has not been used upon invoking the <um:getProperty> tag, the specified property value is retrieved from the Anonymous User Profile. For more information, see Creating and Managing Users, in this guide.

Table 4-23 <um:getProperty>

Tag Attribute

Required

Type

Description

R/C

propertySet


No

String

The Property Set from which the property's value is to be retrieved.

Example: "Demo Portal"

Note: If no property set is provided, the property is retrieved from the profile's default (unscoped) properties.

R

propertyName


Yes

String

The name of the property to be retrieved.

Example: "background_color"

R

id


No

String

If the id attribute is supplied, the value of the retrieved property will be available in the variable name to which id is assigned. Otherwise, the value of the property is inlined.

C


 

Example 1

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getProperty id="myTitlebarBGColor" propertySet="exampleportal" propertyName="titlebar_bgcolor"/>
My titlebar bg color is <%=myTitlebarBGColor%>.

Example 2

My titlebar bg color is <um:getProperty propertySet="exampleportal" propertyName="titlebar_bgcolor"/>.

<um:getPropertyAsString>

The <um:getPropertyAsString> tag (Table 4-24) works exactly like the <um:getProperty> tag above, but ensures that the retrieved property value is a String. The following example shows a multi-valued property which returns a Collection, but presents a list of favorite colors.

Table 4-24 <um:getPropertyAsString>

Tag Attribute

Required

Type

Description

R/C

propertySet


No

String

The Property Set from which the property's value is to be retrieved.

Example: "Demo Portal"

Note: If no property set is provided, the property is retrieved from the profile's default (unscoped) properties.

R

propertyName


Yes

String

The name of the property to be retrieved.

Example: "background_color"

R

id


No

String

If the id attribute is supplied, the value of the retrieved property will be available in the variable name to which id is assigned. Otherwise, the value of the property is inlined.

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getPropertyAsString id="myFaveColors" propertySet="exampleportal" propertyName="fave_colors"/>
My favorite colors are <%=myFaveColors%>.

<um:removeProperty>

The <um:removeProperty> tag (Table 4-25) removes the specified property from the current session's profile or from the Anonymous User Profile. The tag has no enclosed body. Subsequent calls to <um:getProperty> for a removed property would result in the default value for the property as prescribed by the property set, or from the Profile's successor.

Table 4-25 <um:removeProperty>

Tag Attribute

Required

Type

Description

R/C

propertySet


No

String

The Property Set from which the property's value is to be retrieved.

Example: "Demo Portal"

Note: The property is removed from the profile's default (unscoped) properties if no property set is provided.

R

propertyName


Yes

String

The name of the property to be removed.

Example: "background_color"

R


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:removeProperty propertySet="<%=thePropertySet%>" propertyName="<%=thePropertyName%>"/>

<um:setProperty>

The <um:setProperty> tag (Table 4-26) updates a property value for either the session's current profile, or for the Anonymous User Profile. This tag has no enclosed body.

Table 4-26 <um:setProperty>

Tag Attribute

Required

Type

Description

R/C

propertySet


No

String

The Property Set in which the property's value is to be set.

Example: "Demo Portal"

Note: The property is set for the profile's default (unscoped) properties if no property set is provided.

R

propertyName


Yes

String

The name of the property to be set.

Example: "background_color"

R

value

Yes

Object

The new property value.

R

result

No

String

The name of an Integer object to which the result of the set property operation is assigned.

Success: UserManagerTagConstants.SET_PROPERTY_OK

Error encountered: UserManagerTagConstants.SET_PROPERTY_FAILED

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<% String myName = request.getParameter("name"); %>
<um:setProperty propertySet="exampleportal" propertyName="name" value="<%=myName%>"/>

 


User Management:
Group-User Management Tags

User Management tags allow access to user and group profile information, as well as operations such as creating and deleting users and groups, and managing user-group relationships.

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

All User Management tags send results to the same file. If you are checking for results, include this import directive at the top of the page:
<%@ page import="com.beasys.commerce.user.jsp.tags.UserManagerTagConstants" %>

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.


 

<um:addGroupToGroup>

The <um:addGroupToGroup> tag (Table 4-27) adds the group corresponding to the provided childGroupName to the group corresponding to the provided groupName. Since a group can only have one parent, any previous database records which reflect the group belonging to another parent will be destroyed. Both the parent group and the child group must previously exist for proper tag behavior. The tag has no enclosed body.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WebLogic Server Administration Console.

Table 4-27 <um:addGroupToGroup>

Tag Attribute

Required

Type

Description

R/C

childGroupName

Yes

String

The name of the child group.

Example: "<%=childGroupName%>"

R

parentGroupName

No

String

The name of the parent group.

Example: "<%=parentGroupName%>"

R

result


Yes

String

The name of an Integer variable to which the result of the add group to group operation is assigned.

Possible values:

Success: UserManagerTagConstants.ADD_GROUP_OK

Error encountered: UserManagerTagConstants.ADD_GROUP_FAILED

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:addGroupToGroup childGroupName="<%=childGroupName%>" parentGroupName="<%=parentGroupName%>" result="result"/>

<um:addUserToGroup>

The <um:addUserToGroup> tag (Table 4-28) adds the user corresponding to the provided username to the group corresponding to the provided groupName. Both the specified user and the specified group must previously exist for proper tag behavior. The tag has no enclosed body.

Note: This tag should only be invoked when the customRealm element in config.xml is com.beasys.commerce.axiom.contact.security.RDBMSRealm.

Table 4-28 <um:addUserToGroup>

Tag Attribute

Required

Type

Description

R/C

username



Yes

String

The name of the user to be added to the group.

Example: "<%=username%>"

R

groupName


Yes

String

The name of the group to which the user is being added.

Example: "<%=groupName%>"

R

result



Yes

String

The name of an Integer variable to which the result of the add user to group operation is assigned.

Possible values:

Success:
UserManagerTagConstants.ADD_USER_OK

Error encountered:
UserManagerTagConstants.ADD_USER_FAILED

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:addUserToGroup userName="<%=userName%>" groupName="<%=groupName%>" result="result"/>

<um:changeGroupName>

The <um:changeGroupName> tag (Table 4-29) changes the name of the group corresponding to the specified oldGroupName to the specified newGroupName. This tag has no enclosed body.

Note: This tag should only be invoked when the customRealm element in config.xml is com.beasys.commerce.axiom.contact.security.RDBMSRealm.

Table 4-29 <um:changeGroupName>

Tag Attribute

Required

Type

Description

R/C

oldGroupName


Yes

String

The old group name.

Example: "<%=oldGroupName%>"

R

newGroupName


Yes

String

The new group name.

Example: "<%=newGroupName%>"

R

result


Yes

String

The name of an Integer variable to which the result of the change group name operation is assigned.

Possible values:

Success:
UserManagerTagConstants.GROUP_CHANGE_OK

Error encountered:
UserManagerTagConstants.GROUP_CHANGE_FAILED

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:changeGroupname oldGroupName="<%=oldGroupName%>" newGroupName="<%=changeGroupName%>" result="result"/>

<um:createGroup>

The <um:createGroup> tag (Table 4-30) creates a new com.beasys.commerce.axiom.contact.Group object. This tag has no enclosed body.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WebLogic Administration Console.

Table 4-30 <um:createGroup>

Tag Attribute

Required

Type

Description

R/C

groupName


Yes

String

The name of the new group.

Example: "<%=groupName%>"

R

id


No

String

A variable name to which the created Group object is available for the duration of the page's scope.

C

parentName


No

String

The name of the group to set as the parent of the new group.

R

result




Yes

String

The name of an Integer variable to which the result of the create group operation is assigned.

Possible Values:

Success:
UserManagerTagConstants.CREATE_GROUP_OK

Error encountered:
UserManagerTagConstants.CREATE_GROUP_FAILED

A group with the specified group name already exists:
UserManagerTagConstants.GROUP_EXISTS

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:creategroup groupName="<%=groupName%>" result="result"/>

<um:createUser>

The <um:createUser> tag (Table 4-31) creates a new com.beasys.commerce.axiom.contact.User object. This tag has no enclosed body. Although classified as a Group-User management tag, this tag can be used in conjunction with run-time activities, in that it will persist any properties associated with a current Anonymous User Profile if specified.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WebLogic Administration Console.

Table 4-31 <um:createUser>

Tag Attribute

Required

Type

Description

R/C

username


Yes

String

The name of the new user.

Example: "<%=username%>"

R

password


Yes

String

The password for the new user.

Example: "<%=password%>"

R

profileType


No

String

Specifies the extended type of user (for example, WLCS_Customer) to create a user of that type.

R

saveAnonymous


No

String

Whether to persist current anonymous user profile attributes in the newly-created user's profile.

Defaults to false.

Example: "false"

R

id


No

String

A variable name to which the created User object is available for the duration of the page's scope.

C

result


Yes

String

The name of an Integer variable to which the result of the create user operation is assigned.

Possible values:

Success:
UserManagerTagConstants.CREATE_USER_OK

Error encountered:
UserManagerTagConstants.CREATE_USER_FAILED

A user with the specified username already exists:
UserManagerTagConstants.USER_EXISTS

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:createUser userName="<%=username%>" password="<%=password"%> result="result"/>

<um:getChildGroupNames>

The <um:getChildGroupNames> tag (Table 4-32) returns the names of any groups that are children of the given group.

Table 4-32 <um:getChildGroupNames>

Tag Attribute

Required

Type

Description

R/C

groupName


Yes

String

The name of the group to search for child groups.

R

id


Yes

String

The name of the identfier which will be assigned the String array of child group names.

C


 

<um:getChildGroups>

The <um:getChildGroups> tag (Table 4-33) retrieves an array of com.beasys.commerce.axiom.contact.Group objects that are children of the Group corresponding to the provided groupName. The information is taken from the personalization database tables, and reflects the group hierarchy information as set up from the Group Administration and Realm Configuration Administration Tools. This tag has no enclosed body.

Table 4-33 <um:getChildGroups>

Tag Attribute

Required

Type

Description

R/C

groupName


Yes

String

The name of the group whose children are sought.

Example: "<%=groupName%>"

R

id


Yes

String

A variable name to which the child Group objects are available for the duration of the page's scope.

Example: "childGroups"

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getchildgroups groupName="<%=groupName%>" id="childGroups"/>

<um:getGroupNamesForUser>

The <um:getGroupNamesForUser> tag (Table 4-34) retrieves a String array that contains the group names corresponding to groups to which the provided user immediately belongs. This tag has no enclosed body.

Table 4-34 <um:getGroupNamesForUser>

Tag Attribute

Required

Type

Description

R/C

username


Yes

String

The name of the user whose matching groups are sought.

Example: "<%=username%>"

R

id


Yes

String

A variable name to which the resultant group names are assigned.

Example: "myGroups"

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getGroupNamesForUser userName="<%=username%>" id="myGroups"/>

<um:getParentGroupName>

The <um:getParentGroupName> tag (Table 4-35) retrieves the name of the parent of the com.beasys.commerce.axiom.contact.Group object associated with the provided groupName. The information is taken from the personalization database tables, and reflects the group hierarchy information as set up from the Group Administration and Realm Configuration Administration Tools. This tag has no enclosed body.

Table 4-35 <um:getParentGroupName>

Tag Attribute

Required

Type

Description

R/C

groupName


Yes

String

The name of the group whose parent group name is sought.

Example: "<%=groupName%>"

R

id


Yes

String

A variable name to which the name of the parent is available for the duration of the page's scope.

Example: "parentGroupName"

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getParentGroupName groupName="<%=groupName%>" id="parentGroupName"/>

<um:getTopLevelGroups>

The <um:getTopLevelGroups> tag (Table 4-36) retrieves an array of com.beasys.commerce.axiom.contact.Group objects, each of which has no parent group. The information is taken from the personalization database tables, and reflects the group hierarchy information as set up from the Group Administration and Realm Configuration Administration Tools. This tag has no enclosed body.

Table 4-36 <um:getTopLevelGroups>

Tag Attribute

Required

Type

Description

R/C

id


Yes

String

A variable name to which the top-level Group objects are available for the duration of the page's scope.

Example: "topLevelGroups"

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getTopLevelGroups id="topLevelGroups"/>

<um:getUsernames>

The <um:getUsernames> tag (Table 4-38) retrieves a String array that contains the usernames matching the provided search expression. The search expression supports only the asterisk (*) wildcard character, and is case insensitive. As many asterisks as desired may be used in the search expression. This tag has no enclosed body.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WebLogic Administration Console.

Table 4-37 <um:createGroup>

Tag Attribute

Required

Type

Description

R/C

groupName


Yes

String

The name of the new group.

Example: "<%=groupName%>"

R

id


No

String

A variable name to which the created Group object is available for the duration of the page's scope.

C

parentName


No

String

The name of the group to set as the parent of the new group.

R

result




Yes

String

The name of an Integer variable to which the result of the create group operation is assigned.

Possible Values:

Success:
UserManagerTagConstants.CREATE_GROUP_OK

Error encountered:
UserManagerTagConstants.CREATE_GROUP_FAILED

A group with the specified group name already exists:
UserManagerTagConstants.GROUP_EXISTS

C


 

Table 4-38 <um:getUsernames>

Tag Attribute

Required

Type

Description

R/C

searchExp


No

String

The search expression to apply to the user name search. Defaults to `*'

Example: "t*"

R

userLimit


No

String (representing
an Integer)


The maximum number of users to be returned from the search. (String which has a particular Integer.valueOf.) Defaults to 100.

If user count exceeds userLimit, the length of the array in id is truncated to the length of userLimit.

Example: "500"

R

id


Yes

String

A variable name to which the resultant user names are assigned.

Example: "myUsers"

C

result


No

String

The name of an Integer variable to which the result of the getUsernames operation is assigned.

Possible values:

Success:
UserManagerTagConstants.USER_SEARCH_OK

General error:
UserManagerTagConstants.USER_SEARCH_FAILED

C


 

Note: The USER_SEARCH_FAILED value is returned only when a general error occurs while searching for the user, such as a database connection failure. If no user matches the search criteria, the result will not be equal to UserManagerTagConstants.USER_SEARCH_FAILED, but the length returned by the array in id will be zero.

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getUsernames userLimit="500" searchExp="t*" id="myUsers"/>
<%System.out.println("I found " + myUsers.length + " users.");%>

<um:getUsernamesForGroup>

The <um:getUsernamesForGroup> tag (Table 4-39) retrieves a String array that contains the usernames matching the provided search expression and correspond to members of the provided group. The search expression supports only the asterisk (*) wildcard character, and is case insensitive. As many asterisks as desired may be used in the search expression. This tag has no enclosed body.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WLS administration console.

Table 4-39 <um:getUsernamesForGroup>

Tag Attribute

Required

Type

Description

R/C

searchExp


No

String

The search expression to apply to the user name search.

Defaults to" *".

Example: "t*"

R

groupName


Yes

String

The name of the group whose matching members are sought.

Example: "engineering"

R

userLimit


No

String
(representing
an Integer)


The maximum number of users to be returned from the search. (String which has a particular Integer.valueOf.) Defaults to 100.

If user count exceeds userLimit, the length of the array in id is truncated to the length of userLimit.

Example: "500"

R

id


Yes

String

A variable name to which the resultant user names are assigned.

Example: "myUsers"

C

result


No

String

The name of an Integer variable to which the result of the get usernames for group operation is assigned.

Possible values:

Success:
UserManagerTagConstants.USER_SEARCH_OK

General error:
UserManagerTagConstants.USER_SEARCH_FAILED

C


 

Note: The USER_SEARCH_FAILED value is returned only when a general error occurs while searching for the user, such as a database connection failure. If no user matches the search criteria, the result will not be equal to UserManagerTagConstants.USER_SEARCH_FAILED, but the length returned by the array in id will be zero.

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:getUsernamesForGroup groupName="engineering" userLimit="500" searchExp="t*" id="myUsers"/>
<%System.out.println("I found " + myUsers.length + " users in my group.");%>

<um:removeGroup>

The <um:removeGroup> tag (Table 4-40) removes the com.beasys.commerce.axiom.contact.Group object corresponding to the provided groupName. This tag has no enclosed body.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WebLogic Server Administration Console.

Table 4-40 <um:removeGroup>

Tag Attribute

Required

Type

Description

R/C

groupName


Yes

String

The name of the group to be removed.

Example: "<%=groupName%>"

R

result




Yes

String

The name of an Integer variable to which the result of the remove group operation is assigned.

Possible Values:

Success:
UserManagerTagConstants.REMOVE_GROUP_OK

Error encountered:
UserManagerTagConstants.REMOVE_GROUP_FAILED

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:removeGroup groupName="<%=groupName%>" result="result"/>

<um:removeGroupFromGroup>

The <um:removeGroupFromGroup> tag (Table 4-41) removes a child group from a parent group.

Table 4-41 <um:removeGroupFromGroup>

Tag Attribute

Required

Type

Description

R/C

childGroupName

Yes

String

The name of the child group to remove from its parent.

R

parentGroupName

Yes

String

The name of the parent group from which the child group will be removed.

R

result

Yes

String

The name of an Integer variable to which the result of the remove group from group operation is assigned.

Possible values:

Success:
UserManagerTagConstants.REMOVE_GROUP_OK

Failure:
UserManagerTagConstants.REMOVE_GROUP_FAILED

C


 

<um:removeUser>

The <um:removeUser> tag (Table 4-42) removes the com.beasys.commerce.axiom.contact.User object corresponding to the provided username. It can remove any type of extended user that has its profileType set in the database. This tag has no enclosed body.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WebLogic Server Administration Console.

Table 4-42 <um:removeUser>

Tag Attribute

Required

Type

Description

R/C

username


Yes

String

The username of the user to be removed.

Example: "<%=username%>"

R

result


Yes

String

The name of an Integer variable to which the result of the remove user operation is assigned.

Possible values:

Success:
UserManagerTagConstants.REMOVE_USER_OK

Error encountered:
UserManagerTagConstants.REMOVE_USER_FAILED

C


 

Example

<%@ taglib uri="um.tld" prefix="um" %>
.
.
.
<um:removeUser userName="<%=username%>" result="result"/>

<um:removeUserFromGroup>

The <um:removeUserFromGroup> tag (Table 4-43) removes a user from a group.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WebLogic Server Administration Console.

Table 4-43 <um:removeUserFromGroup>

Tag Attribute

Required

Type

Description

R/C

username


Yes

String

The username of the user to remove from the given group.

R

groupName


Yes

String

The name of the group from which the given user will be removed.

R

result



Yes

String

The name of an Integer variable to which the result of the remove user from group operation is assigned.

Possible values:

Success:
UserManagerTagConstants.REMOVE_USER_OK

Failure:
UserManagerTagConstants.REMOVE_USER_FAILED

C


 

 


User Management: Security Tags

User Management tags allow access to user and group profile information, as well as operations such as creating and deleting users and groups, and managing user-group relationships.

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

All User Management tags send results to the same file. If you are checking for results, include this import directive at the top of the page:
<%@ page import="com.beasys.commerce.user.jsp.tags.UserManagerTagConstants" %>

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.

<um:login>

The <um:login> tag (Table 4-44) provides weak authentication (username, password) against the current security realm, and sets the authenticated user as the current WebLogic user. This tag has no enclosed body.

Note: The login tag requires a username parameter and a password parameter to be present in the HTTP request.

Table 4-44 <um:login>

Tag Attribute

Required

Type

Description

R/C

result


Yes

String

The name of an Integer variable to which the result of the login operation is assigned.

Possible values:

Success:
UserManagerTagConstants.LOGIN_OK

General error when performing authentication:
UserManagerTagConstants.LOGIN_ERROR

Authentication failed because of invalid username/password combination:
UserManagerTagConstants.LOGIN_FAILED

C


 

<um:logout>

The <um:logout> tag (Table 4-45) ends the current user's WebLogic Server session. This is independent of the FlowManager's user session tracking, and should be used in combination with the <um:login> tag.

Table 4-45 <um:logout>

Tag Attribute

Required

Type

Description

R/C

No attributes





.
 

<um:setPassword>

The <um:setPassword> tag (Table 4-46) updates the password for the user corresponding to the provided username.

Note: This tag should only be invoked when the class com.beasys.commerce.axiom.contact.security.RDBMSRealm is defined as the active security realm. This can be verified through the WebLogic Server Administration Console.

Table 4-46 <um:setPassword>

Tag Attribute

Required

Type

Description

R/C

username


Yes

String

The username of the user whose password is to be changed.

R

password

Yes

String

The new user password.

R

result


Yes

String

The name of an Integer variable to which the result of the set password operation is assigned.

Possible values:

Success:
UserManagerTagConstants.SET_PASSWORD_OK

Failure:
UserManagerTagConstants.SET_PASSWORD_FAILED

C


 

 


Personalization Utilities

The <es:jsptaglib> tag contains generic tags you can use to create JSP pages.

Use the following code to import the utility tag library:
<%@ taglib uri="es.tld" prefix="es" %>

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.

<es:counter>

The <es:counter> tag (Table 4-47) is used to create a for loop.

Table 4-47 <es:counter>

Tag Attribute

Required

Type

Description

R/C

type


No

String

The type of the counter. Possible values are int or long. Default is int.

R

id

Yes

String

A unique name for the variable.

R

minCount

Yes

Int

The start position for the loop.

R

maxCount

Yes

Int

The end position for the loop.

R


 

Example

<%@ taglib uri="es.tld" prefix="es" %>
.
.
.
<es:counter id="iterator" minCount="0" maxCount="10">
<% System.out.println(iterator);%>
</es:counter>

<es:date>

The <es:date> tag (Table 4-48) is used to get a date- and time-formatted String based on the user's time zone preference.

Table 4-48 <es:date>

Tag Attribute

Required

Type

Description

R/C

timeZoneId

No

String

Defaults to the time zone on the server.

R

formatStr


No

String

A date and time format string that adheres to the java.text.SimpleDateFormat. The default value is MM/dd/yyyy HH:mmss:z.

R


 

Example

<%@ taglib uri="es.tld" prefix="es" %>
.
.
.
<es:date formatStr="MMMM dd yyyy" timeZoneId="MST" />

<es:forEachInArray>

The <es:forEachInArray> tag (Table 4-49) is used to iterate over an array.

Table 4-49 <es:forEachInArray>

Tag Attribute

Required

Type

Description

R/C

id

Yes

String

The variable for each value in the array.

R

type

Yes

String

The type of each value in the array.

R

array

Yes

Object []

The array to iterate over.

R

counterId

No

String

The position in the array.

R


 

Example

<es:forEachInArray id="item" array="<%=items%>" type="String" counterId="i">
<% System.out.println("items[" + i + "]: " + item);%>
</es:forEachInArray>

<es:isNull>

The <es:isNull> tag (Table 4-50) is used to check if a value is null. In the case of a String, the <es:isNull> tag is used to check if the String is null or has a value. An empty string will cause isNull to be false. (An empty string is not null.)

Table 4-50 <es:isNull>

Tag Attribute

Required

Type

Description

R/C

item

Yes

Object

The variable to evaluate.

R


 

Example

<%@ taglib uri="es.tld" prefix="es" %>
.
.
.
<es:isNull item="<%=value%>">
Error: the value is null.
</es:isNull>

<es:monitorSession>

The <es:monitorSession> tag (Table 4-51) 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 4-51 <es: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="es.tld" prefix="es" %>
.
.
.
<es:monitorSession loginRequired="true" />

<es:notNull>

The <es:notNull> tag (Table 4-52) is used to check if a value is not null. In the case of a String, the <es:notNull> tag is used to check if the String is not null or has a value. An empty string will cause notNull to be true. (An empty string is treated as a value.)

Table 4-52 <es:notNull>

Tag Attribute

Required

Type

Description

R/C

item

Yes

Object

The variable to evaluate.

R


 

Example

<%@ taglib uri="es.tld" prefix="es" %>
.
.
.
<es:notNull item="<%=value%>">
The value is not null.
</es:notNull>

<es:simpleReport>

The <es:simpleReport> tag (Table 4-53) is used to create two-dimensional array out of a simple query.

Table 4-53 <es:simpleReport>

Tag Attribute

Required

Type

Description

R/C

id

Yes

String

The variable that holds the resultant two-dimensional array converted from the java.sql.ResultSet specified by the resultSet tag attribute.

R

resultSet

Yes

java.sql.ResultSet

The result set that holds the java.sql.ResultSet.

R


 

Example

<es:simpleReport id="report" resultSet="<%=resultSet%>">
<%
for (int i=0; i<report.length; i++ )
{
for (int j=0; j<report[i].length; j++ )
{
...
}
}
%>

<es:transposeArray>

The <es:transposeArray> tag (Table 4-54) is used to transpose a standard [row][column] array to a [column][row] array.

Table 4-54 <es:transposeArray>

Tag Attribute

Required

Type

Description

R/C

id

Yes

String

The variable that holds the [c][r] array.

R

type


Yes

String

The type of variable in the [r][c] array, such as String.

R

array

Yes

Object[][]

The variable that holds the [r][c] array.

R


 

Example

<%@ taglib uri="es.tld" prefix="es" %>
.
.
.
<es:transposeArray id="byColumnRow" array="<%=byRowColumn%>" type="String">
...
</es:transposeArray>

<es:uriContent>

The <es:uriContent> tag (Table 4-55) is used to pull content from a URL. It is best used for grabbing text-heavy pages.

Table 4-55 <es:uriContent>

Tag Attribute

Required

Type

Description

R/C

id

Yes

String

The variable that holds the downloaded content of the URI.

R

uri


Yes

String

The fully qualified URI from which to get the content.

R


 

Example

<%@ taglib uri="es.tld" prefix="es" %>
.
.
.
<es:uriContent id="uriContent" uri="http://www.beasys.com/index.html">
<%
out.print(uriContent);
%>
</es:uriContent>

Note: If you combine HTML pages with relative URL's, you must fully qualify them to the correct host in each URL, or else images (on other resources) may not be retrieved properly by the browser.

 


WebLogic Utilities

The <wl:jsptaglib> tag library contains custom JSP extension tags which are supplied as a part of the WebLogic Server platform.

To import the WebLogic Utilities JSP tags, use the following code:
<%@ taglib uri="weblogic.tld" prefix="wl" %>

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.

Note: See the Javadoc for further descriptions of the wl tags.

<wl:process>

The <wl:process> tag (Table 4-56) is used for query attribute-based flow control. By using a combination of the four attributes, you can selectively execute the statements between the <wl:process> and </wl:process> tags.

Table 4-56 <wl:process>

Tag Attribute

Required

Type

Description

R/C

name

No

String

The name of a query attribute.

R

notName

No

String

The name of a query attribute.

R

value

No

String

The value of a query attribute.

R

notValue

No

String

The value of a query attribute.

R


 

Statements between the <wl:process> tags will be executed according to the matrix below:

Value

notValue

Neither "value" nor "notValue"

name

Named attribute is equal to the value.

Named attribute does not equal the value.


Name attribute's value is not null.

not Name



notName attribute's value is null.


 

Example

<%@ taglib uri="weblogic.tld" prefix="wl" %>
.
.
.
<wl:process name="lastBookRead" value="A Man in Full">
<!-- This section of code will be executed
if lastBookRead exists and the value of lastBookRead is
"A Man in Full" -->
</wl:process>

<wl:repeat>

The <wl:repeat> tag (Table 4-57) is used to iterate over a variety of Java objects, as specified in the set attribute.

Table 4-57 <wl:repeat>

Tag Attribute

Required

Type

Description

R/C

set


No

Object

The set of objects that includes:

R

count

No

Int

Iterate over first "count" entries in the set.

R

id

No

String

Variable to contain current object being iterated over.

C

type

No

String

Type of object that results from iterating over the set you passed in. Defaults to Object. This type must be fully qualified.

C


 

<wl:cache>

The <wl:cache> tag specifies that its contents do not necessarily need to be updated every time it is displayed.

Table 4-58 <wl:cache>

Tag Attribute

Required

Type

Description

R/C

timeout

No

Integer

Controls the time-to-live of the data, or how often the data must be updated independent of all other controls. This value is in seconds.

R

scope

No

String

Controls the time-to-live of the data, or how often the data must be updated independent of all other controls. This value is in seconds

C

name

No

String

Uniquely identifies this cache. If you do not specify a name a random name will be generated.

C

size

No

Integer

The maximum number of entries that can be in the cache. It defaults to an unlimited cache. It is only relevant for when there is an associated key.

R

vars

No

String

In addition to caching the transformed output of the cache, you can also cache calculated values within the block. These variables are specified exactly the same way as the cache keys. This type of caching is called Input caching.

C

key

No

String

Specifies a comma separated list of values accessible from the current page that the data depends on. These values act as additional keys into the cache.

C

async

No

String

If the async parameter is set to true, the cache will be updated asynchronously, if possible. The user that initiates the cache hit sees the old data.

C


 

 

back to top previous page