Portal Guide

CHAPTER 27

Portal Tag Library

This chapter provides reference information for the Portal Tag Library (PortalTag.jar).

For more information    For background information, see the chapter on using the Director tag libraries in Developing exteNd Director Applications.

 
Top of page

definition

Specifies the profiling definition for the transcoding engine. This tag is used with the deviceProfiling tag.

Syntax

  <prefix:definition>

 
Top of page

deviceProfiling

Performs a transcoding operation. The definition and sourceXML tags can be nested within this tag.

This tag is used to render content for use with multiple devices using the transcoding engine. The definition tag should contain the appropriate XML data for rendering the content.

JSP pages that use this tag may have to set the return MIME type before calling this custom tag in order to have the content properly displayed. The default content type for JSP pages is text/html. Here is an example of the code you might need to add to the JSP page in order to support a WAP (Wireless Application Protocol) device:

  public int getBrowser(HttpServletRequest request) {
    String accept = request.getHeader("ACCEPT");
    if (null != accept && -1 !=
      accept.indexOf("wml")) {
      return WML;
    }
    return -1;
  }
  <%
    switch (getBrowser(request)) {
    case WML:
      response.setContentType("text/vnd.wap.wml");
      break;
    }
  %>

An alternative way to set the content type is to use the id attribute of the deviceProfiling tag to specify a variable where the content type for the current device should be stored. You can then get the value of this variable by calling the getAttribute() method on the pageContext:

  <% response.setContentType((String)pageContext.getAttribute("contenttype")); %>

Syntax

  <prefix:deviceProfiling name="name" style="style" id="id" />

Attribute

Required?

Request-time expression values supported?

Description

name

Yes

No

Specifies the name of this rendering.

style

Yes

No

Sets the style ID for this rendering.

id

No

No

Specifies the name of the variable that will be used to hold the content type for the current device.

If no value is specified, a default id of trans_contentType is used.

Example

This example shows how to use the deviceProfiling tag to perform a transcoding operation. In this example, the profiling definition is hardcoded within the definition tag. Typically, you would use the getResource tag (in the Framework tag library) to get the XML from the resource set dynamically.

  <%@ taglib uri="/fw" prefix="epfw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  
  <% try { %>
  <ep:deviceProfiling style="PhoneListStyle" name="testtwo" id="phone">
    <ep:definition>
     <transcoding lastOpen="d:\PhoneListData.xml"
      xmlns="urn:novell:dp_metadata">
      <separator tagname='employee'/>
      <block name='employeeList' type='list' style='' listlength="4">
       <element name='firstName' type='' location='//first-name/text()'/>
       <element name='lastName' type='' location='//last-name/text()'/>
      </block>
      <block name='employeeDetails' type='content' style=''>
       <element name='firstName' type='' location='//first-name/text()'/>
       <element name='phoneNumber' type='' location='//phone-number/text()'/>
       <element name='email' type='' location='//email/text()'/>
       </block>
      <link from-block='employeeList' from-element='firstName' to-block='employeeDetails'/>
     </transcoding>
    </ep:definition>
    <ep:sourceXML>
     <results querystring="s">
      <employee>
      <first-name>Katy</first-name>
      <last-name>Summers</last-name>
      <phone-number>(617) 343-6530</phone-number>
      <email>ksummers@silverdemo.com</email>
      </employee>
      <employee>
      <first-name>Hank</first-name>
      <last-name>Smiley</last-name>
      <phone-number>(617) 343-6532</phone-number>
      <email>hsmiley@silverdemo.com</email>
      </employee>
  ...
     </results>
    </ep:sourceXML>
    </ep:deviceProfiling>
  <%} catch (Exception e) {
      System.out.println("Error");
      e.printStackTrace();
  } %>
  <% response.setContentType((String)pageContext.getAttribute("phone")); %>

 
Top of page

displayComponent—DEPRECATED

DEPRECATED   This tag has been deprecated. Use renderPortlet.

Displays a portal component within a JSP page. To pass parameters to the component, you can nest the param tag inside the displayComponent tag.

This tag wraps the displayComponent() method on the EbiPresentationMgr interface.

Syntax

  <prefix:displayComponent compID="compID" name="name" decorate="decorate" id="id"/>

Attribute

Required?

Request-time expression values supported?

Description

compID

Yes

Yes

Specifies the ID for a portal component. The ID of a component is the name given to the XML file (without the extension) that describes the component. For example, if the XML file name for a component is MyComponent1.xml, the component ID is MyComponent1.

name

Yes

No

Specifies a component instance name that uniquely identifies the component on the page.

decorate

No

Yes

Specifies a boolean value (true or false) that indicates whether or not to show the title bar.

Although the toolbars display when this option is set to true, the toolbar buttons will not automatically function as they would on the MyPortal page or a PID page. For example, minimize and maximize will not work automatically. In addition, the processRequest method for the component will not fire, unless the fireComponentProcessRequest tag is used as well.

To theme-enable your component, you also need to be sure to include a getThemeLink tag on the page.

If no value is specified, this attribute defaults to false.

id

Yes

No

Specifies the name of the variable that will be used to hold the component content.

If no value is specified, the component content is returned directly.

Example 1

This example shows how to use the displayComponent to send component content to the output stream:

  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <body>
  
  <b>DisplayComponent</b>
  
  <ep:displayComponent compID="MyComponent1" name="mycomp1">
  <ep:param name="Parm1" value="Val1"/>
  <ep:param name="Parm2" value="Val2"/>
  <ep:param name="Parm3" value="Val3"/>
  </ep:displayComponent>
  
  </body>
  </html>
  

Example 2

This example shows how to use the displayComponent to assign component content to the id variable. In this example, the id variable is used to store a theme ID generated by the PortalUrlHelper component:

  <head>
  <ep:displayComponent compID="PortalUrlHelper" name="helper" id="themeid">
   <ep:param name="SUBST_STRING" value="$THEME_ID$"/>
  </ep:displayComponent>
  
  <%=pageContext.getAttribute("themeid")%>
  
  </head>

 
Top of page

displayPID—DEPRECATED

DEPRECATED   This tag has been deprecated.

Displays a PID page within a JSP page.

This tag wraps the displayPage() method on the EbiPresentationMgr interface.

Syntax

  <prefix:displayPID PID="pid" />

Attribute

Required?

Request-time expression values supported?

Description

PID

Yes

No

Specifies the name of a PID page.

Example

  <% taglib uri="/portal" prefix="ep" %>
  ...
  <ep:displayPID PID="MyPID.html" />

 
Top of page

fireComponentProcessRequest—DEPRECATED

DEPRECATED   This tag has been deprecated.

Fires the processRequest method of a component. To pass parameters to the processRequest method, you can nest the param tag inside the fireComponentProcessRequest tag.

This tag wraps the processRequest() method on the EbiPortalComponent interface.

Syntax

  <prefix:fireComponentProcessRequest compID="compID" name="name" />

Attribute

Required?

Request-time expression values supported?

Description

compID

Yes

Yes

Specifies the ID for a portal component. The ID of a component is the name given to the XML file (without the extension) that describes the component. For example, if the XML file name for a component is MyComponent1.xml, the component ID is MyComponent1.

name

No

Yes

Specifies a component instance name that uniquely identifies the component on the page.

Example

  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <body>
  <ep:fireComponentProcessRequest compID="MyComponent1" name="mycomp1">
  <ep:param name="Parm1" value="Val1"/>
  <ep:param name="Parm2" value="Val2"/>
  <ep:param name="Parm3" value="Val3"/>
  </ep:fireComponentProcessRequest>
  
  </body>
  </html>

 
Top of page

getCompList

Retrieves a list of all portal components. To use this tag, the user must be part of the administrators group and have proper authority to get this list of objects. Before using this tag, the user must log in.

This tag wraps the getComponentInfoList() method on the EbiComponentManager interface.

Syntax

  <prefix:getCompList id="id" iterate="iterate" restricted="restricted" category="category"/>

Attribute

Required?

Request-time expression values supported?

Description

id

No

No

Specifies the name of the variable that will be used to hold the resulting component list. The list is an object of type List that contains several objects of type EbiPortalComponentInfo.

If no value is specified, a default id of compList is used.

iterate

Yes

No

Specifies a boolean value (true or false) that indicates whether this tag will operate as a body tag so that each row can be processed separately.

If the iterate attribute is set to true, the following values can be accessed from within the getCompList tag:

  • compName

  • description

  • displayname

Each of these variables has a scope of NESTED.

If the iterate attribute is set to false, this tag will operate as a nonbody tag that returns an object of type List that contains a list of objects of type EbiPortalComponentInfo.

restricted

No

Yes

Specifies a boolean value (true or false) that indicates whether the list of components should be filtered based on security permissions.

Defaults to true.

category

No

Yes

Specifies the name of a category.

Example 1

This example shows how to use the getCompList tag with the iterate attribute set to true:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/fw" prefix="fw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getCompList iterate="true">
  Component name = <%=compName%><br/>
  Description = <%=description%><br/>
  DisplayName = <%=displayname%><br/>
  <p/>
  </ep:getCompList>
  <fw:logoff />
  </body>
  </html>

Example 2

This example shows how to use the getCompList tag with the iterate attribute set to false:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/portal" prefix="ep" %>
  <%@ taglib uri="/fw" prefix="fw" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getCompList iterate="false"/>
  
  <%= ((java.util.List)pageContext.getAttribute("compList")).size() %> = the size of the list...
  <fw:logoff />
  </body>
  </html>

 
Top of page

getObjectInCache

Retrieves an object from the portal cache. Objects are retrieved based on the cache key passed in on the key attribute and cast to the class provided by the className attribute. The result is placed within a scripting variable with a page scope that is named by the tag's id attribute value.

This tag wraps the getObjectInCache() method on the EbiCacheHolder interface.

Syntax

  <prefix:getObjectInCache id="ID" key="key" className="class" sessionCache="sessionCache" />

Attribute

Required?

Request-time expression values supported?

Description

id

No

No

Specifies the name of the variable that will be used to store the cached object.

If no value is specified, a default id of cacheObject is used.

key

Yes

Yes

Specifies the key for the object in the portal cache.

className

No

No

Specifies the name of the class to which the cached object should be cast.

If no value is specified, the object is cast to an Object.

sessionCache

No

No

Indicates whether the object should be retrieved from the session-specific cache. If a value of true is specified, the object is retrieved from the session cache. If a value of false is specified, the object is retrieved from the global cache.

If no value is specified, this attribute defaults to false.

Example

  <% taglib uri="/portal" prefix="ep" %>
  ...
  <ep:getObjectInCache id="myID" key="portalkey" className="java.lang.String" />
  ...
  Value is: <%=myID%>

 
Top of page

getObjectInSessionCache—DEPRECATED

DEPRECATED   This tag has been deprecated. Use getObjectInCache with sessionCache set to true.

Retrieves an object from the session cache. Objects are retrieved based on the cache key passed in on the key attribute and cast to the class provided by the className attribute. The result is placed within a variable with a page scope that is keyed by the tag's id attribute value.

This tag wraps the getObjectInCache() method on the EbiSession interface.

NOTE:   This tag has been deprecated. Use the getObjectInCache tag instead.

Syntax

  <prefix:getObjectInSessionCache id="ID" key="key" className="class" />

Attribute

Required?

Request-time expression values supported?

Description

id

No

No

Specifies the name of the variable that will be used to store the cached object.

If no value is specified, a default id of sessionObject is used.

key

Yes

Yes

Specifies the key for the object in the portal cache.

className

No

No

Specifies the name of the class to which the cached object should be cast.

If no value is specified, the object is cast to an Object.

Example

  <% taglib uri="/portal" prefix="ep" %>
  ...
  <ep:getObjectInSessionCache id="sesobj" key="sessionkey" className="java.lang.String" />
  ...
  Value is: <%=sesobj%>

 
Top of page

getPIDList

Retrieves a list of all PID pages. To use this tag, the user must be part of the administrators group and have proper authority to get this list of objects. Before using this tag, the user must log in.

This tag wraps the getPageInfoList() method on the EbiPageManager interface.

Syntax

  <prefix:getPIDList id="id" iterate="iterate" category="category"/>

Attribute

Required?

Request-time expression values supported?

Description

id

No

No

Specifies the name of the variable that will be used to hold the resulting list of pages. The list is an object of type List that contains several objects of type EbiPageInfo.

If no value is specified, a default id of PIDList is used.

iterate

Yes

No

Specifies a boolean value (true or false) that indicates whether this tag will operate as a body tag so that each row can be processed separately.

If the iterate attribute is set to true, the following values can be accessed from within the getPIDList tag:

  • identifier

  • mime

  • displayname

Each of these variables has a scope of NESTED.

If the iterate attribute is set to false, this tag will operate as a nonbody tag that returns an object of type List that contains a list of objects of type EbiPageInfo.

category

No

Yes

Specifies the name of a category.

Example 1

This example shows how to use the getPIDList tag with the iterate attribute set to true:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/fw" prefix="fw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getPIDList iterate="true">
  Identifier = <%=identifier%><br/>
  mime = <%=mime%><br/>
  Description = <%=displayname%><br/>
  <p/>
  </ep:getPIDList>
  <fw:logoff />
  </body>
  </html>

Example 2

This example shows how to use the getPIDList tag with the iterate attribute set to false:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/portal" prefix="ep" %>
  <%@ taglib uri="/fw" prefix="fw" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getPIDList iterate="false"/>
  
  <%= ((java.util.List)pageContext.getAttribute("PIDList")).size() %> = the size of the list of pages...
  
  <fw:logoff />
  </body>
  </html>

 
Top of page

getThemeLink

Retrieves the URL for the current theme and generates an appropriate link to a theme CSS file. If the id is not set, it will return the string for the link tag directly. If the id is set it will return the link as an attribute of that name. For inline calls, this tag should be placed in the <head> section of the HTML so that the link to the CSS file is positioned properly.

This tag wraps the replaceAllKeywordStrings() method on the EboPortalUrlHelper class.

Syntax

  <prefix:getThemeLink id="id"/>

Attribute

Required?

Request-time expression values supported?

Description

id

No

No

Specifies the name of the variable that will be used to hold the link.

If no value is specified, the link is placed inline on the page.

Example

This example shows how to use the getThemeLink tag to generate a theme link in the HEAD section of a page:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/fw" prefix="fw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <head>
  <ep:getThemeLink/>
  </head>
  <body>
  ...
  </body>
  </html>

 
Top of page

getUserComponentInfo—DEPRECATED

DEPRECATED   This tag has been deprecated.

Retrieves the requested user component information for the current user or a specified user.

This tag wraps the getUserComponentInfo() method on the EbiPortalManager interface.

Syntax

  <prefix:getUserComponentInfo compID="compID" userIID="useriid" id="id"/>

Attribute

Required?

Request-time expression values supported?

Description

compID

Yes

Yes

Specifies a component ID.

userID

No

Yes

Specifies the UUID for a user.

If no value is specified, the current user is used.

id

No

No

Specifies the name of the variable that will be used to hold the component information object. The object returned is of type EbiUserComponentInfo.

If no value is specified, a default id of componentinfo is used.

Example

This example shows how to use the getUserComponentInfo tag to get information about a particular component:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/fw" prefix="fw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getUserComponentInfo compID="PhoneList"/>
  
  <%= ((com.sssw.portal.api.EbiUserPortalInfo)pageContext.getAttribute("componentinfo")).getComponentName() %> is the default page for this user...
  
  <fw:logoff />
  </body>
  </html>

 
Top of page

getUserPageInfo

Retrieves portal page information for the current user or a specified user.

This tag wraps the getUserPageInfo() method on the EbiPortalManager interface.

Syntax

  <prefix:getUserPageInfo userIID="useriid" id="id"/>

Attribute

Required?

Request-time expression values supported?

Description

userPageName

No

Yes

Specifies the name of the personal page.

userID

No

Yes

Specifies the UUID for a user.

If no value is specified, the current user is used.

id

No

No

Specifies the name of the variable that will be used to hold the page information object. The object returned is of type EbiUserPageInfo.

If no value is specified, a default id of pageinfo is used.

Example

This example shows how to use the getUserPageInfo tag to get information about a particular personal page:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/fw" prefix="fw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getUserPortalInfo userPageName="MyUserPage"/>
  
  <%= ((com.sssw.portal.api.EbiUserPageInfo)pageContext.getAttribute("pageinfo")).getPortalLayoutID() %> is the layout ID for the page...
  
  <fw:logoff />
  </body>
  </html>

 
Top of page

getUserPageList

Retrieves a list of all available pages for the current user or a specified user.

This tag wraps the getUserPageInfoList() method on the EbiPortalManager interface.

Syntax

  <prefix:getUserPageList id="id" userIID="userIID" iterate="iterate"/>

Attribute

Required?

Request-time expression values supported?

Description

id

No

No

Specifies the name of the variable that will be used to hold the resulting list of pages. The list is an object of type List that contains several objects of type EbiUserPageInfo.

If no value is specified, a default id of userPageList is used.

userID

No

Yes

Specifies the UUID for a user.

If no value is specified, the current user is used.

iterate

Yes

No

Specifies a boolean value (true or false) that indicates whether this tag will operate as a body tag so that each row can be processed separately.

If the iterate attribute is set to true, the following values can be accessed from within the getUserPageList tag:

  • pagename

  • description

  • displayname

Each of these variables has a scope of NESTED.

If the iterate attribute is set to false, this tag will operate as a nonbody tag that returns an object of type List that contains a list of objects of type EbiUserPageInfo.

Example 1

This example shows how to use the getUserPageList tag with the iterate attribute set to true:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/fw" prefix="fw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getUserPageList iterate="true">
  Page name = <%=pagename%><br/>
  Description = <%=description%><br/>
  Display name = <%=displayname%><br/>
  <p/>
  </ep:getUserPageList>
  <fw:logoff />
  </body>
  </html>

Example 2

This example shows how to use the getUserPageList tag with the iterate attribute set to false:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/portal" prefix="ep" %>
  <%@ taglib uri="/fw" prefix="fw" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getUserPageList iterate="false"/>
  
  <%= ((java.util.List)pageContext.getAttribute("userPageList")).size() %> = the size of the list of pages...
  
  <fw:logoff />
  </body>
  </html>

 
Top of page

getUserPortalInfo

Retrieves portal information for the current user or a specified user.

This tag wraps the getUserPortalInfo() method on the EbiPortalManager interface.

Syntax

  <prefix:getUserPortalInfo userIID="useriid" id="id"/>

Attribute

Required?

Request-time expression values supported?

Description

userID

No

Yes

Specifies the UUID for a user.

If no value is specified, the current user is used.

id

No

No

Specifies the name of the variable that will be used to hold the portal information object. The object returned is of type EbiUserPortalInfo.

If no value is specified, a default id of portalinfo is used.

Example

This example shows how to use the getUserPortalInfo tag to get information about the current user:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/fw" prefix="fw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <head>
  </head>
  <body>
  <fw:login userid="admin" password="admin"/>
  <!-- login a user to the portal...-->
  <ep:getUserPortalInfo/>
  
  <%= ((com.sssw.portal.api.EbiUserPortalInfo)pageContext.getAttribute("portalinfo")).getDefaultUserPage() %> is the default page for this user...
  
  <fw:logoff />
  </body>
  </html>

 
Top of page

handlePortletAction

Handles all render URLs and action URLs directed to portlets on a JSP page. This tag must be placed before the <html> section of each JSP page that uses portlet content.

The action handler obtains the registration id of the portlet specified in the action URL or render URL.

Syntax

  <prefix:handlePortletAction />

Example

  <%@ taglib uri="/portal" prefix="portal" %>
  <portal:handlePortletAction />
  <html>
  <head>
    <portal:getThemeLink />
  </head>
  <body>
  <table>
  <tr>
     <td><portal:renderPortlet registrationID="StockQuotePortlet" /></td>
  </tr>
  <tr>
     <td><portal:renderPortlet registrationID="TestPortlet" /></td>
  </tr>
  </table>
  </body>
  </html>

 
Top of page

param

Specifies a parameter that will be passed to the tag within which it is nested. The param tag can be nested within the displayComponent and the fireComponentProcessRequest tags.

This tag is a nested tag. It can only be used as the child of another tag.

Syntax

  <prefix:param name="name" value="value" />

Attribute

Required?

Request-time expression values supported?

Description

name

Yes

Yes

Specifies the name of the parameter.

value

Yes

Yes

Specifies a value for the parameter.

Example

  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <body>
  
  <b>DisplayComponent</b>
  
  <ep:displayComponent compID="MyComponent1" name="mycomp1">
  <ep:param name="Parm1" value="Val1"/>
  <ep:param name="Parm2" value="Val2"/>
  <ep:param name="Parm3" value="Val3"/>
  </ep:displayComponent>
  
  </body>
  </html>

 
Top of page

PortalUrlHelper

Provides a mechanism for retrieving and parsing portal URLs. To do this, it instantiates a portal context object and translates the provided string, substituting any portal replacement strings with current valid URL information.

For more information    For more information on portal replacement strings, see Portal Replacement Strings.

This tag wraps the replaceAllKeywordStrings() method on the EboPortalUrlHelper class.

Syntax

  <prefix:PortalUrlHelper urlString="urlString" id="id"/>

Attribute

Required?

Request-time expression values supported?

Description

urlString

Yes

Yes

Specifies the URL string that should be parsed.

id

No

No

Specifies the name of the variable that will be used to hold the requested URL.

If no value is specified, the URL is placed inline on the page.

Example

This example shows how to use the PortalUrlHelper tag to get the current theme ID:

  <%@ page language="java"
          session="true"
          isThreadSafe="true"
          contentType="text/html; charset=ISO-8859-1" 
          buffer="none" 
          autoFlush="true" 
          import="com.sssw.portal.*"%>
  <%@ taglib uri="/fw" prefix="fw" %>
  <%@ taglib uri="/portal" prefix="ep" %>
  <html>
  <head>
  </head>
  <body>
  The current theme is: <ep:PortalUrlHelper urlString="$THEME_ID$"/>
  
  </body>
  </html>
  

 
Top of page

putObjectInCache

Puts an object in the portal cache. The object passed in on the object attribute is cached based on the cache key passed in on the key attribute.

This tag wraps the putObjectInCache() method on the EbiCacheHolder interface.

Syntax

  <prefix:putObjectInCache key="key" object="object" sessionCache="sessionCache" />

Attribute

Required?

Request-time expression values supported?

Description

key

Yes

Yes

Specifies the key for the object in the portal cache.

object

Yes

Yes

Passes in the object that will be cached.

sessionCache

No

No

Indicates whether the object should be put in the session-specific cache. If a value of true is specified, the object is put in the session cache. If a value of false is specified, the object is put in the global cache.

If no value is specified, this attribute defaults to false.

Example

  <% taglib uri="/portal" prefix="ep" %>
  ...
  <ep:putObjectInCache key="portalkey" object="<%=pageContext.getAttribute("test")%>" />

 
Top of page

putObjectInSessionCache—DEPRECATED

DEPRECATED   This tag has been deprecated. Use putObjectInCache with sessionCache set to true.

Puts an object in the portal cache that is linked to the current session. The object passed in on the object attribute is cached based on the cache key passed in on the key attribute.

This tag wraps the putObjectInCache() method on the EbiSession interface.

Syntax

  <prefix:putObjectInSessionCache key="key" object="object" />

Attribute

Required?

Request-time expression values supported?

Description

key

Yes

Yes

Specifies the key for the object in the portal cache.

object

Yes

Yes

Passes in the object that will be cached.

Example

  <% taglib uri="/portal" prefix="ep" %>
  ...
  <ep:putObjectInSessionCache key="sessionkey" object="mytestvalue" />

 
Top of page

removeObjectFromCache

Removes an object from the portal cache.

This tag wraps the removeObjectInCache() method on the EbiCacheHolder interface.

Syntax

  <prefix:removeObjectInCache key="key" sessionCache="sessionCache" />

Attribute

Required?

Request-time expression values supported?

Description

key

Yes

Yes

Specifies the key for the object in the portal cache.

sessionCache

No

No

Indicates whether the object should be removed from the session-specific cache. If a value of true is specified, the object is removed from the session cache. If a value of false is specified, the object is removed from the global cache.

If no value is specified, this attribute defaults to false.

Example

  <% taglib uri="/portal" prefix="ep" %>
  ...
  <ep:removeObjectInCache key="portalkey" %>" />

 
Top of page

renderPortlet

Renders portlet content within a JSP page. This tag accepts XML or HTML content from a portlet and renders it on the page as HTML.

Syntax

  <prefix:renderPortlet registrationID="ID" pageNamespace="namespace" />

Attribute

Required?

Request-time expression values supported?

Description

registrationID

Yes

Yes

Specifies the registration ID of the portlet.

NOTE:   The registration ID is the name you give a registered instance of a portlet, as described in Procedure for registering a portlet.

pageNamespace

No

Yes

Specifies a namespace as a string value, which is used to differentiate portlets with identical registration IDs that reside on the same page.

Allows each portlet with the same registration ID to maintain its own session state.

Example

In this example, the JSP includes pairs of portlets with the same registration IDs. The pageNamespace attribute is used to differentiates the StockQuotePortlet registrations and the TestPortlet registrations.

  <%@ taglib uri="/portal" prefix="portal" %>
  <portal:handlePortletAction />
  <html>
  <head>
    <portal:getThemeLink />
  </head>
  <body>
  <table>
  <tr><td>Stock Quote 1</td><td>Stock Quote 2</td></tr>
  <tr>
     <td><portal:renderPortlet registrationID="StockQuotePortlet" /></td>
     <td><portal:renderPortlet registrationID="StockQuotePortlet" pageNamespace="2" /></td>
  </tr>
  <tr>
     <td><portal:renderPortlet registrationID="TestPortlet" /></td>
     <td><portal:renderPortlet registrationID="TestPortlet" pageNamespace="1" /></td>
  </tr>
  </table>
  </body>
  </html>

 
Top of page

sourceXML

Specifies source XML that is to be transformed by the transcoding engine. Used with the deviceProfiling tag. The sourceXML tag should contain appropriate XML data for rendering the content.

Syntax

  <prefix:sourceXML>


Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...