You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Frédéric Donckels (JIRA)" <ji...@apache.org> on 2013/10/08 15:04:41 UTC
[jira] [Created] (WICKET-5386) ChainingModel should not check if
the modelObject given as argument is null
Frédéric Donckels created WICKET-5386:
-----------------------------------------
Summary: ChainingModel should not check if the modelObject given as argument is null
Key: WICKET-5386
URL: https://issues.apache.org/jira/browse/WICKET-5386
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.11.0
Reporter: Frédéric Donckels
In Wicket 1.5.x there was no check against the null value of the target of a CompoundPropertyModel.
This allowed to define a CPM based on a possibly value, then being able to refer to sub-properties of that value in through labels included in the markup without fearing a NullPointerException, nice empty labels would be displayed instead.
Now that CPM has been refactored, null values are explicitly rejected, but only in the constructor.
Changing the model through a call to setObject doesn't check the null value and allows the previous behaviour to work again.
(another workaround is to pass Model.of(value) in the constructor).
These are workarounds, the check itself adds no value and removes functionality.
--
This message was sent by Atlassian JIRA
(v6.1#6144)