Wednesday, August 31, 2011

Talking on RichFaces@mobiles and on JSF testing in Vienna

I would like to invite you on JSF and RichFaces workshop UNIQA held at September 7-9th in Vienna, Austria.

While first two days will be Max Katz covering thoroughly JSF and RichFaces, last conference day will be dedicated to topics related to RichFaces.

I will be presenting on what can RichFaces offer in upcoming mobile era and what are current state-of-art techniques in testing JSF applications with Arquillian, Selenium and JSFUnit.

You can also see detailed program and you can watch the event on Lanyard.

Looking forward to meet you there!

Thursday, August 18, 2011

Push Improvements in RichFaces 4.1

The lot of improvements has been done in 4.1.0.Milestone1 and specifically Push component has been tweaked a much under the hood.

Push component itself is very important for interactive enterprise applications and we are trying to design its API as much clean as possible.

RichFaces team, and Nick Belaevski namely, did great job to decouple Push from JMS to avoid unnecessary overhead with connecting to messaging provider.

On the client-side, changes have been done to support WebSockets as light-weight alternative for long-polling HTTP connections (comet). Clients, which supports them, uses WebSockets by default and fall-backs to long-polling when support is not detected.

Specifically for 4.0.0.Final users, which would like to try M1 release, they may register message stating deprecation of PushFilter in the server log. It is not strictly necessary to re-configure, but PushFilter has been replaced by PushServlet, to which it delegates now. Things are even better in Servlets 3.0 environments, when you don’t need register any servlet since that will be done automatically for you.

On the server-side, we have introduced option for disabling Push and JMS integration in cases when you can’t use enterprise messaging or you don't require it. To turn JMS integration off, you just need to provide following contextual parameter in web.xml:

<context-param>

<param-name>org.richfaces.push.jms.disable</param-name>
<param-value>true</param-value>
</context-param>


If you would like to try Push, you may be pleased that it is now in RichFaces Showcase, however be aware that it can't be seen in demo hosted on GAE since this hosting doesn't support JMS. You will need to deploy it at own, and in such case I strongly recommend you my previous blog.

And what you may expect in near future? We are working on integration with CDI Events feature, so your application would be allowed to throw messages to the clients very easily. This feature can be already seen in RichFaces Showcase Push samples - it is not really hard to develop simple integration with CDI.

But there were also issues which we had to overcome - one of them is issue with Atmosphere and JBoss Web which will be addressed also in M2.

To overcome this issue, you can temporary switch to using blocking I/O approach:

<context-param>

<param-name>org.atmosphere.useBlocking</param-name>
<param-value>true</param-value>
</context-param>


And off-course, if you have ideas how to make Push more user-friendly than it already is, give us know in RichFaces community discussions. We will be pleased to hear from you!

Monday, August 15, 2011

Editor for RichFaces 4.1

You have been requesting and we now answer: RichFaces gets pretty new Editor component, which was lacking from 4.0.0.Final release.

This component can be found in upcoming 4.1.0.Milestone1 release and is mostly feature complete with exception of skinning which will fit to rest of component suite - this functionality is targeted for Milestone 2.

Editor component is using CKEditor implementation internally and it is able to switch between two configurations of toolbar set: basic and full.



It also integrates nicely with rest of JSF 2, thus you can bind e.g. behavior for event denoting the editor content has been changed:

<rich:editor toolbar="full" value="#{article.text}">

<a4j:ajax event="change" action="#{article.save}" />
</rich:editor>

It is important to note that Editor uses resource handling servlet for obtaining own resources. You don’t require any additional configuration to set it up when working with Servlet 3.0 - everything will be registered automatically for you.

However in Servlet 2.5 and older environments, it is necessary to register this servlet manually in web.xml:

<servlet>

<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/org.richfaces.resources/*</url-pattern>
</servlet-mapping>

I would appreciate your feedback on forums, how this component stands.

You can also watch what is being planned for future.