You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Leangen <wi...@leangen.net> on 2009/10/06 03:11:14 UTC

Processing dynamic text

Wicketeers,

If I have a Label that contains some text I want to process, what is  
the best way to do that?

   - Should I even be using a label?

   - Should I override Label's onComponentTag or something?

   - Is there a better way?


The key is that I don't know the content in advance, so there is no  
way to add markup to my html.

Is this beyond the scope of Wicket, or is there something in there  
that I've overlooked?

(Concrete example below.)


Thanks!
=David

***************
Example:

I have the text: "The quick brown fox jumps over the lazy brown dog."

I don't know the content of the text in advance, but I DO know that I  
want to decorate all the nouns. The meaning of "decorate" can change  
over time (maybe some CSS, maybe some js, like a popup).

So I need to produce:

   The quick brown ##fox## jumps over the lazy brown ##dog##.


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


Re: Processing dynamic text

Posted by David Leangen <wi...@leangen.net>.
A very simple solution to my own problem: repeaters!

Man, Wicket rocks!


On Oct 6, 2009, at 10:11 AM, David Leangen wrote:

>
> Wicketeers,
>
> If I have a Label that contains some text I want to process, what is  
> the best way to do that?
>
>  - Should I even be using a label?
>
>  - Should I override Label's onComponentTag or something?
>
>  - Is there a better way?
>
>
> The key is that I don't know the content in advance, so there is no  
> way to add markup to my html.
>
> Is this beyond the scope of Wicket, or is there something in there  
> that I've overlooked?
>
> (Concrete example below.)
>
>
> Thanks!
> =David
>
> ***************
> Example:
>
> I have the text: "The quick brown fox jumps over the lazy brown dog."
>
> I don't know the content of the text in advance, but I DO know that  
> I want to decorate all the nouns. The meaning of "decorate" can  
> change over time (maybe some CSS, maybe some js, like a popup).
>
> So I need to produce:
>
>  The quick brown ##fox## jumps over the lazy brown ##dog##.
>
>
> ---------------------------------------------------------------------
> 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