Re: [SOLVED] Re: PropertyModel / PropertyResolver / Map or List access

2014-11-10 Thread Martin Grigorov
Hi, On Fri, Nov 7, 2014 at 10:39 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi Sven, Hi Paul, thanx, now its working. I thought the PropertyModel/PropertyResolver will unpack the model-object itself, so there is no need to adress getObject by .object. Maybe a small note in

Re: [SOLVED] Re: PropertyModel / PropertyResolver / Map or List access

2014-11-10 Thread Boris Goldowsky
I would recommend against using .object inside a PropertyModel, at least if your application makes use of detachable models. When a component uses the property model in your example, new PropertyModel(MyPage.this, list.object[1].anyProperty) The model returned by MyPage.getList() will be

[SOLVED] Re: PropertyModel / PropertyResolver / Map or List access

2014-11-07 Thread Patrick Davids
Hi Sven, Hi Paul, thanx, now its working. I thought the PropertyModel/PropertyResolver will unpack the model-object itself, so there is no need to adress getObject by .object. Maybe a small note in javadoc could help others not running into this issue. So... All ways (mentioned in javadoc) are

PropertyModel / PropertyResolver / Map or List access

2014-11-06 Thread Patrick Davids
Hi all, the javadoc of PropertyResolver says, map or list access is possible via keys or index. Accessing an map via key is no problem, but I dont get it working for lists and index. for instance: MyPage extends Page{ private IModelListAnything list; public MyPage(IModelListAnything

Re: PropertyModel / PropertyResolver / Map or List access

2014-11-06 Thread Paul Bors
I think that should have worked as per: http://wicket.apache.org/guide/guide/modelsforms.html#modelsforms_2 Label label = new Label(firstChildName, new PropertyModel(person, children.0.name)); What version of Wicket are you using? On Thu, Nov 6, 2014 at 11:03 AM, Patrick Davids

Re: PropertyModel / PropertyResolver / Map or List access

2014-11-06 Thread Patrick Davids
Hi Paul, v6.17.0. Maybe, I made a too reduced example. My property navigates further... its more like this: list[1].anyProperty[key] Is such a combination allowed? Patrick Am 06.11.2014 17:24, schrieb Paul Bors: I think that should have worked as per:

Re: PropertyModel / PropertyResolver / Map or List access

2014-11-06 Thread Paul Bors
Create a quick-start, open a Jira ticket and provide a push request fixing it :) On Thu, Nov 6, 2014 at 11:38 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi Paul, v6.17.0. Maybe, I made a too reduced example. My property navigates further... its more like this:

Re: PropertyModel / PropertyResolver / Map or List access

2014-11-06 Thread Sven Meier
Hi, you're telling PropertyModel to look up property list from MyPage, but list is not a list, it's a model, models don't have a property 1. Use this instead: new Label(myLabel, new PropertyModel(list, [1],anyProperty)) ... or: new Label(myLabel, new PropertyModel(MyPage.this,