pe 8. heinäk. 2022 klo 10.06 Arunachalam Sibisakkaravarthi (
arunacha...@mcruncher.com) kirjoitti:

> Hi Martin Terra, thanks for your suggestion.
> Yes, currently AjaxLink is used in my case, I should use AjaxSubmitLink to
> address the issue where it clears the input.
>

Probably yes, AjaxSubmitLink aj AjaxButton are interchangeable, remember to
setDefaultFormSubmitBehavior(false) to avoid actually submitting and
processing the form.


> I just observed another thing that validation happens for all list items,
> but the validation message shows only items that present when the listview
> is initialized.
> but when I refresh the page (pressing F5 on the browser), then all list
> items show the validation messages. Any idea on this behavior?
>

What is your mechanism of showing the validation messages, is it automatic?

**
Martin

>
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>
>
> On Thu, Jul 7, 2022 at 10:44 AM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > to 7. heinäk. 2022 klo 4.45 Arunachalam Sibisakkaravarthi (
> > arunacha...@mcruncher.com) kirjoitti:
> >
> > > Hi Martin Terra,
> > > Thanks for your feedback, Yes I already used setReuseItems on
> listview. I
> > > will look at your suggestion.
> > > Data loss happens only when invalid email address is entered (in my
> > case).
> > > Let say If the form component doesn't have validation, then no data
> loss
> > > when listview is refreshed.
> > > Will data in the form component be validated when listview is
> refreshed?
> > If
> > > yes, then is it possible to stop that behaviour? Then it will be
> > validated
> > > only when the form is submitted.
> > >
> >
> > When refreshing component via ajax or other submit, you must use
> > button.setDefaultFormProcessing(false) to avoid validation.
> >
> > If you refresh view without button, for example using a Link, a Link does
> > not submit the input data to the server and thus values are "lost"
> because
> > they are never received by the server.
> >
> > When working with forms, all actions must use a form submitting behavior
> > (see AjaxFormSubmitBehavior) in one way or another (ajax or otherwise) to
> > send the values to server (in order for server to be able to repaint them
> > in response).
> >
> > **
> > Martin
> >
> > >
> > >
> > >
> > >
> > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > >
> > >
> > > On Wed, Jul 6, 2022 at 8:01 PM Martin Terra <
> > > martin.te...@koodaripalvelut.com> wrote:
> > >
> > > > You can setReuseItems, but the number of your list items changes you
> > will
> > > > need to implement some sort of FormComponentReuseManager
> > > > <
> > > >
> > >
> >
> https://users.wicket.apache.narkive.com/UBuknoCl/add-remove-dynamic-formcomponent-in-repeatingview
> > > > >
> > > >
> > > >
> > > > **
> > > > Martin
> > > >
> > > > ke 6. heinäk. 2022 klo 13.08 Arunachalam Sibisakkaravarthi (
> > > > arunacha...@mcruncher.com) kirjoitti:
> > > >
> > > > > Hi guys,
> > > > > I have a form that has a text field with Email validator in a
> > ListView
> > > (I
> > > > > want get list of email addresses from user)
> > > > > When invalid email is entered and listview is refreshed then Text
> > field
> > > > is
> > > > > cleared
> > > > > whereas Text field is not cleared when valid email is entered and
> > > > listview
> > > > > is refreshed
> > > > > I don't want to clear even invalid email addresses when listview is
> > > > > refreshed.
> > > > > I want the form components in the list view to be validated  only
> > when
> > > > the
> > > > > form is submitted.
> > > > > Is it possible to address this concern in list view?
> > > > >
> > > > >
> > > > >
> > > > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > > > >
> > > >
> > >
> >
>

Reply via email to