[
https://issues.jboss.org/browse/RF-12422?page=com.atlassian.jira.plugin.s...
]
Thang Pham edited comment on RF-12422 at 8/20/12 7:22 PM:
----------------------------------------------------------
During dynamic collapse (collapse the panel upon a radio selection event), if I try to
collapse the panel manually (by clicking on the top left of the panel), then dynamic
collapse stop working.
Here are codes to reproduce problem:
{code}
<h:form id="myForm">
<rich:collapsiblePanel id="myPanel"
expanded="#{myBean.expanded}" switchType="client">
<rich:extendedDataTable value="#{myBean.foo}"
var="item">
<rich:column>
#{item}
</rich:column>
</rich:extendedDataTable>
<br/>
<h:selectOneRadio value="#{myBean.selectedOption}">
<a4j:ajax event="click"
listener="#{myBean.handleOptionSelect}"
render="myForm:myPanel"/>
<f:selectItems value="#{myBean.option}"/>
</h:selectOneRadio>
</rich:collapsiblePanel>
</h:form>
{code}
And in my bean I have
{code}
@ManagedBean
@ViewScoped
public class MyBean implements Serializable{
private static final String EXPAND = "expand";
private static final String COLLAPSE = "collapse";
private List<String> foo;
private List<SelectItem> option;
private String selectedFoo;
private String selectedOption;
private boolean expanded = true;
public MyBean() {
foo = new ArrayList<String>();
foo.add("Harry");
foo.add("Tom");
option = new ArrayList<SelectItem>();
option.add(new SelectItem(EXPAND, EXPAND));
option.add(new SelectItem(COLLAPSE, COLLAPSE));
}
public void handleOptionSelect(){
System.out.println("Start handleOptionSelect");
if(selectedOption.equals(EXPAND)){
expanded = true;
} else if(selectedOption.equals(COLLAPSE)){
expanded = false;
}
System.out.println("Finish handleOptionSelect");
}
//Setter and getter
}
{code}
Bug
1.
a. If switchType="client", I click on radio "collapse", the panel
collapse correctly. Great, but if I manually expand the panel by clicking on the top left
of the panel, the content of the extendedDataTable is EMPTY.
b. If switchType="ajax" or "server", I click on radio
"collapse", the panel collapse correctly. Great, but if I manually expand the
panel by clicking on the top left of the panel, now the content of the extendedDataTable
is there correctly, but now dynamic collapse NO longer work, meaning if I click on
collapse or expand radio, it no longer collapse or expand the panel
2. If in 1.a, I switch from extendedDataTable to dataTable, then it work perfectly, but I
need extendedDataTable to row selection. (Remember this is with
switchType="client", with other switchType, problem still maintain)
Forum discussion:
https://community.jboss.org/message/754637
was (Author: yunaeyes00):
During dynamic collapse (collapse the panel upon a radio selection event), if I try to
collapse the panel manually (by clicking on the top left of the panel), then dynamic
collapse stop working.
Here are codes to reproduce problem:
{code}
<h:form id="myForm">
<rich:collapsiblePanel id="myPanel"
expanded="#{myBean.expanded}" switchType="client">
<rich:extendedDataTable value="#{myBean.foo}"
var="item">
<rich:column>
#{item}
</rich:column>
</rich:extendedDataTable>
<br/>
<h:selectOneRadio value="#{myBean.selectedOption}">
<a4j:ajax event="click"
listener="#{myBean.handleOptionSelect}"
render="myForm:myPanel"/>
<f:selectItems value="#{myBean.option}"/>
</h:selectOneRadio>
</rich:collapsiblePanel>
</h:form>
{code}
And in my bean I have
{code}
@ManagedBean
@ViewScoped
public class MyBean implements Serializable{
private static final String EXPAND = "expand";
private static final String COLLAPSE = "collapse";
private List<String> foo;
private List<SelectItem> option;
private String selectedFoo;
private String selectedOption;
private boolean expanded = true;
public MyBean() {
foo = new ArrayList<String>();
foo.add("Harry");
foo.add("Tom");
option = new ArrayList<SelectItem>();
option.add(new SelectItem(EXPAND, EXPAND));
option.add(new SelectItem(COLLAPSE, COLLAPSE));
}
public void handleOptionSelect(){
System.out.println("Start handleOptionSelect");
if(selectedOption.equals(EXPAND)){
expanded = true;
} else if(selectedOption.equals(COLLAPSE)){
expanded = false;
}
System.out.println("Finish handleOptionSelect");
}
//Setter and getter
}
{code}
Bug
1.
a. If switchType="client", I click on radio "collapse", the panel
collapse correctly. Great, but if I manually expand the panel by clicking on the top left
of the panel, the content of the extendedDataTable is EMPTY.
b. If switchType="ajax" or "server", I click on radio
"collapse", the panel collapse correctly. Great, but if I manually expand the
panel by clicking on the top left of the panel, now the content of the extendedDataTable
is there correctly, but now dynamic collapse NO longer work, meaning if I click on
collapse or expand radio, it no longer collapse or expand the panel
2. If in 1.a, I switch from extendedDataTable to dataTable, then it work perfectly, but I
need extendedDataTable to row selection. (Remember this is with
switchType="client", with other switchType, problem still maintain)
Bug when mixing dymamic collapse and manual collapse in
rich:collapsiblePanel and rich:extendedDataTable
--------------------------------------------------------------------------------------------------------
Key: RF-12422
URL:
https://issues.jboss.org/browse/RF-12422
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.2.2.Final
Reporter: Thang Pham
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira