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" <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>:
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!