4. Importing JSF Components
Documentation
>
JSF
>
Using Components
> Importing JSF Components
As a round-trip
engineering tool, JSFToolbox integrates easily with your existing Java development
environment. One option is to map your Dreamweaver site root folder to the same location as
your Web application root directory in your Java development environment for the performance
benefits of sharing access to local files. Another option is to keep your Dreamweaver site in
a separate location from your JSF application directory and to import JSF components from a
Java archive (JAR) file directly into Dreamweaver. To import JSF components into Dreamweaver from a JAR file, first create the JAR file using
the "jar" command line utility included in the Java Development Kit or using
your integrated development environment to package the JAR. The important thing is that your
JAR file must contain a file called "faces-config.xml" and it must be
located in a directory called "META-INF" in the root directory of the JAR
file. By using this convention, JSFToolbox will be able to locate and read your Faces
configuration file to determine which components you are importing into your Dreamweaver
site. You can import a JAR file from the Application panel. Select the Components tab and click
the "+" button. To remove a JAR file (and all the JSF component information
associated with that JAR file), click the "-" button. To manually refresh
your site, click the circular arrow icon on any of the JSFToolbox component palettes. Alternately, you
can use the CTRL-ALT-F5 keyboard
shortcut. The ability to import JSF components into Dreamweaver from a JAR file can also be useful
for development teams who want to share components across remote work locations. Another use
case is a design and development team where server-side components can be built by programmers
and handed off to designers who assemble the views of the application. Once you import your JAR into Dreamweaver using JSFToolbox, all the managed beans, message
bundles, UI components, converters, validators, and other JSF components will be available to
your site. This information is persistent and will be available to your site across
Dreamweaver sessions. Additionally, if you add, modify, or remove components in your JSF
application and rebuild your JAR file, JSFToolbox will detect these changes and will update
itself automatically.
|