Hi Volker
I tried with the following
But it still doesn't work
public void update(ActionEvent actionEvent) {
PageActionEvent pageEvent = (PageActionEvent) actionEvent;
UIData sheet = pageEvent.getSheet();
SheetState sheetState =
sheet.getSheetState(FacesContext.getCurrentInstance());
List<Integer> indexes = sheetState.getSelectedRows();
Send me this error
javax.faces.event.ActionEvent incompatible with
org.apache.myfaces.tobago.event.PageActionEvent
what I do wrong?
Regards
Salvador
-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Volker Weber
Enviado el: Viernes, 11 de Julio de 2008 02:18 a.m.
Para: MyFaces Discussion
Asunto: Re: [Tobago] Retrieve sheet selected row value
Hi Salvador,
you need to add the state attribute to the sheet, which points to a
SheetState[1] object.
then you can do :
List<Integer> indexes = sheetState.getSelectedRows();
which returns the list of selected row indexes, in case of
selectable="single" just one.
Regards,
Volker
[1]:
http://myfaces.apache.org/tobago/apidocs-1.0.17/org/apache/myfaces/tobago/model/SheetState.html
2008/7/11 Bravo Villegas Salvador Francisco <[EMAIL PROTECTED]>:
> Hi all,
>
>
>
> I have the sheet <tc:sheet selectable="single" in my .jsp
>
> How can I retrieve in my code the row selected?
>
>
>
> Thanks in advance.
>
> Regards,
>
> Salvador B.
--
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de