Yeah you are right if your page is totally dynamic wich is rarely the
case in my mind. Using your approach, the backing bean would have to
reattach everything to the last children added wich is rather ugly and
complex. You can insert the clay component anywhere in your page and
just don't care about the rest of it (hence it allows you to define a
subview at runtime). But depends of your needs I guess.

On 12/28/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> > No need for shale clay in this case, just add a placeholder in the page
> > (a facet or a panelGroup are perfect) do a binding var on it
> > into the backend bean
> > and then add the elements as child elements into the placeholder.
> >
> > JSF has all the APIs in place to do that.
> >
>
> Didn't you implement a custom ViewHandler? I just read the chapter
> "Developing a custom presentation layer" (Bergsten, Hans: JSF), where using
> Java classes as Views is described. But Bergsten implements a custom
> ViewHandler. And the problem I see with a custom ViewHandler is, that one
> can use only one ViewHandler in a JSF app at one time, and have to configure
> it in the faces-config.xml file. So how to switch between the ViewHandler
> implementations (default and custom) at runtime?
>
> Looks like the "placeholder" approach is a possible alternative...
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Auftrag
> > von Werner Punz
> > Gesendet: Donnerstag, 29. Dezember 2005 00:52
> > An: users@myfaces.apache.org
> > Betreff: Re: How to create JSF pages on the fly?
> >
> >
> > Alexandre Poitras wrote:
> > > I would use Shale-Clay for that. It allows you to define a *place
> > > holder* component in a jsf view tree and define your components at run
> > > time.
> > >
> > > Take a look at the rolodex use case. It use a shapeValidator method,
> > > wich allows you to create a view at runtime programmatically.
> > >
> > > Hope it helps!
> > >
> > No need for shale clay in this case, just add a placeholder in the page
> > (a facet or a panelGroup are perfect) do a binding var on it
> > into the backend bean
> > and then add the elements as child elements into the placeholder.
> >
> > JSF has all the APIs in place to do that.
> >
>
>


--
Alexandre Poitras
Québec, Canada

Reply via email to