JSF20DocPlan

Documentation Plan for JSF 2.0 Support in NetBeans 6.8

The following efforts are being made to provide documentation for JSF 2.0 support that coincides with the NetBeans 6.8 release. A summary of engineering support for JSF 2.0 can be seen at: http://wiki.netbeans.org/JEE6IntegrationJSF.


Contents


NetBeans Articles

  • JSF 2.0 Support in NetBeans 6.8: An article outlining JSF 2.0 support in NetBeans 6.8.

NetBeans Tutorials

New Tutorials

  • Introduction to JSF 2.0: A quickstart guide to creating a web application with JSF 2.0 support.

The application looks as follows in a browser:

Image:jsfDemoApp_JSF20DocPlan.png

The tutorial will cover the following aspects:

  • NetBeans support:
  • JSF project template (New Project wizard)
  • Code completion (annotations for managed bean, Facelets pages)
  • API documentation support
  • Facelets Template and Template Client wizards
  • JSF 2.0:
  • Description of the Facelets integration into JSF 2.0
  • Demonstration of annotations replacing config elements in faces-config.xml. For example:

faces-config.xml

<managed-bean>
       <description>The backing bean for the guessNumber Web application</description>
       <managed-bean-name>UserNumberBean</managed-bean-name>
       <managed-bean-class>guessNumber.UserNumberBean</managed-bean-class>
       <managed-bean-scope>session</managed-bean-scope>
       <managed-property>
           <property-name>minimum</property-name>
           <property-class>long</property-class>
           <value>0</value>
       </managed-property>
       <managed-property>
           <property-name>maximum</property-name>
           <property-class>long</property-class>
           <value>10</value>
       </managed-property>
</managed-bean>

UserNumberBean.java:

@ManagedBean(name="UserNumberBean")
@SessionScoped
public class UserNumberBean {

    ...

    @ManagedProperty(value = "0")
    private long minimum;
    @ManagedProperty(value = "10")
    private long maximum;
  • Implicit Navigation:

Example: greeting.xhtml contains a submit button whose action="response":

<h:commandButton id="submit"
    action="response"
    value="submit" />

response.xhtml is returned without the need to specify navigation rules in faces-config.xml.

  • General JSF support:
  • Validation:
required="true"
requiredMessage="#{errorMessages.required}"

Image:validation-1_JSF20DocPlan.png

validatorMessage="#{errorMessages.outOfRange}"

Image:validation-2_JSF20DocPlan.png

converterMessage="#{errorMessages.numberConvert}"

Image:validation-3_JSF20DocPlan.png

  • Localization:

faces-config.xml

<application>
    <locale-config>
        <default-locale>en</default-locale>
        <supported-locale>fr_FR</supported-locale>
    </locale-config>
    <resource-bundle>
        <base-name>guessNumber.messages</base-name>
        <var>errorMessages</var>
    </resource-bundle>
</application>

Image:localization_JSF20DocPlan.png


  • Applying JSF 2.0 Ajax Features: A demonstration JSF 2.0 Ajax features.
  • Ready by: After the 6.8 release.
  • Proposed url: http://netbeans.org/kb/docs/web/jsf20-ajax.html
  • Current status: In progress (Investigating samples)
  • Expected duration: 4 weeks
  • Notes: The tutorial will be based on several sample projects. The primary purpose is to demonstrate the use of the <f:ajax> tag, and the use of the jsf.ajax namespace. One sample app could be the following, which uses <f:ajax> to update the square colors when the text field loses focus:

Image:ajax-demo_JSF20DocPlan.png

However, other samples will need to demonstrate that asynchronous communication is taking place with the back-end.

  • Other new tutorial content may be developed, based on bundled sample applications. Any such content will be created depending on time availability.

Updated Tutorials

  • Ready by: Period following Beta release (Oct. 1 - Nov. 1)
  • Current status: Done
  • Expected duration: 4 weeks
  • Notes: As CRUD functionality and interoperability with a database is a popular topic, this tutorial is a P1 document for the 6.8 release. The tutorial makes use of the JSF Pages from Entity Classes wizard.
  1. Modifying JSP Pages in the Generated JavaServer Faces CRUD Application
  2. Modifying Java Classes in the Generated JavaServer Faces CRUD Application
  3. Adding Ajax Validation to the Generated JavaServer Faces CRUD Application

These tutorials will be worked on following FCS.

Javahelp

NetBeans Javahelp will be completed in time for FCS (Nov. 23).

Status: Done

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo