| TWiki . Projects . JavaServerFacesSpecFaq |
General Questions
JSF 1.1 Troubleshooting Questions
forEach, if, choose
and when? <c:import> or <jsp:include> to include content from a a JSP page
into a JavaServer Faces page, it produces incorrect HTML output. Why
does this happen?
forEach, if, choose
and when? <c:import> or <jsp:include> to include content from a a JSP page
into a JavaServer Faces page, it produces incorrect HTML output. Why
does this happen? For More Information
Q: What is JavaServer Faces technology?
A: JavaServer Faces technology is a framework for building user interfaces for web applications. JavaServer Faces technology includes:
With the simple, well-defined programming model that JavaServer Faces technology provides, developers of varying skill levels can quickly and easily build Web applications by: assembling reusable UI components in a page, connecting these components to an application data source, and wiring client-generated events to server-side event handlers. With the power of JavaServer Faces technology, these web applications handle all of the complexity of managing the user interface on the server, allowing the application developer to focus on their application code.
Q: What are the benefits of JavaServer Faces technology?
A: The primary benefits of JavaServer Faces technology include:
Q: Who are the intended users of JavaServer Faces technology?
A: Because of the extensibility and ease-of-use that JavaServer Faces technology provides, a wide range of developers and web-page designers can take advantage of the power of JavaServer Faces technology. These users include:
Q: Who is involved in developing the JavaServer Faces specification?
A: A number of important industry players are collaborating with Sun to define the first draft of the JavaServer Faces specification. Please see JSR-252 for a complete list of expert group members.
Q:What are the differences between JavaServer Faces technology and Struts?
A: Struts is an open-source Java web application framework whose architecture is based on the Model-View-Controller design pattern in which requests are routed through a controller that provides overall application management and dispatches the requests to application components. JavaServer Faces technology is a user-interface framework for Java web applications. It is focussed on the view tier of an MVC-based architecture. The Struts and JavaServer Faces technology frameworks do have some overlapping functionality; however each framework has its advantages, and developers can use certain features of both frameworks in a single application.
The greatest advantage that JavaServer Faces technology has over
Struts is its flexible, extensible UI component model, which includes:
Because the JavaServer Faces technology architecture separates the
definition of a component from its rendering, you can render your
components in different ways or even to different clients, such as a
WML client. Moreover, the extensible component APIs
of JavaServer Faces technology allow you to extend the standard set of
components and create entirely new components. None of this is
possible with Struts. In fact, Struts has no notion of
server-side components, which also means that it has no event model for
responding to component events and no facility for saving and restoring
component state. While Struts does have a useful tag library for
rendering components on the page, these components have no object
representation on the server and they can only be rendered to an
HTML client.
A successor to Struts is also just getting started. It's called
Shale, and you can learn more here:
http://www.apachenews.org/archives/000552.html.
Since Shale is also an open-source project, people interested in
participating in the construction of this framework are welcome to
join. You can subscribe to the wiki page here: http://wiki.apache.org/struts/StrutsShale.
Q: How does JavaServer Faces technology relate to JavaServer Pages (JSP) technology?
A: JavaServer Faces technology, version 1.0 relies on JSP 1.2. Since JSP 2.0 is a superset of JSP 1.2, it is possible to use JavaServer Faces technology, version 1.0 with JSP 2.0. Future versions of the JavaServer Faces specification will be able to take better advantage of JSP 2.0.
Q: Where can I find out more about JavaServer Faces technology?
A: See chapters 9 through 13 of the Java EE 5 Tutorial to learn more about JavaServer Faces technology. If you have additional questions not answered by this FAQ, consult the JavaServer Faces Forum.
JSF 1.1 Troubleshooting Questions
forEach,
if, choose and when?
A. The forEach tag does not work with
JavaServer Faces technology, version 1.0 and 1.1 tags due to an
incompatibility between the
strategies used by JSTL and and JavaServer Faces technology. Instead,
you could use a renderer, such as the Table renderer used by the dataTable
tag, that performs its own iteration. The if, choose
when tags work, but the JavaServer Faces tags nested
within these tags must have explicit identifiers.
This shortcoming has been fixed in JSF 1.2.
Q. When I use <c:import>
or <jsp:include> to include content from a a JSP
page into a JavaServer Faces page, it produces incorrect HTML output.
Why does this happen?
A. When using <jsp:include> or <c:import>
to compose a single view from multiple JSP pages, all JavaServer Faces
component tags in the included pages must be nested inside the <f:subview>
tag the JavaServer Faces core tag library (which is itself nested
inside the <f:view> tag). The <f:subview>
<jsp:include>
or <c:import> tag nested inside it, or it can be in
the included page. Any template text or non-JavaServer Faces tags present in a page
that is included with the <jsp:include> or <c:import>
tag, or any other mechanism that uses RequestDispatcher.include,
must be enclosed in an <f:verbatim> tag. This restriction has been lifted for JSF 1.2.
JSF 1.2 Troubleshooting Questions
forEach,
if, choose and when?
A. Yes. A new feature of JSP 2.1, called JSP Id Consumer allows these tags to work as expected.
Q. When I use <c:import>
or <jsp:include> to include content from a a JSP
page into a JavaServer Faces page, it produces incorrect HTML output.
Why does this happen?
A. This has been fixed in JSF 1.2
For More Information
/msg NickServ REGISTER <your password>
/msg NickServ IDENTIFY <your password>
/join ##jsf
/join #jsfaces
----- Revision r6 - 11 Jul 2006 - 03:37:27 - Main.gojira
|