Domain Portal

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

Sunday, 27 May 2007

ExecuteWithParams in your Oracle ADF application

Posted on 00:58 by Unknown
Recently I was researching Google Analytics data for my blog. I have noticed, that there are many search engine keywords with 'ExecuteWithParams' word. Really, this action plays one of the central roles in Oracle ADF BC application, it is used quite frequently and people want to know more about it. So, I have decided to build sample application focused on 'ExecuteWithParams' functionality.

Sample application - ExecuteWithParams.zip, is based on DEPARTMENTS table from standard HR schema. Business logic of developed sample is based on idea to allow edit operation only for departments from specified geographic region. Edit form allows to change department location, but only within specified region. And finally, region is specified in property file called UIResources.properties.

In order to achieve business logic requirements I have changed default SQL for Departments View Object - I have joined Departments table with Locations and Countries, in order to retrieve departments only from region specified in :regionIdVal bind variable:

Value for :regionIdVal is assigned in ExecuteWithParams action.

Departments edit form contains location component, I have implemented this component as af:selectOneChoice. It allows to select only locations within specified region. This means, ExecuteWithParams should be also applied for this component. I have edited default SQL for Locations View Object, this View Object is used as a List Data Source for af:selectOneChoice. Modified SQL statement:


Value for :regionIdVal is assigned in ExecuteWithParams action also. This value is defined in UIResources.properties file, for example: regionId=2, you can change it's value at any time.

Let's switch to ExecuteWithParams action. I have created required actions in such way - at first I have dragged and dropped needed data controls and after that I have created actions in page definition file manually. ExecuteWithParams action for Departments View Object definition:


You can notice, that action have one parameter - regionIdVal. When action is created, don't forget to add executable - invokeAction into page definition file for ExecuteWithParams. This will enable automatic execution of defined action. Executable for DepartmentExecuteWithParams action:


Action and executable for Locations View Object can be created in the same way.

And..., how it works:


Edit form shows departments only from region specified in property file, at the same time af:selectOneChoice allows to choose locations only from specified region also.

When running sample application, don't forget to add adf-faces-impl.jar and jsf-impl.jar to application's WEB-INF\lib directory.
Email ThisBlogThis!Share to XShare to Facebook
Posted in ADF | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Groovy - Multiple LOV's per Attribute in JDeveloper 11g
    I was blogging previously about multiple LOV's per attribute functionality. I was using RowImpl class for View object in order to calcu...
  • Workaround for Null Value Bug in ADF List Of Values 11g
    Those of you, who are using List Of Values (LOV) component in ADF 11g, most probably already have noticed bug related to Null value. Simple ...
  • Oracle ADF - between 4GL and J2EE is only one step
    According to ADF architecture described in Oracle JDeveloper 10g (10.1.3) Developer's Guide Section 1.1.1 - Framework Architecture and S...
  • ADF Business Components: Complex Insert in Easy Way
    In this post I continue series of my posts related to DML (Data Manipulation Language) in ADF Business Components, those posts are among of ...
  • 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 ...
  • Creating new row using CreateInsert operation
    Sample application - CreateInsert.zip , demonstrates how to create editable table with 'create new row' functionality in ADF BC. We ...
  • External Transaction Service in Oracle TopLink
    I have developed sample application, in order to demonstrate how to use External Transaction Service (ETS), when Oracle TopLink is used in M...
  • After UKOUG'08
    This week I was on UKOUG'08 conference. I really have enjoyed high quality of its content and I have learned new technical things about...
  • Glasspane in ADF Faces RC
    You can build very cool systems, based on excellent architecture design, with ADF BC or EJB in Model layer and with ADF Task Flows in View C...
  • The Best of IBM - IBM Bravo !
    Today I received IBM Bravo certificate, for my Top-Performance in IBM Global Business Services, during last year. This award is for my succe...

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)
    • ►  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)
      • ExecuteWithParams in your Oracle ADF application
      • Oracle Fusion Middleware Regional Director nomination
      • Spring in Lithuania
      • Templating in Oracle JDeveloper 11g
      • Create/Edit operations and setCurrentRowWithKeyVal...
    • ►  April (6)
    • ►  March (4)
    • ►  February (5)
    • ►  January (9)
  • ►  2006 (9)
    • ►  December (9)
Powered by Blogger.

About Me

Unknown
View my complete profile