Hi,

if you use the actionListener attribute instead of the action attribute,
(if you need to do navagation here you need both) you get a
actionEvent in your method
and can get the actual rowdata:

<tc:link actionListener="#{mainctrl.ctrDlgMainDialog.searchRightActionListener}"
...

public void searchRightActionListener(ActionEvent event) {

 UIComponent o = event.getComponent();
 while(o != null && !(o instanceof UIData)) {
   o = o.getParent();
 }
 UIData data = (UIData)(o);

 leftTableBoData = data.getRowData();
 id = leftTableBoData.getLeftTable01Column();

}

Regards,
 Volker

2007/3/27, Clemens Sietas <[EMAIL PROTECTED]>:
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" <[EMAIL PROTECTED]>
An: "MyFaces Discussion" <[email protected]>
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 <[EMAIL PROTECTED]>:
> > 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: [EMAIL PROTECTED]
> > --------------------------------------------
> >
> >
> >

--
--------------------------------------------
Clemens Sietas
email: [EMAIL PROTECTED]
--------------------------------------------



Reply via email to