Pages - Menu

Sunday, September 15, 2013

af:table bad behavior in JDeveloper/ADF 12c | Oracle ADF

Hi,
Few Days ago, we faced one bad behavior while building IMS New ADF Application.
While Leading Oracle Fusion Discussion Group B Team - Saudi Arabia / Gulf Area, Main issue come from the default behavior of af:table component for 12c Latest ADF/JDeveloper .
Normal Behavior in ADF Project is a disaster in 12c (as before in old versions) but little bit different, in few steps i will show the bad behaviors and How to solve completely with one step.
  • create small table with insert statement as attached in SCRIPT.sql attached file in the project url and create it into your default hr schema.
  • Create ADF - JSF Fusion Application as usual. 
                     image
  • Build Business Component from table and drop it as Entity Object and View Object as well based on table created.
imageimage
  • Make View Object in No Rows Mode (VO always in Insert Mode Only).
image
  • Make Normal jsf page dropping VO as a af:table and createinsert method as a button in toolbar facet for panelgrouplayout container.
image
  • we have only one record in our table
image
  • Run the page, press createinsert button and you will face this Error Message !!
image
  • Insert Second Record
image
  • Run Page Again, and press same button, wow it works !!, but there is a another bad behavior, Data Duplicated !!
  • but wait, why Data Displayed !!, we created new row only and at same time, VO has no row property activated !!
image
  • sometimes if you have Master Detail Relation Ship and you have af:table for detail one, you will face another problems same as “Second Record is not visible !!” and sometimes Fire Validation Error for Required items however u didn’t leave the row !!
Finally, to Stop all bad behaviors from af:table, please change the Change Event Policy property of Iterator to be Non instead of ppr (in page Def base of page)
image
image
Now, you have perfect result ..

image

No comments:

Post a Comment