Release Notes


OpenFaces 3.0 with JSF 2.0 Support

posted Nov 4, 2010, 8:26 AM by Unknown user

The final release of OpenFaces 3.0 is out. This release focuses on OpenFaces' compatibility with JSF 2.0 specification, which is currently quickly replacing the older JSF 1.2 standard and makes application development notably more convenient. Now developers of JSF 2.0-based applications can enjoy using many mature OpenFaces components such as DataTableTreeTableDayTable, and many other useful components. Special thanks go to all community members who contributed to the early access versions and helped us with testing and preparing this final version!

 

We are not going to drop the JSF 1.2-based OpenFaces 2.x version family. Both 3.x and 2.x families will be evolving in parallel, and all improvements to OpenFaces 3.x will also be included into the appropriate 2.x releases to support JSF 1.2 developers.

 

You can download version 3.0 here. Installing OpenFaces 3.0 into your JSF 2.0 application is as simple as adding the openfaces.jar and runtime dependency jars from the distribution package to your application. No web.xml modifications are required. Just make sure you're using the latest Mojarra 2.0.3. You can also browse the online demo, and study the release notes. Should you have any questions, you're welcome to join the OpenFaces community.

OpenFaces 3.0 Release Notes

posted Nov 4, 2010, 8:24 AM by Unknown user   [ updated Nov 8, 2011, 7:13 AM by Dmitry Pikhulya ]

General Information

 

The main focus in this release is OpenFaces' compatibility with JSF 2.0 specification. No new features except JSF 2.0 compatibility are introduced in this release. The OpenFaces 3.x becomes the recommended version family for new development, however we will continue to evolve the JSF 1.2-based OpenFaces 2.x version family in parallel with OpenFaces 3.x family to support developers who cannot migrate to JSF 2.0 yet. All new features and components of the subsequent OpenFaces 3.x releases will also be included into the appropriate OpenFaces 2.x releases as well.

 

Adding OpenFaces 3.0

 

Installing OpenFaces into your application is as simple as follwing these two steps:

 

  • Make sure that your application uses the latest Mojarra 2.0.3, which is required for OpenFaces Ajax components to work properly. If you're using Glassfish v3 application server then you'll have to upgrade Mojarra in the server itself (see the Installing Mojarra 2.0.3 on Glassfish v3 section in Mojarra 2.0.3 release notes).
  • Add openfaces.jar found in the OpenFaces distribution package, and the dependency jars found in package's "lib" directory to your application.

 

Once you've done this, you can use OpenFaces in your application. Add this namespace declaration to your pages: xmlns:o="http://openfaces.org/"

 

Here's a code of a simplest page, which can be used to test that OpenFaces works properly in your application:

 

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:o="http://openfaces.org/">
  <h:head>
    <title>OpenFaces Test</title>
  </h:head>
  <h:body>
    <h:form>
      <o:foldingPanel caption="Hello, OpenFaces!" expanded="false">
        <o:calendar/>
      </o:foldingPanel>
    </h:form>
  </h:body>
</html>

This page will display a collapsed FoldingPanel, like this:

... and clicking on the '+' expansion button will send an Ajax request and open the embedded Calendar like this:


If you require any further help, you can ask for assistance on the OpenFaces forum.

Migrating from OpenFaces 2.0

 

Assuming that you've migrated your application in general to JSF 2.0, the following steps are required to move to OpenFaces 3.0:

  • Make sure that your application uses the latest Mojarra 2.0.3, which is required for OpenFaces Ajax components to work properly. If you're using Glassfish v3 application server then you'll have to upgrade Mojarra in the server itself (see the Installing Mojarra 2.0.3 on Glassfish v3 section in Mojarra 2.0.3 release notes).
  • Upgrade openfaces.jar and the dependent library jars used in your application.
  • Remove OpenFaces resource filter declaration and mapping from application's web.xml file.
  • Review usages of <o:ajax> component and O$.ajax.request JavaScript function according to the information below.

 

Make sure to use the new JSF 2.0 <h:head> tag instead of <head>, which is important for proper resource handling of OpenFaces (and other) components.

 

NOTE: JSP support is discontinued in JSF 2.0, so you'll have to migrate to Facelets to use the new version of OpenFaces.

 

Changes in <o:ajax> component and O$.ajax.request function in OpenFaces 3.0

 

Some minor changes were made to the <o:ajax> component and O$.ajax.request JavaScript function to make their behavior uniform with the standard <f:ajax> tag and jsf.ajax.request function introduced in JSF 2.0, so you might amend their usage if you find them working not as you have expected after the migration:

  • The <o:ajax> component now doesn't automatically include its parent component (or the component to which it is attached to) into the list of submitted components (or the "execute" list). If you still need this behavior, you have to add that component to the execute attribute of<o:ajax> tag explicitly.
  • Rendered component(s) are also not automatically included into the list of submitted components, so you'll also have to include them explicitly if needed. This is applicable for both <o:ajax> tag and O$.ajax.request function.
  • The executeRenderedComponents attribute of <o:ajax> tag (which exists in early access builds of OpenFaces 2.1) has been removed in OpenFaces 3.0. This attribute is not needed anymore since, as mentioned in the previous point, rendered components are not included into the submitted (or "executed" components) anymore.

 

Code Contributions

 

OpenFaces is now using Git version control system, and its repository is published on GitHub. This makes it a lot easier to contribute code changes to OpenFaces because of GitHub's forking feature. So if you face any bugs, anticipate any features and feel that you can make appropriate changes, you're welcome to fork the project. See more details in this post. Of course, if you don't work with Git, good old patches are also accepted.

OpenFaces Repository is on GitHub

posted Nov 4, 2010, 8:24 AM by Unknown user   [ updated Sep 13, 2011, 6:13 AM by Dmitry Pikhulya ]

OpenFaces is now using Git instead of SVN as a version control system, which facilitates simultaneous development of OpenFaces versions 2.x and 3.x. Here's the new OpenFaces repository URL: git://github.com/openfaces/OpenFaces.git

 

The branch named "master" currently hosts the code for OpenFaces 2.x, and it is the branch where all new features and modifications common for both versions are being added. The branch named "3.0-master" contains changes relative to the "master" branch which are required to adapt the code to JSF 2.0 and form OpenFaces 3.x. I'd like to point out once more that, while JSF 1.2 is still being actively used, both OpenFaces 2.x (based on JSF 1.2), and OpenFaces 3.x (based on JSF 2.0) are going to be evolved in parallel. They will have the same set of features, but will be targeted at different versions of JSF.

 

The repository is hosted on GitHub -- here's the OpenFaces GitHub page. This means that if you're familiar with Git, it's now much easier to become a code committer if you'd like to affect what comes in OpenFaces yourself. To do this, you can:

  1. Register on GitHub (or use your existing account);
  2. Fork the OpenFaces repository;
  3. Make the desired changes to the OpenFaces source code right in your forked repository -- fix the most annoying bug, add a feature that you always wanted to exist :), etc.
  4. Send a pull request, and we'll review and pull in your changes to the central repository.

OpenFaces 3.0 Early Access 2 with JSF 2.0 support

posted Nov 4, 2010, 8:22 AM by Unknown user   [ updated Nov 4, 2010, 8:23 AM ]

We're pleased to present the second Early Access release for OpenFaces 3.0 with JSF 2.0 support. This release features tighter integration with the JSF 2.0 infrastructure, which has resolved most of the problems that existed in the previous release. Here are the most notable fixes:

  • fixed Ajax functionality for DataTable, TreeTable, CompositeFilter and all other components;
  • fixed compatibility with the standard JSF 2.0 Ajax APIs (the <f:ajax> component, and jsf.ajax.request() JavaScript function);
  • made possible to attach client behavior tags, such as <f:ajax> to all OpenFaces input and command components

 

Besides, it is now easier to add OpenFaces to your application -- you just need to add OpenFaces jar with its dependencies to your application. No web.xml modification and resource filter registration is required anymore!

 

You can download this version and the demo package that runs on Tomcat and GlassFish v3 here (see the OpenFaces 3.0 Early Access 2 section). If you've used the previous release, please also read the migration instructions in the release notes document.

 

This is the last milestone before the final release of OpenFaces 3.0. We'd like to have your feedback on how it behaves in your JSF 2.0 applications in order to polish the library by the actual release. Please post your feedback and share your experience on the product's forum.

OpenFaces 3.0 EA2 Release Notes

posted Nov 4, 2010, 8:22 AM by Unknown user

Here are the changes that were made since the previous early access milestone.

Improvements

  • It's now easier to add OpenFaces to your application: you just need to add OpenFaces jar and its dependencies. No web.xml modification and resource filter registration is required anymore. See the "Installation and Configuration" section in developer's guide for details.

Resolved Issues

  • Fixed Ajax functionality for DataTable, TreeTable, CompositeFilter and all other components.
  • Fixed compatibility with the standard JSF 2.0 Ajax APIs (the <f:ajax> component, and jsf.ajax.request() JavaScript function).
  • Made possible to attach client behavior tags, such as <f:ajax> to all OpenFaces input and command components.

Known issues

  • Session expiration notification for Ajax calls doesn't work currently.

 

Migration Instructions

  1. OpenFaces requires the latest version of Mojarra, 2.0.3, since it has some fixes critical for proper functionality of OpenFaces components. You can download Mojarra 2.0.3 here. If you're running your application on Glassfish application server, make sure to update Mojarra in Glassfish (see the instructions).
  2. Remove ResourceFilter declaration and mapping from application's web.xml.
  3. Make sure to use <h:head> and <h:body> tags instead of old-style plain <head> and <body> tags.

 

Note: running OpenFaces demo, which is available for download, on Glassfish application server, requires the latest version of Mojarra (Mojarra 2.0.3) to be installed in the Glassfish server. See the installation instructions.

OpenFaces 3.0 Early Access 1 with JSF 2.0 Support

posted Nov 4, 2010, 8:20 AM by Unknown user   [ updated Nov 4, 2010, 8:21 AM ]

We're glad to announce the first early access milestone of the new OpenFaces 3.0 version featuring JSF 2.0 compatibility. Now developers creating JSF 2.0 based applications have access to rich possibilities provided by all kinds of OpenFaces components, ranging from DataTable and TreeTable for flexible data display, to BorderLayoutPanel and Window for creating various layouts, and Validation framework for client-side validation and additional validators.

 

OpenFaces 3.0 will be maintained in parallel with OpenFaces 2.0 and both of them will have the same set of features, but they will target different versions of JSF: 2.0 and 1.2 respectively. The final release for the OpenFaces 3.0 version is expected in June.

 

You can download the new version and the demo package that runs on Tomcat and GlassFish v3 here (see the OpenFaces 3.0 Early Access 1 section).

 

As JSF 2.0 support is currently on an intermediate stage, some functionality is limited yet and there are the following known issues in OpenFaces 3.0 EA1:

- State saving during OpenFaces Ajax requests has some issues when using the built-in Ajax capabilities in certain OpenFaces components. Most notable consequences are: a) impossibility to use Ajax node folding in TreeTable, so only client-side node folding works fine yet, and b) DataTable paginator's "next" button which can't be used more than once.

- The CompositeFilter component doesn't work in this Early Access version.

 

Feel free to share your feedback and ask any questions on the product's forum. Stay up to date with the latest OpenFaces news by following us on Twitter.

New LevelIndicator component

posted Nov 4, 2010, 8:20 AM by Unknown user

We're introducing the new OpenFaces LevelIndicator component which is already available in the latest nightly builds.level-indicator-default-vertical.png

LevelIndicator  - a component that shows a numeric value in graphic style, similar to the LED volume meter and resource meter used in Windows Task Manager.

 

LevelIndicator component can be defined on the page using <o:levelIndicator> tag. LevelIndicator can be provided with the level value that it will represent. The value should be of typejava.lang.Double and be in [0..1] range.

 

On the following examples you can see the LevelIndicator component in it's default horizontal and vertical states.

level-indicator-default-horizontal.png

 

The component has transitionLevels and colors attributes, so using these attributes you can define value ranges and specify appropriate colors for them.

 

<o:levelIndicator value="0.8" colors="blue,orange,violet" transitionLevels="0.35, 0.6" />

 

The upper declaration defines that LevelIndicator component has two transition level points at 0.35 and 0.6,

this means that LevelIndicator has three value ranges([0 - 0.35] , [0.35 - 0.6] , [0.6 - 1]).

 

Each of defined value ranges will use each own color, defined in colors attribute of <o:levelIndicator> tag. The result component's representation can be seen on the example below.

level-indicator-with-custom-colors.png

As it can be seen from the example below, the component's styles and sizes can be easily customized to the desired look.

  <o:levelIndicator value="0.8"
                    style="background-color: #e6e6e6; border: 1px solid #333; width: 350px; height: 40px;"
                    segmentSize="5"
                    colors="blue,orange,violet"
                    transitionLevels="0.35, 0.6"/>

level-indicator-with-custom-css.png

OpenFaces 3.0 Preview with JSF 2.0 Support

posted Nov 4, 2010, 8:18 AM by Unknown user   [ updated Nov 4, 2010, 8:19 AM ]

We're glad to announce a preview of the JSF 2.0 compliant version of OpenFaces. This is not yet the 3.0 EAP1 milestone mentioned in our Roadmap, which will be published soon but you can already check out OpenFaces in a JSF 2.0 environment and give us some valuable feedback before the upcoming EAP1 version.

 

Here are the OpenFaces 3.0 Preview download files:

openfaces-3.0.preview1.zip -- contains the new openfaces.jar file and runtime dependency jar files.

openfaces-3.0.preview1-src.zip -- source code for the new version.

openfaces-3.0.preview1-demo.zip -- contains the demo application war file deployable under GlassFish v3 and Tomcat 6.x.

openfaces-3.0.preview1-demo-src.zip -- demo source code.

 

The installation instructions are the same as for OpenFaces 2.0 for now, see the documentation. Please note also that OpenFaces versions 2.0 and 3.0 are going to have the same features but run under different versions of JSF -- 1.2 and 2.0 respectively.

 

The JSF 2.0 compatibility support is on an intermediate stage yet though most of the components are already functional. Here are the known issues in this version:

- State saving during OpenFaces Ajax requests has some problems, which results in some issues with built-in Ajax capabilities in certain OpenFaces components. For example DataTable paginator's "next" button can't be used twice and there are certain problems when using the Ajax node folding in TreeTable (hwever client-side TreeTable node folding with preloadedNodes="all" works fine now).

- The CompositeFilter component doesn't work in this version.

- There are numerous validation messages at the bottom of each demo page, though these messages don't affect the demo application's functionality.

- The documentation is not updated to reflect the JSF 2.0 related specifics yet.

 

Please share your feedback and any issues that you might have on the forum.

New SelectOneMenu component with autocompletion support

posted Nov 4, 2010, 8:17 AM by Unknown user

We're introducing the new OpenFaces SelectOneMenu component which is already available in the latest nightly builds. This component is API-compatible with the standard <h:selectOneMenu> tag, though it provides such additional features as autocompletion support, displaying the drop-down items with JSF compnents and/or HTML markup, multi-column items display, etc. This component is still in development and some features are still going to be added, as well as its API which can still undergo minor changes before the release, though you can already check it out now.

 

The fact that it's API-compatible with its standard analog means that you can migrate to the OpenFaces version quite easily. Say, you have a standard combo-box, which is declared like this:

<h:selectOneMenu value="#{SelectOneMenuBean.selectedCity}" converter="#{SelectOneMenuBean.cityConverter}">
  <f:selectItems value="#{SelectOneMenuBean.cityItems}"/>
</h:selectOneMenu>

you can just replace the <h:selectOneMenu> tag with <o:selectOneMenu> to switch to the extended OpenFaces version of this component:

 

<o:selectOneMenu value="#{SelectOneMenuBean.selectedCity}" converter="#{SelectOneMenuBean.cityConverter}">
  <f:selectItems value="#{SelectOneMenuBean.cityItems}"/>
</o:selectOneMenu>

 

Doing this will turn on the autocompletion or automatic search functionality, where you can type a part of an item, a city in this case, and have the matching item to be highlighted automatically. This feature makes it possible to use combo-boxes even if you need to select from a very large number of items, say several hundred items, where using the standard SelectOneMenu component would be impractical. Here's how the latter declaration looks in the browser when searching for an item:

SelectOneMenu1.png

This component is not in the online demo yet, though you can download the nightly build demo that includes this example (deployable on Tomcat 6), and its source code.

SelectOneMenu vs DropDownField

Although the SelectOneMenu above looks very much like the DropDownField component, they have one key difference besides the API differences.

 

The DropDownField component (as well as its cousin SuggestionField) is essentially an input component, like other standard input components such as <h:inputText>. In other words, despite it contains the drop-down list to choose items from, the purpose of the DropDownField component is just the entry of text, and the component's drop-down list as well as the autocompletion functionality just assists the text entry. This particularly means that if for example the drop-down list contains two items with the same name (say London, UK and London, OH), it won't be possible to distinguish between them -- the DropDownField will just contain the "London" text when clicking on any of these items and it will be the same as if the user entered this text without even opening the drop-down list.

 

In contrast, the SelectOneMenu component is a select component, which means that although it allows typing item name in its embedded input field, its purpose is to select from a predefined list of items. So typing "London" (or a partial text) will open a drop-down list for selecting the desired option, and the selected item will be saved in the component and will properly reflect the original item object that corresponds to the selected item.

 

Nevertheless, the components have much in common, and the SelectOneMenu component has much of the DropDownField's API and possibilities, like customizing the suggestion options, and multi-column drop-down list display. These are briefly shown below.

Additional Customization Options

By default, typing in the SelectOneMenu's field brings the drop-down where all items are displayed and the one matching the typed string being highlighted. It is also possible to make SelectOneMenu filter the suggestion list and display only the matching items using thesuggestionMode attribute, which can take the following values:

  • "stringStart" - Shows suggestions that begin with the entered value.
  • "substring" - Shows suggestions that contain the entered value.
  • "stringEnd" - Shows suggestions that end with the entered value.
  • "all" (the default value) - Shows all items in the list of suggestions.

 

The SelectOneMenu also has much of the API applicable to DropDownField component, and one of the notable ones is the ability to create multi-column drop-down lists using the embedded <o:column> tags.

 

So we'll add these two capabilities to our original example:

 

<o:selectOneMenu value="#{SelectOneMenuBean.selectedCity}"
                 converter="#{SelectOneMenuBean.cityConverter}"
                 var="city"
                 suggestionMode="stringStart">
  <f:selectItems value="#{SelectOneMenuBean.cityItems}"/>
  <o:column style="color: black">#{city.name}</o:column>
  <o:column style="color:gray">#{city.country}</o:column>
</o:selectOneMenu>

 

and the resulting combo-box will look like this as a result:

SelectOneMenu2.png

You can check out the DropDownField documentation for more customization options until ComboBox documentation receives its own documentation.

OpenFaces 2.0 Released

posted Nov 4, 2010, 8:15 AM by Unknown user

We are glad to announce that OpenFaces 2.0 has "graduated" from the Early Access Program and the final version is released!

 

OpenFaces is an open source JSF library consisting of a set of advanced components, the Ajax framework and the client-side validation framework.

 

6 new components are introduced since the EAP 2 was published:

  • CompositeFilter – allows the user to build complex filter crieteria with multiple filter conditions;
  • LayeredPane  a container that allows switching between different sets of displayed components;
  • SelectOneRadio – an extended version of the standard <h:selectOneRadio> component;
  • SelectManyCheckbox – an extended version of the standard <h:selectManyCheckbox> component;
  • CommandButton – an extended version of the standard <h:commandButton> component;
  • CommandLink – an extended version of the standard <h:commandLink> component.

 

DataTable and TreeTable components have been significantly extended with the following functionality:

  • Content scrolling with frozen header/footer rows. Both vertical and horizontal scrolling with frozen columns is supported;
  • Interactive drag&drop column reordering;
  • Interactive column visibility customization;
  • Numerous filtering extensions -- customizing search condition, case sensitivity, placing filters inside or outside the table;
  • Tighter integration with the Hibernate library;
  • And more...

 

Certainly, there are many more extensions and fixes in other OpenFaces components and you can see the full list in the release notes.

 

Use your chance to see the components in action in the Live Demo!

 

We welcome everyone to contribute and participate in OpenFaces development. Please don't hesitate to post your feedback at the product forum or email us and follow OpenFaces on Twitter.

1-10 of 14