Posts tagged jsf
(including all source code left out of the article in IOUG Collaborate 2009 Select Journal)
At the time I’m writing this, Devoxx 2008 is well into it’s second day. Day one was quite interesting, with the major announcement being the release of JavaFX 1.0 last week. Apart from that, IBM presented their RFID technology, which has been incorporated into our access badges. Day two held another major announcement: all of Java will be made modular. That means not only the SDK, but also the JRE and even the JVM. Expected release date of JDK 7: somewhere in 2010… (more…)
Rapid development of Rich JSF Web applications on top of EJB/JPA persistence (JSF on Rails – Demo 1)
Here you will find the first demo from my Devoxx 2008 presentation. It shows how you can rapidly create a rich web application based on Java Server Faces and EJB/JPA persistency using JDeveloper 11g and the ADF 11g framework. The presentation included below shows the steps one by one to create a rich web application. The JDeveloper 11g application can be downloaded as well. The end result looks something like:
it includes such features as: master detail tables with synchronization; column sort; run time column manipulation: resize, reposition and hide/show; popup with detailed context data; data driven, synchronized chart; accordion for better page real estate usage.
As I was preparing for my Devoxx presentation next Monday, I decided to look at the somewhat harder way of integrating a JPA based business tier into a JavaServer Faces web tier. The easy way – when using the ADF 11g framework in JDeveloper 11g is creating a Data Control for the Session Facade Bean. The Web Application can create data bindings for entities, entity collections and operations exposed in the Session Facade Bean that completely hide the injection or lookup details from the web tier developer. It’s the ADF responsibility to find the session bean and manage references to it.
However, if you do not use ADF, you need to establish the link between the Web Application and the JPA Business Service yourself.
The JEE 5 way of achieving this consists of a few simple steps – on top of the JPA entity definitions: (more…)
Context Sensitive Resource Bundle entries in JavaServer Faces applications – going beyond plain language, region & variant locales
We were faced by an interesting challenge: our JSF application should display boilerplate text – titles, button labels, prompt, error messages, tool tips etc, – in a context sensitive way. Not just by language, region and variant – the well known dimensions along which the standard JSF and Java mechanism works with Resource Bundles. Beyond that simple ‘locale’ sensitivity – which we also needed – we need a more specialized context dependency. Along several dimensions.
For example when a user of younger age category approaches the web application, the text presented should be (or at least could be) different from whatever we show our senior users. Also when the application is accessed in the context of a certain brand or company the text may need to be different from other brand or company contexts. And the marketing department came up with the ability to presents some text tailored to the time of year – Winter or Summer, Holiday Season or no Christmas in sight – or the day of the week – working day or weekend. Good old marketing department – if they were to rule the world….
And so we got started. How can we cater for these various context dependencies, along various mutually More >
Just over two years ago I wrote an article on this blog – integrating-adf-faces-and-myfaces-tomahawk-creating-a-popup-with-adf-faces-shuttle-component (supported by Changing the order of columns in a JSF Table Component -in the client, at run-time, by the end user and having-the-end-user-hide-and-display-columns-in-a-jsf-table-component) – on how to implement functionality in ADF 10g applications that allowed the end user to bring up a popup window associated with a table. In this window, she can select the columns to display in the table and determine their other. This means for example that you can define a table with 25 columns, specify only five or so to be displayed when the page is first displayed and have the user select a different set of columns to display. In specific situations this can be very useful functionality – and at the very least it looks cool in demos.
The ADF 10g implementation is not extremely straightforward. It entails using the Apache MyFaces popup component and leveraging the ADF Shuttle Component. Some additional wiring with a managed bean is required. Not too hard, but not very elegant either.
I thought to implement this feature with the ADF 11g More >