put it into <pre> tags -igor
On Fri, Jul 24, 2009 at 3:58 PM, Swapna Rachamalla<swapna.rachama...@gmail.com> wrote: > Hi All > > the code in *html*: > > <div class="marginLeft20" wicket:id="mfg"><a class="bottomCellLinks" > href="#" wicket:id="mfgLink"><span wicket:id="mfgName">[Manufacturer > Name]</span></a></div> > > the code in *Java *file: > > RepeatingView rv = new RepeatingView("mfg"); > WebMarkupContainer wmc = new WebMarkupContainer(rv.newChildId()); > BookmarkablePageLink mfgLink = null; > String finalString =""; > String AMfgNames = "\n\n"+" A "+"\n\n"; > String BMfgNames = "\n\n"+" B "+"\n\n"; > for(.....) { > if(Pattern.matches("[aA][\\w\\W\\s\\S\\d\\D.]*",mfgName )) > AMfgNames = AMfgNames + mfgName +" | "; > if(Pattern.matches("[bB][\\w\\W\\s\\S\\d\\D.]*",mfgName )) > BMfgNames = BMfgNames + mfgName +" | "; > > mfgLink = ManufacturerDetailPage.getBookmarkableLink("mfgLink", mfg); > } > finalString = finalString + AMfgNames + BMfgNames; > mfgLink.add(new Label("mfgName", finalString).setRenderBodyOnly(true)); > wmc.add(mfgLink); > rv.add(wmc); > > > Here i am using a Label "mfgName" (wicket Id) and is referred in html in the > span tag. For this label i am passing the value using variable "finalString" > .This finalString contains "\n" character for nextline..In the browser it is > not displaying in the nextline. Suppose if i use "\\n" it is displaying the > "\\n" in the String value..I can't use <br> in HTML becos i have to insert > this nextline charcter while forming the String. Is there any way to do > this? > > Please help me out.. > > Thanks > Swapna > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org