GroovieMan schrieb:
>> [....]
>>
>> Anyway, do you think that JSTL is a nogo for tools like tobago,
>> or can you imagine some usecases ?
>>     

The JSF lifecycle should be thought of as:

viewing a new page:
* build component tree (aka a "view tree")
* render component tree
* save state of component tree

Handling a postback without navigation:
* restore component tree (from saved state)
* process submitted data
* render component tree
* save state of component tree

Handling a postback with navigation:
* restore component tree (from saved state)
* process submitted data
* build new component tree
* render new component tree
* save state of component tree


JSTL tags that do not change what components are in the component-tree
are generally safe. That includes using c:if to wrap something that is
NOT a JSF component. But using JSTL tags to change what components are
in the tree (eg wrapping JSF components in a c:if, or c:foreach) is
dangerous, and usually leads to strange results.

By using the JSF "rendered" property instead of c:if, the component-tree
doesn't change; the same objects are in the tree, they just choose to
render HTML or not.

This applies to all JSF libraries, including Tobago.

Regards,
Simon

-- 
-- Emails in "mixed" posting style will be ignored
-- (http://en.wikipedia.org/wiki/Posting_style)

Reply via email to