wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien <seb...@gmail.com>
Subject Re: initModel and 'compound' components only
Date Fri, 19 Dec 2014 10:10:01 GMT
Hi Sven,

Thank you for your answer! I understand the concern...
>From the user (me) point of view, it is still an issue... Are you aware of
an opened ticket for this? Do you want me to open one?

Best regards,
Sebastien

On Thu, Dec 18, 2014 at 8:09 PM, Sven Meier <sven@meiers.net> wrote:
>
> Hi Sebastien,
>
> this topic was discussed before:
> When searching parental components for a IComponentInheritedModel,
> #initModel() is skipped to prevent unnecessary creation of intermediate
> models. See the comment on line 3788 ff:
>
> https://github.com/apache/wicket/blob/master/wicket-
> core/src/main/java/org/apache/wicket/Component.java#L3788
>
> I don't remember a nice solution for this. As it is now, you can't defer
> creation of CompoundPropertyModels until #initModel() is called.
>
> Regards
> Sven
>
>
>
>
> On 18.12.2014 16:43, Sebastien wrote:
>
>> Hi all,
>>
>> I often use #initModel in my pages because I find it very convenient in
>> many usecase...
>>
>> Actually there is an issue in a certain scenario: let's say #initModel is
>> supposed to return a CompoundPropertyModel. So I am free to explicitly
>> *not* provide the model to the component that consume this model, a label
>> for instance. But, If the page only contains those 'compound' components,
>> #initModel is never called so the model is never set.
>>
>> A workaround is to set the model manually:
>> this.setModel(this.initModel());
>>
>> Is it a known issue already? (don't have seen)
>> Quickstart is ready in case...
>>
>> Thanks & best regards,
>> Sebastien
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message