You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jonas <ba...@gmail.com> on 2009/07/17 10:44:00 UTC

IModel parameters of StringResourceModel not getting detached

A question about StringResourceModel: it supports IModels in the
'parameters' Object[] that
are properly handled in StringResourceModel#getString, meaning they
could get attached because
of StringResourceModel. Shouldn't it also be the StringResourceModel's
responsibility to properly
detach them (from #onDetach)?

Who's in general responsible to detach an IModel, specially those who
aren't a Component's
'default' IModel? Is that correct that any code that calls
IModel#getObject() should also
call IModel#detach() later in the same request?

cheers,
Jonas

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


Re: IModel parameters of StringResourceModel not getting detached

Posted by Jonas <ba...@gmail.com>.
done:
https://issues.apache.org/jira/browse/WICKET-2381

On Fri, Jul 17, 2009 at 4:52 PM, Johan Compagner<jc...@gmail.com> wrote:
> please make a jira issue for this
> The detach of StringResourcemodel should walk over its param to check if it
> is a model and call detach on those.
>
> On Fri, Jul 17, 2009 at 10:44, Jonas <ba...@gmail.com> wrote:
>
>> A question about StringResourceModel: it supports IModels in the
>> 'parameters' Object[] that
>> are properly handled in StringResourceModel#getString, meaning they
>> could get attached because
>> of StringResourceModel. Shouldn't it also be the StringResourceModel's
>> responsibility to properly
>> detach them (from #onDetach)?
>>
>> Who's in general responsible to detach an IModel, specially those who
>> aren't a Component's
>> 'default' IModel? Is that correct that any code that calls
>> IModel#getObject() should also
>> call IModel#detach() later in the same request?
>>
>> cheers,
>> Jonas
>>
>> ---------------------------------------------------------------------
>> 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: IModel parameters of StringResourceModel not getting detached

Posted by Johan Compagner <jc...@gmail.com>.
please make a jira issue for this
The detach of StringResourcemodel should walk over its param to check if it
is a model and call detach on those.

On Fri, Jul 17, 2009 at 10:44, Jonas <ba...@gmail.com> wrote:

> A question about StringResourceModel: it supports IModels in the
> 'parameters' Object[] that
> are properly handled in StringResourceModel#getString, meaning they
> could get attached because
> of StringResourceModel. Shouldn't it also be the StringResourceModel's
> responsibility to properly
> detach them (from #onDetach)?
>
> Who's in general responsible to detach an IModel, specially those who
> aren't a Component's
> 'default' IModel? Is that correct that any code that calls
> IModel#getObject() should also
> call IModel#detach() later in the same request?
>
> cheers,
> Jonas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>