I ended up adding an empty Wicket form to my base page and creating submitCustomForm() JavaScript function which can be called from any non-Wicket form submission. The function copies all form elements from the form being submitted to the Wicket form and submits the Wicket form. Works like a charm.
Thanks, Alec On Mon, May 2, 2011 at 10:22 PM, Igor Vaynberg <igor.vaynb...@gmail.com> wrote: > an alternative would be to write your own form-like component. form > impl doesnt use any internal hooks that you dont have access to, so > its feasible you can easily write your own version that processes > dynamic fields, etc. > > -igor > > > On Mon, May 2, 2011 at 11:47 AM, Alec Swan <alecs...@gmail.com> wrote: >> Igor, we would like have access to the Wicket page model while >> processing the custom form submission, so using separate servlets is >> not a good solution for us. >> >> I started implemented the 3.1 step in our solution and immediately ran >> into a problem because wicket form contains a DIV with a hidden input >> with name wicketForm9a_hf_0, which I suspect is required by Wicket. I >> am assuming that 3.2 is a preferred approach because it will work even >> if other hidden form elements are added in later versions of Wicket. >> >> Thoughts? >> >> Thanks, >> >> Alec >> >> On Mon, May 2, 2011 at 10:44 AM, Igor Vaynberg <igor.vaynb...@gmail.com> >> wrote: >>> or you can write a servlet to process form submissions from all these >>> different forms and call it a day. >>> >>> -igor >>> >>> On Mon, May 2, 2011 at 9:21 AM, Alec Swan <alecs...@gmail.com> wrote: >>>> Hello, >>>> >>>> We have an interesting situation here. We have a Wicket page which we >>>> deliver to our web designer. The web designer uses this page as a >>>> template to build many pages and on each page may or may not choose to >>>> add a non-wicket form. Our webapp should collect the names and values >>>> submitted from this form and store them in a CSV file. >>>> >>>> So, the question is how to provide the web designer the flexibility of >>>> adding a random form and being able to collect this form submission >>>> data on the back-end? >>>> >>>> One idea that I am currently working on is this. >>>> 1. Add an empty Wicket form to the the wicket template page; >>>> 2. Provide submitCustomForm() JavaScript method that web designer will >>>> call from his custom form's "action"; >>>> 3. In submitCustomForm() we can: >>>> 3.1 either change the custom form's "action" to point to Wicket >>>> form's action and submit custom form. >>>> 3.2. or somehow copy form elements from custom form to wicket form >>>> and submit wicket form. >>>> >>>> Your feedback will be greatly appreciated. >>>> >>>> Thanks, >>>> >>>> Alec >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org