Last year in November, I was blogging about ADF generator for dynamic ADF BC and ADF UI. This approach allows to generate ADF BC from metadata and draw ADF UI dynamically based on ADF BC structure. You can read more about it here. This approach works without issues. However, if you want to change dynamic ADF BC and redraw ADF UI while staying on the same fragment or page, there is special trick to recreate dynamic iterator declared in Page Definition. This trick is described in Duncan Mills blog - Refresh Problems using Adaptive Bindings, I will apply it to my sample app posted here.
Without this trick applied, if you try to change ADF BC dynamic VO - there will be error generated from ADF bindings:
Sample application - ADFDynamicReportUI_v2.zip, works better with the workaround applied. Just before ADF BC dynamic VO is changed, ADF bindings iterator is refreshed - this allows to reload ADF View based on changed ADF BC VO:
Iterator is defined in Page Definition, this is regular static iterator created out of predefined VO (later dynamically initialized, see my previous blog mentioned above). There is not table or attribute bindings, because I'm using ADF dynamic form component on the ADF UI:
Dynamic VO is constructed in AM Implementation class, based on parameter - different VO structure is created:
Different SQL statement is created:
It works now to switch to different VO structure - see the checkbox coming as part of recreated VO:
Without this trick applied, if you try to change ADF BC dynamic VO - there will be error generated from ADF bindings:
Sample application - ADFDynamicReportUI_v2.zip, works better with the workaround applied. Just before ADF BC dynamic VO is changed, ADF bindings iterator is refreshed - this allows to reload ADF View based on changed ADF BC VO:
Iterator is defined in Page Definition, this is regular static iterator created out of predefined VO (later dynamically initialized, see my previous blog mentioned above). There is not table or attribute bindings, because I'm using ADF dynamic form component on the ADF UI:
Dynamic VO is constructed in AM Implementation class, based on parameter - different VO structure is created:
Different SQL statement is created:
It works now to switch to different VO structure - see the checkbox coming as part of recreated VO:
No comments:
Post a Comment