Domain Portal

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 16 October 2008

Form Opening in Find Mode

Posted on 12:58 by Unknown
It can be that topic for current blog post looks very basic, however I will describe one simple thing that can make your development life easier. I will explain how to use Method Call in ADF Task Flow in order to open called form in Find mode, without using invokeAction in Page Definition.

How often you develop forms, where one of key requirements is to open form in Find mode. From my experience, it is quite common behavior. However, usually it is not enough just to define invokeAction in Page Definition and execute Find action each time when page is opened (postback == false). For example, form can be opened in Find mode from main menu, but it should be opened in Edit mode, when is called from separate specific form. In such case, JDeveloper/ADF 10.1.3 developer will create parameters and evaluate through expression language in invokeAction. This approach works, however as always there is a better approach.

This better approach is to use ADF Task Flow functionality available in JDeveloper/ADF 11g. In ADF Task Flow its possible to define Method Calls and separate action logic with page logic. Please, read ADF Developer Guide 11g, in order to get more information about ADF Task Flows.

You can download sample application I have developed - FindMethod.zip. This application is based on standard HR schema from Oracle and implements two pages - index.jspx and main.jspx. First page is defined in unbounded ADF Task Flow and calls second page from bounded ADF Task Flow. Second page is opening in Find mode automatically, without invokeAction in Page Definition.

Main logic, related to this post, is in bounded ADF Task Flow task-flow-definition.xml file:


You can see that as default activity is selected Find Method Call. Idea is - when bounded ADF Task Flow will be opened, default Find activity will trigger and will set iterator to Find mode. Sounds simple, however in practice is little bit more complex. If you will just drag and drop Find action from Data Control and define it as a default activity, it will not work - separate Page Definition file for Method Call will be generated, and Find action will be invoked not for iterator available in main.jpx Page Definition file, but for iterator available in Page Definition associated with Method Call - means Form will not be opened in Find mode.

Second idea that can come to your mind is simply to associate Method Call activity with Find action available in main.jspx Page Definition file:


But, this also will not work, exception on runtime - Page Definition not found:


And now, its time to describe a solution. You need to open DataBindings.cpx file and to assign same Page Definition file to Method Call created in ADF Task Flow as is assigned to a page. In our case, there will be two Page Mappings (one is real, second is for Method Call) and one Page Definition Usage:


When assignment will be done, go back to bounded ADF Task Flow and provide Find action for Method Call from Page Definition file associated with a main.jspx page:


Now it looks everything is done and we can run application, in index.jspx page lets press Find button and open bounded ADF Task Flow with default Find action:


Form is opened in Find mode without any invokeAction declaration:


Just to summarize, ADF Task Flow functionality - Method Call, in this case allows to put form to Find mode automatically when bounded ADF Task Flow is opened. All the other pages inside bounded ADF Task Flow can open the same form without invoking Method Call, what gives higher flexibility.
Email ThisBlogThis!Share to XShare to Facebook
Posted in ADF, JDeveloper 11g | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Multiple LOV's per Attribute in JDeveloper 11g
    During OOW 2008 I have attended Steve Muench talk about new features in ADF Business Components available in 11g release - Oracle ADF: New D...
  • JBO-25058 and JBO-26001 exceptions
    In a case if you will get JBO-25058 and JBO-26001 exceptions after running application developed with Oracle ADF in JDeveloper 11g, most pro...
  • JDeveloper 11g Masterclass in Vilnius
    I'm posting update to my previous post - Oracle Forms to SOA workshop in Vilnius , where I was describing masterclass session I will do ...
  • Opening Report Window in ADF Faces
    Such requirement as opening report window can be assumed as easy one. But, when I have received request for solution, it was not so easy to ...
  • Oracle JDeveloper/ADF Real Life Story on Oracle OpenWorld
    Yes, that right - I was presenting Oracle JDeveloper/ADF Real Life Story on Oracle OpenWorld in Unconference section. Everyone was free to c...
  • JDev/ADF samples list
    This week, Steve Muench on his examples page have added a link to my JDev/ADF samples list . Thanks, I'm very proud of this - it is co...
  • Oracle Always Rocks !
    This song was performed at Oracle OpenWorld 2007, after Larry Ellison and Safra Catz keynote - Sunday Night Live—30 Years Behind The Scenes ...
  • Oracle Fusion Middleware 11g Technology Preview 3 - whats included?
    Probably almost everyone have noticed Christmas gift from Oracle - JDeveloper 11g Technology Preview 3 . What new things are inside this gif...
  • List-Of-Values Component in Search and Edit Form
    Sample application described in this post contains high practical value, it implements real use case. Defined use case - based on value sele...
  • Oracle Magazine Peer-to-Peer column
    My profile is published in Oracle Magazine January/February 2008 edition - Favorite Things . Profiles of Oracle ACE Director - Chris Ostrow...

Categories

  • ADF
  • Apex
  • Apple
  • BPEL
  • Events
  • Forms
  • Groovy
  • JDeveloper 11g
  • Nomination
  • ODTUG Kaleidoscope
  • OFUG
  • Oracle Magazine
  • Oracle OpenWorld
  • Security
  • SOA
  • Spatial
  • TopLink
  • Traveling
  • Uncategorized
  • Vgo Software
  • Web Services
  • WebCenter
  • WebLogic
  • Workarounds

Blog Archive

  • ▼  2008 (72)
    • ►  December (2)
    • ►  November (3)
    • ▼  October (9)
      • Oracle Day'08 in Vilnius
      • After BGOUG Autumn' 2008 Conference
      • ADF Security 11g and ADF Business Components
      • Vgo Webinar - Client/Server Forms Modernizations t...
      • JDeveloper/ADF 11g Masterclass in Latvia
      • Form Opening in Find Mode
      • JDeveloper 11g Production on Mac OS
      • Multiple LOV's per Attribute in JDeveloper 11g
      • JDeveloper 11g Release Candidate for ACE Directors
    • ►  September (4)
    • ►  August (9)
    • ►  July (6)
    • ►  June (10)
    • ►  May (4)
    • ►  April (5)
    • ►  March (7)
    • ►  February (5)
    • ►  January (8)
  • ►  2007 (65)
    • ►  December (6)
    • ►  November (7)
    • ►  October (6)
    • ►  September (4)
    • ►  August (3)
    • ►  July (4)
    • ►  June (6)
    • ►  May (5)
    • ►  April (6)
    • ►  March (4)
    • ►  February (5)
    • ►  January (9)
  • ►  2006 (9)
    • ►  December (9)
Powered by Blogger.

About Me

Unknown
View my complete profile