RichFaces rich:isUserInRole function

I blogged earlier about four built-in RichFaces functions that come in very handy, especially the rich:component(id) one. Many rich components (from rich;* tag library) provide client-side JavaScript API. To access this API, you need to use rich:component(id) and add the JavaScript method name, such as: #{rich:component(‘id’)}.someMethod(). For example, go to rich:listShuttle component in RichFaces Developers Guide and scroll to ReferenceData/JavaScript API section. That’s the JavaScript API you can call on this component.

There is one more, less known function available in RichFaces. It’s called rich:isUserInRole(role). It lets you define security roles in web.xml file and then use the role on a page. For example, suppose only the administrator should see some part of a page:

<rich:panel header="Admin panel" rendered="#{rich:isUserInRole('admin')}">
  Very sensitive information
</rich:panel>
 
<rich:panel header="User panel">
   General information
</rich:panel>

In the above example, unless you were authenticated as ‘amdin’, you will not see the top panel. Of course you need the security role in web.xml file. It’s a nice and handy feature to have available.

Webinar recording: Add BIRT Re­porting to JSF Ap­pli­ca­tions Using RichFaces

Add BIRT Reporting to JSF Applications using RichFaces recording is available here. You can also download the complete application I showed during the webinar here.

RichFaces 4, JSF 2

Last week I attended, presented and taught 1-day workshop at JSFdays conference in Vienna, Austria. The conference was great and I’m already looking forward to next year. What’s amazing, virtually everyone I spoke with was using or planning to use RichFaces. One of the most frequent questions I was asked is when RichFaces 4 will be available? Although, I’m not in position to confirm this, it’s safe to guess that 4.0 GA will be available sometime in mid-summer. The RichFaces team has been working on JSF 2 support in RichFaces for some time now. First, there is RichFaces 4 Alpha 1. The team is now working on Alpha 2 which is also going to be the last Alpha release. Second, there is now RichFaces 3.3.3 CR1 also with basic JSF 2 support (read more about this version here).

As you probably know, JSF 2 Ajax support is greatly inspired by RichFaces 3.x and more specifically the a4j:support tag. RichFaces 4 is not going to stop here, it’s going to add advanced features from version 3.x plus some new features on top of standard JSF 2 Ajax support. Here is RichFaces 4 road map by Jay Balunas which also contains a list of new and improved features in RichFaces 4.

RichFaces in the cloud

Learn how to run RichFaces applications in the cloud.

RichFaces 3.3.3 RC1 and JSF 2

RichFaces team has been working hard and this week they released RichFaces version 3.3.3 RC1 which works with JSF 2. This version doesn’t support the full JSF 2 API. This version was made available for two reasons: 1) make 3.3.x branch very stable, 2) make it easier for companies to migrate to JSF 2. You don’t need to wait for RichFaces 4 which will have full JSF 2 support. If you are migrating to an application server which has JSF 2, you can take your existing RichFaces application and run it there.

Make sure to read this post by Jay and this wiki page on how to setup and limitations. One cool feature you can use from JSF 2 is managed beans annotations, but do read the wiki page before starting.

If you are going to be using JSF 1.2 for a while and just need a very stable RichFaces release, then just download version 3.3.3 and use it in exactly the same way.

I’m pretty sure work will now accelerate on RichFaces 4 (get alpha version here) which will fully support JSF 2.

RichFaces workshop during JSFdays 2010, Vienna, Austria

Next week (Thursday, Feb 25th) I will be teaching 1-day RichFaces workshop on the last day of JSFDays conference in Vienna, Austria. If you are new to RichFaces, this is an excellent opportunity to learn everything you need in just 1 day. RichFaces is very simple, yet powerful and flexible if you just know a few basics (1. sending an Ajax request, 2. partial tree processing, 3. partial page update, 4. using queues, 5. using component JS API).

I’ve been teaching RichFaces for over 4 years and I always tell my students, you really just need to be familiar with a few core concepts. That’s it, everything else is based on these concepts. Now, if you have been using RichFaces for some time, you will greatly benefit from the workshop as well. You will learn new features and concepts that you might not know existed. You don’t know how many times I heard form students that used RichFaces previously: “we didn’t know we can do that, now it makes sense, it’s so easy”.

All the core concepts are carried to using rich: tags as well. We will cover a few extra features such as using built-in RichFaces functions, component JavaScript API and facets. Again, once you know the basics, you can use any component in RichFaces. We will then cover using and customising skins. We will finish with RichFaces 4 and what features it adds on top of JSF 2 and specifically Ajax features.

You can review the outline for the workshop here. There is still time to register!

I’m also doing a general session on RichFaces on Tuesday, Feb 23rd. Exadel is a sponsor and we are going to have a table at the conference so stop by and say hello.

JSF, RichFaces, CDI, JBoss Tools workshop in Minsk, Belarus

Several members of the RichFaces and JBoss Tools teams will be presenting at the Modern Java Technologies Workshop in Minsk, Belarus. From the RichFaces team Nick Belaevski and Ilya Shaikovsky will be discussing Java Server Faces 2.0, and then two topics on RichFaces 3.3.X and 4.0.X.

More information (more information in Russian).

To register, send an email to conference@exadel.com

Got a copy of JSF 1.2 Components book by Ian Harvatis

Today I got a copy of JSF 1.2 Components book (PACKT Publishing) by Ian Hlavats. I’m going to read and write a review for the book on my blog. The book covers various JSF components including RichFaces, MyFaces, IceFaces, Seam, and standard JSF. Read more about the book here.

You can also download a free Facelets Components chapter.

Webinar: Learn how to add BIRT Reporting to JSF Applications with RichFaces

Exadel and Actuate are doing a webinar on how to add BIRT reporting to JSF application with RichFaces. Virgil Dodson, Developer Evangelist (Actuate) and myself will be presenting during the webinar.

Register here

Abstract:
In this technical session, you will be introduced to the popular open source Eclipse BIRT technology and learn how to easily add reporting and data visualizations to JSF web applications. You will find out about the capabilities of the BIRT designer and run-time engine and how to easily create tables, graphs, and charts using a drag-and-drop design paradigm.

You will then learn about the popular RichFaces JSF component library, the new integration available with BIRT, and see a demonstration on how to seamlessly add BIRT reports to JSF applications. Attendees will learn:

· About using the BIRT designer
· How to add rich data visualizations and reports based on BIRT into JSF applications
· How to wrap a BIRT report as a JSF component
· Techniques to pass parameters for more dynamic and filtered reports
· How to make page updates fast, using RichFaces’ AJAX capabilities

Register for the webinar here.

Presenting and teaching at JSFdays 2010, Vienna

I’m presenting and teaching at the JSFdays 2010 conference in Vienna, Austria February 23-25th, 2010. The conference is being held for the 3rd year and is a great place to learn about JSF and everything that’s happening around JSF.

I’m presenting a session on RichFaces on Wednesday, February 23rd. The session will cover RichFaces 3.x as well as new RichFaces 4 based on JSF 2. On the last day (February 25th), I’m teaching a full day RichFaces workshop. If you are new to RichFaces, this would be a great opportunity to learn everything you need to know in just one day. We will cover all the core concepts, features and tags. If you are already using RichFaces, this workshop will fill in many gaps in your knowledge, and you will also be introduced to concepts and features you might never known existed. On Thursday, February 24th, I’m participating in a Rich Internet Applications forum.

Outline for RichFaces workshop

  1. RichFaces core concepts
    1. Sending an Ajax request
    2. Partial view rendering
    3. Partial view processing
    4. View scope
    5. Using queues to control traffic
    6. More a4j:tags (a4j:repeat, a4j:status, a4j:actionparam, a4j:log and more)
  2. rich: tags
    1. Inputs, in-place edit
    2. Selects
    3. Validation
    4. Data iteration
    5. Menus
    6. Other
    7. RichFaces functions
  3. Skins
    1. Using out-of-the-box skins
    2. Creating custom skins
    3. Loading different skins in runtime
    4. Overwriting styles generated by skins
  4. RichFaces 4.0 and JSF 2 integration

Next Page »