You could put a link on each row

On Sat, Feb 14, 2009 at 12:19 PM, Christoph Grün <chris...@gmx.at> wrote:
> Hi all,
>
>
>
> I have a datatable and following method that delivers the selected item in
> the table. How can I get the index of the selected element? There are
> methods for getting the current page index and all page rows, but I couldn't
> find a function for getting the index of the current element.
>
>
>
> datatable.getRowsPerPage();
>
> datatable.getCurrentPage();
>
>
>
> public ActionPanel(String id, IModel<T> model) {
>
>            super(id, model);
>
>            add(new Link("select") {
>
>                @Override
>
>                public void onClick() {
>
> T selected = (T) getParent().getDefaultModelObject();
>
>                }
>
>            });
>
>
>
> Thanks a lot!
>
> Br, Christoph
>
>
>
>
>
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to