You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2006/03/16 16:51:32 UTC

Re: Is there a preferred location for ?

<f:view> has to enclose all of your JSF tags if you are using a JSP
viewhandler, so STYLE 1) is the most flexible as you can add tags
before and after html tags, inside the head tag, etc.   Doesn't really
matter other than that.   If you only use JSF tags in your body, STYLE
3 is fine too.

On 3/15/06, Lindholm, Greg <gl...@neom.com> wrote:
> I've seen at least 3 different location for <f:view> as shown below.
> Is there any concensus on this?
> Any insite or reasoning for a choice?
>
>
> STYLE 1) JSF In Action
> ----------------------
> <f:view>
>        <html>
>                ...
>        </html>
> </f:view>
>
>
> STYLE 2) Core JSF
> -----------------
> <html>
>        <f:view>
>                <head>
>                        ...
>                </head>
>                <body>
>                        ...
>                </body>
>        </f:view>
> </html>
>
> STYLE 3) Mastering JSF
> ----------------------
> <html>
>        <head>
>                ...
>        </head>
>        <body>
>                <f:view>
>                        ...
>                </f:view>
>        </body>
> </html>
>
>
> Greg
>

Re: Is there a preferred location for ?

Posted by Mario Ivankovits <ma...@ops.co.at>.
Style 4) Martin and Mario on the road ;-)

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

There is still work to do, e.g all the html attribute on the
documentBody, but this is the way I would propose for the long term as
this allows you
to get rid of the extensionFilter buffering.

Ciao,
Mario

>> STYLE 1) JSF In Action
>> ----------------------
>> <f:view>
>>        <html>
>>                ...
>>        </html>
>> </f:view>
>>
>>
>> STYLE 2) Core JSF
>> -----------------
>> <html>
>>        <f:view>
>>                <head>
>>                        ...
>>                </head>
>>                <body>
>>                        ...
>>                </body>
>>        </f:view>
>> </html>
>>
>> STYLE 3) Mastering JSF
>> ----------------------
>> <html>
>>        <head>
>>                ...
>>        </head>
>>        <body>
>>                <f:view>
>>                        ...
>>                </f:view>
>>        </body>
>> </html>
>>
>>
>> Greg
>>
>