You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sebastien <se...@gmail.com> on 2014/12/18 16:43:36 UTC

initModel and 'compound' components only

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

Re: initModel and 'compound' components only

Posted by Sebastien <se...@gmail.com>.
Hi Martin,

Here we are: https://issues.apache.org/jira/browse/WICKET-5792
There is no urgency though, but thank you very much :)

Best regards,
Sebastien


On Fri, Dec 19, 2014 at 3:05 PM, Martin Grigorov <mg...@apache.org>
wrote:
>
> Sebastien,
>
> Please create a ticket with a quickstart and I will give my best too
> during/after the holidays.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Dec 19, 2014 at 4:01 PM, Sebastien <se...@gmail.com> wrote:
> >
> > Hi Sven,
> >
> > I like puzzle, but I am not really sure to have some available spare
> time.
> > Will see beginning of next year if I can dig into this...
> >
> > Best regards,
> > Sebastien
> >
> > On Fri, Dec 19, 2014 at 2:24 PM, Sven Meier <sv...@meiers.net> wrote:
> > >
> > > Hi,
> > >
> > > you will have to come up with a really good idea on how to improve this
> > > puzzle.
> > >
> > > Regards
> > > Sven
> > >
> > >
> > >
> > >
> > > On 19.12.2014 11:10, Sebastien wrote:
> > >
> > >> 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 <sv...@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
> > >>>
> > >>>
> > >>>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
>

Re: initModel and 'compound' components only

Posted by Martin Grigorov <mg...@apache.org>.
Sebastien,

Please create a ticket with a quickstart and I will give my best too
during/after the holidays.

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

On Fri, Dec 19, 2014 at 4:01 PM, Sebastien <se...@gmail.com> wrote:
>
> Hi Sven,
>
> I like puzzle, but I am not really sure to have some available spare time.
> Will see beginning of next year if I can dig into this...
>
> Best regards,
> Sebastien
>
> On Fri, Dec 19, 2014 at 2:24 PM, Sven Meier <sv...@meiers.net> wrote:
> >
> > Hi,
> >
> > you will have to come up with a really good idea on how to improve this
> > puzzle.
> >
> > Regards
> > Sven
> >
> >
> >
> >
> > On 19.12.2014 11:10, Sebastien wrote:
> >
> >> 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 <sv...@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
> >>>
> >>>
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: initModel and 'compound' components only

Posted by Sebastien <se...@gmail.com>.
Hi Sven,

I like puzzle, but I am not really sure to have some available spare time.
Will see beginning of next year if I can dig into this...

Best regards,
Sebastien

On Fri, Dec 19, 2014 at 2:24 PM, Sven Meier <sv...@meiers.net> wrote:
>
> Hi,
>
> you will have to come up with a really good idea on how to improve this
> puzzle.
>
> Regards
> Sven
>
>
>
>
> On 19.12.2014 11:10, Sebastien wrote:
>
>> 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 <sv...@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
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: initModel and 'compound' components only

Posted by Sven Meier <sv...@meiers.net>.
Hi,

you will have to come up with a really good idea on how to improve this puzzle.

Regards
Sven



On 19.12.2014 11:10, Sebastien wrote:
> 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 <sv...@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
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: initModel and 'compound' components only

Posted by Sebastien <se...@gmail.com>.
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 <sv...@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
>
>

Re: initModel and 'compound' components only

Posted by Sven Meier <sv...@meiers.net>.
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