Working with Backing Beans in JDeveloper - The Right Way

One nice feature that was in JDeveloper for a long time is the ability to automatically expose every component on your JSF page in a backing bean. While this is a nice "work saving" feature, you shouldn't be using this one in most cases.
The reason is that it will create objects in your backing bean code for a lot of items you don't actually need to manipulate, making your code bigger and more complex to maintain.

The right way of working is to expose only components you need in your backing bean - and JDeveloper makes this just as easy through the binding property in the property inspector and the edit option it has.

Here is a quick video showing you how to do that:

Comments:

Can you use this method to create one backing bean to access objects of different pages, or should each page have it's own backing bean?

Posted by orlando Kelly on March 30, 2010 at 03:34 AM PDT #

While you could do it, you'll need to change the scope of your managed bean so it will be available for both pages. A better approach with ADF is to use the pageFlowScope to pass information between pages. see: http://fmwdocs.us.oracle.com/doclibs/fmw/E10285_01/web.1111/b31973/af_lifecycle.htm#BABIHDAA

Posted by shay.shmeltzer on March 30, 2010 at 03:39 AM PDT #

Thanks Shay, I tried to access that link but I cannot, is it an internal oracle link?

Posted by Ollyando on March 31, 2010 at 02:52 AM PDT #

oops - wrong URL, should be: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_lifecycle.htm#BABIHDAA - the ADF Web Developer Guide

Posted by shay.shmeltzer on March 31, 2010 at 04:07 AM PDT #

Thanks Shay, please share more video tips !

Posted by Daniel on March 31, 2010 at 10:09 PM PDT #

Could you upload the video to the oracle area on youtube for viewing on an iPad?

Posted by Steverar on April 10, 2010 at 11:55 AM PDT #

This is an interesting option - I won't be able to move existing videos - but might consider this for upcoming ones.

Posted by shay.shmeltzer on April 13, 2010 at 08:51 AM PDT #

Nice Video. Its good to have actual video than tons of document. Picture is worth 1000 words!

Posted by Nitin on April 26, 2010 at 04:34 AM PDT #

Yes definitely agree with Nitin on short video tutorials rather than documentation or actually in addition to the documentation. The Fusion and Web Developers guide are great, much better than previous attempts at documentation, but video adds so much more. It would be good if in a future release of jdev, as well as cue cards you could search for something and have a small tutorial video showing you how to do it, inside the tool. That would increase productivity 10x

Posted by Orlando Kelly Ollyando on April 28, 2010 at 04:31 AM PDT #

Very helpful. Thank you so much

Posted by John on April 27, 2011 at 03:41 AM PDT #

Great video. Thanks. I dont see the binding property for the input text on Jdev 11.1.2. Any way to expose the input text to the button logic?

Posted by guest on July 27, 2011 at 04:48 AM PDT #

guest - I can see the binding property for inputText in 11.1.2 - it's under the advanced section of the property inspector.

Posted by Shay on August 01, 2011 at 04:37 AM PDT #

Where's the video?

Posted by guest on November 12, 2012 at 05:31 AM PST #

guest - if you can't see the embedded video in the post then see it directly on my channel on youtube - http://www.youtube.com/watch?v=-3df6980Yf0

Posted by shay on November 12, 2012 at 07:31 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today