You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "alexander.elsholz" <al...@widas.de> on 2009/03/16 10:17:49 UTC
Override ResourceModel
Hi,
i want to append some static code, after calling ressourcemodel.getobject to
the localized String.
so i override this method, but i think this method was never called - why?
is there an other opprtunity to append some static code after localization?
thanks alex
--
View this message in context: http://www.nabble.com/Override-ResourceModel-tp22534226p22534226.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Override ResourceModel
Posted by "alexander.elsholz" <al...@widas.de>.
the translated text, but without the static extra String. if i set a
breakpoint in the getObject-method, the breakpoint was never achieved.
alex
igor.vaynberg wrote:
>
> what does the label output?
>
> -igor
>
> On Mon, Mar 16, 2009 at 2:52 PM, alexander.elsholz
> <al...@widas.de> wrote:
>>
>> public class MyResourceModel extends ResourceModel {
>>
>> @Override
>> public Object getObject() {
>> String lLblValue = (String) super.getObject() + lblTag;
>> return lLblValue;
>> }
>> }
>>
>> with this model i create my label.
>>
>> public BLabel(String pId, String pTag) {
>> super(pId);
>> ...
>> MyResourceModel lresModel = new
>> MyResourceModel(lResolver.getI18nKey(), pTag);
>> setModel(lresModel);
>> }
>>
>> but the method 'getObject' is never called.
>>
>> thanks alex
>>
>>
>> Jeremy Thomerson-5 wrote:
>>>
>>> Please show us the code.
>>>
>>> --
>>> Jeremy Thomerson
>>> http://www.wickettraining.com
>>>
>>>
>>>
>>> On Mon, Mar 16, 2009 at 4:17 AM, alexander.elsholz <
>>> alexander.elsholz@widas.de> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> i want to append some static code, after calling
>>>> ressourcemodel.getobject
>>>> to
>>>> the localized String.
>>>>
>>>> so i override this method, but i think this method was never called -
>>>> why?
>>>>
>>>> is there an other opprtunity to append some static code after
>>>> localization?
>>>>
>>>> thanks alex
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Override-ResourceModel-tp22534226p22534226.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Override-ResourceModel-tp22534226p22548224.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
--
View this message in context: http://www.nabble.com/Override-ResourceModel-tp22534226p22553122.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Override ResourceModel
Posted by Igor Vaynberg <ig...@gmail.com>.
what does the label output?
-igor
On Mon, Mar 16, 2009 at 2:52 PM, alexander.elsholz
<al...@widas.de> wrote:
>
> public class MyResourceModel extends ResourceModel {
>
> @Override
> public Object getObject() {
> String lLblValue = (String) super.getObject() + lblTag;
> return lLblValue;
> }
> }
>
> with this model i create my label.
>
> public BLabel(String pId, String pTag) {
> super(pId);
> ...
> MyResourceModel lresModel = new
> MyResourceModel(lResolver.getI18nKey(), pTag);
> setModel(lresModel);
> }
>
> but the method 'getObject' is never called.
>
> thanks alex
>
>
> Jeremy Thomerson-5 wrote:
>>
>> Please show us the code.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Mon, Mar 16, 2009 at 4:17 AM, alexander.elsholz <
>> alexander.elsholz@widas.de> wrote:
>>
>>>
>>> Hi,
>>>
>>> i want to append some static code, after calling ressourcemodel.getobject
>>> to
>>> the localized String.
>>>
>>> so i override this method, but i think this method was never called -
>>> why?
>>>
>>> is there an other opprtunity to append some static code after
>>> localization?
>>>
>>> thanks alex
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Override-ResourceModel-tp22534226p22534226.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Override-ResourceModel-tp22534226p22548224.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: Override ResourceModel
Posted by "alexander.elsholz" <al...@widas.de>.
public class MyResourceModel extends ResourceModel {
@Override
public Object getObject() {
String lLblValue = (String) super.getObject() + lblTag;
return lLblValue;
}
}
with this model i create my label.
public BLabel(String pId, String pTag) {
super(pId);
...
MyResourceModel lresModel = new
MyResourceModel(lResolver.getI18nKey(), pTag);
setModel(lresModel);
}
but the method 'getObject' is never called.
thanks alex
Jeremy Thomerson-5 wrote:
>
> Please show us the code.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Mar 16, 2009 at 4:17 AM, alexander.elsholz <
> alexander.elsholz@widas.de> wrote:
>
>>
>> Hi,
>>
>> i want to append some static code, after calling ressourcemodel.getobject
>> to
>> the localized String.
>>
>> so i override this method, but i think this method was never called -
>> why?
>>
>> is there an other opprtunity to append some static code after
>> localization?
>>
>> thanks alex
>> --
>> View this message in context:
>> http://www.nabble.com/Override-ResourceModel-tp22534226p22534226.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Override-ResourceModel-tp22534226p22548224.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Override ResourceModel
Posted by Jeremy Thomerson <je...@wickettraining.com>.
Please show us the code.
--
Jeremy Thomerson
http://www.wickettraining.com
On Mon, Mar 16, 2009 at 4:17 AM, alexander.elsholz <
alexander.elsholz@widas.de> wrote:
>
> Hi,
>
> i want to append some static code, after calling ressourcemodel.getobject
> to
> the localized String.
>
> so i override this method, but i think this method was never called - why?
>
> is there an other opprtunity to append some static code after localization?
>
> thanks alex
> --
> View this message in context:
> http://www.nabble.com/Override-ResourceModel-tp22534226p22534226.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>