myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugine F" <eugi...@hotmail.com>
Subject Re: modifying faces servlet to let view be loaded from a data base by default
Date Wed, 18 Apr 2007 09:46:49 GMT
Hello Simon,
I have had a look at the classes you made mention of. The problem I am 
having now is to see clearly where the requested view is being loaded. I 
could see how the viewId is got or being created  but I could not see how 
the jsf implementaion clearyl gets the resource say "projects.jsp" or 
"projetc.xhtml". That is the important line I am looking for to change or 
modify so that my custom view handler(if it is what is required to be 
written ) may now search for the required resource from a data base.
Any helpm would be appreciated
thanks
Eugine

>From: David Delbecq <delbd+jakarta@oma.be>
>Reply-To: "MyFaces Discussion" <users@myfaces.apache.org>
>To: MyFaces Discussion <users@myfaces.apache.org>
>Subject: Re: modifying faces servlet to let view be loaded from a data base 
>by default
>Date: Fri, 13 Apr 2007 11:51:53 +0200
>
>En l'instant précis du 12/04/07 10:58, Eugine F s'exprimait en ces termes:
> > Hello Simon,
> > Thanks I think you got me right. I want to let the viewhandler get all
> > the views from the databse. I would ceratainly be working with
> > facelets. The idea behind it is developing something liake a content
> > management system. I would now have a good look at JspViewHandlerImpl,
> > FacesServlet and LifecycleImpl. nBased on that I would try to see if I
> > could implement a custom view handler. I would let you know or come
> > back to you in case of difficulties. :) Thanks
> > Eugine
>Then you don't have to write a custom viewhandler but instead write
>something the extends facelets (perhaps change some facelets code...)
>since facelets has it's own viewhandler that care of loading the .xhtml
>from file and parsing it.
> >
> >> From: Simon Kitching <simon.kitching@rhe.co.nz>
> >> Reply-To: "MyFaces Discussion" <users@myfaces.apache.org>
> >> To: MyFaces Discussion <users@myfaces.apache.org>
> >> Subject: Re: modifying faces servlet to let view be loaded from a
> >> data base by default
> >> Date: Thu, 12 Apr 2007 08:54:08 +1200
> >>
> >> Hi Eugene,
> >>
> >> Yes, ViewHandler is one of the main classes you need to look at
> >> (JspViewHandlerImpl is the implemenation for JSP pages). Also look at
> >> FacesServlet and LifecycleImpl. The code in these three classes is
> >> pretty easy to understand.
> >>
> >> You might want to read:
> >>   http://wiki.apache.org/myfaces/StudyGuide
> >>
> >> I don't know any existing term for this so I'm going to use the
> >> phrase "view definition" for something that defines what JSF
> >> components are in a view.; "jsp files" and "facelets xtml files" are
> >> two examples.
> >>
> >> If you wanted to get *all* your "view definitions" from a database
> >> then I think that would be reasonably simple; just implement a new
> >> ViewHandler and then register it in the faces-config file.
> >>
> >> However if you want *some* of your "view definitions" to be from a
> >> database, and some from the database depending on something in the
> >> requested URL (eg prefix/suffix) then that might be a bit trickier.
> >> I'm not aware of any built-in mechanism that allows different
> >> ViewHandlers to be returned based on URL. I'm sure there's some way
> >> to achieve this though. Maybe your custom ViewHandler can hold a
> >> reference to a JspViewHandler, inspect the URL/viewId and decide
> >> whether to handle the request itself or delegate to the underlying
> >> implementation?
> >>
> >> Regards,
> >>
> >> Simon
> >>
> >> Eugine F wrote:
> >>> Hello ,
> >>> The issue is the following; If I ask for a resource such as
> >>> "projects.jsp", the faces implementation implementation begins the
> >>> request prcessing life cycle. How does the faces implementation go
> >>> about getting this resource. Which class is responsible for the
> >>> search of this resource and at what stage of the life cycle?  I
> >>> would like to know if it is the viewHandler and if possible the
> >>> method that takes care of this process. With this knowledge I would
> >>> then like to influence the behaviour or customize it.
> >>> Thanks
> >>>
> >>>> From: "Volker Weber" <v.weber@inexso.de>
> >>>> Reply-To: "MyFaces Discussion" <users@myfaces.apache.org>
> >>>> To: "MyFaces Discussion" <users@myfaces.apache.org>
> >>>> Subject: Re: modifying faces servlet to let view be loaded from a
> >>>> data base by default
> >>>> Date: Wed, 11 Apr 2007 09:57:18 +0200
> >>>>
> >>>> Hi,
> >>>>
> >>>> you can use the binding on a panel tag, and create the content in
> >>>> your app.
> >>>>
> >>>> regards,
> >>>>  Volker
> >>>>
> >>>> 2007/4/11, Eugine F <euginef@hotmail.com>:
> >>>>> Hello users,
> >>>>> I would like to have a clue as to how I could modify the faces
> >>>>> servlet or
> >>>>> the component that I have to modify to let the view be loaded form
> >>>>> a data
> >>>>> base. Anyone has an idea?
> >>>>> thanks
> >>>>> Eugine
> >>>>>
> >>>>> _________________________________________________________________
> >>>>> Wenn Ihnen E-Mail nicht schnell genug ist: MSN Messenger! -
> >>>>> http://www.imagine-msn.com/messenger/default2.aspx?locale=de
> >>>>> Kostenlos
> >>>>> downloaden!
> >>>>>
> >>>>>
> >>>
> >>> _________________________________________________________________
> >>> Ihr Blog. Ihre Fotos. Ihre Erlebnisse. Jetzt auf MSN Spaces. -
> >>> http://spaces.msn.com/SignUp.aspx Jetzt anmelden!
> >>>
> >>
> >
> > _________________________________________________________________
> > Wenn Ihnen E-Mail nicht schnell genug ist: MSN Messenger! -
> > http://www.imagine-msn.com/messenger/default2.aspx?locale=de Kostenlos
> > downloaden!
> >
>

_________________________________________________________________
Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig 
im Web, Ihren E-Mails und auf Ihrem PC! -  http://desktop.msn.de/ Kostenlos 
downloaden!


Mime
View raw message