The entity User needs to have a Job's instance when you construct your
model.

François


On Tue, Feb 11, 2014 at 2:56 PM, ChambreNoire <a...@tentelemed.com> wrote:

> Hi,
>
> I have a form which can flip between edit and view modes. Its fields share
> a
> common CompoundPropertyModel which in turn points to an AbstractEntityModel
> similar to that described in the 'Wicket in Action' blog.
>
> My problem is with associations that happen to be null. If I have a User
> entity with a lazily initialised Job association, during viewing all works
> fine but when I edit the user and enter some text into a field that is
> bound
> to User.Job.Name I get a "WicketRuntimeException: Attempted to set
> property
> value on a null object". How is this kind of situation generally handled?
>
> Many thanks,
>
> Chambre
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Submitting-values-for-null-associations-tp4664365.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to