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
render af:deck child

Hello
Jdev 12.2.1.4.0
I have af:deck with 5 children (for this example UI components A,B,C,D,E
also i have 5 af:links , every link shows a different child accordingly when clicking it
and that using a bean. all the above works fine.
lets say I have 5 attribute bindings from the DB
(for this example we will call them A_att,B_att,C_att,D_att,E_att
on EVERY ROW that returns from the DB, those attribute returns true/ false in this way
A B C D E
true false false false false
true true false false false
true true true false false
true true true true false
true true true true true
my goal is to display the deck child according to the LAST true attribute that was received
on every selected row.
I tried to to this with a condition in the deck_child
#{binding.E.inputValue ne false ? 'E' :
binding.D.inputValue ne false ? 'D' :
....
}
it has two issues
- I have to click search twice in order for the child to be displayed, otherwise, no child is being displayed at all
- it stops working at all when I manually click on one of the links.
for example, if I'll click link #3 , child C will be shown,
then i do another search the displayed child will always be C despite the return attributes value. it always remains #3.
i tried to do this with a bean but didn't succedd there as well (tried to do this on the actionEvent of the search button)
can anyone please help me achieve this (if it's possible at all)
Thank you
Answers
-
Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,587 Red Diamond
User, can you provide a reproducible test case, please?
If yes, it should be built using the HR DB schema.
Timo
-
Hello
no ..but i will simplify this.. leave the DB attribute
I have a search button that runs the following for the example
public void search(ActionEvent actionEvent) { RichDeck deck = null; // Request // #{bindings.Execute_LM_requests.execute} ADFUtils.ExecuteOperation("MRTsummary1Iterator", "Execute_LM_requests"); // Results ADFUtils.ExecuteOperation("mi_results_steps1Iterator", "Execute_MI_results"); AdfFacesContext.getCurrentInstance().addPartialTarget(resTable); // choose 5th deck child UIComponent eventComponent = deckResultsBind; deck = (RichDeck) eventComponent; deck.setDisplayedChild("LMres"); -- this is the 5th deck child components name AdfFacesContext.getCurrentInstance().addPartialTarget(deck); }
when I click search for the first time, it shows the 'LMres' child component correctly (image #1)
but if I will choose another child (image #2) using the af:link that switches the deck's children
and THEN I will click the search button again , no child will be displayed (image #3) it will appear as blank.
afterward clicking the search button AGAIN will show the LMres child correctly (like in image#1)
-
Seems like after the status message in image 2, the screen needs to be refreshed somehow to display result. Click on the circular refresh button in the browser, or refresh page by some other method.
-
Hello
this should have refreshed the deck :
deck.setDisplayedChild("LMres"); -- coosing fixed child for the example AdfFacesContext.getCurrentInstance().addPartialTarget(deck);
The idea here is that the relevant deck's child will be selected automatically (using a bean) according to data that is received from the DB.
this should be implemented on a table row select change (SelectionEvent) .
for example: clicking on row 1 -> can end out presenting deck's child #4
clicking on row 2 -> and row 2 can end out showing deck's #3
.. etc.
all that is based on a formula inside the bean.
in this example i choose a fixed child 'LMres' using actionEvent just to demonstrate it's not working after manually clicking a different deck's child (any other than 'LMres') before clicking on the search button.
p.s- a similar code is being used by the
<af:link>
ActionEvent, which works fine -> meaning clicking manually on a link, switches the correct deck's child)anyone has a clue how to overcome this? is this a Bug?
please
-
Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,587 Red Diamond
The problem I see is that we don't see what you have implemented. We have to assume that you have set up the component and code correctly. From what I see it should work. As it doesn't work, we have to assume ...
Try to create a reproducible test case we can use to look into the problem.
If it turns out to be a bug you need a test case anyway.
Timo