January 9, 2013

Invoking actions before loading the JSF or JSFF page

If we want to invoke the operations like Create or CreateInsert of a data control while loading the page, we can achieve this by doing below


  • Open JSF or JSFF page, go to bindings tab
  • In the “Executables”, click on “+” symbol to add, select InvokeActions options from the given list
  • Enter some ID to the action and select Binds from the given list
  • Select the action and click on pencil icon to edit it, “Common Properties” window will be opened
  • Go to common tab, select a value to Refresh (for example, every time when the JSF page is loaded, if the create action needs be executed then the refresh value should be “always”)
  • Give the Refresh Condition
  • Click on Finish
  • Move the action to the top of the “Executables” as shown in the below image


 

January 8, 2013

Assign DBSequence to a property in Entity Object

I want to add a sequence to the user_id field in user_info table of my database. For which I have followed the below procedure.
  • Create a db sequence named “userid”
Create sequence userid start with 10000000001

  • Open the Entity Attribute, “user_id” in the Entity Object of the application
  • Select Type as Integer and  click on Value type “Expression” radio button
  • Enter the below expression in the value field
 (new oracle.jbo.server.SequenceImpl("USERID",adf.object.getDBTransaction())).getSequenceNumber()

Where “USERID” is the sequence name which is created already
  • Click on Ok

December 13, 2012

Import ADF Taskflow into a Portal as a library


To import a ADF task flow into a web center portal application as a library, follow the below procedure

  • Create a deployment profile for the ADF task flow project as “ADF library jar”
  • Deploy and make adf library jar for the ADF task flow
  • Open the Resource Palette on right side of the JDev
  • Right click on “File System” and select the option “New File System Connection”
  • Provide a name to the connection and directory path where the adf task flow jar file is copied
  • The created connection will be added to the Resource Palette
  • Open the Portal application and select the project to which the task flow should be added
  • In the Resource Palette, expand the connection created and right click on the jar file, select the option “Add to Project”. It will ask for the confirmation to which project it will be added
  • Now expand the jar file and drag and drop the task flow listed in a jsf page as a region in which we want to show the task flow