You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Thierry Leveque <tl...@gmail.com> on 2009/04/23 17:45:51 UTC

Problem with ListView embedded in another ListView

Hi

I have a ListView that is embedded inside another ListView. Both ListView
are dynamic: Both have an Add and a Remove button.
The ietms in both ListView are a series of form fields.

The problem I have is only with my second ListView when I add more than one
item without submitting the form. The fields lost their content. i.e. If I
click on my Add button a new row with fields appear. I put some values in
those fields. I click again on my Add button, the new row appear but the
values I just enter before are lost!
And yes I put my getReuseItems() to true.

The same thing is working fine with the ListView at the first level. The
values in the fields are not lost.
The problem is only with the embeded one.

Any idea??

Thierry
Sent from Montreal, Quebec, Canada

Re: Problem with ListView embedded in another ListView

Posted by Thierry Leveque <tl...@gmail.com>.
Thank you very much!!!
The AjaxSubmitLink ( with the DefaultFormProcessing set to false) solve my
problem!!

This is what happening when using to much copy-paste!! I was already using
AjaxSubmitLink everywhere in my code....

Thierry
Sent from Montreal, Quebec, Canada

On Thu, Apr 23, 2009 at 13:28, Igor Vaynberg <ig...@gmail.com>wrote:

> is the link repainting the entire listview? in that case all values
> will be lost because they are not submitted. either use
> ajaxsubmitlink, or only repaint the new row. there is an article on
> wicketinaction.com that shows how to do it.
>
> -igor
>
> On Thu, Apr 23, 2009 at 9:57 AM, Thierry Leveque <tl...@gmail.com>
> wrote:
> > No, it is an AjaxFallbackLink
> >
> > Both ListView use AjaxFallbackLink to Add or Remove item.
> >
> > Thierry
> > Sent from Montreal, Quebec, Canada
> >
> > On Thu, Apr 23, 2009 at 12:44, Igor Vaynberg <igor.vaynberg@gmail.com
> >wrote:
> >
> >> is your "add" button submitting the form?
> >>
> >> is setreuseitems turned on on both listviews?
> >>
> >>
> >> -igor
> >>
> >> On Thu, Apr 23, 2009 at 8:45 AM, Thierry Leveque <tl...@gmail.com>
> >> wrote:
> >> > Hi
> >> >
> >> > I have a ListView that is embedded inside another ListView. Both
> ListView
> >> > are dynamic: Both have an Add and a Remove button.
> >> > The ietms in both ListView are a series of form fields.
> >> >
> >> > The problem I have is only with my second ListView when I add more
> than
> >> one
> >> > item without submitting the form. The fields lost their content. i.e.
> If
> >> I
> >> > click on my Add button a new row with fields appear. I put some values
> in
> >> > those fields. I click again on my Add button, the new row appear but
> the
> >> > values I just enter before are lost!
> >> > And yes I put my getReuseItems() to true.
> >> >
> >> > The same thing is working fine with the ListView at the first level.
> The
> >> > values in the fields are not lost.
> >> > The problem is only with the embeded one.
> >> >
> >> > Any idea??
> >> >
> >> > Thierry
> >> > Sent from Montreal, Quebec, Canada
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Problem with ListView embedded in another ListView

Posted by Igor Vaynberg <ig...@gmail.com>.
is the link repainting the entire listview? in that case all values
will be lost because they are not submitted. either use
ajaxsubmitlink, or only repaint the new row. there is an article on
wicketinaction.com that shows how to do it.

-igor

On Thu, Apr 23, 2009 at 9:57 AM, Thierry Leveque <tl...@gmail.com> wrote:
> No, it is an AjaxFallbackLink
>
> Both ListView use AjaxFallbackLink to Add or Remove item.
>
> Thierry
> Sent from Montreal, Quebec, Canada
>
> On Thu, Apr 23, 2009 at 12:44, Igor Vaynberg <ig...@gmail.com>wrote:
>
>> is your "add" button submitting the form?
>>
>> is setreuseitems turned on on both listviews?
>>
>>
>> -igor
>>
>> On Thu, Apr 23, 2009 at 8:45 AM, Thierry Leveque <tl...@gmail.com>
>> wrote:
>> > Hi
>> >
>> > I have a ListView that is embedded inside another ListView. Both ListView
>> > are dynamic: Both have an Add and a Remove button.
>> > The ietms in both ListView are a series of form fields.
>> >
>> > The problem I have is only with my second ListView when I add more than
>> one
>> > item without submitting the form. The fields lost their content. i.e. If
>> I
>> > click on my Add button a new row with fields appear. I put some values in
>> > those fields. I click again on my Add button, the new row appear but the
>> > values I just enter before are lost!
>> > And yes I put my getReuseItems() to true.
>> >
>> > The same thing is working fine with the ListView at the first level. The
>> > values in the fields are not lost.
>> > The problem is only with the embeded one.
>> >
>> > Any idea??
>> >
>> > Thierry
>> > Sent from Montreal, Quebec, Canada
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

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


Re: Problem with ListView embedded in another ListView

Posted by Thierry Leveque <tl...@gmail.com>.
No, it is an AjaxFallbackLink

Both ListView use AjaxFallbackLink to Add or Remove item.

Thierry
Sent from Montreal, Quebec, Canada

On Thu, Apr 23, 2009 at 12:44, Igor Vaynberg <ig...@gmail.com>wrote:

> is your "add" button submitting the form?
>
> is setreuseitems turned on on both listviews?
>
>
> -igor
>
> On Thu, Apr 23, 2009 at 8:45 AM, Thierry Leveque <tl...@gmail.com>
> wrote:
> > Hi
> >
> > I have a ListView that is embedded inside another ListView. Both ListView
> > are dynamic: Both have an Add and a Remove button.
> > The ietms in both ListView are a series of form fields.
> >
> > The problem I have is only with my second ListView when I add more than
> one
> > item without submitting the form. The fields lost their content. i.e. If
> I
> > click on my Add button a new row with fields appear. I put some values in
> > those fields. I click again on my Add button, the new row appear but the
> > values I just enter before are lost!
> > And yes I put my getReuseItems() to true.
> >
> > The same thing is working fine with the ListView at the first level. The
> > values in the fields are not lost.
> > The problem is only with the embeded one.
> >
> > Any idea??
> >
> > Thierry
> > Sent from Montreal, Quebec, Canada
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Problem with ListView embedded in another ListView

Posted by Igor Vaynberg <ig...@gmail.com>.
is your "add" button submitting the form?

is setreuseitems turned on on both listviews?


-igor

On Thu, Apr 23, 2009 at 8:45 AM, Thierry Leveque <tl...@gmail.com> wrote:
> Hi
>
> I have a ListView that is embedded inside another ListView. Both ListView
> are dynamic: Both have an Add and a Remove button.
> The ietms in both ListView are a series of form fields.
>
> The problem I have is only with my second ListView when I add more than one
> item without submitting the form. The fields lost their content. i.e. If I
> click on my Add button a new row with fields appear. I put some values in
> those fields. I click again on my Add button, the new row appear but the
> values I just enter before are lost!
> And yes I put my getReuseItems() to true.
>
> The same thing is working fine with the ListView at the first level. The
> values in the fields are not lost.
> The problem is only with the embeded one.
>
> Any idea??
>
> Thierry
> Sent from Montreal, Quebec, Canada
>

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