incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Lowe" <chris.lowe...@gmail.com>
Subject Re: Problem creating Facelet component using Trinidad
Date Tue, 23 Jan 2007 22:17:24 GMT
Try

<stl:tabNavigation
   tabs="#{AddressLookupBacking}"
   bean="#{AddressLookupBacking}"/>

Then refer to the tabOptions in your component as follows:

<ui:repeat value="#{tabs['tabOptions']}" var="tab">

(of course, if this works you can eliminate 'tabs' altogether and just use
beans)

C.


On 23/01/07, Brian Smith <unobriani@gmail.com> wrote:
>
> I am trying to create a component using Facelet Tags.  The component uses
> a
> Trinidad NavigationPane (tr:NavigationPane).  I am trying to make this
> component reusable by passing a collection of "options" to it.  Each
> option
> represents a commandNavigationItem
>
> Here is the component
>
> <!--facelets/components/tabNavigation.xhtml-->
>
> <div
>     xmlns="http://www.w3.org/1999/xhtml"
>     xmlns:f="http://java.sun.com/jsf/core"
>     xmlns:ui="http://java.sun.com/jsf/facelets"
>     xmlns:tr="http://myfaces.apache.org/trinidad">
>
>      <tr:form>
>          <tr:panelGroupLayout layout="horizontal">
>              <tr:navigationPane hint="tabs">
>                  <ui:repeat value="#{tabs}" var="tab">
>                     <tr:commandNavigationItem
>                         text="#{tab.label}"
>                         selected="#{tab.selected}"
>                         partialSubmit="true"/>
>
>                  </ui:repeat>
>              </tr:navigationPane>
>          </tr:panelGroupLayout>
>      </tr:form>
> </div>
>
> Here is my usage
>
> <stl:tabNavigation
>     tabs="#{AddressLookupBacking.tabOptions}"
>     bean="#{AddressLookupBacking}"/>
>
> I am initializing the tabOptions list in Faces-Config
>
> Here is the tab lib
> <facelet-taglib>
>     <namespace>http://stlouiscity.com/jsf/csb</namespace>
>     <tag>
>         <tag-name>tabNavigation</tag-name>
>         <source>facelets/components/tabNavigation.xhtml</source>
>     </tag>
> </facelet-taglib>
>
> Here is my problem
>
> SEVERE: Warning: illegal component hierarchy detected, expected UIXCommand
> but found another type of component instead.
> java.lang.ClassCastException: com.sun.facelets.component.UIRepeat
>     at
>
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.renderContent
> (NavigationPaneRenderer.java:120)
>     at
>
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.encodeAll
> (NavigationPaneRenderer.java:83)
>     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(
> CoreRenderer.java:184)
>     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
> UIXComponentBase.java:700)
>     at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(
> UIXCollection.java:495)
>     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(
> CoreRenderer.java:263)
>     at
>
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer.encodeChild
> (PanelGroupLayoutRenderer.java:169)
>     at
>
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer._encodeChildren
> (PanelGroupLayoutRenderer.java:140)
>     at
>
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer.encodeAll
> (PanelGroupLayoutRenderer.java:92)
>     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(
> CoreRenderer.java:184)
>     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
> UIXComponentBase.java:700)
>     at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(
> ComponentSupport.java:242)
>     at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(
> ComponentSupport.java:239)
>     at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(
> ComponentSupport.java:239)
>     at com.sun.facelets.FaceletViewHandler.renderView(
> FaceletViewHandler.java:580)
>     at
> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView
> (
> ViewHandlerImpl.java:178)
>     at com.sun.faces.lifecycle.RenderResponsePhase.execute(
> RenderResponsePhase.java:107)
>     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
>     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java
> :137)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:252)
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:173)
>     at
>
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter
> (TrinidadFilterImpl.java:327)
>     at
>
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl
> (
> TrinidadFilterImpl.java:291)
>     at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(
> TrinidadFilterImpl.java:214)
>     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(
> TrinidadFilter.java:93)
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:202)
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:173)
>     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(
> ReplyHeaderFilter.java:96)
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:202)
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:173)
>     at org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:213)
>     at org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:178)
>     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(
> SecurityAssociationValve.java:175)
>     at org.jboss.web.tomcat.security.JaccContextValve.invoke(
> JaccContextValve.java:74)
>     at org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:126)
>     at org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:105)
>     at org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:107)
>     at org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:148)
>     at org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java
> :869)
>     at
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:664)
>     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:527)
>     at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(
> MasterSlaveWorkerThread.java:112)
>     at java.lang.Thread.run(Thread.java:595)
>
> It seems that Trinidad is getting hung up on the ui:repeat facelet tag.  I
> am just learning both Facelets and Trinidad so any help would be greatly
> appreciated.
>
> I have posted this both the the Facelets and Trinidad User Lists
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message