myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Poitras <alexandre.poit...@gmail.com>
Subject Re: How to create JSF pages on the fly?
Date Thu, 29 Dec 2005 00:51:06 GMT
Most custom ViewHandler use a decorate approach (facelets, shale,
...), ie you specify the extension you want the viewhandler to handle
in your web.xml file. When a view is requested, the custom viewhandler
check if the extension of the url matches the value of the parameter.
If yes, it handles the request. Otherwise it just delegates the
request back to the original ViewHandler.

On 12/28/05, Matthias Kahlau <mkahlau@web.de> 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: users-return-14345-mkahlau=web.de@myfaces.apache.org
> > [mailto:users-return-14345-mkahlau=web.de@myfaces.apache.org]Im 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

Mime
View raw message