dev@jsftemplating.java.net

Re: JSFTemplating: creating a project with jsf templating - newbie questions

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Sat, 27 Jan 2007 21:51:04 -0800

Michael Phoenix wrote:
> I'm starting to play around with jsf templating and needed
> clarification on what you would need to do to be able to use jsf
> templating in a brand new project using an IDE for web applications
> such as NetBeans. I noticed that the tutorial references to Creator
> components says that you need to put them in a lib folder under
> WEB_INF. Is this for any project or just "demo"?
The references to "Creator Components" are in reference to JSF
"Components". This documentation explains how to use the JSF
"Components" that are bundled with Creator. Components allow you to
place tables, trees, text fields, drop down lists, etc. on your page to
build your application. The "components" files are needed by any
application that wants to use those components.

If you do not want to use any extra components, you may use the JSF
standard components as documented by any JSF book or online
documentation. For example <h:inputText .../>, <h:form />, <h:dataTable
/>, etc. If you do this, you only need the jar files that are in the
"dist" directory of JSFTemplating. Right now that includes the
"dynafaces" jar file, but this may not be needed in the future...
> I looked at the demo/WE-INF/lib directory and noticed that it
> contained a number of jar files. Which of these are specific to the
> demo appplicai\tion and which would be needed in another JSF
> Templating project?
See my blog entry at:

http://blogs.sun.com/paulsen/entry/jsftemplating_dynamicfaces_easy_ajax

This explains which jar files are used for what. The "demo" application
also has an "app.jar" also which contains classes specific to the
application. You may use the "demo" applicatoin as a template for
building your own custom applications since it has the build files setup
and contains almost no extra code. You can remove the component jar
files if you don't need them.
> Do your jar files have to be in this specific path or are you OK just
> having them in your project's libraries folder?
For Java EE web applications, jar files must be in the WEB-INF/lib
directory.
> I'm assuming that webui-jsf.jar and webui-jsf-suntheme.jar are ui
> component archives, are there other jars that are required with them?
> Is there anything else, besides the requirements for setting up a JSF
> project, that is required for a project using JSF Templating?
Putting the jsftemplating.jar file into the WEB-INF/lib directory is all
that is required to setup JSFTemplating (if you have JSF already
setup). For now, you must also include the "dynafaces" jar file that is
in the "dist" directory.
> I would suggest that a quick guide to setting up projects using JSF
> Templating should be part of your collection of tutorials. If it is
> and I just missed it please give me a little quidance as to where to
> find it.
https://jsftemplating.dev.java.net/tutorials/index.html

The first tutorial "Setup Tutorial" is supposed to do this. Perhaps it
doesn't clearly state that the "demo" app is supposed to be a template
for a JSFTemplating app. Or explain what each file is used for.

If you'd like to modify these files to add clarification, please do! :)
Feel free to merge in any information from by blog about what the files
are for, or add your own ideas. Just run it by this email alias before
you check in any changes. You can edit these files at:
jsftemplating/www/tutorials/

Thanks!

Ken
>
> Thanks,
> Mike