<render:writeAttribute> Tag

This tag is used in the portal look and feel skeleton files that render the structure of portal components. Portal components have a hierarchical relationship with each other. For example, a book contains a page and a page contains a placeholder. The <render:beginRender> and <render:endRender> tags serve as opening and closing tags for a component within which child components are rendered, which ultimately result in opening and closing HTML tags within which child components are nested. The <render:writeAttribute> tag is to populate the <render:beginRender> HTML tag with HTML attributes.

The WebLogic Portal Extensions provide predefined sets of skeletons that meet most portal rendering needs. Unless you are creating new skeleton JSPs by hand (rather than copying and modifying existing skeleton JSPs), you are not likely to use this tag.

Syntax

<tagName attribute="value" />

Attributes

name

Required (String) - Name portion of the name/value pair. Enter the name of a valid HTML attribute, such as id, class, or style, for the type of HTML tag you are using.

value

Optional (String) - Value portion of the name/value pair. Enter the value of the HTML attribute you specified. The WebLogic Workshop Portal Extensions use presentation methods to return a value, as shown in the following example. The methods also enable the population of id, class, and style values that are entered in the WebLogic Workshop Enterprise Edition Property Editor window for a selected portal resource.

defaultValue

Optional (String) - The default attribute value. You can use a variable for the default value as shown in the following example.

Example

This example shows the page.jsp skeleton for portal page rendering. The <render:writeAttribute> tags are nested within the HTML <div> tag to provide the tag's id, class, and style attributes. In many skeleton files, code is included above the render tags to construct the class attribute, which is a string for a specific CSS style. The id and style attributes are usually populated for a portal component in the Propert Editor window in WebLogic Workshop Platform Edition.

<%@ page import="com.bea.netuix.servlets.controls.page.PagePresentationContext,
com.bea.netuix.servlets.controls.page.BookPresentationContext"%>
<%@ taglib uri="render.tld" prefix="render" %>
.
.
.
<render:beginRender> <!-- Begin Page --> <div <render:writeAttribute name="id" value="<%= pageCtx.getPresentationId() %>"/> <render:writeAttribute name="class" value="<%= pageCtx.getPresentationClass() %>" defaultValue="<%= pageClass %>"/> <render:writeAttribute name="style" value="<%= pageCtx.getPresentationStyle() %>"/> > </render:beginRender> <render:endRender> </div> <!-- End Page --> </render:endRender>

Related Topics

<render:beginRender> Tag

<render:endRender> Tag

<render:renderChild> Tag