You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Andreas Zeller - zit-systems <an...@zit-systems.de> on 2006/03/25 22:53:37 UTC
t:collapsiblePanel
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>
Re: t:collapsiblePanel
Posted by Martin Marinschek <ma...@gmail.com>.
Duplicate ID?
no clue. can you post the stacktrace?
regards,
Martin
On 3/27/06, Andreas Zeller - zit-systems <an...@zit-systems.de>
wrote:
>
> Very well then... Running snapshot now... Gives me an exception...
> duplicate ID... Doesn't work at all and I don't know why... I think I gotta
> implement something on my own...
>
>
> Martin Marinschek wrote:
>
> 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 <andreas.zeller@zit-systems.de >
> 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.
> >
> > [image: 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
>
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
Re: t:collapsiblePanel
Posted by Andreas Zeller - zit-systems <an...@zit-systems.de>.
Very well then... Running snapshot now... Gives me an exception...
duplicate ID... Doesn't work at all and I don't know why... I think I
gotta implement something on my own...
Martin Marinschek wrote:
> 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*
> <andreas.zeller@zit-systems.de <ma...@zit-systems.de>>
> 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
> <http://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
Re: t:collapsiblePanel
Posted by Andreas Zeller - zit-systems <an...@zit-systems.de>.
Hey Martin,
No, I actually don't. But this should be a completely different object
inside the dataTable. Indpendent from the version of the collapsible, right?
Whatever... Thanks for the hint... I'll give it a try and let you guys
know if it works.
Andreas
Martin Marinschek wrote:
> 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*
> <andreas.zeller@zit-systems.de <ma...@zit-systems.de>>
> 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
> <http://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
Re: t:collapsiblePanel
Posted by Martin Marinschek <ma...@gmail.com>.
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 <an...@zit-systems.de>
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.
>
> [image: 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