Archive for the 'RIA' Category

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.

JavaFX plug-in for Eclipse version 1.2.2 is now available

With the launch of exadel.org, we also made a new version of JavaFX plug-in available, version 1.2.2. Download the new version here.

In addition to bug fixing, it has the following new features:

  • New JavaFX Script Wizard
  • Outline View with navigation

As we have been promising, the plug-in is now open source (under GPL). You can download the sources, access project Jira and post questions and comments to new forum all from www.exadel.org.

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.

JavaFX as JSF VDL (View Description Language)?

JavaFX is a new scripting language from Sun (I guess now from Oracle) for building Java-based rich user interfaces for the Web, mobile, desktop and even TV. There are plenty of sources on the Internet the predicted or predict the death of JavaFX. Based on what Oracle said few weeks ago, JavaFX has a bright future. We, at Exadel, after playing with JavaFX for some time (see Flamingo, JavaFX Eclipse plug-in) believe that JavaFX is actually a great language to build rich user interfaces, and not only for Java-based applications. JavaFX script can be extended to be used as a view description language (VDL) for JSF or even HTML5.

What does it mean? Well, you no longer have to mix HTML with JSF tags. The entire page is developed from JavaFX nodes (UI components), using JavaFX’s object-oriented nature. Layout it defined via JavaFX layout controls. It will be now be possible (finally) to create real visual and drag-and-drop editor for JSF.

Another very powerful feature in JavaFX is binding. Any changes in the model are automatically updated in the UI, it’s possible to extend the same to JSF. No longer you have to specify what components to render via Ajax, it will be done automatically by the application. More about this feature from Alex Smirnov’s blog.

We already have a first version of JavaFX as JSF VDL (we are still looking for better name, any suggestions?), and here is a quick example. When a button is clicked, the label Hello X is updated with the number of clicks.

var x = 0;
var bindVal = "Hello";
 
function init(){
   FxPage{
      content : [
         FxForm{
                content : [
                    FxOutputLabel{
                        value : bind bindVal
                    },
                    FxCommandButton{
                        value : "Button"
                        actionListener : function() : String{
                            bindVal = "Hello {x++}";
			    return null;
                        }
                    }
                ]
            }
        ]
    }
}

JavaFX script above is processed and a standard JSF UI component tree is created as with Facelets.

For now the model is created inside the JavaFX file, but we are working on allowing to bind to JSF managed beans or CDI beans.

As you can see JavaFX is a very powerful UI language. We will make this library available soon. It works with JSF 2.

You can read more about JavaFX as JSF VDL for Alex Smirnov’s blog.

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

Oracle’s Ellison sees success in Java-based middleware…with my input on JavaFX

Check out Oracle’s Ellison sees success in Java-based middleware article by searchSOA.com. I was asked to provide feedback on Oracle’s plans with JavaFX. It’s pretty cool that my name is mentioned in the same article as Larry Ellison! It’s time for Larry to invite me to lunch.

Next Page »