List Info

Thread: Using Tiles2 with jsf




Using Tiles2 with jsf
country flaguser name
Germany
2007-08-30 03:32:38
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(ViewT
ag.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(ViewT
ag.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(ViewT
ag.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(ViewT
ag.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.co
m/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.handleJspExcepti
on(JspServletWrapper.java:518)
[snip]
Caused by: javax.servlet.ServletException:
javax.servlet.jsp.JspException:
java.lang.IllegalStateException
	at
org.apache.jasper.runtime.PageContextImpl.doHandlePageExcept
ion(PageContextImpl.java:851)
[snip]
Caused by: java.lang.IllegalStateException
	at
com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewT
ag.java:258)
[snip]
09:58:31,103 WARN  [lifecycle] executePhase(RENDER_RESPONSE
6,org.apache.myfaces.trinidadinternal.context.FacesContextFa
ctoryImpl$CacheRenderKitde643a) threw exception
java.lang.NullPointerException
	at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Edi
tableValueRenderer.addOnSubmitConverterValidators(EditableVa
lueRenderer.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.Edi
tableValueRenderer.addOnSubmitConverterValidators(EditableVa
lueRenderer.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

Re: Using Tiles2 with jsf
user name
2007-08-30 10:59:30
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_reisergmx.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(ViewT
ag.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(ViewT
ag.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(ViewT
ag.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(ViewT
ag.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.co
m/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.handleJspExcepti
on(JspServletWrapper.java:518)
> [snip]
> Caused by: javax.servlet.ServletException:
javax.servlet.jsp.JspException:
java.lang.IllegalStateException
>         at
org.apache.jasper.runtime.PageContextImpl.doHandlePageExcept
ion(PageContextImpl.java:851)
> [snip]
> Caused by: java.lang.IllegalStateException
>         at
com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewT
ag.java:258)
> [snip]
> 09:58:31,103 WARN  [lifecycle]
executePhase(RENDER_RESPONSE
6,org.apache.myfaces.trinidadinternal.context.FacesContextFa
ctoryImpl$CacheRenderKitde643a) threw exception
> java.lang.NullPointerException
>         at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Edi
tableValueRenderer.addOnSubmitConverterValidators(EditableVa
lueRenderer.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.Edi
tableValueRenderer.addOnSubmitConverterValidators(EditableVa
lueRenderer.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
>

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )