You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Simon Kitching <sk...@obsidium.com> on 2005/11/13 21:50:52 UTC

JSF 1.2 spec issue: problems with out-of-order text

Hi,

It was my impression that the JSF1.2/JSP2.1 spec releases were going to 
deal with the following ordering problems:
* A JSF component that renders its children doesn't correctly handle JSP 
"template text" within it; any such text gets rendered before the component.
* A page that is dynamically included from another page cannot mix JSF 
components and template text; any text in the page gets output before 
any JSF-generated output.

However reading the JSF 1.2 public final draft document, it looks to me 
like the spec authors have avoided dealing with these two issues completely.

Can someone confirm this is the case, or (better still) point me at the 
changes that show how JSF1.2/JSP2.1 will deal with these? I've checked 
the JSF forums etc. but can't see any info, nor any good place to ask 
this question directly.

If I'm right and this is not addressed, then I have a workaround for the 
second issue (which is particularly painful when using Tiles) which I 
can post.

On the same thread, the cause of the problem with dynamic include of a 
page is that in tomcat the included page is written into a buffer that 
is only copied to the servlet response after the included page is 
complete. I can't see anything in the JSP spec that mandates this; is 
there a reason this is done or is this just a tomcat quirk?

=========

 From the preface of the JSF 1.2 public final draft document:

<quote>
? Also, remove the requirements that <f:verbatim> be used, and that 
components added to the tree programmatically will only be rendered if 
they are the children of a rendersChildren==true component
</quote>

However from section 9.2.2 of the same document:
<quote>
9.2.2 Including components in a page
...
For the current version of this specification, any template text (or 
non-JSF custom actions) present in a page that is included with the 
<jsp:include> or <c:import> action, or any other mechanism that uses 
RequestDispatcher.include(), must be enclosed in an <f:verbatim> custom 
action (see Section 9.4.19 “<f:verbatim>”). This restriction may be 
lifted in future versions of this specification.
</quote>

Sections 9.2.8 and 9.2.9 of this document have titles that seem to be 
relevant to these issues, but the content of those sections doesn't 
appear to address them at all.


Thanks,

Simon