I understand it now. Thanks for your assistance

On Fri, Aug 13, 2010 at 1:36 PM, Bodis, Jerome <bo...@uni-mainz.de> wrote:

> Just create a panel that holds you links/buttons or whatever and that is
> loaded with your invoice model. The panel could have a link with your
> invoice number and in the onClick/onSubmit method you trigger a redirect to
> your details page or something like this.
> Take a look at the wicket phonebook demo application or see my last column:
>
> List<IColumn<Object[]>> columns = new ArrayList<IColumn<Object[]>>();
> columns.add(new AbstractColumn<Object[]>(new Model<String>("Name"),
> "dnsAname") { XXX });
> columns.add(new AbstractColumn<Object[]>(new Model<String>("Sub-Domäne"),
> "dnsDomain") { XXX });
> columns.add(new AbstractColumn<Object[]>(new Model<String>("Ip"),
> "ipAddress") { XXX });
> columns.add(new AbstractColumn<Object[]>(new Model<String>("Mac"),
> "etherHwAddr") { XXX });
> columns.add(new AbstractColumn<Object[]>(new Model<String>("Standort"),
> "location") { XXX });
> columns.add(new AbstractColumn<Object[]>(new Model<String>(" "))
> {
>        public void populateItem(Item<ICellPopulator<Object[]>> cellItem,
> String componentId, IModel<Object[]> rowModel)
>        {
>                /*
>                * A panel that has some buttons
>                */
>                ActionsPanel<Device> actions = new ActionsPanel<Device>(
> SOME PARAMETER )
>                {
>                        @Override
>                        public void onSubmitButton1(AjaxRequestTarget
> target, Form form)
>                        {
>                                DO SOMETHING
>                        }
> });
> _devicesAFDDT = new AjaxFallbackDefaultDataTable<Object[]>("devicesTable",
> columns, dataProvider, 20)
>
>
>
> -----Original Message-----
> From: Josh Kamau [mailto:joshnet2...@gmail.com]
> Sent: Friday, August 13, 2010 12:05 PM
> To: users@wicket.apache.org
> Subject: Re: overriding newRowItem() in AjaxFallbackDefaultDataTable
>
> Thanks Jerome. What i want is to make the data in the cells clickable so
> that users can use them to drill down. For example, one column displays
> invoice numbers. I want the invoice number displayed to be a link so that a
> user can click it to open the invoice details page. I thought i would do so
> by overriding the way the cells are rendered. I am still not able to do
> this.
>
> Regards.
> Josh
>
> On Fri, Aug 13, 2010 at 12:59 PM, Bodis, Jerome <bo...@uni-mainz.de>
> wrote:
>
> >
> > >Somebody please help me with a sample code on how to override the
> > newRowItem method of the AjaxFallbackDefaultDataTable
> >
> > _dbsTable = new
> > AjaxFallbackDefaultDataTable<DnsDomainBuildingSubnet>("dbsTable",
> > dbsColumns, dbsProvider, 20)
> >                {
> >                        // add a tooltip to each row
> >                        @Override
> >                        protected Item<DnsDomainBuildingSubnet>
> > newRowItem(String id,
> >                                        int index,
> > IModel<DnsDomainBuildingSubnet> model) {
> >
> >                                Item<DnsDomainBuildingSubnet> item =
> > super.newRowItem(id, index, model);
> >
> >                                String info = "blabla";
> >
> >                                item.add(new
> > JQueryTooltipBehavior(info));
> >
> >                                return item;
> >                         }
> >                };
> >
> > >I would like to display some of the columns as links . is this the
> > >way to
> > do it?
> >
> > Add a panel with your links (or whatever content you need) to an
> > AbstractColumn and append this to your list of columns
> > (List<IColumn<XX>>)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to