Hi Tobias,
I'm not sure: CompoundPropertyModel#bind() has a generic type parameter,
perhaps this is treated differently in Java 7 vs. 8.
Sven
On 06.12.2015 10:57, Tobias Soloschenko wrote:
Hi Sven,
so the behavior of wicket-7.x is right then? Because getObect receives the
actual nested model and not src as model object?
Then we have an error in master.
kind regards
Tobias
Am 06.12.2015 um 10:04 schrieb Sven Meier <s...@meiers.net>:
Hi Tobios,
new ExternalImage("compoundImage",compoundPropertyModel.bind("url")));
this invokes the constructor with the Serializable argument, effectively
wrapping the propertyModel inside a normal model.
Have fun
Sven
On 06.12.2015 09:31, Tobias Soloschenko wrote:
Hi guys,
Martin mentioned to me that my last integration breaks the build of Wicket-7.x.
As I saw master compiled fine. After a short research we found out that the
CompoundPropertyModel works slightly different.
Output in wicket-7.x:
<img wicket:id="compoundImage"
src="Model:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[org.apache.wicket.markup.html.image.ExternalImageTestPage$ImageSrc@7cdbc5d3]]:expression=[url]"/>
Output in master:
<img wicket:id="compoundImage" src="http://www.google.de/test.jpg"/>
Invokation:
ImageSrc imageSrc = new ImageSrc();
imageSrc.setUrl("http://www.google.de/test.jpg");
CompoundPropertyModel<ImageSrc> compoundPropertyModel = new
CompoundPropertyModel<ImageSrc>(imageSrc);
add(new
ExternalImage("compoundImage",compoundPropertyModel.bind("url")));
Code to receive the model object. String.valueOf(model.getObject());
I don't know what changed, but maybe you know.
kind regards
Tobias