webtier@glassfish.java.net

Re: [webtier] JSF Latest Snapshot, issue with Component Tree

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Sat, 21 Mar 2009 09:08:29 -0700

On 3/21/09 7:41 AM, Lincoln Baxter, III wrote:
> Ok, I can reproduce this now... take a look at the composite component
> below.
>
> By deleting the <h:outputScript> tag, I am able to get proper rendering.
>
> This is a layout component, and is used in several places in the
> page... I'm guessing that when the <h:outputScript> component
> repeats, it is always adding itself to the HEAD component again, but
> not assigning itself a unique ID.
Yep, this is a known issue. We'll hopefully have a fix next week.
>
>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:composite="http://java.sun.com/jsf/composite">
>
> <composite:interface>
> <composite:renderUsingPageChildren />
> <composite:attribute name="value" required="true" type="String" />
> <composite:attribute name="collapsible" required="false" type="Boolean"
> default="false" />
> <composite:facet name="content" />
> </composite:interface>
>
> <composite:implementation>
> * <h:outputScript name="ocpcommon/headerTab.js" target="head" />*
> <h:panelGroup styleClass="OCPheaderTab" layout="block">
> <div class="OCPtab">
> <h3><h:outputText value="#{compositeComponent.attrs.value}" /></h3>
> <div class="OCPtabAction"><composite:renderUsingPageChildren />
> <h:panelGroup layout="block"
> style="float: right; position:relative; top:-18px; left: -3px;">
> <h:panelGroup layout="inline"
> rendered="#{compositeComponent.attrs.collapsible eq 'true'}">
> <h:outputLink id="collapse" href=""
> onclick="return collapse(event, '#{compositeComponent.clientId}');"
> title="Collapse">
> <h:graphicImage url="/images/stock/up_2.gif" />
> </h:outputLink>
> <h:outputLink id="expand" href="#" style="display:none;"
> onclick="return expand(event, '#{compositeComponent.clientId}');"
> title="Expand">
> <h:graphicImage url="/images/stock/down_2.gif" />
> </h:outputLink>
> </h:panelGroup>
> </h:panelGroup></div>
> </div>
>
> <h:panelGroup id="content" styleClass="OCPcontent" layout="block"
> rendered="#{!empty compositeComponent.facets.content}">
> <composite:insertFacet name="content" />
> </h:panelGroup>
> <div class="clearing"></div>
> </h:panelGroup>
> </composite:implementation>
>
> </html>