Le 05-07-18 à 20:05, Craig McClanahan a écrit :

David (and others interested in Tiles+JSF),

While you are testing the new-and-improved standalone tiles-core.jar,
I thought I'd report on a particular use case that worked for me, that
you might want to consider as well ... you can embed the <f:subview>
(or <s:subview> if you use the Shale version) *inside* a Tile ... it
doesn't have to be outside.

This becomes particularly important when you think about how client
ids are generated for the JSF components inside the tile.  The subview
component is  NamingContainer, so it imposes its own id in the
generated client id for child components.  Therefore, if you use
something like this in your outermost layout:

    <f:subview id="content">
        <tiles:insert attribute="content"/>
    </f:subview>

then *any* component inside *any* content tile will have the same
prefix.  That can make life complicated if two different content tiles
have a component with the same id ... they end up with the same client
id, and that confuses the component tree process when the same view
(from the JSF perspective) is rendered with a different content tile.

Thanks, I hadn't thought of that.

The solution is to just use <tiles:insert/> in your layout, and put
the <f:subview> tag for each content tile *inside* that tile (with a
unique id value, so all the tiles have unique client ids).  We should
do that in any examples you update.

Yes.


david


Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to