//AMIS Technology Blog » javaserver faces

Posts tagged javaserver faces

image.png

Develop and Deploy ADF applications – free of charge using the new ADF Essentials

1

In a long hoped for but little anticipated move, Oracle yesterday announced ADF Essentials – the free edition of the ADF framework. Oracle now offers a complete free stack to develop and deploy applications – with Oracle Database XE, GlassFish Open Source Edition and ADF Essentials, optionally running on Oracle Enterprise Linux. It’s a red LAMP if you will.

ADF Essentials is exactly the same as ADF – it is just a subset of ADF. Even some of the highly advanced features in ADF are included in ADF Essentials – such as Data Visualization (DVT), Business Components (ADF BC), Data Binding and Taskflows. The parts not included in ADF Essentials are by and large more for specific use cases – ADF Mobile, Desktop Integration, Customization – or targeted at integration with other components in the Oracle Fusion Middleware stack – such as Data Controls for Essbase, BI and BAM.

Some of the features of ADF that are not available with Essentials that are unfortunate to let go off: ADF Security (!), publication of ADF BC as Web Service, the Web Service Data Control and remote taskflows. However, for most of these features, alternative solutions can be created or are already available – such as More >

Vacatures bij AMIS services

Using custom functions in EL expressions in JSF 1.x

1

EL expressions are one of the main driving forces for JavaServer Faces. Most dynamic characteristics of pages and widgets are governed by EL expressions. In JSF 1.x, there are some limitations for EL expressions that can at times be a little frustrating. One of the limitations is the fact that no custom functions or operators can be used in EL expressions. Quite some time ago, I wrote this article – http://technology.amis.nl/blog/622/how-to-call-methods-from-el-expressions-pre-jsp-20-trick-for-jsps-with-jstl – to demonstrate a trick for using a Map interface implementation to access custom functionality from EL expression after all.

However, things can even be better. Rather than jumping through the somewhat elaborate hoops of implementing the Map and consructing complex EL expressions, there are two other approaches. One is to create a custom EL Resolver can configure it in the faces-config.xml. Another is discussed in this article. It involves registering custom Java methods as eligible for use in EL expressions. And that really makes life a lot easier. It allows us to create EL expressions such as:

#{cel:concat (cel:upper( bean.property), cel:max(bean2.property, More >
SIG Event

Creating a custom JSF 1.2 component – with facets, resource handling, events and listeners, valueExpression and methodExpression attributes

 

I occasionally create custom JavaServer Faces components. Just enough to sort of remember what the steps are, but not nearly frequently enough to quickly put a new component together. This article demonstrates the quick step approach to creating a new custom component in the old fashioned way (that means: it is not a Facelets template based or an ADF Faces 11g Declarative Component). Its primary purpose is to help me quickly retrace my steps. But perhaps it will benefit some of you as well.

The Shuffler component I will develop supports facets. It will render its facet children – one after the other. Which one is rendered first can be indicated through an attribute facetOrder (values normal, reverse and random), which is EL enabled. A shuffler-method-expression can optionally be set to provide the Shuffler with a shuffle-order-processor: the method is invoked with the list of facets to shuffle and will return it in the order in which to render the children.

The component can render with a shuffle icon that when pressed causes the children to be shuffled. The Shuffler component allows registration of Shuffle Event Listeners, custom listeners that are informed whenever the shuffle More >

Vacatures bij AMIS services

EJB Dependency Injection of Session Bean Facade in JSF 1.2 on WebLogic 10.3 (JSF with JPA)

 

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…)

Go to Top