tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas LE BAS <nle...@bigfoot.com>
Subject Re: Tiles2 2.0.5 - JSF RI 1.2 - inlineContent
Date Mon, 05 Nov 2007 19:50:59 GMT
Antonio Petrelli a écrit :
> 2007/11/5, Holger Igel <holger.igel@cosys.de>:
>   
>> javax.servlet.jsp.JspException: Can't write content above <f:view> tag
>> Illegal to flush within a custom tag
>>     
>
>
>
> Mmmm...  the <f:view> tag is trying to flush the stream... that's strange...
> I don't know much of JSF, is <f:subview> applicable here?
>
>
>   
>> Is it possible to handle the body content of <tiles:putAttribute> like the
>> <jsp:include> with an url (your second solution) ? This would be very nice
>> and avoids using 2 files...
>>     
>
>
>
> I meant that was *your* second solution, i.e. when you used:
> <tiles:insertAttribute name="body" value="/body.jsp" />
>
> Antonio
>
>   
Only one <f:view> is allowed per request. It must be the outermost of
all JSF-tags.

<f:subview> is allowed anywhere ; it may help you here but won't be a
neat solution to the problem. JSF expects that the tags are executed in
the correct order when building the component tree. You may have to
design an entirely new tag and JSF component ("tiles:putSubView /
tiles:insertSubView"?) in order to make it work correctly in every
situations...

If you really need inline contents with JSF tags in them, you may want
to look at facelets... but facelets is not based on JSP, it's an
entirely different servlet templating engine...

Hope this helps,
Nick

Mime
View raw message