NetBeans 73 JSF22

(Difference between revisions)
(Faces Flow)
m (Mandatory IDE updates)
Line 31: Line 31:
===Mandatory IDE updates===
===Mandatory IDE updates===
*  Update model of faces-config.xml for JSF2.2 ('''MODERATE & MUST HAVE''')
*  Update model of faces-config.xml for JSF2.2 ('''MODERATE''' & '''MUST HAVE''')
*  Bundle JavaServer Faces library 2.2 ('''EASY & MUST HAVE''')
*  Bundle JavaServer Faces library 2.2 ('''EASY''' & '''MUST HAVE''')
*  Update NetBeans sources to be able to handle one-file JSF library .JAR (jsf-api.jar and jsf-impl.jar was merged into javax.faces.jar) ('''MODERATE & MUST HAVE''')
*  Update NetBeans sources to be able to handle one-file JSF library .JAR (jsf-api.jar and jsf-impl.jar was merged into javax.faces.jar) ('''MODERATE''' & '''MUST HAVE''')
===JSF 2.2 features which can be supported in IDE===
===JSF 2.2 features which can be supported in IDE===

Revision as of 12:07, 20 June 2012

List of JavaServer Faces 2.2 features vs. NetBeans IDE support



Since JavaServer Faces specification in version 2.2 should be completed during NetBeans 7.3 development phase including its support from the GlassFish application server, we should be able to implement support for features of this JSF release.

In following section should be mentioned all known JSF features which should be "IDE support-able" and suggestions for them - like difficultness and feature suggestions.

Be aware that the JSF 2.2 specification is still changing and many of described features could work differently or some of features could be added/removed in addition. Also two the biggest features weren't specified yet, so especially multi-templating support is just guessed from the prototype application.

There is attempt to guess time estimates and usefulness of the proposed features. Here are lists of them:
Time estimates

  • EASY - should take 1/2 - 1 day
  • MODERATE - should take 1 - 3 days
  • COMPLEX - complicated feature which has to be designed detaily (time depends on the desing)
  • UNKNOWN - can be estimated by the feature author



Open Questions

  • Which JSF libraries will we bundle with NetBeans IDE? 2.2, 2.1, 1.2?
  • There are almost no information about JSF 2.2 and HTML5 support (what everything we could expect)
  • Multi-templating was created just like prototype for now so hard to guess what everything will be needed to support. Templates should be available also as component libraries, but nowhere is defined how it will look exactly, so that's one additional feature which we could need to support.

Mandatory IDE updates

  • Update model of faces-config.xml for JSF2.2 (MODERATE & MUST HAVE)
  • Bundle JavaServer Faces library 2.2 (EASY & MUST HAVE)
  • Update NetBeans sources to be able to handle one-file JSF library .JAR (jsf-api.jar and jsf-impl.jar was merged into javax.faces.jar) (MODERATE & MUST HAVE)

JSF 2.2 features which can be supported in IDE

Faces Flow

Description/Example: In web applications, and in applications in general actually, there is often the concept of a “flow” that takes the user through a series of screens. Such flows includes wizards, multi-screen subscriptions, bookings, etc.

  • Base Support: @FlowScoped anntotaion, new tablib "xmlns:j=""" should be working by deafult???, as well as new j:<coponents>???
  • Suggestion #1: EL should have new implicit variable in CC: facesFlowScope (EASY & MUST HAVE)
  • Suggestion #2: Wizard - Create new FacesFlow: It would help to create skeleton for new faces-flow: create FF folder (by convention), ask for steps pages, not sure how much would be possible to define whole faces-flow-definition, see (COMPLEX & NICE TO HAVE)
  • Suggestion #3: Hint - CDI not enabled (at @FlowScoped or j:<component> or taglib usage?) when the CDI is not enabled since JSF 2.2 is dependend on CDI here (MODERATE & SHOULD HAVE)
  • Suggestion #4: EL Faces-Flow CC - i.e. #{facesFlowScope.someKey} someKey variable could be available across rest pages of the same flowScope (UNKNOWN & NICE TO HAVE'

More information:


DRAFT - not enough of information to design it preciselly
Description/Example: Give to a JSF application, the ability to change its look and feel with the use of several templates,

  • Base Support: User is able to create folder for templates and define context-param in the web.xml DD by himself.
  • Suggestion #1: Facelets Template wizard checkbox "Use multi-templating" - it would set required name of the page and parent folder (templates) and the user could choose just the name of the template (subfolder) (MODERATE & NICE_TO_HAVE)
  • Suggestion #2: In addition to suggestion #1 the wizard would generate whole template skeleton, means: <template>/css, <template>/images, <template>/defaultPng.png, <template>/template.xhtml, <template>/template.xml (with generated base meta informations) (MODERATE & NICE_TO_HAVE)
  • Suggestion #3: Layout style should be possible to turn off (using checkbox) - to be able to create only simple empty template skeleton (in combination with the checkbox from suggestion #1) (EASY & NICE_TO_HAVE)
  • Suggestion #4: If multi-template chosen, we could enable checkbox "use as default" which would update web.xml DD and the appropriate context-param (EASY & NICE_TO_HAVE)

More information:

Facelets Component Tag can be declared via annotation

Description/Example: Facelets does not require an explicit tag handler and a component can be registered via its annotation.

  • Base Support: new parameters of @FacesComponent will be offered by Java code completion
  • Suggestion #1: JSF model should be able to load @FacesComponent and JSF Editor should offer these components in CC, including namespace handling (COMPLEX & NICE_TO_HAVE)

More information:

Facelets ResourceResolver can be declared via annotation

Description/Example: Instead of registering resource resolved in web.xml DD using javax.faces.FACELETS_RESOURCE_RESOLVER @FaceletsResourceResolver can be used.

Base Support: Provide annotation for declaring Facelets ResourceResolver (AUTO)

  • Suggestion #1: Hint at the FaceletsResourceResolver if more annotation like this is used that just the first encountered one will be used (MODERATE & OPTIONAL)

More information:

Component and validator annotations default to simple class name

Description/Example: @FacesComponent and @FacesValidator value attribute becomes optional.

Base Support: value is an optional attribute now - should be handled by java editor (AUTO)

  • Suggestion #1: Hint at the annotation with value which correspond to the class simple name with decapitalized first letter that the value is optional now and can be removed (EASY & NICE_TO_HAVE)

More information:

JSF 2.2 features which are/will be supported automatically

The viewAction Component


    <f:viewAction action="#{someBean.someAction}" />

Base Support: new <f:viewAction> component (AUTO)
More information:

Queue control for AJAX requests

Description/Example: Delay attribute of the <f:ajax> tag can specify AJAX requests queue behavior.

Base Support: new delay attribute at <f:ajax> component (AUTO)
More information:

AJAX + non-AJAX file upload component

Description/Example: New component for uploading files.

Base Support: new <f:fileInput> component (AUTO)
More information:,

Injection in all JSF artifacts

Description/Example: Almost all JSF artifacts can be used as injection target.

Base Support: @EJB, @Inject, ... annotation can be added into Validators, Converters etc. already now, CallEJB actions works also in all java classes of web project (AUTO)
More information:

Other JSF 2.2 features

Here are lists of rest JavaServer Faces 2.2 features which are improvments in the JSF itself and doesn't require any support from the IDE or supports from NetBeans would be quite non-conceptual and such supports aren't available also in another areas (like i.e.: detecting faces-config created nodes programatically, support for beans CC by programatically building facelet etc). All features defining new annotations, new faces-config.xml tags, new objects, methods, properties, const will be supported by default by XML or Java editor as usually.

Java APIs

  • Programmatic configuration
  • FaceletFactory in the standard API
  • FlashFactory and FlashWrapper
  • Instantiating composite component in Java
  • Support for the Collection interface in UIData
  • Wrapper class for Lifecycle


  • Identify client windows via a Window Id (ide does not provide completion for context-param names and values)
  • Restoring view scope before view is build
  • System events for The Flash
  • Publish PostRestoreStateEvent
  • Mandate tree visiting for partial state saving


  • Component modification management

XML configuration

  • Case insensitivity for state saving method (ide does not provide completion for context-param names and values)

Standards compliance

  • Unique ids and fixed name attribute for view state field
  • Allowing id attribute on all elements for HTML5 content (id can be specified for all components)

Useful links

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