Hi,

This may be a limitation of Wicket itself.

DateTimePicker is a FormComponentPanel, i.e. it is not attached to HTML
form element but most probably to a <div> that has some HTML form elements
inside it.
I am not 100% sure but AFAIR wicket-ajax.js doesn't traverse the children
of the <div>. It just tries to get the 'value' of the form component with
wicket:id on it, in this case the <div>, so it will send 'null' as a value.
Once this is improved I think we will need to improve the server side as
well. As you can see at [1] it updates only the formComponent's model, but
not the models of its children in case of FormComponentPanel.

I'll be able to run the application later today or tomorrow to confirm this.

Please file a ticket for improvement at Wicket JIRA.
Thanks!

1.
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java#L144-L160

On Thu, Jul 9, 2015 at 2:13 PM, Václav Čermák <vvcer...@gmail.com> wrote:

> Hi,
>
> I'am facing another problem with DateTimePicker. I attached
> AjaxFormComponentBehavior on it:
>
> import com.googlecode.wicket.kendo.ui.form.datetime.DateTimePicker;
>
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
> import org.apache.wicket.markup.html.WebMarkupContainer;
> import org.apache.wicket.markup.html.WebPage;
>
> public class HomePage extends WebPage {
>     private static final long serialVersionUID = 1L;
>
>     private WebMarkupContainer dtp;
>
>     public HomePage(final PageParameters parameters) {
>         super(parameters);
>
>         add(new Label("version", getApplication().getFrameworkSettings().
> getVersion()));
>
>         add(dtp = new DateTimePicker("dtp"));
>         dtp.setOutputMarkupId(true);
>         dtp.add(new AjaxFormComponentUpdatingBehavior("onchange")
>         {
>
>             @Override
>             protected void onUpdate(AjaxRequestTarget target)
>             {
>                 System.out.println("CHANGED!");
>             }
>         });
>
>     }
>
> }
>
> and I'am getting an error:
>
> Value of variable [[date]] could not be resolved while interpolating [[Error 
> while parsing datetime: date was '${date}' and time was '${time}']]
>
>
> when I try to change a date in browser. This error I'am getting from
> attached quickstart as well ...
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "wicket-jquery-ui" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to wicket-jquery-ui+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wicket-jquery-ui/edc29b75-17b9-4181-bb15-21e630af905f%40googlegroups.com
> <https://groups.google.com/d/msgid/wicket-jquery-ui/edc29b75-17b9-4181-bb15-21e630af905f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

Reply via email to