You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org> on 2006/01/22 00:39:42 UTC
[jira] Commented: (MYFACES-1040) Collapsible panel in datatable
gets jammed
[ http://issues.apache.org/jira/browse/MYFACES-1040?page=comments#action_12363544 ]
Martin Marinschek commented on MYFACES-1040:
--------------------------------------------
It does work in my current code.
Try it out, please.
regards,
Martin
> Collapsible panel in datatable gets jammed
> ------------------------------------------
>
> Key: MYFACES-1040
> URL: http://issues.apache.org/jira/browse/MYFACES-1040
> Project: MyFaces
> Type: Bug
> Components: Tomahawk
> Versions: Nightly
> Environment: Replicable in all environments.
> Reporter: saurabhr@wisdominfotech.com
> Priority: Blocker
>
> After binding collapsible-panel's value-parameter to a backing bean property, it works, but all collapsible-panel's in a data table collapse and expand at same time - click one and all get expanded - and when we try to bind it to an object in the list returned by backing bean - "prodReq" in sample - it doesn't works and gets jammed - if it is collapsed it remains collapsed and if expanded it remains expanded the toggling dosen't work.
> Same problem is reproduceable in the tomahawk sample application in the latest code from svn.
> Eg:
> <t:dataTable id="prod_dt" var="prodReq"
> value="#{prqfilter.productionRequests}" preserveDataModel="false">
> <h:column>
> <t:collapsiblePanel id="test4" title="prod" dir="ltr"
> value="#{prodReq.collapsed}" var="toggle">
> <f:facet name="header">
> <t:div style="width:500px;background-color:#CCCCCC;">
> <h:outputText value="Production Request"/>
> <t:headerLink>
> <h:outputText value="> Details" rendered="#{toggle}"/>
> <h:outputText value="v Overview" rendered="#{!toggle}"/>
> </t:headerLink>
> <h:commandLink value="test" action="#{prodReq.toggleState}"/>
> </t:div>
> </f:facet>
>
> <h:inputText value="#{prodReq.firstName}"/>
> <h:inputText value="#{prodReq.surName}"/>
> <h:inputText value="#{prodReq.collapsed}"/>
> </t:collapsiblePanel>
> </h:column>
> </t:dataTable>
> Code from {prqfilter} Backing Bean:
> ===========================
> private List<SelectItem> prodLocaions;
>
> private List<ProductionRequest> productionRequests;
>
> private boolean _collapsed;
> public boolean isCollapsed()
> {
> return _collapsed;
> }
> public void setCollapsed(boolean collapsed)
> {
> _collapsed = collapsed;
> }
>
> public List<ProductionRequest> getProductionRequests() {
> //System.out.println("In get prod req" + productionRequests);
> //test data
> productionRequests = new ArrayList<ProductionRequest>();
> productionRequests.add(new ProductionRequest("A","B","12/12/2006"));
> productionRequests.add(new ProductionRequest("c","d","12/12/2006"));
> productionRequests.add(new ProductionRequest("e","f","12/12/2006"));
> productionRequests.add(new ProductionRequest("g","h","12/12/2006"));
>
> System.out.println("In get prod req" + productionRequests);
> return productionRequests;
> }
> public void setProductionRequests(List<ProductionRequest> productionRequests) {
> this.productionRequests = productionRequests;
> }
> Code from {prodReq} list object:
> ===========================
> public class ProductionRequest implements java.io.Serializable {
>
> private String _firstName;
> private String _surName;
> private String _birthDate;
>
> private boolean _collapsed=true;
>
>
> public ProductionRequest() {
> //Do Nothing
> }
>
> public ProductionRequest(String firstName, String surName, String birthDate) {
> setFirstName(firstName);
> setSurName(surName);
> setBirthDate(birthDate);
> }
>
> public void toggleState() {
> System.out.println("Prodreq togg" + isCollapsed());
> this.setCollapsed(!isCollapsed());
> }
>
>
> public boolean isCollapsed() {
> return _collapsed;
> }
> public void setCollapsed(boolean collapsed) {
> _collapsed = collapsed;
> }
> public String getBirthDate() {
> return _birthDate;
> }
> public void setBirthDate(String birthDate) {
> this._birthDate = birthDate;
> }
> public String getFirstName() {
> return _firstName;
> }
> public void setFirstName(String firstName) {
> this._firstName = firstName;
> }
> public String getSurName() {
> return _surName;
> }
> public void setSurName(String surName) {
> this._surName = surName;
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira