on your label call .setEscapeModelStrings(true);

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, Sep 25, 2009 at 6:28 PM, Altuğ B. Altıntaş <alt...@gmail.com> wrote:

> Thanks Pedro;
>
> String test = "Get the latest Java <b>Software</b> and <br/>explore how
> Java
> technology provides a better digital experience.";
> Label label = new Label("test", new Model(test));
> label.setEscapeModelStrings(false);
>
> works for me !!
>
> setEscapeModelStrings(false); is the key part.
>
> Thanks.
>
> 2009/9/26 Pedro Santos <pedros...@gmail.com>
>
> > Wicket is using html scape character to output your string on model, so
> it
> > will to be presented as '<' and '>'.
> > u can set FLAG_ESCAPE_MODEL_STRINGS to the componet
> >
> >
> http://static.ddpoker.com/javadoc/wicket/1.4-rc2/org/apache/wicket/Component.html#getDefaultModelObjectAsString()<http://static.ddpoker.com/javadoc/wicket/1.4-rc2/org/apache/wicket/Component.html#getDefaultModelObjectAsString%28%29>
> <
> http://static.ddpoker.com/javadoc/wicket/1.4-rc2/org/apache/wicket/Component.html#getDefaultModelObjectAsString%28%29
> >
> >
> > On Fri, Sep 25, 2009 at 7:38 PM, Altuğ B. Altıntaş <alt...@gmail.com>
> > wrote:
> >
> > > Hi all ;
> > >
> > > Problem is html tag - bold  <br>doesn't process ; I don't know if this
> > > problem related with Wicket.
> > >
> > > Let me explain it by simple code:
> > >
> > > HTML side :
> > >
> > > <wicket:panel>
> > >  <span wicket:id="test" >
> > >         test code comes here
> > >  </span>
> > > </wicket:panel>
> > >
> > > Java side :
> > >
> > > String test = "Java <b>Software</b>  technology.";
> > > item.add(  new Label("test", test) );
> > >
> > > When i test the code; i see the output like that  :
> > >
> > > Java <b>Software</b>  technology.
> > >
> > > Note  : Software is not in bold; the html source code and the view is
> the
> > > same <b>Software</b>.
> > >
> > > Any suggestions ?
> > >
> > > Thanks.
> > >
> > > --
> > > Altuğ.
> > >
> >
> >
> >
> > --
> > Pedro Henrique Oliveira dos Santos
> >
>
>
>
> --
> Altuğ.
>

Reply via email to