Are you using latest nightly?

There has been a fair amount of fixes for collapsible panel from 1.1.1 to the current version. Word of warning: the value attribute is now the title attribute, and the collapsed attribute is now the value attribute (this was basically the reason why the old collapsible panel wouldn't work in a dataTable, the new one does).

regards,

Martin

On 3/25/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED] > wrote:
Hey everybody,

I got a question concerning the collapsible Panel Tag of MyFaces. I have several objects inside a database and I added the "toggleCollapsed" boolean Attribute to the bean.

So that's what the Comments Bean looks like. Just a few getters and setters, filled by hibernate. Hibernate doesn't touch the property for the panel.

BUT: When I expand the panel, all of the objects expand and not only the one I selected. To get this straight: the datatable iterates the objects inside the list. So each object has a different "toggleCollapsed" property.

Why does the panel expand all the objects? Here's a screenshot of both states and the source of the JSF Code.

panel

I'd be glad if anybody could help me with that.

If I am not rebuilding, you can check it out for yourself: http://82.207.147.13:8080/Produktredaktion/pages/kommentare.xhtml

Thanks in advance,

Andreas


                        <t:dataTable
                                id="kommentare"
                                value="#{benutzerKommentare.comments}"
                                var="comments"
                                rows="15"
                                rowClasses="oddRow, evenRow"
                                renderedIfEmpty="true"
                                headerClass="tableHeader"
                                preserveDataModel="false"
                                >

                                <t:column>
                                <f:facet name="header">
                                <h:outputText value="ID" />
                                </f:facet>
                                <t:outputText value="#{comments.id}" />
                                </t:column>

                                <t:column width="30">
                                <f:facet name="header">
                                <h:outputText value="Kommentar" />
                                </f:facet>
                                <t:outputText value="#{comments.kommentar}" />
                                </t:column>

                                <t:column width="30">
                                <f:facet name="header">
                                <h:outputText value="Benutzername" />
                                </f:facet>
                                <t:outputText value="#{comments.benutzer.vorname} #{comments.benutzer.nachname}" />
                                </t:column>

                                <t:column>
                                <f:facet name="header">
                                <h:outputText value="" />
                                </f:facet>

                                <t:collapsiblePanel value="antworten" collapsed="#{comments.toggleCollapsed}" var="#{collapsed}" >
                                <h:inputText value="#{comments.reaktion}" rendered="#{!collapsed}"/>
                                </t:collapsiblePanel>
                                </t:column>

                        </t:dataTable>







--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to