Agreed!
Leaving it as is.

Thank you for your comments!

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


On Thu, Aug 7, 2014 at 3:59 PM, Martin Grigorov <[email protected]>
wrote:

> Hm, but then this will break your approach.
> And I guess this is used by the applications already.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Thu, Aug 7, 2014 at 3:58 PM, Martin Grigorov <[email protected]>
> wrote:
>
>> You are right! This will solve the problem.
>> But for some reason I expect Wicket to do this for me - the model is
>> IComponentInheritedModel and it has an "owner", the component that owns the
>> model. So it should be feasible to calculate the relative path between them.
>> I'll investigate whether this is possible.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>>
>> On Thu, Aug 7, 2014 at 3:40 PM, John Sarman <[email protected]> wrote:
>>
>>> Martin,
>>>
>>> I think you need the address wicket:id changed to person.address and the
>>> street1 to person.address.street1  .
>>>
>>> WebMarkupContainer addressContainer = new
>>> WebMarkupContainer("person.address");
>>>
>>> addressContainer.add(new Label("person.address.street1"));
>>>
>>> John Sarman
>>>
>>>
>>> On Thu, Aug 7, 2014 at 9:30 AM, Martin Grigorov <[email protected]>
>>> wrote:
>>>
>>> > Hi,
>>> >
>>> > Debugging https://issues.apache.org/jira/browse/WICKET-4941 I found
>>> out
>>> > that CompoundPropertyModel works only shallow component hierarchy (one
>>> > level deep!).
>>> > Is this by design ?
>>> >
>>> > I've added a unit test that shows the problem:
>>> >
>>> >
>>> https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commitdiff;h=7042f885;hp=98404f5541fee8064ff01dee7ff7f4209669245c
>>> >
>>> > If you have a container for Person with two children - one for name
>>> (Label)
>>> > and another for Address (a container). The Address container have its
>>> own
>>> > children, like street (Label).
>>> > With the current impl of CompoundPropertyModel (and
>>> Component#initModel())
>>> > Wicket tries to find "street" in Person, while it should try
>>> > "address.street" in Person.
>>> >
>>> > Anyone with more experience with IComponentInheritedModel could help
>>> here ?
>>> >
>>> >
>>> > Martin Grigorov
>>> > Wicket Training and Consulting
>>> > https://twitter.com/mtgrigorov
>>> >
>>>
>>
>>
>

Reply via email to