Shay Shmeltzer's Oracle Development Tools Tips

  • March 30, 2010

Working with Backing Beans in JDeveloper - The Right Way

Shay Shmeltzer
Director of Product Management - Oracle

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:

Join the discussion

Comments ( 14 )
  • orlando Kelly Tuesday, March 30, 2010
    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?
  • shay.shmeltzer Tuesday, March 30, 2010
    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
  • Ollyando Wednesday, March 31, 2010
    Thanks Shay,
    I tried to access that link but I cannot, is it an internal oracle link?
  • shay.shmeltzer Wednesday, March 31, 2010
    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
  • Daniel Thursday, April 1, 2010
    Thanks Shay, please share more video tips !
  • Steverar Saturday, April 10, 2010
    Could you upload the video to the oracle area on youtube for viewing on an iPad?
  • shay.shmeltzer Tuesday, April 13, 2010
    This is an interesting option - I won't be able to move existing videos - but might consider this for upcoming ones.
  • Nitin Monday, April 26, 2010
    Nice Video. Its good to have actual video than tons of document.
    Picture is worth 1000 words!
  • Orlando Kelly Ollyando Wednesday, April 28, 2010
    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
  • John Wednesday, April 27, 2011
    Very helpful. Thank you so much
  • guest Wednesday, July 27, 2011

    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?

  • Shay Monday, August 1, 2011

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

  • guest Monday, November 12, 2012

    Where's the video?

  • shay Monday, November 12, 2012

    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

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.