myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michał 'Gandalf' Stawicki" <stawi...@gmail.com>
Subject Re: [Tobago] using value from tc:link on server
Date Tue, 27 Mar 2007 09:26:44 GMT
I don't know if it should work, but you could try this:

define a request scope bean using spring, where you will store the ID.
Using Spring, inject this bean into bean where you need to use the ID.
Now, in the tc:link's listener, get yours link object from event, read
ID from it, and store it in the request scoped bean. Then you can
access ID where you have injected the request scoped bean.

This is what I would try at first

regards,
michał

On 27/03/07, Clemens Sietas <siecle@gmx.de> wrote:
> Hi Volker,
>
> thank you for your answer.
> However, I could not get the grip of the solution
> for my tc:link problem from the popup-example.
>
> My table (sheet) is filled by a database select.
> One column is configured as link and the lable of the
> link is filled with a specific Id (String).
> When the link is clicked the Id should be used for
> a further select.
> The table does not know what Id is in the specific row.
>
> Is it correct to use the lable to display the value of the Id?
> The lable is bound (var="leftTableBoData) with reference
> of the list which is (bean-)bound via the sheet (mainctrl.ctrDlgMainDialog.leftTableBoData).
> The lable calls the method leftTableBoData (label="#{leftTableBoData.leftTable01Column}").
>
> This is the normal binding I used to know, unfortunately I have
> no idea how to get the String value back to the server?
> (Listener?/Action-Method?)
>
> Again thanks for any help
> Regards
> Clemens
>
> -------- Original-Nachricht --------
> Datum: Mon, 26 Mar 2007 16:03:53 +0200
> Von: "Volker Weber" <v.weber@inexso.de>
> An: "MyFaces Discussion" <users@myfaces.apache.org>
> Betreff: Re: [Tobago] using value from tc:link on server
>
> > Hi Clemens,
> >
> > please see this thread:
> >
> > http://www.nabble.com/-Tobago--Popup-inside-tc%3Asheet-tf3466547.html
> >
> > and ask here again if this did not help.
> >
> > Regards,
> >   Volker
> >
> > 2007/3/26, Clemens Sietas <siecle@gmx.de>:
> > > Hello,
> > >
> > > how can I get hold of the displayed label in a
> > > tc:link in the server code.
> > >
> > >        <tc:sheet value="#{mainctrl.ctrDlgMainDialog.leftTableBoData}"
> > columns="2*;6*" var="leftTableBoData">
> > >           <tc:column label="Id"
> > >                      id="name" sortable="true">
> > >             <tc:link
> > action="#{mainctrl.ctrDlgMainDialog.searchRightAction}" immediate="true"
> > >                      label="#{leftTableBoData.leftTable01Column}"/>
> > >
> > > The label contains the id. When the link is clicked I need
> > > the Id as string on the server for a search for a second table.
> > > How can I read the value of the label?
> > >
> > > Thanks in advance
> > > Clemens Sietas
> > >
> > > --
> > > --------------------------------------------
> > > Clemens Sietas
> > > email: siecle@gmx.de
> > > --------------------------------------------
> > >
> > >
> > >
>
> --
> --------------------------------------------
> Clemens Sietas
> email: siecle@gmx.de
> --------------------------------------------
>
>
>


-- 
stawicki@gmail.com
http://stawicki.jasliska.pl
GG: 3691111
JID: stawicki@gmail.com
Mime
View raw message