<render:toggleButtonUrl> Tag

This tag lets you build URLs for the toggle buttons in portlet titlebars, such as Minimize/Restore or Maximize/Restore.

You can use the <render:param> tag to append a query to the URL.

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.

Note: If you use this tag in a JSP that is used in a struts or Java Page Flow application, in order for the URL to resolve correctly, Java Page Flow support must be enabled in the portal Web project's WEB-INF/netuix-config.xml file, as shown in the following example. Notice the <enable> element is set to true.

<!-- Enable or disable Pageflow support -->
<pageflow>
    <enable>true</enable>
</pageflow>

Syntax

<tagName attribute="value" />

Attributes

var

Optional (String) - The variable that will contain the value of the URL.

scope

Optional (String) - This attribute has three primary variations:

PAGE SCOPE - (This is the default) The named reference remains available in this PageContext until the return from the current Servlet.service() invocation.

REQUEST SCOPE - The named reference remains available from the ServletRequest associated with the Servlet that until the current request is completed.

SESSION SCOPE - (Valid only if this page participates in a session). The named reference remains available from the HttpSession (if any) associated with the Servlet until the HttpSession is invalidated.

scheme

Optional (String) - The protocol for the URL. Should be "http" or "https". If you do not use this attribute, the protocol used to make the current request is used.

domain

Optional (String) - Sets the domain of the server to access, such as www.bea.com. If you do not use this attribute, the domain that was used to make the current request is used.

port

Optional (String) - Sets the server port to use for the domain. If you do not use this attribute, the port that was used to make the current request is used.

pathPrefix

Optional (String) - Sets the prefix to the path.

encodeSession

Optional (boolean) - Enables URL rewriting for enconding a session ID in the URL. If the value is set to "false," the URL is not encoded with the session ID. If you do not use this attribute, the default value is "true."

template

Use the template defined within url-template-config.xml when outputting the url for this tag.

Example

This example shows the togglebutton.jsp skeleton file for toggle button rendering.

<%@ page import="com.bea.netuix.servlets.controls.window.ToggleButtonPresentationContext,
com.bea.netuix.servlets.controls.window.TitlebarPresentationContext,
com.bea.netuix.servlets.controls.window.WindowPresentationContext"%> <%@ taglib uri="render.tld" prefix="render" %><%
ToggleButtonPresentationContext button = ToggleButtonPresentationContext.getToggleButtonPresentationContext(request);
String buttonClass = button.getPresentationClass();
String defaultButtonClass = "bea-portal-button";
%> <render:genericUrl var="rolloverImgSrc" path="<%= button.getRolloverImageSrc() %>"/> <%
String rolloverImgSrc = (String) pageContext.getAttribute("rolloverImgSrc");
%> <render:beginRender><a <render:writeAttribute name="id" value="<%= button.getPresentationId() %>"/>
<render:writeAttribute name="class" value="<%= buttonClass %>" defaultValue="<%= defaultButtonClass %>"/>
<render:writeAttribute name="style" value="<%= button.getPresentationStyle() %>"/>href="<render:toggleButtonUrl/>"><img src="<render:genericUrl path="<%= button.getImageSrc() %>"/>"
<render:writeAttribute name="alt" value="<%= button.getAltText() %>"/><render:writeAttribute name="longdesc" value="<%= rolloverImgSrc %>"/>/></render:beginRender><render:endRender></a></render:endRender>

Related Topics

Creating URLs to Portal Resources

<render:pageUrl> Tag

<render:windowUrl> Tag

<render:jspContentUrl> Tag

<render:param> Tag