You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bravo Villegas Salvador Francisco <SB...@sigmatao.com> on 2008/07/11 01:37:29 UTC
[Tobago] Retrieve sheet selected row value
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.
RE: [Tobago] Retrieve sheet selected row value
Posted by Bravo Villegas Salvador Francisco <SB...@sigmatao.com>.
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: weber.volker@googlemail.com [mailto:weber.volker@googlemail.com] 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 <SB...@sigmatao.com>:
> 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
Re: [Tobago] Retrieve sheet selected row value
Posted by Volker Weber <v....@inexso.de>.
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 <SB...@sigmatao.com>:
> 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