You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by PATRICIA GUEDES <gu...@gmail.com> on 2005/10/27 13:55:00 UTC

Getting the index of the clicked image

Hi everyone,

I am using a dataTable with a dataModel (my remessaBean.valuesEmbque
is a DataModel). Each line of my dataTable has an image. How can I get
the index of the clicked image?

Ex:

<x:dataTable value="#{remessaBean.valuesEmbque}" var="values" >
       <x:column>
            <f:facet name="header">
                <h:outputText value="Excluir" styleClass="forms"/>
            </f:facet>
            <h:commandButton actionListener="#{remessaBean.delEmbque}"
                                        
image="/eServices/eservices/images/trash.gif" />
       </x:column>
</x:dataTable>

Thanks.
Guedes

AW: Getting the index of the clicked image

Posted by Hans Sowa <ha...@procon.co.at>.
Hi Patricia

You can use the method getRowData() of the class DataModel. The method
returns the clicked row in the datatable. Maybe this helps.

mfg Hans Sowa
PROCON DATA Datenverarbeitung Ges.m.b.H.
mailto:hans.sowa@procon.co.at
http://www.procon.co.at


-----Ursprüngliche Nachricht-----
Von: PATRICIA GUEDES [mailto:guedes.castro@gmail.com] 
Gesendet: Donnerstag, 27. Oktober 2005 13:55
An: users@myfaces.apache.org
Betreff: Getting the index of the clicked image

Hi everyone,

I am using a dataTable with a dataModel (my remessaBean.valuesEmbque
is a DataModel). Each line of my dataTable has an image. How can I get
the index of the clicked image?

Ex:

<x:dataTable value="#{remessaBean.valuesEmbque}" var="values" >
       <x:column>
            <f:facet name="header">
                <h:outputText value="Excluir" styleClass="forms"/>
            </f:facet>
            <h:commandButton actionListener="#{remessaBean.delEmbque}"
                                        
image="/eServices/eservices/images/trash.gif" />
       </x:column>
</x:dataTable>

Thanks.
Guedes