[
https://issues.jboss.org/browse/RF-13394?page=com.atlassian.jira.plugin.s...
]
Lukáš Fryč commented on RF-13394:
---------------------------------
The issue here is that the ToggleControl on "universal toggle button" renders
wrong scripts:
initially: panel 1, item 1
click on "item 3" ->
RichFaces.component('panel1').switchToItem('item1');
click on "item 2" ->
RichFaces.component('panel1').switchToItem('item3');
click on "panel 2" ->
RichFaces.component('panel1').switchToItem('item2');
...and so on. Notice how all the changes are one request back.
---
During debugging I have discrovered that a following difference between
* 4.5 (where the component doesn't work):
** In 4.5, JSF calls {{ToggleControl#setTargetItem(item)}} with *the state of variable in
previous request*
** e.g. since you have chosen item3, the setTargetItem(item1) is called instead
and
* 5.0 (where the component works).
** the method {{ToggleControl#setTargetItem(item)}} is not called at all.
Toggle control: attributes targetItem and targetPanel don't work
----------------------------------------------------------------
Key: RF-13394
URL:
https://issues.jboss.org/browse/RF-13394
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-panels-layout-themes, regression
Affects Versions: 4.5.0.Alpha1
Environment: RichFaces 4.5.0-SNAPSHOT
Metamer 4.5.0-SNAPSHOT
EAP 6.1.1
Mojarra 2.1.19
Java(TM) SE Runtime Environment 1.7.0_04-b20 @ Linux
Chrome 31.0.1650.57 @ Linux x86_64
Reporter: Pavol Pitonak
Assignee: Lukáš Fryč
Labels: regression
Fix For: 4.5.0.Alpha1
Original Estimate: 1 hour
Remaining Estimate: 1 hour
# deploy Metamer and open
http://localhost:8080/metamer/faces/components/richToggleControl/accordio...
# set targetPanel=panel2
# set targetItem=item3
# click on "universal toggle control" button
result:
* nothing happens
* third item on second panel should be active
* when you change targetPanel and/or targetItem and press the button again, it is
switched to panel2/item3
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira