Hi!

Sorry for the lenghty mail.

I would like to get rid of the ExtensionFilter when it comes to buffer
and parse the response.


Now there are a couple of methods how to archive this:

1) documentTag

Having something like

<f:view>
<t:document>
    <t:documentHead>
    </t:documentHead>
    <t:documentBody>
    </t:documentBody>
</t:document>
</f:view>

when using the HTML render kit, t:document renders the <html stuff,
t:documentHead <head and t:documentBody the <body eqivalent
This, e.g. documentBody will accept all html attributes required for the
html <body tag.

The main disadvantage I see here is that you cant put the documentBody
in an include. Remember, you have to close a jsp-tag within the same
compilation unit.


2) During writing this mail, I decided to discard the other method I had
in mind as the above is nicer ;-)
It was something like
<t:script name="header"/>
<t:script name="bodyStart"/>
<t:script name="bodyEnd"/>

you simply place them as hook points in your html where the extension
filter can insert its scripts.
Even if simpler, we still have to use the HTML html/head/body tags -
this is something solution (1) will solve too.


Back to 1)
ok, the document/documentBody problem is still there and we have to find
a solution for this.
Its not uncommon to have a jsp like this:

<jsp:include file="inc/header.jsp" />
<t:panelLayout>
<f:facet name="header" >
....
<f:facet name="footer" >
...
</t:panelLayout>
<jsp:include file="inc/footer.jsp" />


using the documentTag it will look like

<t:document>
<jsp:include file="inc/header.jsp" /> <=documentHead and documentBody
inside here>
<t:panelLayout>
<f:facet name="header" >
....
<f:facet name="footer" >
...
</t:panelLayout>
<jsp:include file="inc/footer.jsp" /> <= documentBody inside end here>
</t:document>

One might argue to take the document* tags outside of the includes, but
shouldn't we try to put common tags to central places?
The panelLayout already is a compromise.

So, one solution can be to have
<t:document state="start" />
<t:documentBody state="start" />
<t:documentBody state="end" />
<t:document state="end" />

Then the tags are closed and thus we can put it in an include, but I
have to admit this is absolutely not nice.

So, now ... What do you think? Other ideas?

Thanks!
Mario

Reply via email to