On 12/3/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 12/3/06, Simon Kitching <[EMAIL PROTECTED]> wrote: > How would you recommend an app do this on first render of a page (eg > "when user setting is X, add this component else add that component")? > Perhaps in a binding setter method? That's where I would use Shale :-). The prerender() method is the perfect place to put that kind of logic. Indeed, that's what the SQL browser does -- it performs the query and rebuilds the children of the table component in the prerender() method. Shale guarantees to call this on the first call or on a callback, so you don't have to do anything special.
I should be a little bit more verbose, and mention that I'm talking about the "View Controller" feature of Shale[1]. It's a very lightweight framework that gives you event callbacks on things of interest to an application, as opposed to the low level UI events that standard JSF processing supports. You'll also note that the programming model supported by View Controller is very similar to that provided by default in Java Studio Creator, meaning it's been heavily used for a couple of years now, and found to be quite flexible. Craig [1] http://shale.apache.org/shale-view/index.html

