Re: How to dynamically generate a JSF page using a bean
Janaka Perera wrote:
There is a web page which needed to be rendered according to a xml
configuration file.
Is there a way in JFS to dynamically generate a page with controls,
tables and values like in a JSP Servlet.
Yes, absolutely.
I am very new to JSF(I have created jsf pages with static controls).
Appreciate if you can help.
Daniel Pitts wrote:
I don't know the details, but I think JSFs are very similar to JSPs in
that regard. Its just another templateing toolkit AFAIK.
More than that, really. It purports to be a full-fledged component model for
Web user interfaces. I'm finding it a bit tricky to learn at spots, but
basically quite manageable.
JSF is a superset of JSP implemented through tag libraries. That is, take a
regular JSP, add some stuff to it, and you have JSF.
The pages aren't really "templated", as I understand the term from my
web-developing genius friends, but linked into Java program logic. JSF
comprises a set of standardized, yet extensible, components like layout grids,
wrappers for standard HTML form elements and so on, along with protocols to
link them to dynamic logic, both server-side and client-side, and a
deployment-time navigation model. It grafts an object model onto the whole
web application activity.
<http://java.sun.com/javaee/5/docs/tutorial/doc/bnaph.html>
and the following sections from the Sun JEE tutorial give a good starting
point for learning about it, but I'd keep looking for more material beyond
that (and do).
Java Blueprints and other sources outline ways to combine JSF with AJAX and
other scripting approaches.
Behind JSF is an interaction model with a multi-stage lifecycle for request
handling and component management. Adept practitioners can exploit the
lifecycle to perform various kinds of magic.
My approach to JSF is still rather simplistic. Even at that level it works
well to develop a prototypical web application quite rapidly. Combined with
the standard tag library and the Expression Language (EL) it can maybe do too
much?
--
Lew