Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Refresh components outside the event root component - Panel Collection

Hi,
After reading this post: https://blogs.oracle.com/jdevotnharvest/panelcollection-confusion-or,-what-is-an-event-root i understood what an event root component is and what is it doing.
My request is to refresh components outside the event root component.
We have a declarative component that has a Panel Collection inside. Panel collection is a event root component which means that when i press a button located in the panel collection toolbar, it only refreshes panel collection and it's children.
Because we can have more than one table in the same page, that is more than one declarative component, hence more than one panel collection. All tables on the page are depended on each other and needs to be refresh when an action occurs on each of them.
I know i can do it declarative by adding partialTriggers on each of table, buttons and so on, but this requires a lot of work and requires more work when something changes on the declarative component.
I would like to know if there is some way i can emit that event is occurred in the panel collection to the parent of declarative component so that all components of page(region) are refreshed(rerendered).
Basically i need that the panel collection is no longer an event root component, eater by somehow emitting a event to the parent, or just somehow saying that the panel collection is not a event root.
Thank you.
JDeveloper: 12.2.1.2.0
Best Answer
-
If you want to refresh complete page, you can remove partialSubmit=true from button itself. That will make full page refresh. Yes its not a good practice as you are unnecessary refreshing all UI components.
If you want selectively refresh few UI components then you definitely tell ADF, which are those components. The simplest approach is individual components provide partialTrigger pointing to button.
If you don't want that then, I would suggest find a common parent component for all your tables. Set its partialTrigger pointing to button.
Thanks
Sanjeev
Answers
-
Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,585 Red Diamond
How about adding a global button to the declarative component which you can use to notify the page to refresh. The general implementation can be found here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/24-generic-toolbar-component-169163.pdf
You add an actionListener to the declarative component which you pass from the outside. When you need to refresh the page you call this listener from inside the declarative component.
Timo
-
If you want to refresh complete page, you can remove partialSubmit=true from button itself. That will make full page refresh. Yes its not a good practice as you are unnecessary refreshing all UI components.
If you want selectively refresh few UI components then you definitely tell ADF, which are those components. The simplest approach is individual components provide partialTrigger pointing to button.
If you don't want that then, I would suggest find a common parent component for all your tables. Set its partialTrigger pointing to button.
Thanks
Sanjeev
-
Hi Timo,
Thank you for your reply.
I had a similar idea, to add a button outside of declarative component and somehow call it. Perhaps it is the best idea to move whole toolbar outside panel collection and somehow make it look that its inside panel collectionWhere would that actionListener point to? would we be required to add a button to every page?
Robert
-
Hi SanjeevChauhan,
I have tried to remove the partialSubmit property (set it to false) but it doesn't do anything. I just need to refresh the next root component, and in our case that is <af:region>.
We are trying to avoid setting partial triggers to components as its to much work, and will require more work if something changes on declarative component.
Update:
I have tried to set partial triggers of a common parent(af: region) programmatically to id of a panel collection(panel collection is refreshed every time a button is pressed) and it works very well.
Now i just need find a place/method that isn't called too many times, to add partialtriggers to af:region. If i manage to do it, i think we will keep this approach.Robert