You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Andrea Del Bene <an...@gmail.com> on 2015/05/24 17:21:27 UTC

New StrngResourceLocator (WICKET-5906)

Hi,

I'd like to apply the two following improvements:

-add a setDefaultValue(String value) to not force users to create a 
model for static values
-add constructor StrngResourceLocator(String resourceKey, IModel<?> 
model). (Has it been removed on purpose?)

What do you think?

Re: New StrngResourceLocator (WICKET-5906)

Posted by Martin Grigorov <mg...@apache.org>.
Look good to me.

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

On Mon, May 25, 2015 at 1:16 PM, andrea del bene <an...@gmail.com>
wrote:

> Here it is...
>
>
> https://git1-us-west.apache.org/repos/asf?p=wicket.git;a=commitdiff;h=b680969d;hp=91f2f8a24d8342fc484ca7d2869a401079707855
>
>
> On 25/05/2015 09:09, Martin Grigorov wrote:
>
>> Andrea,
>>
>> Please make the changes and we can discuss the diff after that.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Mon, May 25, 2015 at 7:15 AM, Tobias Soloschenko <
>> tobiassoloschenko@googlemail.com> wrote:
>>
>>  Woops, I send the mail to fast - just wanted to add that if this is ok
>>> then I would accept adding this constructor and the method.
>>>
>>> This would reduce the overhead of source code for those usecases.
>>>
>>> kind regards
>>>
>>> Tobias
>>>
>>> Am 24.05.15 um 21:17 schrieb Andrea Del Bene:
>>>
>>>  yes, sorry for my 'creative' writing :)
>>>>
>>>> On 24 May 2015 20:42, "Martin Grigorov" <mg...@apache.org> wrote:
>>>>
>>>>   Hi Andrea,
>>>>
>>>>> Do you talk about StringResourceModel?
>>>>> On May 24, 2015 6:21 PM, "Andrea Del Bene" <an...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>   Hi,
>>>>>
>>>>>> I'd like to apply the two following improvements:
>>>>>>
>>>>>> -add a setDefaultValue(String value) to not force users to create a
>>>>>> model
>>>>>> for static values
>>>>>> -add constructor StrngResourceLocator(String resourceKey, IModel<?>
>>>>>> model). (Has it been removed on purpose?)
>>>>>>
>>>>>> What do you think?
>>>>>>
>>>>>>
>>>>>>
>

Re: New StrngResourceLocator (WICKET-5906)

Posted by andrea del bene <an...@gmail.com>.
Here it is...

https://git1-us-west.apache.org/repos/asf?p=wicket.git;a=commitdiff;h=b680969d;hp=91f2f8a24d8342fc484ca7d2869a401079707855

On 25/05/2015 09:09, Martin Grigorov wrote:
> Andrea,
>
> Please make the changes and we can discuss the diff after that.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, May 25, 2015 at 7:15 AM, Tobias Soloschenko <
> tobiassoloschenko@googlemail.com> wrote:
>
>> Woops, I send the mail to fast - just wanted to add that if this is ok
>> then I would accept adding this constructor and the method.
>>
>> This would reduce the overhead of source code for those usecases.
>>
>> kind regards
>>
>> Tobias
>>
>> Am 24.05.15 um 21:17 schrieb Andrea Del Bene:
>>
>>> yes, sorry for my 'creative' writing :)
>>>
>>> On 24 May 2015 20:42, "Martin Grigorov" <mg...@apache.org> wrote:
>>>
>>>   Hi Andrea,
>>>> Do you talk about StringResourceModel?
>>>> On May 24, 2015 6:21 PM, "Andrea Del Bene" <an...@gmail.com> wrote:
>>>>
>>>>   Hi,
>>>>> I'd like to apply the two following improvements:
>>>>>
>>>>> -add a setDefaultValue(String value) to not force users to create a
>>>>> model
>>>>> for static values
>>>>> -add constructor StrngResourceLocator(String resourceKey, IModel<?>
>>>>> model). (Has it been removed on purpose?)
>>>>>
>>>>> What do you think?
>>>>>
>>>>>


Re: New StrngResourceLocator (WICKET-5906)

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

Please make the changes and we can discuss the diff after that.

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

On Mon, May 25, 2015 at 7:15 AM, Tobias Soloschenko <
tobiassoloschenko@googlemail.com> wrote:

> Woops, I send the mail to fast - just wanted to add that if this is ok
> then I would accept adding this constructor and the method.
>
> This would reduce the overhead of source code for those usecases.
>
> kind regards
>
> Tobias
>
> Am 24.05.15 um 21:17 schrieb Andrea Del Bene:
>
>> yes, sorry for my 'creative' writing :)
>>
>> On 24 May 2015 20:42, "Martin Grigorov" <mg...@apache.org> wrote:
>>
>>  Hi Andrea,
>>>
>>> Do you talk about StringResourceModel?
>>> On May 24, 2015 6:21 PM, "Andrea Del Bene" <an...@gmail.com> wrote:
>>>
>>>  Hi,
>>>>
>>>> I'd like to apply the two following improvements:
>>>>
>>>> -add a setDefaultValue(String value) to not force users to create a
>>>> model
>>>> for static values
>>>> -add constructor StrngResourceLocator(String resourceKey, IModel<?>
>>>> model). (Has it been removed on purpose?)
>>>>
>>>> What do you think?
>>>>
>>>>
>

Re: New StrngResourceLocator (WICKET-5906)

Posted by Tobias Soloschenko <to...@googlemail.com>.
Woops, I send the mail to fast - just wanted to add that if this is ok 
then I would accept adding this constructor and the method.

This would reduce the overhead of source code for those usecases.

kind regards

Tobias

Am 24.05.15 um 21:17 schrieb Andrea Del Bene:
> yes, sorry for my 'creative' writing :)
> On 24 May 2015 20:42, "Martin Grigorov" <mg...@apache.org> wrote:
>
>> Hi Andrea,
>>
>> Do you talk about StringResourceModel?
>> On May 24, 2015 6:21 PM, "Andrea Del Bene" <an...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'd like to apply the two following improvements:
>>>
>>> -add a setDefaultValue(String value) to not force users to create a model
>>> for static values
>>> -add constructor StrngResourceLocator(String resourceKey, IModel<?>
>>> model). (Has it been removed on purpose?)
>>>
>>> What do you think?
>>>


Re: New StrngResourceLocator (WICKET-5906)

Posted by Tobias Soloschenko <to...@googlemail.com>.
@Andrea: So if I understood you right - if no component would be set to 
the StringResourceModel the localizer is going to be invoked like this:

(second paramter is the component)
value = localizer.getString(getResourceKey(), null, null, null, null, 
defaultValue);


I guess the app localization is going to be used then.

Am 24.05.15 um 21:17 schrieb Andrea Del Bene:
> yes, sorry for my 'creative' writing :)
> On 24 May 2015 20:42, "Martin Grigorov" <mg...@apache.org> wrote:
>
>> Hi Andrea,
>>
>> Do you talk about StringResourceModel?
>> On May 24, 2015 6:21 PM, "Andrea Del Bene" <an...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'd like to apply the two following improvements:
>>>
>>> -add a setDefaultValue(String value) to not force users to create a model
>>> for static values
>>> -add constructor StrngResourceLocator(String resourceKey, IModel<?>
>>> model). (Has it been removed on purpose?)
>>>
>>> What do you think?
>>>


Re: New StrngResourceLocator (WICKET-5906)

Posted by Andrea Del Bene <an...@gmail.com>.
yes, sorry for my 'creative' writing :)
On 24 May 2015 20:42, "Martin Grigorov" <mg...@apache.org> wrote:

> Hi Andrea,
>
> Do you talk about StringResourceModel?
> On May 24, 2015 6:21 PM, "Andrea Del Bene" <an...@gmail.com> wrote:
>
> > Hi,
> >
> > I'd like to apply the two following improvements:
> >
> > -add a setDefaultValue(String value) to not force users to create a model
> > for static values
> > -add constructor StrngResourceLocator(String resourceKey, IModel<?>
> > model). (Has it been removed on purpose?)
> >
> > What do you think?
> >
>

Re: New StrngResourceLocator (WICKET-5906)

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

Do you talk about StringResourceModel?
On May 24, 2015 6:21 PM, "Andrea Del Bene" <an...@gmail.com> wrote:

> Hi,
>
> I'd like to apply the two following improvements:
>
> -add a setDefaultValue(String value) to not force users to create a model
> for static values
> -add constructor StrngResourceLocator(String resourceKey, IModel<?>
> model). (Has it been removed on purpose?)
>
> What do you think?
>

Re: New StrngResourceLocator (WICKET-5906)

Posted by Tobias Soloschenko <to...@googlemail.com>.
Without looking into code, but the change about the defaultValue make sense to me - I remember a discussion about the constructor and why it has been removed - maybe we should check the mailinglist / the PRs before re-adding it.

kind regards

Tobias

> Am 24.05.2015 um 17:21 schrieb Andrea Del Bene <an...@gmail.com>:
> 
> Hi,
> 
> I'd like to apply the two following improvements:
> 
> -add a setDefaultValue(String value) to not force users to create a model for static values
> -add constructor StrngResourceLocator(String resourceKey, IModel<?> model). (Has it been removed on purpose?)
> 
> What do you think?