Finally, OmniFaces 1.2 is released! Due to job, holiday and personal circumstances it took one month longer than initially planned. There are relatively a lot of minor but very useful additions, among others the ability to capture
result into an EL variable, so that it can be used in a component attribute such as title
. The only real major addition is a new PartialViewContext
, the OmniPartialViewContext
.
This custom PartialViewContext
adds the following enhancements to your JSF web application:
- Support for programmatically executing callback scripts in ajax response.
- Support for programmatically adding arguments to JavaScript scope in ajax response.
- Buffers the ajax response fully until buffer size regardless of flush calls and gently closes the XML tags in ajax response in case of exception during ajax render response.
- Fixes the no-feedback problem when a
ViewExpiredException
occurs during an ajax request on a page which is restricted by web.xml
.
Points 1 and 2 are to be achieved by the new Ajax
utility class. Note that PrimeFaces indeed offers similar functionality in flavor of RequestContext
, but that's thus not available when you are not using PrimeFaces.
Point 3 has the advantage that the entire ajax response can be resetted and replaced by the error page by FullAjaxExceptionHandler
and that exceptions during rendering of ajax response can now be properly handled, in both Mojarra and MyFaces.
Point 4 has the advantage that the enduser will now really be redirected to the login page instead of getting no form of feedback at all. More detailed description of the problem and solution can be found in this stackoverflow.com question: ViewExpiredException not thrown on ajax request if JSF page is protected by j_security_check.
Here's a complete overview of all additions, changes and bugfixes in OmniFaces 1.2, see also What's new in OmniFaces 1.2? on the showcase application:
Added in OmniFaces 1.2
- Character encoding filter
- Resource handler which replaces resource URLs by CDN URLs
- Ignore validation failures on submit
- Store
h:outputFormat
result in a variable - Several
of:format()
shortcut EL functions to format strings in EL - New
Ajax
utility class to ease programmatically updating components, executing callback scripts and injecting variables in JS scope - New
OmniPartialViewContext
for theAjax
utility class, better exception handling during rendering of ajax response byFullAjaxExceptionHandler
and the fix of no-feedback problem when the view is expired during ajax request on a restricted page - New multi field validators which validates if "ONLY ONE" or "ONE or NONE" of the given inputs has been filled out
- New
of:formatCurrency()
andof:formatNumber()
EL functions - New generic enum converter for use in
UISelectMany
components withList
- Some new utility methods in
Faces
andComponents
Changed in OmniFaces 1.2
- Support to render JS/CSS inline by
CombinedResourceHandler
- Changed generation of combined resource IDs by
CombinedResourceHandler
so that it's now reversible - Improved rendered attribute of
o:treeNodeItem
so that it can now also seeo:tree var/varNode
- Improved
components
attribute of multi field validators so that it's resolved relative to parentUINamingContainer
instead of to parentUIForm
- Improved multi field validators to recognize
UISelectBoolean
components as well - Improved
FullAjaxExceptionHandler
to better handle exceptions during ajax render response phase - Improved
o:highlight
to apply style class on associated labels as well
Bugfixed in OmniFaces 1.2
- Serialization and state saving issues in o:cache
- Broken behaviour in MyFaces when using null values in
SelectItemsConverter
- Removed accidently introduced Servlet 3.0 dependency in
GzipResponseFilter
and improved recognition of non-gzippable responses (content range, etc) - Broken behavior of
ResetInputAjaxActionListener
when both PrimeFaces and RichFaces is used in same webapp
Download statistics
We just wanted to add, OmniFaces 1.1 was far more often been downloaded through Maven than through the Google project page. On the Google project page, OmniFaces 1.1 was been downloaded 557 times since the release. However, through Maven, where the stats are unfortunately not publicly available, OmniFaces 1.1 was been downloaded 418 times in July, 496 times in August and 528 times in September. We don't have statistics for October yet (we guess 400~500 until today), but the total is already 1999 downloads. That's not bad, after all :)
Source:http://balusc.blogspot.com/2012/10/omnifaces-12-is-released.html
Tidak ada komentar:
Posting Komentar