You are here

JSF

Getting a localized string from the resource bundle

When you are working with multilingual applications, you will need to show all messages and labels in the language of the users. Therefore we use resource bundles.
When you define a resource budnle in the faces-config you can access it in any JSPX page but you also want to access it in a managed bean. This snippet shows you how:

Execute binding operation from managed bean

It often happens that you want to execute an operation added in the bindings. This is often the case with business components. You want to commit a transaction, create a new row and so on. All these operations can be added in the opertion bindings.
The snippet below shows you how to execute these operations from a managed bean.

Open an ADF popup from a managed bean

Normally you will use a showPopupBehavior component in a JSPX page to open a popup but sometimes you also want to open a popup from a managed bean.

Execute expression language from managed bean

Sometimes you will need to get a specific value that is only accessible by expression language.
The following snippet will provide you with a generic method that you can use all the time. It takes a single parameter being the expression and it returns an Object. You will have to do the casting as shown in the examples.
In ADF this can also be used to access the object from the binding.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer