myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Clark <rcc1234...@yahoo.com>
Subject Re: dataTable and commandButton question
Date Fri, 08 Apr 2005 01:18:56 GMT
Thank you all for your help.  I have plenty of ideas
now to ponder which one will fit my needs best. 
Thanks a bunch :)

Ray

--- Grigoras Cristinel <grig@wdd.ro> wrote:
> 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*
> <rcc1234567@yahoo.com 
> > <mailto:rcc1234567@yahoo.com>> 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
> > hborders@mail.win.org
> <mailto:hborders@mail.win.org> 
> 
> 
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Sports - Sign up for Fantasy Baseball. 
http://baseball.fantasysports.yahoo.com/

Mime
View raw message