You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Rob Audenaerde <ro...@gmail.com> on 2016/10/28 11:33:03 UTC
wicket datatable, row selection, update another component
Hi all,
I have a DataTable which, in onConfigure(), sets a selected item. I want
another (detail) panel, outside of this component, to react on that
selection i.e. set it's visibility and render details of the selected item.
What I see is that the onConfigure() of the detail component is called
BEFORE the DataTable, so I figure it renders before the DataTable is
rendered, so the detail.setVisible() in the onConfigure() in the DataTable
is called too late.
How should I solve this? The only component that know which item is going
to be selected is the DataTable.
Thanks,
Rob
Re: wicket datatable, row selection, update another component
Posted by Rob Audenaerde <ro...@gmail.com>.
Thanks Martin, I ended up with doing something like this, but then using
events so the components don't need to know each other.
On Oct 28, 2016 14:40, "Martin Grigorov" <mg...@apache.org> wrote:
> Hi,
>
> You can do: DetailsComponent#onConfigure() {dataTable.configure();
> configureMyself();}
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Oct 28, 2016 at 1:33 PM, Rob Audenaerde <ro...@gmail.com>
> wrote:
>
> > Hi all,
> >
> > I have a DataTable which, in onConfigure(), sets a selected item. I want
> > another (detail) panel, outside of this component, to react on that
> > selection i.e. set it's visibility and render details of the selected
> item.
> >
> > What I see is that the onConfigure() of the detail component is called
> > BEFORE the DataTable, so I figure it renders before the DataTable is
> > rendered, so the detail.setVisible() in the onConfigure() in the
> DataTable
> > is called too late.
> >
> > How should I solve this? The only component that know which item is going
> > to be selected is the DataTable.
> >
> > Thanks,
> > Rob
> >
>
Re: wicket datatable, row selection, update another component
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
You can do: DetailsComponent#onConfigure() {dataTable.configure();
configureMyself();}
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Fri, Oct 28, 2016 at 1:33 PM, Rob Audenaerde <ro...@gmail.com>
wrote:
> Hi all,
>
> I have a DataTable which, in onConfigure(), sets a selected item. I want
> another (detail) panel, outside of this component, to react on that
> selection i.e. set it's visibility and render details of the selected item.
>
> What I see is that the onConfigure() of the detail component is called
> BEFORE the DataTable, so I figure it renders before the DataTable is
> rendered, so the detail.setVisible() in the onConfigure() in the DataTable
> is called too late.
>
> How should I solve this? The only component that know which item is going
> to be selected is the DataTable.
>
> Thanks,
> Rob
>