You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Paul Ryan <pa...@gmail.com> on 2007/02/26 10:36:05 UTC
togglelink within a datatable
Hi,
I am trying to do inline editing within a table. I have included a
togglePanel component as a column value within a <t:datatable>, my problem
is that the 'for' attribute seems to require the explicit id of the
component to hide/display, so when my table contains more than one row, the
ids get mixed up.
Does anyone have a solution to this or a better way to do this ?
This is my jsf snippet
<h:column>
<s:togglePanel>
<s:toggleGroup>
<s:toggleLink for="editValue">
<h:outputText value="click to edit"/>
</s:toggleLink>
</s:toggleGroup>
<t:div id="editValue">
<t:inputText value="#{test.value}"/>
<h:commandLink value="Update"
actionListener="#{handler.update}"/>
</t:div>
</s:togglePanel>
</h:column>
Thanks,
Paul.
--
View this message in context: http://www.nabble.com/togglelink-within-a-datatable-tf3291761.html#a9155856
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: togglelink within a datatable
Posted by Werner Punz <we...@gmail.com>.
Paul Ryan schrieb:
> Hi,
>
> I am trying to do inline editing within a table. I have included a
> togglePanel component as a column value within a <t:datatable>, my problem
> is that the 'for' attribute seems to require the explicit id of the
> component to hide/display, so when my table contains more than one row, the
> ids get mixed up.
> Does anyone have a solution to this or a better way to do this ?
>
> This is my jsf snippet
>
> <h:column>
> <s:togglePanel>
> <s:toggleGroup>
> <s:toggleLink for="editValue">
> <h:outputText value="click to edit"/>
> </s:toggleLink>
> </s:toggleGroup>
>
> <t:div id="editValue">
> <t:inputText value="#{test.value}"/>
> <h:commandLink value="Update"
> actionListener="#{handler.update}"/>
> </t:div>
> </s:togglePanel>
> </h:column>
>
There is a less dynamic toggle mechanism already embedded in tomahawk
check the master detail example which does exactly that, toggeling of
detail stuff in a data table.