Hi,
In myfaces examples is an example about using x:updateActionListener, in dataTable.jsp,
you can set any property you want.
Is working for me.


<h:column>
<f::facet name="header">
<h:outputText value="#{example_messages['label_country_name']}" />
</f::facet>
<x:commandLink action="go_country" immediate="true" >
<h:outputText value="#{country.name}" />
<!-- for convenience: MyFaces extension. sets id of current row in countryForm -->
<!-- you don't have to implement a custom action! -->
<x:updateActionListener property="#{countryForm.id}" value="#{country.id}" />
</x:commandLink>
</h:column>



Cristi


Heath Borders wrote:

There are a few ways to do this.  The easiest is to get call:

FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("var");

where "var" is the name of your datatable's variable.

On Apr 6, 2005 9:45 PM, *Ray Clark* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I'm sure this must have been asked before but I can't
    find it in the archives.  So please forgive me if it
    has been asked before.

    I have a dataTable with a commandButton rendered on
    each row.  When the commandButton is pressed I need
    it's managed bean method to know which row the button
    was pressed for.  So how can the method know which row
    to process?

    Thanks,
    Ray


__________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo




--
-Heath Borders-Wing
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>




Reply via email to