Revised:05/19/2003
The purpose of this release is to introduce you to the JavaServer Faces framework and to provide you with an opportunity to give us feedback on the work we've done so far.
This Early Access release of JavaServer Faces technology provides an early alpha version of the JSF technology which is currently being developed under the Java Community Process(SM) ("JCP(SM)") as JSR127. The expert group is actively working on the specification, and you should expect to see continued evolution between this release and the final draft of the specification. Therefore, applications built on this release of JavaServer Faces technology are not guaranteed to work without modification on future releases.
Software | Version
|
---|---|
Java Development Kit | version 1.3.1 or later |
Java Web Services Developer Pack | version 1.1 or 1.2 |
Microsoft Internet Explorer or Netscape Navigator | version 6 (IE)
version 7 (Netscape) |
The three major new features for this release are: Application Configuration Resources, Navigation Handling, and Object Management
The following example illustrates the problem. Only a JavaServer Faces tag with a unique id will be rendered. Once that id is non-unique no more output will be generated.
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <% // Place a simple string in session scope String simpleString = new String("I am a simple String"); pageContext.setAttribute("SimpleString", simpleString, PageContext.SESSION_SCOPE); %> <html> <head> <title>Unique id requirement example</title> </head> <body> <h3>Unique id requirement example</h3> <f:use_faces> <h:form id="basicForm" formName="basicForm" > <c:forEach begin="0" end="3" varStatus="status"> JSF Index: <c:out value="${status.index}"/> Value: <h:output_text id="must_be_unique" valueRef="SimpleString"/> <br> </c:forEach> </h:form> </f:use_faces> </body> </html>
If your JavaServer Faces application needs access to attributes in a PageContext, one workaround is using JSTL to store those attributes in one of the scopes that is available to the JavaServer Faces implementation. These scopes are: Request, Session, or Application.
Here is an example that illustrates the workaround:
<%@ page import="java.util.ArrayList" %> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <% // Construct a preconfigured customer list in session scope ArrayList list = new ArrayList(); list.add(new String("apple")); list.add(new String("pear")); list.add(new String("orange")); list.add(new String("banana")); list.add(new String("strawberry")); pageContext.setAttribute("ListBean", list, PageContext.SESSION_SCOPE); %> <html> <head> <title>PageContext workaround example</title> </head> <body> <h3>PageContext workaround example</h3> <f:use_faces> <h:form id="basicForm" formName="basicForm" > <c:forEach items="${ListBean}" varStatus="status"> <c:if test="${status.last}"> <!-- saving PageContext "status.count" value in request scope --> <c:set var="count" value="${status.count}" scope="request" /> </c:if> </c:forEach> <!-- You could also use "requestScope.count" to explicitly define the scope --> <p>There are <h:output_text valueRef="count"/> items in the list.</p> </h:form> </f:use_faces> </body> </html>
Copyright © 2002, 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa
Clara, California 95054, U.S.A. All rights reserved.
Sun Microsystems, Inc. has intellectual property rights relating to
technology embodied in this product. In particular, and without
limitation, these intellectual property rights may include one or more
of the U.S. patents listed at http://www.sun.com/patents and one or
more
additional patents or pending patent applications in the U.S. and other
countries.
This product is distributed under licenses restricting its use, copying
distribution, and decompilation. No part of this product may be
reproduced in any form by any means without prior written authorization
of Sun and its licensors, if any.
Third-party software, including font technology, is copyrighted and
licensed from Sun suppliers.
Sun, Sun Microsystems, the Sun logo, the Java Coffee Cup logo,
JavaServer, and Java are trademarks or registered trademarks of Sun
Microsystems, Inc. in the U.S. and other countries.
Federal Acquisitions: Commercial Software - Government Users Subject
to
Standard License Terms and Conditions.
Copyright © 2002, 2003 Sun Microsystems, Inc., 4150 Network Circle,
Santa Clara, California 95054, Etats-Unis. Tous droits réservés.
Sun Microsystems, Inc. a les droits de propriété intellectuels
relatants
à la technologie incorporée dans ce produit. En particulier,
et sans la
limitation, ces droits de propriété intellectuels peuvent
inclure un ou
plus des brevets américains énumérés à
http://www.sun.com/patents et un
ou les brevets plus supplémentaires ou les applications de brevet
en
attente dans les Etats - Unis et les autres pays.
Ce produit ou document est protégé par un copyright et
distribué avec
des licences qui en restreignent l'utilisation, la copie, la
distribution, et la décompilation. Aucune partie de ce produit
ou
document ne peut être reproduite sous aucune forme, par quelque
moyen
que ce soit, sans l'autorisation préalable et écrite
de Sun et de ses
bailleurs de licence, s'il y ena.
Le logiciel détenu par des tiers, et qui comprend la technologie
relative aux polices de caractères, est protégé
par un copyright et
licencié par des fournisseurs de Sun.
Sun, Sun Microsystems, le logo Sun, le logo Java Coffee Cup, JavaServer,
et Java sont des marques de fabrique ou des marques déposées
de Sun
Microsystems, Inc. aux Etats-Unis et dans d'autres pays.