Thanks for the input Martin. Essentially, it's possible, but I'd have to
rewrite form handling code and lose functionality :)
Another idea: maybe it is possible to handle the variable number of form
components with page parameters. Something like
"http://....&numPhones=n" where "numPhones" would be set by the "add
phone number" button. A stateless form in a stateless page would then be
able to add the required number of form components to process the
received input.
One way or another, this doesn't look like a very easy task. I'll
definitely work on some other parts of the site before attempting this.
On 08/03/2012 2:50 AM, Martin Grigorov wrote:
Hi,
One way to accomplish this is to submit to a page, not to a Form, and
handle the request parameters manually.
But this way it wont be Ajax anymore and you'll go to a new page.
Additionally you will lose the form validation.
On Wed, Mar 7, 2012 at 9:52 PM, Bertrand Guay-Paquet
<[email protected]> wrote:
Hi,
I have a form with a list of FormComponentPanels for phone numbers.
Currently, adding a new phone number to the list involves an ajax request to
add a new FormComponentPanel instance to the form and then another request
to submit the form.
Is there a way to achieve this without the intermediate ajax roundtrip which
adds the new component? Adding a new FormComponentPanel to the client's DOM
can easily be done with javascript, but can Wicket's form processing handle
a variable size array of inputs?
The input array would be of the form:
phoneNumber[0]="..."
phoneType[0]="..."
phoneNumber[n]="..."
phoneType[n]="..."
Besides less requests sent to the server, this is also necessary to make
such a form stateless.
Thanks,
Bertrand
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]