ADF: One-time initialization code in a backing bean after table render?
781282Jun 24 2010 — edited Jun 25 2010Hi,
I'm new to ADF / JSF, so bear with me if this is a really basic question.
I'm running JDeveloper 11g R1 11.1.1.3.0
I have a jsff with an af:table on it which is tied to a db table view. I need to run some initialization code in my backing bean after the page/table has rendered, but it can only run once. The initialization code needs to run after the table is rendered because it depends on data in the table.
The af:table has binding="#{backingBeanScope.SomeBean.table}" and the bean has accessors for the 'table' property.
Right now, I'm running my initialization code as a side-effect in the setTable method, but this is clearly wrong since the method is invoked multiple times on a single page view. I also tried using an @PostConstruct method in the bean, but that's too early - the method is run before setTable is called (ie the 'table' field in my bean is still null).
Is there some way I can register a method in the bean to be invoked after the table is rendered, but only once?