You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Iain Reddick <ia...@beatsystems.com> on 2010/08/04 22:19:46 UTC

Model object string manipulation

What's the cleanest way of doing string manipulation with a component that uses a String as a model (e.g. a Label). I'm thinking of mutations such as to uppercase and to lowercase, etc.

An obvious place is to do it in the model, but I'm interested to hear what other developer's approaches are. Is there a nicer way of doing this - via a behaviour for instance?

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


Re: Model object string manipulation

Posted by Igor Vaynberg <ig...@gmail.com>.
for reusable situations, or even one off, you can write a simple decorator model

-igor

On Wed, Aug 4, 2010 at 1:27 PM, Iain Reddick
<ia...@beatsystems.com> wrote:
> To elaborate a bit - I'm talking about "one off" situations and also re-usable solutions, such as the aforementioned "to upper" and "to lower" cases.
>
> ----- Original Message -----
> From: "Iain Reddick" <ia...@beatsystems.com>
> To: users@wicket.apache.org
> Sent: Wednesday, 4 August, 2010 9:19:46 PM
> Subject: Model object string manipulation
>
> What's the cleanest way of doing string manipulation with a component
> that uses a String as a model (e.g. a Label). I'm thinking of mutations
> such as to uppercase and to lowercase, etc.
>
> An obvious place is to do it in the model, but I'm interested to hear
> what other developer's approaches are. Is there a nicer way of doing
> this - via a behaviour for instance?
>
> --------------------------------------------------------------------- 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
>
>

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


Re: Model object string manipulation

Posted by Iain Reddick <ia...@beatsystems.com>.
To elaborate a bit - I'm talking about "one off" situations and also re-usable solutions, such as the aforementioned "to upper" and "to lower" cases.

----- Original Message -----
From: "Iain Reddick" <ia...@beatsystems.com>
To: users@wicket.apache.org
Sent: Wednesday, 4 August, 2010 9:19:46 PM
Subject: Model object string manipulation

What's the cleanest way of doing string manipulation with a component
that uses a String as a model (e.g. a Label). I'm thinking of mutations
such as to uppercase and to lowercase, etc.

An obvious place is to do it in the model, but I'm interested to hear
what other developer's approaches are. Is there a nicer way of doing
this - via a behaviour for instance?

--------------------------------------------------------------------- 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