I created a Quickstart with what Im trying to do - this may not be the best
way, and my approach might be way off the mark:

https://dl.dropbox.com/u/107816727/quickstart.tar.gz

A couple of points:

1. I'd really like to use Datatables JS lib - it works well on all the
platforms Ive tested in on
2. When applying a Datatable() on top of an existing <table>, the table
cannot contain any <td> elements with colspan attributes - it breaks
Datatables.  This is why I'm using the fnOpen and fnClose functions of
Datatables, and invoking a callback.

There maybe a simpler/better way than Ive coded up here - Im open to
suggestions.

The end result of this will be a reusable Component that leverages
Datatables to provide client side filtering, pagination and sorting, with
dynamically loaded expandable Panels (obtained through an interface
callback on the server side).  Ive achieved similar functionality in the
past by using a Repeater that repeated 2x <tr>, with the second <tr> being
an EmptyPanel until the user clicked an AjaxLink, then I did a
addOrReplace( new DetailsPanel() ) on the server side, rerendering the
repeated group. In this scenario, the second <tr> was structured as:
<tr><td colspan="n"><div wicket:id="foo"></div></td></tr>.  However, that
colspan breaks Datatables - see #2 above.

N


On Tue, Nov 27, 2012 at 2:40 AM, Martin Grigorov <mgrigo...@apache.org>wrote:

> Hi,
>
> Since the markup is added dynamically it looks like
> MarkupContainer#autoAdd() is the best match.
> You'll need to create the MarkupStream yourself.
>
>
> On Tue, Nov 27, 2012 at 3:53 AM, Nick Pratt <nbpr...@gmail.com> wrote:
>
> > If I create an empty element (a <div>) in HTML (via jQuery), and assign
> it
> > an ID, is it possible to
> > create a Wicket Panel (via an Ajax callback) to replace that element?
> >
> >
> > N
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>

Reply via email to