Hi,

Please create a ticket and attach the quickstart.
It is a bug.


On Wed, Aug 7, 2013 at 9:44 AM, Antoine Angenieux
<aangeni...@clinigrid.com>wrote:

> Hi all!
>
> I'm using Wicket 6 (both 6.8 and 6.9.1) and am facing an issue when:
>
> 1. I have a multipart form
> 2. This form is submitted via an AjaxSubmitLink (or by any component using
> an Ajax behavior for submission)
> 3. The updateAjaxAttributes method of the link is overridden to:
>   3.1 set multipart to true on the attributes
>   3.2 add dynamic extra parameters to the attributes
>
> then, the dynamic extra parameters are not evaluated.
>
> I have come up with a quickstart based on Wicket 6.9.1 if you are
> interested, otherwise, below is code from the quickstart that displays the
> issue:
>
> public HomePage(final PageParameters parameters) {
>   super(parameters);
>   final Form<Void> form;
>   add(form = new Form<Void>("form"));
>   form.setMultiPart(true);
>   form.add(new AjaxSubmitLink("submit") {
>
>     private static final long serialVersionUID = 1L;
>
>     @Override
>     protected void updateAjaxAttributes(**AjaxRequestAttributes
> attributes) {
>       super.updateAjaxAttributes(**attributes);
>       attributes.setMultipart(true);
>       attributes.**getDynamicExtraParameters().**add(
>         "return { 'param1': 0 }");
>     }
>
>     @Override
>     protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
>       assertEquals("1", getRequest().**getRequestParameters()
>         .getParameterValue("param1").**toOptionalString());
>     }
>
>
>   });
>
> }
>
> When clicking the link, the assertion always fails. If I comment both
> form.setMultipart(true) and attributes.setMultipart(true), then the
> assertion is true, as expected.
>
> Do you have any idea? Or should I fill a ticket with the attached
> quickstart?
>
> Thanks in advance for your answsers!
>
> Cheers,
>
> Antoine.
>
> --
> -------------
> Antoine Angénieux
> Co-founder
> mob: +33 6 60 21 09 18
> aangeni...@clinigrid.com
> -------------
> Clinigrid
> 92/98 boulevard Victor Hugo
> 93300 Clichy Cedex
> Tel: +33 1 55 90 66 84
> -------------
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to