You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Gast, Thorsten" <th...@wirecard.com> on 2010/05/05 17:17:40 UTC
Dynamically adding rows to a html table
Hi,
we have a list of search results which are displayed in a html table. One entry per row. To see more details of a result, an ajax link should trigger a rendering of a new table row (<tr>) directly beneath the selected entry.
In a first approach we rendered a hidden table row (with wicket:id) which should be filled with the details. Currently we try to replace the table row e.g. with a method call to replaceWith of Component. We succeeded in displaying the content, but the tablerow wasn’t replaced. Instead a new one was created (without a markupid). So there is the problem that we have an empty and hidden tablerow and a new tablerow which can’t be removed dynamically afterwards.
Is there a best practice how this issue could be solved?
Regards
Thorsten
Re: Dynamically adding rows to a html table
Posted by Igor Vaynberg <ig...@gmail.com>.
http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/
-igor
On Wed, May 5, 2010 at 8:17 AM, Gast, Thorsten
<th...@wirecard.com> wrote:
> Hi,
>
> we have a list of search results which are displayed in a html table. One entry per row. To see more details of a result, an ajax link should trigger a rendering of a new table row (<tr>) directly beneath the selected entry.
> In a first approach we rendered a hidden table row (with wicket:id) which should be filled with the details. Currently we try to replace the table row e.g. with a method call to replaceWith of Component. We succeeded in displaying the content, but the tablerow wasn’t replaced. Instead a new one was created (without a markupid). So there is the problem that we have an empty and hidden tablerow and a new tablerow which can’t be removed dynamically afterwards.
>
> Is there a best practice how this issue could be solved?
>
> Regards
>
> Thorsten
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Dynamically adding rows to a html table
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
I have noticed that with HTML tables you must often redraw table if
you want to add or manipulate rows.
**
Martin
2010/5/5 Gast, Thorsten <th...@wirecard.com>:
> Hi,
>
> we have a list of search results which are displayed in a html table. One entry per row. To see more details of a result, an ajax link should trigger a rendering of a new table row (<tr>) directly beneath the selected entry.
> In a first approach we rendered a hidden table row (with wicket:id) which should be filled with the details. Currently we try to replace the table row e.g. with a method call to replaceWith of Component. We succeeded in displaying the content, but the tablerow wasn’t replaced. Instead a new one was created (without a markupid). So there is the problem that we have an empty and hidden tablerow and a new tablerow which can’t be removed dynamically afterwards.
>
> Is there a best practice how this issue could be solved?
>
> Regards
>
> Thorsten
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org