Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Developing Web Applications with Oracle ADF Essentials

You're reading from   Developing Web Applications with Oracle ADF Essentials Quickly build attractive, user-friendly web applications using Oracle's free ADF Essentials toolkit

Arrow left icon
Product type Paperback
Published in Aug 2013
Publisher Packt
ISBN-13 9781782170686
Length 270 pages
Edition 1st Edition
Arrow right icon
Toc

Adding logic to the user interface


Logic in the user interface is implemented in the form of managed beans. These are Java classes that are registered with the task flow and automatically instantiated by the ADF framework. As you might remember from Chapter 3, Creating Task Flows and Pages, ADF operates with various memory scopes –– you have to decide on a scope when you define a managed bean.

Adding a bean method to a button

The simplest way to add logic to the user interface is to drop a button (af:commandButton) onto a page or page fragment and then double-click on it. This brings up the Bind Action Property dialog as shown in the following screenshot:

If you leave Method Binding selected and click on New, the Create Managed Bean dialog appears as shown in the following screenshot:

In this dialog, you can give your bean a name, provide a class name (typically the same as the bean name), and select a scope. The backingBean scope is a good scope for logic that is only used for one action when...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime