Hi,

I guess you talk about [1]. It is in wicket-datetime, not wicket-extensions.

It is a Panel component, actually FormComponentPanel, so
adding OnChangeAjaxBehavior to it won't work.
I am not sure why the hour and time sub-components work for you. I'd expect
that you add OnChangeAjaxBehavior to each TextField inside it.
In Wicket 6.x there are factory methods for all sub components. In 1.5.x I
see there is only #newDateTextField() [2].
You can use DateTimeField.get("...") to get a reference to a child
component and add the behavior to it.

1.
https://github.com/apache/wicket/blob/wicket-1.5.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.java
2.
https://github.com/apache/wicket/blob/wicket-1.5.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.java#L411

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Jun 1, 2015 at 3:05 PM, Urbani, Edmund <edmund.urb...@lilandit.com>
wrote:

>  Hello all, I am having trouble trying to apply an OnChangeAjaxBehaviour
> to the DateTimeField component from wicket-extensions. The AJAX updates
> always cause the model to be set to null. Even when the model is
> initialized with a non-null value, and that date is property displayed, any
> attempt to edit it will again set the model value back to null. Editing the
> date part does not seem to cause an AJAX update at all, only the time
> fields do. The project I am working on is currently using Wicket 1.5.13.
> Any ideas? Kind reagards,  Edmund
>
>
>
>
>
>
>
>
>
>
> --
>
> Edmund Urbani
> Liland IT Team Email: edmund.urb...@lilandit.com
> <edmund.urb...@lilandit.com>
>
> <edmund.urb...@lilandit.com>
>
> Liland IT GmbH ...does IT better
> Tel: +43 463 220111
> Fax: +43 463 220111-33
> Tel(GER): +49 221 65028588
>
> Find us at Facebook http://facebook.com/Lilandit
> http://green-badges.com
> http://iventcloud.com
> http://Lilandit.com
>
>  <http://www.LilandIT.com>  <http://www.LilandIT.com>
>
> Copyright © 2015 Liland IT GmbH This mail may contain confidential and /
> or privileged information. If you are not the intended recipient or have
> received this email in error, please notify the sender immediately and
> destroy this email. The unauthorized copying and unauthorized
> distribution of this mail is strictly forbidden. This email may contain
> confidential and / or privileged information. If you are not the Intended
> Recipient (or have received this email in error) please notify the sender
> immediately and destroy this email. Any Unauthorised copying, disclosure
> or distribution of the material in this email is strictly forbidden.
>
>
>
>
>
>

Reply via email to