NetBeans 73 JSF22

List of JavaServer Faces 2.2 features vs. NetBeans IDE support


Contents


Introduction

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

Priorities

  • NICE TO HAVE
  • SHOULD HAVE
  • MUST HAVE

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

[JSF22_01] 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="http://java.sun.com/jsf/flow"" should be working by deafult???, as well as new j:<coponents>???
  • #1: EL should have new implicit variable in CC: facesFlowScope (EASY & MUST HAVE)
  • #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 http://jdevelopment.nl/jsf-22/#730 (COMPLEX & NICE TO HAVE)
  • #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)
  • #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: http://javaserverfaces-spec-public.java.net/nonav/proposals/JAVASERVERFACES_SPEC_PUBLIC-730/proposal.txt

[JSF22_02] Multi-Templating

According to issue below, this is deferred to a later JSF release.
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.
  • #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 & SHOULD HAVE)
  • #2: In addition to #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 & SHOULD HAVE)
  • #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 #1) (EASY & SHOULD HAVE)
  • #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: http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-971

[JSF22_03] 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
  • #1: JSF model should be able to load @FacesComponent and JSF Editor should offer these components in CC, including namespace handling (COMPLEX & MUST HAVE)

More information: http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-594

[JSF22_04] 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

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

More information: http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1038

[JSF22_05] 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

  • #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: http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-703


Other JSF 2.2 features

Rest of JavaServer Faces 2.2 features which are improvements 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 (like new annotations, new tld scheme etc.).


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