Friday, October 12, 2012
I’m excited about the buzz the RichFaces Bootstrap sandbox initiative is generating. It’s also exciting to see other projects offer a bootstrap style/theme. This can only help inter-op and component compatibility, marking life easier for all JSF developers. This post is meant to help those looking to build a custom application using the RichFaces Bootstrap components.
Along with the new approach we are taking in the development of these new components, the RichFaces project is incorporating a new LESS based approach to style/themes. With LESS we can take advantage of dynamic features such as variables, mixins, operations and functions. However, this requires us to make some changes to how we serve resources and is still in active development as we work through various prototypes in the RichFaces Sandbox.
The RichFaces Bootstrap Quickstart
We’ve added a RichFaces Bootstrap Quickstart project that you can use to build an application to test-drive these new components. This quickstart application has the sole intention of being a starting point, and is much simpler to grok than the demo application we’ve been providing that is more of a component showcase. As an added bonus, creating this quickstart served as a good driver to simplify the RichFaces bootstrap-ui project, making it easier to consume. Simplicity for-the-win!
Rest assured the complexity of this approach will ultimately disappear and usage of these components will become transparent as we move out of the prototyping stage and include these components in “RichFaces proper”.
A walk-through the Quickstart
The RichFaces Bootstrap quickstart is a maven project available on github in the RichFaces Sandbox repository. It includes the appropriate configuration in the web.xml deployment descriptor that, when coupled with a resource mapping file, allows us to activate the client-side LESS styling of the RichFaces Bootstrap components.
If you are not interested in working with the client-side LESS styling, but rather the CSS compiled at build time, then simply build the quickstart project as is:
mvn clean install
However, should you wish to work with the LESS approach to styling, change the
org.richfaces.clientSideStyle context-param in the web.xml to
<!-- Note this will be overridden by PROJECT_STAGE = Production -->
You can then include your own
.less files and they will be converted to CSS on the client-side with the provided less.js library. You will then want to convert your LESS files to CSS (at build time) when you go to production, but that will be the topic of another blog (or look at how we’ve done it with wro4j in the bootstrap-ui project).
We’re planning on pushing heavily on LESS/JSF integration in the coming few months, looking to simplify the process, and enable you to take advantage of the many LESS/Bootstrap themes available and apply them to your application. We’ll keep the “README” of the quickstart up-to-date with any changes required to consume the components in your own projects.
Disclaimer: RichFaces Bootstrap is a Sandbox project, and not yet meant for production use. API’s and component implementations will change.
Wednesday, October 10, 2012
I am happy to announce that the first candidate release of RichFaces 4.2.3 (4.2.3.CR1) is now available. This is purely a bug-fix release, with a focus on compatibility between RichFaces and the JBoss Portlet Bridge.
To try out this release:
You can download the distribution directly
, or for maven users, increment the RichFaces version in your pom.xml to 4.2.3.CR1. For more information on setting up a RichFaces 4 application, refer to our getting started guide
Portlet Bridge Fixes
RichFaces aims to be a container agnostic project, working in Servlet containers, Java EE implementations, and Portals, all from multiple vendors. Of course keeping up with bugs and fixes across all these deployment environments is a lot of work, so we naturally tend to focus our efforts on certain specific environments. As such, nothing makes us happier then receiving github pull requests addressing compatibility issues between RichFaces and one of these deployment containers.
This is precisely what Ken Finnigan of the Portal Bridge team has done, identifying and resolving a number of issues with RichFaces when running in a Portlet environment. Unfortunately a number of servlet specific references leaked through in some of our implementations, but Ken has done an excellent job rounding these up, and replacing them with the appropriate JSF abstraction, ensuring RichFaces components work equally well in servlet and portlet environments. Great job Ken!
I’d also like to call out , Bernard Labno, Christian Kaltepoth, and Luca Nardelli for the bugs they fixed and submitted as github pull requests. RichFaces is a very much a community project, and it’s in part contributions like these that keep the project healthy and moving forward. Thanks guys — and keep those pull requests coming!
Specific issues resolved with this release include:
- [RF-10758] – Input fields in popupPanel lose focus
- [RF-10980] – Impossible to set tabindex of input inside rich:popupPanel
- [RF-11051] – a4j.version does not work
- [RF-11104] – rich:inputNumberSlider slider position is affected by css position attribute of containing element
- [RF-12113] – rich:inputNumberSpinner minValue and maxValue being ignored after second request
- [RF-12114] – Richfaces 4.2 rich:autocomplete don't fire ajax on blur event
- [RF-12221] – rich:orderingList: fix VDL-DOC of @listHeight, @maxListHeight, @minListHeight, @listWidth
- [RF-12256] – DragAndDrop + position: absolute results in broken positioning
- [RF-12273] – rich:fileUpload does not work in portlets because it does not utilize javax.faces.encodedURL for the XmlHttpRequest URL
- [RF-12424] – Showcase contains Servlet specific code
- [RF-12425] – Showcase fails to load SyntaxHighlighter scripts when Require.js is present
- [RF-12476] – Resource Name in mapping for two menu images is incorrect
- [RF-12343] – Problem when saving form with rich picklist inside composite component
Be sure to take this candidate release for a spin, and report back any regressions. We are expecting the 4.2.3.Final release to simply be a re-tag of the CR1 release, barring any unforeseen blockers.
In the mean time we are hard at work on our the 4.3 release train, and are working on having a 4.3.0.M2 release available hot-on-the-heels of this 4.2.3 release.
Tuesday, August 7, 2012
The first milestone release of RichFaces 4.3 (4.3.0.M1) is now available. This is a significant release, with primary focus on improving the RichFaces Component Development Kit (CDK) – the tool we use to author our JSF components. A second goal of the release was to improve our MyFaces support, which we accomplished by fixing a number of issues, and identifying some further issues to be addressed in a subsequent 4.3 milestone release.
To try out this release:
You can download the distribution directly
, or for maven users, increment the RichFaces version in your pom.xml to 184.108.40.20620802-M1. For more information on setting up a RichFaces 4 application, refer to our getting started guide
RichFaces Component Development Kit (CDK) is a heavy-lifter in the RichFaces Framework. The CDK is the tool we use to author our JSF components. Improvements we make to the CDK improve our ability to deliver components, and will reduce our turnaround on delivering new features for developing web applications.
RichFaces developer Paul Dijou has written up a great summary of the recent CDK improvements. For further details on what has changed, you can refer to the list of individual issues addressed. While the bulk of CDK changes have landed in M1, we will undoubtedly introduce further improvements throughout the rest of the 4.3 release cycle as we push the boundaries on what’s possible with the CDK in our RichFaces Bootstrap sandbox project.
Testing of our components and framework has always been a primary concern of the RichFaces project. All our releases to date have been tested not only with unit tests, but also with a large battery of significant number of functional tests. However, functional tests treat the JSF servlet as a black box – we know what we put it and we can test what comes out. On the other hand, unit tests mock the environment where our implementation runs, hiding any issues that would occur only in a real environment. If you think about it, these tests operate in a blind-folded manner: what’s happening as the container executes our application logic?
To this end, the RichFaces project has co-ordinated with the Arquillian project in the development of a new extension: “Arquillian Warp”. With Warp, we can write tests that assert state simultaneously on both the client and the server. For JSF, this means our tests can assert state at arbitrary points throughout the JSF lifecycle. As you can imagine, this opens up a whole new category of tests we can write, as we can not only assert that our application logic has the desired effect, but also that it executes as we expect.
Warp reuses outstanding Arquillian integration with various containers, which allows us to test the integration of RichFaces with many application servers and servlet containers. Furthermore, Warp leverages the Arquillian Drone extension for running Selenium-based tests. Arquillian’s flexibility together with Drone’s ability to drive both real and mocked browsers (ie. HtmlUnit), allows us to run tests using minimal resources in continuous integration, and we can run those same tests in “real” environments to verify integration with many real containers.
Our integration tests makes heavy use of ShrinkWrap to create micro-deployments allowing us to separate the project into small testable pieces. ShrinkWrap Resolvers provides support for resolving various modules from our multi-module project, while ShrinkWrap Descriptors allows us to programatically describe configuration files (like faces-config.xml and web.xml), property files, and Facelet files – which enable us to write tests once and run them in many different configurations.
So far we’ve used this new capability within the framework to harden our RichFaces Push and Resource Mapping implementation, and we will continue to develop new cross-container integration tests of our components and frameworks to complement our already impressive test suite.
This milestone release addresses a number of bugs as well as new features. For a full list of issues addressed, be sure to check out the Release Notes. However, there are a couple of issues I would like to call out in this blog.
The rich:jQuery function in EL to call a jQuery object from a JSF id as in:
This is a convenience method introduced as a short-hand for the current:
The RichFaces a4j:push feature now has a max inactive timeout, that specifies the maximum amount of time a session is allowed to be inactive. This is an experimental feature, put in place as a workaround while we resolve the underlying issue RF-12219. Try it out, let us know what you think!
The RichFaces project is very much an open source project, and leverages other open source projects wherever possible. In this milestone release, we updated the version dependency of some of our upstream projects. These include:
- RF-12176 – Upgrade to Atmosphere 1.0.0.beta4
- RF-12334 – Upgrade Mojarra to 2.1.7
- RF-12335 – Upgrade MyFaces to 2.1.8
- RF-12336 – Upgrade jQuery to 1.7.2
- RF-12371 – Upgrade Maven project dependency to 3.0.4
With this release, we’ve also turned our attention to a number of MyFaces issues that we hadn’t addressed with our recent releases. In order to co-ordinate with the JBoss EAP 6 release, we focused predominantly on Mojarra compatibility. However RichFaces is a container agnostic project, and we’re making a concerted effort to improve our MyFaces compatibility with our 4.3 release.
This effort is being facilitated both by the Arquillian Warp project mentioned above, as well as by the TomEE project. TomEE gives us an excellent pre-bundled/pre-configured Tomcat and MyFaces environment against which we can both develop and debug our components – without requiring us to assemble the required jars, and “roll our own appserver”.
As with our CDK improvements, fixing MyFaces issues will continue throughout the 4.3 release. M1 is just a first step in this direction.
In a recent RichFaces community meeting, we set some goals for the M2 release of RichFaces 4.3. These goals include:
- Restructure the build (according to the requirements being collected in our wiki)
- Proceed with further MyFaces fixes
- Iteration/repeating issues
- Critical/Popular bugs
Also, be sure to follow the RichFaces Bootstrap project:
In the RichFaces Bootstrap
Sandbox project, we are developing our next-generation component set based on top of the Twitter bootstrap
project. RichFaces developer Paul Dijou has an excellent write-up on the latest bootstrap updates
. Also, check out JSF+LESS blog
by RichFaces developer Lukas Fryc
, showcasing the real-time CSS
development going on in our Bootstrap project – JSF
component styling at it’s best!
Friday, July 13, 2012
RichFaces represented at the 2012 JAX conference in San Francisco this week. I presented three times on two JSF topics. The conference was overall a great success in my opinion – while not the most highly attended conference at which I’ve presented, those that attended were highly engaged and happy to have such direct access to the speakers.
Indeed this was one of my preferred aspects to JAX conf. One couldn’t help but be impressed with the calibre of speakers that flocked to the JAX brand for their 2nd annual North American conference. Unfortunately I missed the speaker summit over the weekend, but there was no shortage of conversation during the famous “hallway track”. Events like JAX are great catalysts, bringing communities together to foster fantastic innovation! It’s surely just a matter of time until the US and Canadian java developers catch on – next year’s conference will be an even bigger success, I’m sure!
My first presentation on Mobile JSF + RichFaces was quite similar to the mobile RichFaces talk I presented earlier this month at JBoss World. The session begins with my proposal that the mobile web is important and unavoidable in today’s market. I then demonstrate how one can build mobile web applications using “vanilla JSF”, then we look at the value-add of introducing RichFaces to simplify the process of building mobile web applications with JSF. Feel free to dig into the slides.
My second talk on JSF components took a similar approach. We begin at looking how we can quickly, rapidly, and easily build custom JSF components leveraging existing jQuery plugins. We then finish by looking at how building similar components with the RichFaces CDK gives us greater expressivity, and an effective workaround for some known JSF 2 composite components bugs. I had the pleasure of giving this talk twice at the conference: the first time in an abbreviated form at a JAX community evening event, and again a 2nd time the following day to the JAX conf attendees, this time diving further into the details. Check out the slides here.
Overall I have to say this is one of my favourite conferences both to attend and at which to present. The folks who run JAX definitely know how to put a conference together, and I look forward to speaking again at any future events!
Monday, July 2, 2012
I just returned from an excellent trip to the Red Hat Summit/JBoss World in Boston. The event was fantastic, kicking off with a great keynote demoing Drools in a Mobile scenario. Following the keynote were a number of great sessions, including one I presented on the topic of Mobile RichFaces Applications.
The session was well received, with some good discussion afterwards. In the session I motivated mobile web applications as a must-have in today’s market – users’ will want and expect a functional web application even if your native application is better. I then demonstrated how JSF w/ RichFaces can be an effective means for providing mobile web applications, particularly if it’s a technology stack in which you are already invested. Feel free to check out my slides (be sure to use the space key to advance through the pages). I’m looking forward to seeing the mobile applications people will do with these tools, particularly once we get our mobile slidfast components out the door.
After my session on RichFaces mobile, we re-convened for a mobile BOF with some of the other mobile related projects at JBoss (Aerogear, Errai, and the Demo app Ticket Monster). Here the discussion got very lively with a number of personalities both on the panel and in the audience getting their opinions out. It’s always great to hear user/customer feedback on our projects, with people oftentimes using the tools we provide in use cases we never envisioned.
Aside from the sessions, BOFs, and the invaluable “hallway track” there were plenty of other things to do in the great city of Boston. I managed to catch a game at Fenway park: the Red Sox vs. the Blue Jays – sadly my fellow Canadians weren’t able to pull through with a win. We also got to visit the park again two days later in a conference event. This time we had a free-run over the park and I got my picture taken swinging over home plate!
Thanks to all my team mates and our fantastic user community who made the event a success – I look forward to seeing you again next year!
Wednesday, June 6, 2012
For those of you still developing against RichFaces 3 (you should strongly consider migrating to RichFaces 4!) we have deployed the RichFaces 3 showcase (also referred to as the RichFaces 3 “demo”) to OpenShift, Red Hat’s PaaS offering. This is the same cloud environment we use to host the RichFaces 4 showcase.
This deployment of the RichFaces 3 showcase not only ensures that this useful and valuable resource will continue to be available to you, the developer community, but also serves to demonstrate how you can take advantage of OpenShift and the latest JBoss AS 7 releases to host your Richfaces 3/4 applications! Leverage the scalability of cloud computing today!
Tuesday, May 15, 2012
RichFaces 4.2.2.Final is available, the second RichFaces 4.2 micro release. This release was originally intended to focus on changes required to better align with the upcoming JBoss AS 7.1.2 release. However we had some community members step forward with some fixes, and those contributions ended up turning this release into a reasonable bug fix release!
I would like to give a big shout out to Luca Nardelli, Adrian Gonzalez, and Jason Porter. These are RichFaces users who contributed back to the project with bug fixes and new features; improving the quality of the JSF component framework we all use to build applications on a daily basis. Three cheers for OSS, and our community contributors! If you would also like to get involved and contribute code to the project, check out our ContributorGettingStartedGuide wiki page!
To try out this release, you can download the distribution directly, or for maven users, increment the RichFaces version in your pom.xml to 4.2.2.Final. For more information on setting up a RichFaces 4 application, refer to our getting started guide.
What’s new with 4.2.2.Final?
- [RF-10839] – tooltip: attachment using target not works if tooltip defined before the component to which it attaches.
- [RF-11370] – rich:toolTip: targetted example causes NPE for some IDs
- [RF-12198] – rich:tooltip does not work inside a4j:commandButton
- [RF-12199] – rich:tooltip does not work inside h:graphicImage
For those migrating from RichFaces 3, Adrian has contributed improvements to the Xcss2Ecss conversion utility:
- [RF-11994] – Xcss2EcssConverter error handling f:importResource
- [RF-12010] – ecss hot reloading
A number of other fixes are seen with:
- rich:dataTable and rich:extendedDataTable
- validation and messages
- dependency updates, matching changes in the upcoming JBoss AS 7.1.2 release
We’ll shortly begin our 4.3.0.M1 sprint which will focus on MyFaces compatibility issues and some CDK improvements in this first milestone. Concurrent to this, we will be working in the RichFaces Sandbox to deliver our next-generation component set. Should any of the above initiatives appeal to you, feel free to get involved, and help move the project forward!
Friday, May 4, 2012
I’m happy to share the news that the RichFaces community has started an effort to wrap Twitter Bootstrap with the RichFaces CDK. If you haven’t yet heard, Twitter’s Bootstrap project is a set of HTML/CSS/js “widgets” that you can use for building a website/web application with an emphasis on a fluid layouts that adapt well to mobile devices. The RichFaces community effort centres around providing a set of first-class JSF components built using these Bootstrap widgets via the RichFaces CDK.
This is still early days for the effort, consider what we have so far as a Proof of Concept. The work is being done in the RichFaces Sandbox, where new ideas/components are explored and proven before migrating in the the framework core. We’ll explore how to bring these Bootstrap components into the framework proper when the effort is complete. The reason for this blog post is to let people know what the community is doing and invite people to get involved!
Take a look at the RichFaces bootstrap demo to see what the components look like. Keep in mind we used the RichFaces bootstrap JSF components to build the demo itself, (a dogfood demo if you will!). So far we’ve stubbed out a number of bootstrap components with the CDK, and we have a bootstrap “enabled” commandButton component (build on top of the robust a4j:commandButton).
Some example bootstrap components that I particularly like are:
The buttonDropdown can be used to provide alternate actions for a button on your page:
The bootstrap grid components (gridContainer/gridRow/gridColumn) provide a powerful means to layout your page. Being proper JSF components, they are also valid JSF execute/render targets.
I’ll blog more about the individual components as they get fleshed out. There’s a ton of blog material here!
RichFaces Bootstrap Roadmap
Our roadmap for these bootstrap components moving forward involves:
- RFSBOX-7 Finish wrapping the remaining bootstrap components
- RFSBOX-8 Flesh out the attributes of the already wrapped components
- RFSBOX-9 Couple the widget events into the RichFaces/JSF event subsytem (eg. for enabling JSF behaviours)
- Migrate/wrap (or re-implement if required) the existing RF 4 components
The task is big, and we could use your commits! So if you are interested in either RichFaces, Bootstrap, or both – be sure to drop by #richfaces on IRC (freenode.net) to discuss how you can get involved and influence how these components will shape up!
Concurrent to the work we do in our sandbox, we are still very much focused on improving the current set of RichFaces 4 components. We have another 4.2 micro release coming out soon, and are planning the Milestone releases for the 4.3 release train.
Lastly, I’d like to close with a big shoutout to Paul Dijou, a Richfaces community member who has been instrumental in getting this effort off the ground! Thanks Paul, and keep those pull request coming!
Tuesday, April 17, 2012
We’ve released RichFaces 4.2.1.Final – the first micro release for the 4.2 release train. Since the CR1 release we’ve primarily addressed bugs with the Richfaces showcase and the RichFaces archetypes. CR1 itself focused on bug fixes and stability improvements throughout the framework.
To try out this release, you can download the distribution directly, or for maven users, increment the RichFaces version in your pom.xml to 4.2.1.Final. For more information on setting up a RichFaces 4 application, refer to our getting started guide.
What’s in 4.2.1.Final?
One noteworthy issue to take note of:
- [RF-11940] – Our ajax push component (a4j:push) was not receiving pushes from the server on Android devices. We identified a bug in the Atmosphere framework which powers our push technology, a bug which we fixed and pushed back upstream (OSS for the win!).
Be sure to check out the 4.2.1.CR1 release blog for a more complete picture of what we addressed with this micro release.
New with this release, we are once again deploying the showcase on new infrastructure. The OpenShift Express service has been unified with OpenShift Flex to deliver a single service now simply referred to as OpenShift (see this FAQ entry). The end result for us is a simplified deployment and management console, and an easier ability to host multiple applications.
We’re currently focused on improving the JSF testing and RichFaces mobile stories. However we’ll shortly begin our 4.3.0.M1 sprint which will focus on MyFaces compatibility issues. Concurrent to all this, we will working in the RichFaces Sandbox to deliver our next-generation component set. Should any of the above initiatives appeal to you, feel free to get involved and help move the project forward!
Wednesday, April 4, 2012
We’ve released RichFaces 4.2.1.CR1 – the first candidate release for the first 4.2 micro release. This release comes with initial support for rapid component development with the CDK and jRebel, and a new archetype demonstrating (among other things) a mobile RichFaces application,. For the most part however, this release focuses on bug-fixes and stability of the components and framework.
To try out this release, you can download the distribution directly, or for maven users, increment the RichFaces version in your pom.xml to 4.2.1.CR1. For more information on setting up a RichFaces 4 application, refer to our getting started guide.
Since the 4.2.0.Final release, we’ve included a new sample application: the RichFaces kitchensink quickstart (also available as an archetype). This is example application demonstrates key pieces of the Java EE stack, with a JSF/RichFaces frontend. We have it currently deployed to openshift if you want to see it in action. Be sure to check out this example with your mobile phone, to see the kind of mobile application you can build with RichFaces (complete with client side validation, and ajax push!)
Rapid component Development
Another new initiative that made its way into this release is the work we’ve been doing to support rapid component development with the CDK and jRebel. We’ve included the necessary jRebel configuration in our component projects (RF-12090) to enable jRebel to hot reload the classes generated by the CDK. See Lukas’ blog post for details on how you can get this working seamlessly within eclipse with JBoss tools.
Highlighted release notes
Specific components addressed include the rich:extendedDataTable, rich:contextMenu, and a4j:push:
- [RF-10754] – extendedDataTable: two or more components placed on the page causes horizontal scroll to disappear
- [RF-12013] – Deadlock in push component
- [RF-12072] – Push: add onsubscribed event
- [RF-11936] – rich:contextMenu activation is possible outside of tree nodes
- [RF-11971] – rich:menuItem onclick return value ignored
- [RF-12042] – Metamer: rich:contextMenu doesn’t disappear after clicking out of the menu in IE9 and Google Chrome
- [RF-12043] – rich:contextMenu isn’t rendered correctly in IE 9 compatibility mode
- [RF-11996] – rich:contextMenu on several rows in extendedDataTable
Overall, areas such as event handling, validation, messages, and browser compatibility were addressed:
- [RF-10941] – a4j:command* components misses default behavior event
- [RF-12091] – rich:dataScroller scrollListener not documented
- [RF-10968] – Tree: treeSelectionChangeListener and treeToggleListener do not work
- [RF-12007] – AbstractPanelMenuGroup.getChangeExpandListener is not used
- [RF-7351] – Regression: “messages: globalOnly does not work properly”
- [RF-11978] – Graph Validator – does not mark context to fail validation
- Browser compatibility
- [RF-11884] – Multiple Errors with IE8/9
The RichFaces showcase saw some improvements, including some mobile specific fixes:
- [RF-11872] – Mobile Showcase and a4j:region demo: submit button doesn’t respond on the first click
- [RF-11905] – shutdown of the JBoss AS with showcase deployed throws DB error
- [RF-12048] – Showcase: Change the password for JMS guest connection
- [RF-12051] – Showcase: simplified Push CDI sample which wouldn’t use subtopics
Lastly, a few fixes I couldn’t fit into any of the above categories:
- Miscellaneous fixes
- [RF-11977] – Multiple fileUpload controls on the same page do not work
- [RF-12093] – ResourceServlet can’t handle resources outside of specific libraries
- [RF-12052] – rich:TabPanel – HTML comments should be supported inside the tabPanel
Our crack-QE team has uncovered some regression in the CR1 release with their extensive test suite. We’ll address these issues with the 4.2.1.Final release, but be sure to give the CR1 release a spin to check for any issues we may have overlooked. Of course, concurrent to this micro release, we’re hard at work on some brand new stuff for RichFaces 4.3 (see the relevant planning discussion for details).