Sunday, April 28, 2013

How to invoke backing bean method right after page fragment loads


Usecase : Invoke a backing bean method right after page fragment loads and access the UI components rendered on the page fragment

Implementation : 

 - Create a backing bean implements oracle.adf.model.RegionController class
- override isRegionViewable(), getName(), refreshRegion(),validateRegion() as shown below

    - Configure the class which implements to RegionController in pageFragment page definition file as shown below.

2 comments:

  1. Hi Ravi,

    When I try to access the attribute/field that is bound using BINDING property to the backing bean - it gives NPE in the refreshRegion(...) method. And what do you mean by this.getUIBindings() method there? That is where I try to access binding layer but as I said it gives NPE.

    Any ideas?

    ReplyDelete
  2. Hi Ravi,
    I have exactly the same issue as Hitesh a NPE when I try to get a pund component(RichInputText) in the refreshRegion(...) method.

    Can you help please?

    Thanks

    ReplyDelete