myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Pratt" <thechrispr...@gmail.com>
Subject Re: Using Tiles2 with jsf
Date Thu, 30 Aug 2007 15:59:30 GMT
This is just a guess, but I don't think you can have a f:view within
an f:view.  You might try changing the f:view's in the included tiles
to f:subview.
  (*Chris*)

On 8/30/07, Florian Reiser <florian_reiser@gmx.de> wrote:
> Hello,
>
> I have an trinidad-jsf-file containing the following tags:
>
> <f:view>
>   <tr:document>
>     <tr:form>
>       <tr:panelPage>
>         <f:facet name="branding">
>           <tr:outputText value="My company" />
>         </f:facet>
>         <tr:outputText value="My dummy content" />
>       <tr:panelPage>
>     </tr:form>
>   </tr:document>
> </f:view>
>
> I want to split the layout section of the page from the actual content with the help
of tiles. I create the following tiles:
>
> template.jsp:
>
> <f:view>
>   <tr:document>
>     <tr:form>
>       <tr:panelPage>
>         <f:facet name="branding">
>           <tr:outputText value="My company" />
>         </f:facet>
>         <tiles:insertAttribute name="content" />
>       <tr:panelPage>
>     </tr:form>
>   </tr:document>
> </f:view>
>
> myPage.jsp:
> <tiles:insertTemplate template="template.jsp">
>   <tiles:putAttribute name="content">
>     <tr:outputText value="My dummy content" />
>   </tiles:putAttribute>
> </tiles:insertTemplate>
>
> When I execute call myPage.jsp from my web browser, I get the following errors:
>
> 09:58:31,025 WARN  [taglib] Can't leverage base class
> java.lang.IllegalStateException
>         at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:258)
> [snip]
> 09:58:31,025 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
> java.lang.IllegalStateException
>         at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:258)
> [snip]
> 09:58:31,041 WARN  [taglib] Can't leverage base class
> java.lang.IllegalStateException
>         at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:258)
> [snip]
> 09:58:31,057 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
> java.lang.IllegalStateException
>         at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:258)
> [snip]
> 09:58:31,057 ERROR [RenderTagSupport] Error during rendering
> javax.servlet.jsp.JspException: ServletException while including page.
>         at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:102)
> [snip]
> Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page
/templates/default.jsp at line 7
>
> 4:      uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
> 5:      uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
> 6:
> 7: <f:view>
> 8:      <tr:document>
> 9:                      <tr:form>
> 10:                             <tr:panelPage>
>
>
> Stacktrace:
>         at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:518)
> [snip]
> Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.IllegalStateException
>         at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:851)
> [snip]
> Caused by: java.lang.IllegalStateException
>         at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:258)
> [snip]
> 09:58:31,103 WARN  [lifecycle] executePhase(RENDER_RESPONSE 6,org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit@de643a)
threw exception
> java.lang.NullPointerException
>         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.EditableValueRenderer.addOnSubmitConverterValidators(EditableValueRenderer.java:206)
> [snip]
> 09:58:31,103 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw
exception
> java.lang.NullPointerException
>         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.EditableValueRenderer.addOnSubmitConverterValidators(EditableValueRenderer.java:206)
> [snip]
>
>
> What do I have to do to get tiles2 working with my jsf-pages?
>
> With kind regards
> Florian Reiser
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>

Mime
View raw message