You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Saurabh Rasinghaney <sa...@Wisdominfotech.com> on 2006/01/10 22:20:00 UTC

Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

Hi All,

 

We are facing a problem (java.lang.IllegalStateException: Client-id :
_id3ToggleCollapsed is duplicated in the faces tree.) with Collapsible
Panel, when we are using Collapsible inside a data table. When we
display one row it shows one panel but when we display multiple rows it
gives error (attached below).

 

I am not sure if we can do this or not. The code and exception trace is
attached below.

 

Any suggestions are welcome. Thanks in advance for your help.

 

Thanks,

Saurabh

 

 

 

 

        <t:dataTable id="test_dt" var="prodReq"
value="#{prqViewBacking.productionRequests}" preserveDataModel="false"

                    styleClass="scrollerTable"

                headerClass="standardTable_Header"

                footerClass="standardTable_Header"

                rowClasses="standardTable_Row1,standardTable_Row2"

 
columnClasses="standardTable_Column,standardTable_ColumnCentered,standar
dTable_Column"

        >

        

            <h:column>                

                <f:facet name="header">

                 <t:div
style="width:500px;background-color:#CCCCCC;align=left">

                              <h:outputText value="Production Request
"/>

                 </t:div>

                </f:facet>

                

                   <t:collapsiblePanel dir="ltr"
collapsed="#{prodReq.collapsed}">

                      <h:panelGrid>

                              <h:inputText
value="#{prodReq.firstName}"/>

                              <h:inputText value="#{prodReq.surName}"/>

                              <h:inputText
value="#{prodReq.collapsed}"/>

                          </h:panelGrid>

                </t:collapsiblePanel>

            </h:column>

 

 

 

 

import java.util.ArrayList;

 

/**

 *

 */

 

public class PrqViewBacking implements java.io.Serializable {

                

    //private boolean _collapsed=true;

    private ArrayList<ProductionRequest> _productionRequests;

    

    public PrqViewBacking() {

                ArrayList<ProductionRequest> productionRequests  = new
ArrayList<ProductionRequest>();

                //test data

                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"));

                this.setProductionRequests(productionRequests);

    }    

    

    

 

                public ArrayList getProductionRequests() {

                                System.out.println("In get prod req" +
_productionRequests);                               

                                return _productionRequests;

                }

                

                public ArrayList productionRequests() {

                                System.out.println(_productionRequests);


                                return _productionRequests;

                }

 

                public void setProductionRequests(ArrayList
productionRequests) {

                                _productionRequests =
productionRequests;

                }

}

 

 

 

public class ProductionRequest implements java.io.Serializable {

                

                private String _firstName;

                private String _surName;

                private String _birthDate;

                

                private static Integer id=0;

                

                private boolean _collapsed=true;

                

                public static String getId() {

                                return "_" + (++id).toString();

                }

                

                

                public ProductionRequest() { 

                                //Do Nothing


                }

                

                public ProductionRequest(String firstName, String
surName, String birthDate) {

                                setFirstName(firstName);

                                setSurName(surName);

                                setBirthDate(birthDate);

                }

                

                  public boolean collapsed() {

                        return _collapsed;

                  }

                  

    public boolean isCollapsed() {

        return _collapsed;

    }

 

    public void setCollapsed(boolean collapsed) {

        _collapsed = collapsed;

    }

    

    public boolean getCollapsed() {

       return _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;

                }

 

 

}

 

 

14:48:24,390 ERROR [[jsp]] Servlet.service() for servlet jsp threw
exception

java.lang.IllegalStateException: Client-id : _id3ToggleCollapsed is
duplicated in the faces tree.

        at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicate
Ids(JspStateManagerImpl.java:241)

        at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicate
Ids(JspStateManagerImpl.java:255)

        at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicate
Ids(JspStateManagerImpl.java:255)

        at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicate
Ids(JspStateManagerImpl.java:251)

        at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicate
Ids(JspStateManagerImpl.java:251)

        at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicate
Ids(JspStateManagerImpl.java:255)

        at
org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedVie
w(JspStateManagerImpl.java:204)

        at
org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:139)

        at
org.apache.jsp.app.PrqView_jsp._jspx_meth_f_view_0(org.apache.jsp.app.Pr
qView_jsp:140)

        at
org.apache.jsp.app.PrqView_jsp._jspService(org.apache.jsp.app.PrqView_js
p:100)

        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:322)

        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:672)

        at
org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio
nDispatcher.java:463)

        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:398)

        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:301)

        at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
ervletExternalContextImpl.java:415)

        at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView
HandlerImpl.java:234)

        at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352
)

        at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

        at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Extensi
onsFilter.java:122)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

        at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
r.java:81)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)

        at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipa
lValve.java:39)

        at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:159)

        at
org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredS
essionValve.java:81)

        at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
ava:59)

        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)

        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)

        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)

        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
6)

        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:744)

        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)

        at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker
Thread.java:112)

        at java.lang.Thread.run(Thread.java:595)

 

 

 

Best Regards,

________________

Saurabh Raisinghaney 

 


Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

Posted by Simon Kitching <sk...@obsidium.com>.
Hansjörg Meuschel wrote:
>
>>> oh ok... i don't know exactly all implementation details, however 
>>> what i know is that the t:datatable has some serious problems:
>>>
>>> Example:
>>> <h:form>
>>> <t:datatable>
>>> <t:column>
>>> <h:inputText>
>>> </ ...>
>>>
>>> THIS WILL NOT WORK! (all input field get the same id)
>>>
>>>
>>> <h:form>
>>> <h:datatable>
>>> <h:column>
>>> <h:inputText>
>>> </ ...>
>>> THIS WILL WORK! (all input field get different ids)
>>>
>>> This is the reason why the t:datatable can't be used with submittable 
>>> componenents! Or am I doing something very wrong here ??

[snip]

>>
>> Note that there have been some problems reported recently regarding 
>> tomahawk on sun's JSF RI implementation which *might* be related. I've 
>> only tried this on the MyFaces JSF implementation.
>>


[snip output showing h:dataTable generating unique ids, and t:dataTable 
not doing so]

> 
> 
> -> same client ids for each iteration are generated -> can't work!
> I'm using JSF RI 1.1.01 / current myfaces version and it does not seem 
> that the panelgrid is the only component having this problem (09.01.2006 
> 16:33: TabPane -> Form => Javascript-Error)
> 
> Do you have any ideas about that?

Ok, this *is* the same issue I referred to earlier. There is an 
incompatibility between t:dataTable and the Sun reference 
implementation's UIData class.

See:
   https://issues.apache.org/jira/browse/MYFACES-1010

The current consensus seems to be that this is a problem with the Sun 
RI. A workaround might be implemented in Tomahawk, but that's not going 
to help you in the near future.

You could always move to using the MyFaces JSF implementation :-).
Otherwise it looks like you either need to use h:dataTable or create 
your own version of t:dataTable containing one of the workarounds 
described in the JIRA issue.


Note: I'm not sure if this is related to the original CollapsiblePanel 
issue. Saurabh, are you using the Sun RI?

Regards,

Simon

Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

Posted by Hansjörg Meuschel <hj...@gmx.de>.
Simon Kitching wrote:

> Hansjörg Meuschel wrote:
>
>> Simon Kitching wrote:
>>
>>> Hansjörg Meuschel wrote:
>>>
>>>> Hi,
>>>> the problem is the surrounding t:datatable: Children of this 
>>>> component all get the same id as the component does not create new 
>>>> objects for each iteration.
>>>
>>>
>>>
>>> That's just not true.
>>>
>>> Both the h:dataTable and t:dataTable components use the "flyweight" 
>>> pattern to avoid creating a component-per-row. However they ensure 
>>> that the id effectively varies per row for the component, making 
>>> this transparent for most purposes.
>>
>>
>> oh ok... i don't know exactly all implementation details, however 
>> what i know is that the t:datatable has some serious problems:
>>
>> Example:
>> <h:form>
>> <t:datatable>
>> <t:column>
>> <h:inputText>
>> </ ...>
>>
>> THIS WILL NOT WORK! (all input field get the same id)
>>
>>
>> <h:form>
>> <h:datatable>
>> <h:column>
>> <h:inputText>
>> </ ...>
>> THIS WILL WORK! (all input field get different ids)
>>
>> This is the reason why the t:datatable can't be used with submittable 
>> componenents! Or am I doing something very wrong here ??
>
>
> You're doing something very wrong, though I don't know what. Input 
> fields in tables work fine for me, in MyFaces 1.1.1 and SVN head (I 
> haven't tried older versions).
>
> Note that the *id* of the component stays the same, but the *clientId* 
> changes. Given
>  <h:form id="form1">
>   <h:dataTable id="table1">
>    <h:column>
>     <h:inputText id="input1">
>
> During rendering, the *same* input-text component is called once per 
> row. If it calls getId(), it sees "input1". However if it calls 
> "getClientId", it sees:
>   form1:table1:0:input1
>   form1:table1:1:input1
>   form1:table1:2:input1
> which are all unique ids.
>
> Same process occurs during decoding of submitted values, so each 
> submitted value gets processed correctly.
>
> I also had a collapsible panel within a table and had that working a 
> few months ago. I've deleted that code since, though, as I've taken a 
> different approach to presenting that data.
>
> Note that there have been some problems reported recently regarding 
> tomahawk on sun's JSF RI implementation which *might* be related. I've 
> only tried this on the MyFaces JSF implementation.
>
> Regards,
>
> Simon



Hello Simon,
thanks for your explanations.

i've tried your example:

the output using

<h:form id="form1">
  <h:dataTable id="table1" value="#{projectBenefitBean.allTargetValues}" 
var="targetperiod">
   <h:column>
    <h:inputText id="input1"/>
   </h:column>
  </h:dataTable>
</h:form>

<form id="HJMEU:form1" name="HJMEU:form1" method="post" action="/Sophi2/pdca/plan/target0.faces" enctype="application/x-www-form-urlencoded"><table id="HJMEU:form1:table1">
<tbody>
<tr>
<td><input id="HJMEU:form1:table1:0:input1" name="HJMEU:form1:table1:0:input1" type="text" value="" /></td>
</tr>
<tr>
<td><input id="HJMEU:form1:table1:1:input1" name="HJMEU:form1:table1:1:input1" type="text" value="" /></td>

</tr>
<tr>
<td><input id="HJMEU:form1:table1:2:input1" name="HJMEU:form1:table1:2:input1" type="text" value="" /></td>
</tr>
<tr>
<td><input id="HJMEU:form1:table1:3:input1" name="HJMEU:form1:table1:3:input1" type="text" value="" /></td>
</tr>
<tr>
<td><input id="HJMEU:form1:table1:4:input1" name="HJMEU:form1:table1:4:input1" type="text" value="" /></td>
</tr>
<tr>
<td><input id="HJMEU:form1:table1:5:input1" name="HJMEU:form1:table1:5:input1" type="text" value="" /></td>
</tr>
<tr>
<td><input id="HJMEU:form1:table1:6:input1" name="HJMEU:form1:table1:6:input1" type="text" value="" /></td>
</tr>
<tr>

<td><input id="HJMEU:form1:table1:7:input1" name="HJMEU:form1:table1:7:input1" type="text" value="" /></td>
</tr>
<tr>
<td><input id="HJMEU:form1:table1:8:input1" name="HJMEU:form1:table1:8:input1" type="text" value="" /></td>
</tr>
<tr>
<td><input id="HJMEU:form1:table1:9:input1" name="HJMEU:form1:table1:9:input1" type="text" value="" /></td>
</tr>
<tr>
<td><input id="HJMEU:form1:table1:10:input1" name="HJMEU:form1:table1:10:input1" type="text" value="" /></td>
</tr>
</tbody>
</table>

-> just as you said: different client ids for each iteration are generated

and now the output using
<h:form id="form1">
  <t:dataTable id="table1" value="#{projectBenefitBean.allTargetValues}" 
var="targetperiod">
   <h:column>
    <h:inputText id="input1"/>
   </h:column>
  </t:dataTable>
</h:form>

<table id="HJMEU:form1:table1">
<tbody id="HJMEU:form1:table1:tbody_element">
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>

<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr>
<tr><td><input id="HJMEU:form1:table1:input1" name="HJMEU:form1:table1:input1" type="text" value="" /></td></tr></tbody></table>


-> same client ids for each iteration are generated -> can't work!
I'm using JSF RI 1.1.01 / current myfaces version and it does not seem that the panelgrid is the only component having this problem (09.01.2006 16:33: TabPane -> Form => Javascript-Error)

Do you have any ideas about that?







Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

Posted by Simon Kitching <sk...@obsidium.com>.
Hansjörg Meuschel wrote:
> Simon Kitching wrote:
> 
>> Hansjörg Meuschel wrote:
>>
>>> Hi,
>>> the problem is the surrounding t:datatable: Children of this 
>>> component all get the same id as the component does not create new 
>>> objects for each iteration.
>>
>>
>> That's just not true.
>>
>> Both the h:dataTable and t:dataTable components use the "flyweight" 
>> pattern to avoid creating a component-per-row. However they ensure 
>> that the id effectively varies per row for the component, making this 
>> transparent for most purposes.
> 
> oh ok... i don't know exactly all implementation details, however what i 
> know is that the t:datatable has some serious problems:
> 
> Example:
> <h:form>
> <t:datatable>
> <t:column>
> <h:inputText>
> </ ...>
> 
> THIS WILL NOT WORK! (all input field get the same id)
> 
> 
> <h:form>
> <h:datatable>
> <h:column>
> <h:inputText>
> </ ...>
> THIS WILL WORK! (all input field get different ids)
> 
> This is the reason why the t:datatable can't be used with submittable 
> componenents! Or am I doing something very wrong here ??

You're doing something very wrong, though I don't know what. Input 
fields in tables work fine for me, in MyFaces 1.1.1 and SVN head (I 
haven't tried older versions).

Note that the *id* of the component stays the same, but the *clientId* 
changes. Given
  <h:form id="form1">
   <h:dataTable id="table1">
    <h:column>
     <h:inputText id="input1">

During rendering, the *same* input-text component is called once per 
row. If it calls getId(), it sees "input1". However if it calls 
"getClientId", it sees:
   form1:table1:0:input1
   form1:table1:1:input1
   form1:table1:2:input1
which are all unique ids.

Same process occurs during decoding of submitted values, so each 
submitted value gets processed correctly.

I also had a collapsible panel within a table and had that working a few 
months ago. I've deleted that code since, though, as I've taken a 
different approach to presenting that data.

Note that there have been some problems reported recently regarding 
tomahawk on sun's JSF RI implementation which *might* be related. I've 
only tried this on the MyFaces JSF implementation.

Regards,

Simon

Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

Posted by Hansjörg Meuschel <hj...@gmx.de>.
Simon Kitching wrote:

> Hansjörg Meuschel wrote:
>
>> Hi,
>> the problem is the surrounding t:datatable: Children of this 
>> component all get the same id as the component does not create new 
>> objects for each iteration.
>
>
> That's just not true.
>
> Both the h:dataTable and t:dataTable components use the "flyweight" 
> pattern to avoid creating a component-per-row. However they ensure 
> that the id effectively varies per row for the component, making this 
> transparent for most purposes.

oh ok... i don't know exactly all implementation details, however what i 
know is that the t:datatable has some serious problems:

Example:
<h:form>
<t:datatable>
<t:column>
<h:inputText>
</ ...>

THIS WILL NOT WORK! (all input field get the same id)


<h:form>
<h:datatable>
<h:column>
<h:inputText>
</ ...>
THIS WILL WORK! (all input field get different ids)

This is the reason why the t:datatable can't be used with submittable 
componenents! Or am I doing something very wrong here ??
Greets Hans




Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

Posted by Simon Kitching <sk...@obsidium.com>.
Hansjörg Meuschel wrote:
> Hi,
> the problem is the surrounding t:datatable: Children of this component 
> all get the same id as the component does not create new objects for 
> each iteration.

That's just not true.

Both the h:dataTable and t:dataTable components use the "flyweight" 
pattern to avoid creating a component-per-row. However they ensure that 
the id effectively varies per row for the component, making this 
transparent for most purposes.

Re: Urgent: Collapsible Panel with data table not working IllegalStateException: Client-id : _id3ToggleCollapsed

Posted by Hansjörg Meuschel <hj...@gmx.de>.
Hi,
the problem is the surrounding t:datatable: Children of this component 
all get the same id as the component does not create new objects for 
each iteration.
-> I recommend switching to the h:datatable or writing your own component!
Greets, Hans


Saurabh Rasinghaney wrote:

> Hi All,
>
>  
>
> We are facing a problem (java.lang.IllegalStateException: Client-id : 
> _id3ToggleCollapsed is duplicated in the faces tree.) with Collapsible 
> Panel, when we are using Collapsible inside a data table. When we 
> display one row it shows one panel but when we display multiple rows 
> it gives error (attached below).
>
>  
>
> I am not sure if we can do this or not. The code and exception trace 
> is attached below.
>
>  
>
> Any suggestions are welcome. Thanks in advance for your help.
>
>  
>
> Thanks,
>
> Saurabh
>
>  
>
>  
>
>  
>
>  
>
>         <t:dataTable id="test_dt" var="prodReq" 
> value="#{prqViewBacking.productionRequests}" preserveDataModel="false"
>
>                     styleClass="scrollerTable"
>
>                 headerClass="standardTable_Header"
>
>                 footerClass="standardTable_Header"
>
>                 rowClasses="standardTable_Row1,standardTable_Row2"
>
>                 
> columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
>
>         >
>
>        
>
>             <h:column>               
>
>                 <f:facet name="header">
>
>                  <t:div 
> style="width:500px;background-color:#CCCCCC;align=left">
>
>                               <h:outputText value="Production Request "/>
>
>                  </t:div>
>
>                 </f:facet>
>
>                
>
>                    <t:collapsiblePanel dir="ltr" 
> collapsed="#{prodReq.collapsed}">
>
>                       <h:panelGrid>
>
>                               <h:inputText value="#{prodReq.firstName}"/>
>
>                               <h:inputText value="#{prodReq.surName}"/>
>
>                               <h:inputText value="#{prodReq.collapsed}"/>
>
>                           </h:panelGrid>
>
>                 </t:collapsiblePanel>
>
>             </h:column>
>
>  
>
>  
>
>  
>
>  
>
> import java.util.ArrayList;
>
>  
>
> /**
>
>  *
>
>  */
>
>  
>
> public class PrqViewBacking implements java.io.Serializable {
>
>                
>
>     //private boolean _collapsed=true;
>
>     private ArrayList<ProductionRequest> _productionRequests;
>
>    
>
>     public PrqViewBacking() {
>
>                 ArrayList<ProductionRequest> productionRequests  = new 
> ArrayList<ProductionRequest>();
>
>                 //test data
>
>                 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"));
>
>                 this.setProductionRequests(productionRequests);
>
>     }   
>
>    
>
>    
>
>  
>
>                 public ArrayList getProductionRequests() {
>
>                                 System.out.println("In get prod req" + 
> _productionRequests);                              
>
>                                 return _productionRequests;
>
>                 }
>
>                
>
>                 public ArrayList productionRequests() {
>
>                                 
> System.out.println(_productionRequests);                            
>
>                                 return _productionRequests;
>
>                 }
>
>  
>
>                 public void setProductionRequests(ArrayList 
> productionRequests) {
>
>                                 _productionRequests = productionRequests;
>
>                 }
>
> }
>
>  
>
>  
>
>  
>
> public class ProductionRequest implements java.io.Serializable {
>
>                
>
>                 private String _firstName;
>
>                 private String _surName;
>
>                 private String _birthDate;
>
>                
>
>                 private static Integer id=0;
>
>                
>
>                 private boolean _collapsed=true;
>
>                
>
>                 public static String getId() {
>
>                                 return "_" + (++id).toString();
>
>                 }
>
>                
>
>                
>
>                 public ProductionRequest() {
>
>                                 //Do Nothing                            
>
>                 }
>
>                
>
>                 public ProductionRequest(String firstName, String 
> surName, String birthDate) {
>
>                                 setFirstName(firstName);
>
>                                 setSurName(surName);
>
>                                 setBirthDate(birthDate);
>
>                 }
>
>                
>
>                   public boolean collapsed() {
>
>                         return _collapsed;
>
>                   }
>
>                  
>
>     public boolean isCollapsed() {
>
>         return _collapsed;
>
>     }
>
>  
>
>     public void setCollapsed(boolean collapsed) {
>
>         _collapsed = collapsed;
>
>     }
>
>    
>
>     public boolean getCollapsed() {
>
>        return _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;
>
>                 }
>
>  
>
>  
>
> }
>
>  
>
>  
>
> 14:48:24,390 ERROR [[jsp]] Servlet.service() for servlet jsp threw 
> exception
>
> java.lang.IllegalStateException: Client-id : _id3ToggleCollapsed is 
> duplicated in the faces tree.
>
>         at 
> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:241)
>
>         at 
> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:255)
>
>         at 
> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:255)
>
>         at 
> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:251)
>
>         at 
> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:251)
>
>         at 
> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:255)
>
>         at 
> org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:204)
>
>         at 
> org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:139)
>
>         at 
> org.apache.jsp.app.PrqView_jsp._jspx_meth_f_view_0(org.apache.jsp.app.PrqView_jsp:140)
>
>         at 
> org.apache.jsp.app.PrqView_jsp._jspService(org.apache.jsp.app.PrqView_jsp:100)
>
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
>
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>
>         at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
>
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
>
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
>
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>
>         at 
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
>
>         at 
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
>
>         at 
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
>
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
>
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>
>         at 
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
>
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>
>         at 
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
>
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>
>         at 
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
>
>         at 
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
>
>         at 
> org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:81)
>
>         at 
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
>
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>
>         at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>
>         at 
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
>
>         at java.lang.Thread.run(Thread.java:595)
>
>  
>
>  
>
>  
>
> Best Regards,
>
> ________________
>
> *Saurabh Raisinghaney *
>
>  
>


-- 
Mit freundlichen Grüßen,

------------------------------
 Hansjörg Meuschel
 Martin-Treu-Str. 40
 90403 Nürnberg
 Tel.   +49 (0)911 274 278 1
 mobil: +49 (1)60 725 3479
 mail:  hjmeu@gmx.de
 http://www.meuschel.net