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
.



Relevant Pages

  • Re: Which do I use for web design?
    ... Even with a text editor JSF isn't overly hard for what it offers, ... JSP and JSF make a nice staged learning ramp. ... servlet/JSP/beans web app: servlet as controller, JSPs as view, and beans ... understanding what frameworks will do for you. ...
    (comp.lang.java.programmer)
  • Re: Information about jsf..
    ... that is change style of page,organizing input forms etc.... ... If you're using HTML render kits for JSF, ... use CSS to work with the visual appearance of the page. ... Tiles is a framework created by David Geary for doing layout of JSP ...
    (comp.lang.java.programmer)
  • Re: Which presentation framework?
    ... > Looking for frameworks I've found these ones: JSP, JSF, Tiles, SiteMesh. ... Tiles is a way of doing more re-usable layout with JSP; ...
    (comp.lang.java.programmer)
  • Java Expressions in JSPs ausserhalb von JSP-Tags ignored?
    ... solange wir JSF in Verbindung mit Facelets nutzten ohne ... Allerdings wird das Projekt im Moment testweise auf ... JSP und Tiles umgestellt um einigen vorangegangenen Problemen aus dem ... Leider wird seit der Umstellung auf JSP die Expression ...
    (de.comp.lang.java)
  • Re: java web application: what I need except jsp & servlet ?
    ... Standard stuff. ... I figure out how jsp and servlet works, but I'm not sure that jsp components will be functionally good enough for table manipulation. ... But JSF, especially if you add the Apache Tomahawk library, has components that implement a lot of the boilerplate logic. ...
    (comp.lang.java.help)