incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: AW: Problem combining trinidad and facelets
Date Fri, 29 Sep 2006 17:00:26 GMT
<c:forEach> is actually quite legal.  (whereas ui:repeat is not)

The issue is that Facelets is putting in UIInstructions, just for the
whitespace in this content.  I've never been certain why this happens,
but you can work around it by trimming out all the whitespace inside
of the navigationPane (one long huge line).

I think that Trinidad should not be throwing an exception;  we should
just ignore the contents, which would work well here.

BTW, by "nodeStamp", we mean <f:facet name="nodeStamp">.

-- Adam


On 9/29/06, Böhringer Jochen <Jochen.Boehringer@tcc-products.de> wrote:
> Hello Simon,
>
>
>
> thanks for your hint. Now I switched to this code. But I get the message
>
>
>
> <tr:nodeStamp> Tag Library supports namespace: http://myfaces.apache.org/trinidad,
but no tag was defined for name: nodeStamp
>
>
>
> Also switching to f:nodeStamp does not help:
>
>
>
> <f:nodeStamp> Tag Library supports namespace: http://java.sun.com/jsf/core, but
no tag was defined for name: nodeStamp
>
>
>
> What am I missing?
>
>
>
> <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
>
> <tr:document xmlns="http://www.w3.org/1999/xhtml"
>
>       xmlns:ui="http://java.sun.com/jsf/facelets"
>
>       xmlns:h="http://java.sun.com/jsf/html"
>
>       xmlns:f="http://java.sun.com/jsf/core"
>
>       xmlns:tr="http://myfaces.apache.org/trinidad"
>
>       xmlns:trh="http://myfaces.apache.org/trinidad/html"
>
>       xmlns:c="http://java.sun.com/jsp/jstl/core"
>
>       title="#{navigationControler.activePageTitle}">
>
>
>
>       <tr:form>
>
>             <tr:panelPage>
>
>                   <f:facet name="navigation1">
>
>                         <tr:navigationPane hint="tabs" id="navigation1" var="menuItem"
value="#{navigationControler.menuItemList}">
>
>                              <tr:nodeStamp>
>
>                                    <tr:commandNavigationItem text="#{menuItem.label}"
>
>                                          shortDesc="#{menuItem.id}" selected="#{menuItem.selected}"
>
>                                          action="redirect.main" disabled="#{menuItem.disabled}">
>
>                                          <f:actionListener
>
>                                                type="de.tccproducts.dprs.webapp.navigation.NavigationHandler"
/>
>
>                                    </tr:commandNavigationItem>
>
>                              </tr:nodeStamp>
>
>                         </tr:navigationPane>
>
>                   </f:facet>
>
>             </tr:panelPage>
>
>       </tr:form>
>
>       <ui:debug />
>
> </tr:document>
>
>
>
> Regards
>
> Jochen
>
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Simon Lessard [mailto:simon.lessard.3@gmail.com]
> Gesendet: Freitag, 29. September 2006 16:57
> An: adffaces-user@incubator.apache.org
> Betreff: Re: Problem combining trinidad and facelets
>
>
>
> Hello Böhringer,
>
>
>
> Why do you use a c:foreach in the navigationPane? You should use nodeStamp
>
> instead. I think this iswhat iscausing your problem.
>
>
>
>
>
> Regards,
>
>
>
> ~ Simon
>
>
>
> On 9/29/06, Böhringer Jochen <Jochen.Boehringer@tcc-products.de> wrote:
>
> >
>
> > Hello,
>
> >
>
> >
>
> >
>
> > If I setup Trinidad and Facelets and try to execute the following xhtml
>
> > file I get a ClassCastException (see below). This is caused by the usage of
>
> > the <c:forEach> Tag I think. So I tried to switch to <ui:repeat> but
with a
>
> > similar exception (see below). I am using jsf-facelets-1.1.11.jar,
>
> > myfaces-1.1.4 and Trinidad-m1-snapshot on JBoss 4.x.
>
> >
>
> >
>
> >
>
> > Any help would be greatly appreciated.
>
> >
>
> >
>
> >
>
> > Regards Jochen
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
>
> >
>
> > <tr:document xmlns="http://www.w3.org/1999/xhtml"
>
> >
>
> >       xmlns:ui="http://java.sun.com/jsf/facelets"
>
> >
>
> >       xmlns:h="http://java.sun.com/jsf/html"
>
> >
>
> >       xmlns:f="http://java.sun.com/jsf/core"
>
> >
>
> >       xmlns:tr="http://myfaces.apache.org/trinidad"
>
> >
>
> >       xmlns:trh="http://myfaces.apache.org/trinidad/html"
>
> >
>
> >       xmlns:c="http://java.sun.com/jsp/jstl/core"
>
> >
>
> >       title="#{navigationControler.activePageTitle}">
>
> >
>
> >
>
> >
>
> >       <tr:form>
>
> >
>
> >             <tr:panelPage>
>
> >
>
> >                   <f:facet name="navigation1">
>
> >
>
> >                         <tr:navigationPane hint="tabs" id="navigation1">
>
> >
>
> >                              <c:forEach var="menuItem"
>
> >
>
> >                                    items="#{
>
> > navigationControler.menuItemList}">
>
> >
>
> >                                    <tr:commandNavigationItem text="#{
>
> > menuItem.label}"
>
> >
>
> >                                          shortDesc="#{menuItem.id}"
>
> > selected="#{menuItem.selected}"
>
> >
>
> >                                          action="redirect.main"
>
> > disabled="#{menuItem.disabled}">
>
> >
>
> >                                          <f:actionListener
>
> >
>
> >                                                type="
>
> > de.tccproducts.dprs.webapp.navigation.NavigationHandler" />
>
> >
>
> >                                    </tr:commandNavigationItem>
>
> >
>
> >                              </c:forEach>
>
> >
>
> >                         </tr:navigationPane>
>
> >
>
> >                   </f:facet>
>
> >
>
> >             </tr:panelPage>
>
> >
>
> >       </tr:form>
>
> >
>
> >       <ui:debug />
>
> >
>
> > </tr:document>
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > <c:forEach> Exception:
>
> >
>
> >
>
> >
>
> > 16:41:38,557 INFO  [STDOUT] 29.09.2006 16:41:38
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRendererrenderContent
>
> >
>
> > SCHWERWIEGEND: Warning: illegal component hierarchy detected, expected
>
> > UIXCommand but found another type of component instead.
>
> >
>
> > java.lang.ClassCastException: com.sun.facelets.compiler.UIInstructions
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.renderContent
>
> > (NavigationPaneRenderer.java:123)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.encodeAll
>
> > (NavigationPaneRenderer.java:86)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeEnd(
>
> > CoreRenderer.java:181)
>
> >
>
> >       at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
>
> > UIXComponentBase.java:673)
>
> >
>
> >       at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(
>
> > UIXCollection.java:466)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComponent
>
> > (UIComponentUINode.java:329)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(
>
> > UIComponentUINode.java:273)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(
>
> > UIComponentUINode.java:250)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render
>
> > (ContextPoppingUINode.java:234)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(
>
> > BaseUINode.java:356)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(
>
> > BaseUINode.java:311)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(
>
> > BaseRenderer.java:423)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderNamedChild(
>
> > BaseRenderer.java:395)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PageHeaderLayoutRenderer._renderTabBar
>
> > (PageHeaderLayoutRenderer.java:580)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PageHeaderLayoutRenderer.renderContent
>
> > (PageHeaderLayoutRenderer.java:440)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(
>
> > BaseRenderer.java:91)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render
>
> > (XhtmlLafRenderer.java:81)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(
>
> > BaseUINode.java:356)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(
>
> > BaseUINode.java:311)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(
>
> > BaseRenderer.java:423)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(
>
> > BaseRenderer.java:341)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(
>
> > BaseRenderer.java:233)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderContent
>
> > (BaseRenderer.java:140)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(
>
> > BaseRenderer.java:91)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render
>
> > (XhtmlLafRenderer.java:81)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(
>
> > BaseUINode.java:356)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(
>
> > BaseUINode.java:311)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.composite.UINodeRenderer.renderWithNode
>
> > (UINodeRenderer.java:100)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.composite.UINodeRenderer.render(
>
> > UINodeRenderer.java:46)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.uinode.UIXComponentUINode.renderInternal
>
> > (UIXComponentUINode.java:189)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase.encodeEnd(
>
> > UINodeRendererBase.java:66)
>
> >
>
> >       at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
>
> > UIXComponentBase.java:673)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.RenderUtils.encodeRecursive(
>
> > RenderUtils.java:66)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeChild
>
> > (CoreRenderer.java:255)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeAllChildren
>
> > (CoreRenderer.java:277)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent
>
> > (PanelPartialRootRenderer.java:74)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent
>
> > (BodyRenderer.java:134)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll
>
> > (PanelPartialRootRenderer.java:154)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll
>
> > (BodyRenderer.java:76)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.delegateRenderer
>
> > (CoreRenderer.java:294)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll
>
> > (DocumentRenderer.java:78)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeEnd(
>
> > CoreRenderer.java:181)
>
> >
>
> >       at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
>
> > UIXComponentBase.java:673)
>
> >
>
> >       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.FaceletViewHandler.renderView(
>
> > FaceletViewHandler.java:580)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView
>
> > (ViewHandlerImpl.java:176)
>
> >
>
> >       at org.apache.myfaces.lifecycle.LifecycleImpl.render(
>
> > LifecycleImpl.java:384)
>
> >
>
> >       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
>
> >
>
> >       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:90)
>
> >
>
> >       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:81)
>
> >
>
> >       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.CustomPrincipalValve.invoke(
>
> > CustomPrincipalValve.java:39)
>
> >
>
> >       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(
>
> > SecurityAssociationValve.java:159)
>
> >
>
> >       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
>
> > AuthenticatorBase.java:407)
>
> >
>
> >       at org.jboss.web.tomcat.security.JaccContextValve.invoke(
>
> > JaccContextValve.java:59)
>
> >
>
> >       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:856)
>
> >
>
> >       at
>
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
>
> > (Http11Protocol.java:744)
>
> >
>
> >       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)
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > <ui:repeat> Exception:
>
> >
>
> >
>
> >
>
> > 16:44:16,434 INFO  [STDOUT] 29.09.2006 16:44:16
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRendererrenderContent
>
> >
>
> > SCHWERWIEGEND: 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:123)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.encodeAll
>
> > (NavigationPaneRenderer.java:86)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeEnd(
>
> > CoreRenderer.java:181)
>
> >
>
> >       at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
>
> > UIXComponentBase.java:673)
>
> >
>
> >       at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(
>
> > UIXCollection.java:466)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComponent
>
> > (UIComponentUINode.java:329)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(
>
> > UIComponentUINode.java:273)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(
>
> > UIComponentUINode.java:250)
>
> >
>
> >       at
>
> > org.apache.myfaces.trinidadinternal.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render
>
> > (ContextPoppingUINode.java:234)
>
> >
>
> >       at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(
>
> > BaseUINode.java:356)
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
>
>

Mime
View raw message