You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Swapna Rachamalla <sw...@gmail.com> on 2009/07/25 00:58:28 UTC

Reg next line character in the passed String

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

Re: Reg next line character in the passed String

Posted by Swapna Rachamalla <sw...@gmail.com>.
Thank you...

On Mon, Jul 27, 2009 at 11:34 PM, Juri Prokofiev <pr...@gmail.com> wrote:

> Maybe this CSS trick will help you:
>
> <pre class="formatPre" style="width: 500px" wicket:id="body" />
>
> .formatPre {
>     overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2,
> not needed in Firefox 3 */
>     white-space: pre-wrap; /* css-3 */
>     white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
>     white-space: -pre-wrap; /* Opera 4-6 */
>     white-space: -o-pre-wrap; /* Opera 7 */
>     /* width: 99%; */
>     word-wrap: break-word; /* Internet Explorer 5.5+ */
> }
>
>
>
> On Mon, Jul 27, 2009 at 11:56 PM, Swapna Rachamalla <
> swapna.rachamalla@gmail.com> wrote:
>
> > HI Igor
> >
> > I have tried with you suggestions..now it is displaying the whole content
> > but it is not displaying in the next line wherever i need to display..
> >
> > Here is the code in HTML:
> > <div class="marginLeft20" wicket:id="mfg">
> >
> >            <a class="bottomCellLinks" href="#" wicket:id="mfgLink">
> >             <pre wicket:id="mfgName">
> >            <!--  <span wicket:id="mfgName">[Manufacturer Name]</span> -->
> >            </pre></a> </div>
> >
> > Here is the Java Code:
> > 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";
> >         String CMfgNames = "\n\n"+" C "+"\n\n";
> >        String DMfgNames = "\n\n"+" D "+"\n\n";
> >        String EMfgNames = "\n\n"+" E "+"\n\n";
> >        String FMfgNames = "\n\n"+" F "+"\n\n";
> >        String GMfgNames = "\n\n"+" G "+"\n\n";
> >        String HMfgNames = "\n\n"+" H "+"\n\n";
> >        for(Manufacturer mfg: mfgs)
> >        {
> >
> >            String mfgName = mfg.getName();
> >            //if(Pattern.matches("[aA][a-zA-Z_0-9]*",mfgName ))
> >             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 +" | ";
> >             if(Pattern.matches("[cC][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
> >                CMfgNames = CMfgNames + mfgName +" | ";
> >            if(Pattern.matches("[dD][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
> >                DMfgNames = DMfgNames + mfgName +" | ";
> >            if(Pattern.matches("[eE][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
> >                EMfgNames = EMfgNames + mfgName +" | ";
> >            if(Pattern.matches("[fF][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
> >                FMfgNames = FMfgNames + mfgName +" | ";
> >            if(Pattern.matches("[gG][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
> >                GMfgNames = GMfgNames + mfgName +" | ";
> >            if(Pattern.matches("[hH][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
> >                HMfgNames = HMfgNames + mfgName +" | ";
> >
> >
> >           // s = s +  mfg.getName()+" | ";
> >                s = s +  mfgName +" | ";
> >             mfgLink =
> ManufacturerDetailPage.getBookmarkableLink("mfgLink",
> > mfg);
> >             mfgLinkA =
> > ManufacturerDetailPage.getBookmarkableLink("mfgLinkA", mfg);
> >            mfgLinkB =
> > ManufacturerDetailPage.getBookmarkableLink("mfgLinkB", mfg);
> >            mfgLinkC =
> > ManufacturerDetailPage.getBookmarkableLink("mfgLinkC", mfg);
> >            mfgLinkD =
> > ManufacturerDetailPage.getBookmarkableLink("mfgLinkD", mfg);
> >            mfgLinkE =
> > ManufacturerDetailPage.getBookmarkableLink("mfgLinkE", mfg);
> >            mfgLinkF =
> > ManufacturerDetailPage.getBookmarkableLink("mfgLinkF", mfg);
> >            //mfgLink.add(new Label("index", new Model(index++)));
> >
> >        }
> >        finalString = finalString + AMfgNames + BMfgNames + CMfgNames +
> > DMfgNames + EMfgNames + FMfgNames + GMfgNames + HMfgNames ;
> >  mfgLink.add(new Label("mfgName", finalString).setRenderBodyOnly(true));
> > wmc.add(mfgLink);
> > rv.add(wmc);
> > add(rv);
> > }
> >
> > On Fri, Jul 24, 2009 at 8:55 PM, Jeremy Thomerson <
> > jeremy@wickettraining.com
> > > wrote:
> >
> > > You said in your email that you are using span tags.  What is the
> > > generated HTML?  Do you have span tags inside pre tags?  Have you
> > > tried setRenderBodyOnly(true)?  Or just attach the wicket:id to the
> > > pre tags directly?
> > >
> > > --
> > > Jeremy Thomerson
> > > http://www.wickettraining.com
> > >
> > >
> > >
> > >
> > > On Fri, Jul 24, 2009 at 6:38 PM, Swapna
> > > Rachamalla<sw...@gmail.com> wrote:
> > > > Hi Igor
> > > >
> > > > I am using <pre> tag.
> > > >
> > > > It is displaying
> > > >
> > > > A
> > > >
> > > > A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear |
> > ABT
> > > |
> > > > AC Delco | ACCESS
> > > >
> > > > but the actual String value is the following:
> > > >
> > > > A
> > > >
> > > > A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear |
> > ABT
> > > |
> > > > AC Delco | ACCESS HD | ACCUSCREEN | ACD SYSTEMS LICENSING | ACP -
> > MEMORY
> > > > UPGRADES | Accell | Accell Corp | Acer | Acme Hitch | Acomdata |
> > Acoustic
> > > > Research | Actiontec Electronics | Active Thermal Management |
> > Activision
> > > > Blizzard | Activision Blizzard Inc | ADAPTEC - RAID | ADAPTEC SW |
> > > ADDONICS
> > > > | ADIC (ADVANCED DIGITAL INFO. CORP.) | ADMINISTAFF | ADS | ADTRAN
> > > > INTERNATIONAL | ADTRAN TOTAL ACCESS 1500 PRODUCT | ADVANCED MATRIX
> > TECH.
> > > > INC. | Adcom | Addlogix | Adesso Inc. | Adobe Licensing | Adobe
> > Software
> > > |
> > > > Adobe Software | Adrians | Adtran | Advance Clocks | AEC SOFTWARE |
> > > Aethra
> > > > SpA | AGFA | AGT | AIC | AIMETIS | AIPTEK | AIRDRIVES | AIRMAGNET
> > > ENTERPRISE
> > > > | AIRVAC/M&S SYSTEMS | AIS (American Industrial System) | AITECH |
> > > > Air-Trekkers | Airhead | Airsoft | Airway | AKG | Akadema |
> ALACRITECH
> > > INC.
> > > > | ALCOHAWK | ALLIED - NET.COVER | ALLIED TELESIS | Alcatel | Aleen |
> > > > Aleratec | All Components | Alliance Systems | Allsop | Allworx |
> Alpen
> > |
> > > > Alpha Telecom | Altec Lansing | Altronix | Aluratek | AMBICOM | AMBIR
> > > > TECHNOLOGY | AMC | AMD | AMERICAN BATTERY | AMERICAN HARVEST |
> AMERICAN
> > > > TERMINAL | AMERIPHONE | AML | Ambico | American Digital Accessories |
> > > > American International | American Power Conversion | American
> Recorder
> > |
> > > > Amplivox | ANIXTER  INC. | ANYCOM | Anderson Teak | Andis Company |
> > Anoma
> > > Na
> > > > Corp | Ant Commandos | Antec Inc | Antennas Direct | AOC
> International
> > |
> > > > AOPEN - SOLUTIONS | APEX | APPLE OPTIONS | Ape Case | Applica |
> > Apricorn
> > > |
> > > > Aqua Blox | AR | ARCHITECH | ARRAY NETWORKS | ARRAY NETWORKS -
> SUPPORT
> > |
> > > > ARROW FASTNERS | Archos | Aristocrat | Arkon | ArtDio | Artec | ASTRA
> |
> > > > Aspyr | Astatic | Asus Notebooks | AT&T | ATEK INC. | ATHOC | ATI |
> ATN
> > |
> > > > ATREND | ATT/Vtech | ATTACHMATE - VPA | ATTO TECHNOLOGY | ATV Logic |
> > > Atari
> > > > | Atcom | Atdec | Aten Corp | Athenatech | Atlantic | Atlas | Atlus
> USA
> > |
> > > > Aton | AUTODESK PSG | Audible Phone Technology | Audio Messaging
> > > Solutions |
> > > > Audio Technica | Audio-Technica Pro | AudioCodes | AudioSource |
> > Audiovox
> > > |
> > > > Aurora Printing Calculators | Autoloc | AVERATEC | AVERY DENNISON |
> AVG
> > > BOX
> > > > | AVI DIGITAL SIGNAGE | AVOCENT-EQUINOX | Avanti | Avaya | Avermedia
> > Tech
> > > |
> > > > Avital | Avteq | AXIS | AXIS COMMUNICATION INC. | AXSYS | Axcess
> > > Technology
> > > > | Axion | Axxess | Azden |
> > > >
> > > > Thanks
> > > > Swapna.
> > > >
> > > > On Fri, Jul 24, 2009 at 4:00 PM, Igor Vaynberg <
> > igor.vaynberg@gmail.com
> > > >wrote:
> > > >
> > > >> put it into <pre> tags
> > > >>
> > > >> -igor
> > > >>
> > > >> On Fri, Jul 24, 2009 at 3:58 PM, Swapna
> > > >> Rachamalla<sw...@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-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
> > >
> > >
> >
>
>
>
> --
> http://www.autoladu.ee  - kõik varuosad ühes kohas
>

Re: Reg next line character in the passed String

Posted by Juri Prokofiev <pr...@gmail.com>.
Maybe this CSS trick will help you:

<pre class="formatPre" style="width: 500px" wicket:id="body" />

.formatPre {
     overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2,
not needed in Firefox 3 */
     white-space: pre-wrap; /* css-3 */
     white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
     white-space: -pre-wrap; /* Opera 4-6 */
     white-space: -o-pre-wrap; /* Opera 7 */
     /* width: 99%; */
     word-wrap: break-word; /* Internet Explorer 5.5+ */
}



On Mon, Jul 27, 2009 at 11:56 PM, Swapna Rachamalla <
swapna.rachamalla@gmail.com> wrote:

> HI Igor
>
> I have tried with you suggestions..now it is displaying the whole content
> but it is not displaying in the next line wherever i need to display..
>
> Here is the code in HTML:
> <div class="marginLeft20" wicket:id="mfg">
>
>            <a class="bottomCellLinks" href="#" wicket:id="mfgLink">
>             <pre wicket:id="mfgName">
>            <!--  <span wicket:id="mfgName">[Manufacturer Name]</span> -->
>            </pre></a> </div>
>
> Here is the Java Code:
> 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";
>         String CMfgNames = "\n\n"+" C "+"\n\n";
>        String DMfgNames = "\n\n"+" D "+"\n\n";
>        String EMfgNames = "\n\n"+" E "+"\n\n";
>        String FMfgNames = "\n\n"+" F "+"\n\n";
>        String GMfgNames = "\n\n"+" G "+"\n\n";
>        String HMfgNames = "\n\n"+" H "+"\n\n";
>        for(Manufacturer mfg: mfgs)
>        {
>
>            String mfgName = mfg.getName();
>            //if(Pattern.matches("[aA][a-zA-Z_0-9]*",mfgName ))
>             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 +" | ";
>             if(Pattern.matches("[cC][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
>                CMfgNames = CMfgNames + mfgName +" | ";
>            if(Pattern.matches("[dD][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
>                DMfgNames = DMfgNames + mfgName +" | ";
>            if(Pattern.matches("[eE][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
>                EMfgNames = EMfgNames + mfgName +" | ";
>            if(Pattern.matches("[fF][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
>                FMfgNames = FMfgNames + mfgName +" | ";
>            if(Pattern.matches("[gG][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
>                GMfgNames = GMfgNames + mfgName +" | ";
>            if(Pattern.matches("[hH][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
>                HMfgNames = HMfgNames + mfgName +" | ";
>
>
>           // s = s +  mfg.getName()+" | ";
>                s = s +  mfgName +" | ";
>             mfgLink = ManufacturerDetailPage.getBookmarkableLink("mfgLink",
> mfg);
>             mfgLinkA =
> ManufacturerDetailPage.getBookmarkableLink("mfgLinkA", mfg);
>            mfgLinkB =
> ManufacturerDetailPage.getBookmarkableLink("mfgLinkB", mfg);
>            mfgLinkC =
> ManufacturerDetailPage.getBookmarkableLink("mfgLinkC", mfg);
>            mfgLinkD =
> ManufacturerDetailPage.getBookmarkableLink("mfgLinkD", mfg);
>            mfgLinkE =
> ManufacturerDetailPage.getBookmarkableLink("mfgLinkE", mfg);
>            mfgLinkF =
> ManufacturerDetailPage.getBookmarkableLink("mfgLinkF", mfg);
>            //mfgLink.add(new Label("index", new Model(index++)));
>
>        }
>        finalString = finalString + AMfgNames + BMfgNames + CMfgNames +
> DMfgNames + EMfgNames + FMfgNames + GMfgNames + HMfgNames ;
>  mfgLink.add(new Label("mfgName", finalString).setRenderBodyOnly(true));
> wmc.add(mfgLink);
> rv.add(wmc);
> add(rv);
> }
>
> On Fri, Jul 24, 2009 at 8:55 PM, Jeremy Thomerson <
> jeremy@wickettraining.com
> > wrote:
>
> > You said in your email that you are using span tags.  What is the
> > generated HTML?  Do you have span tags inside pre tags?  Have you
> > tried setRenderBodyOnly(true)?  Or just attach the wicket:id to the
> > pre tags directly?
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> >
> > On Fri, Jul 24, 2009 at 6:38 PM, Swapna
> > Rachamalla<sw...@gmail.com> wrote:
> > > Hi Igor
> > >
> > > I am using <pre> tag.
> > >
> > > It is displaying
> > >
> > > A
> > >
> > > A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear |
> ABT
> > |
> > > AC Delco | ACCESS
> > >
> > > but the actual String value is the following:
> > >
> > > A
> > >
> > > A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear |
> ABT
> > |
> > > AC Delco | ACCESS HD | ACCUSCREEN | ACD SYSTEMS LICENSING | ACP -
> MEMORY
> > > UPGRADES | Accell | Accell Corp | Acer | Acme Hitch | Acomdata |
> Acoustic
> > > Research | Actiontec Electronics | Active Thermal Management |
> Activision
> > > Blizzard | Activision Blizzard Inc | ADAPTEC - RAID | ADAPTEC SW |
> > ADDONICS
> > > | ADIC (ADVANCED DIGITAL INFO. CORP.) | ADMINISTAFF | ADS | ADTRAN
> > > INTERNATIONAL | ADTRAN TOTAL ACCESS 1500 PRODUCT | ADVANCED MATRIX
> TECH.
> > > INC. | Adcom | Addlogix | Adesso Inc. | Adobe Licensing | Adobe
> Software
> > |
> > > Adobe Software | Adrians | Adtran | Advance Clocks | AEC SOFTWARE |
> > Aethra
> > > SpA | AGFA | AGT | AIC | AIMETIS | AIPTEK | AIRDRIVES | AIRMAGNET
> > ENTERPRISE
> > > | AIRVAC/M&S SYSTEMS | AIS (American Industrial System) | AITECH |
> > > Air-Trekkers | Airhead | Airsoft | Airway | AKG | Akadema | ALACRITECH
> > INC.
> > > | ALCOHAWK | ALLIED - NET.COVER | ALLIED TELESIS | Alcatel | Aleen |
> > > Aleratec | All Components | Alliance Systems | Allsop | Allworx | Alpen
> |
> > > Alpha Telecom | Altec Lansing | Altronix | Aluratek | AMBICOM | AMBIR
> > > TECHNOLOGY | AMC | AMD | AMERICAN BATTERY | AMERICAN HARVEST | AMERICAN
> > > TERMINAL | AMERIPHONE | AML | Ambico | American Digital Accessories |
> > > American International | American Power Conversion | American Recorder
> |
> > > Amplivox | ANIXTER  INC. | ANYCOM | Anderson Teak | Andis Company |
> Anoma
> > Na
> > > Corp | Ant Commandos | Antec Inc | Antennas Direct | AOC International
> |
> > > AOPEN - SOLUTIONS | APEX | APPLE OPTIONS | Ape Case | Applica |
> Apricorn
> > |
> > > Aqua Blox | AR | ARCHITECH | ARRAY NETWORKS | ARRAY NETWORKS - SUPPORT
> |
> > > ARROW FASTNERS | Archos | Aristocrat | Arkon | ArtDio | Artec | ASTRA |
> > > Aspyr | Astatic | Asus Notebooks | AT&T | ATEK INC. | ATHOC | ATI | ATN
> |
> > > ATREND | ATT/Vtech | ATTACHMATE - VPA | ATTO TECHNOLOGY | ATV Logic |
> > Atari
> > > | Atcom | Atdec | Aten Corp | Athenatech | Atlantic | Atlas | Atlus USA
> |
> > > Aton | AUTODESK PSG | Audible Phone Technology | Audio Messaging
> > Solutions |
> > > Audio Technica | Audio-Technica Pro | AudioCodes | AudioSource |
> Audiovox
> > |
> > > Aurora Printing Calculators | Autoloc | AVERATEC | AVERY DENNISON | AVG
> > BOX
> > > | AVI DIGITAL SIGNAGE | AVOCENT-EQUINOX | Avanti | Avaya | Avermedia
> Tech
> > |
> > > Avital | Avteq | AXIS | AXIS COMMUNICATION INC. | AXSYS | Axcess
> > Technology
> > > | Axion | Axxess | Azden |
> > >
> > > Thanks
> > > Swapna.
> > >
> > > On Fri, Jul 24, 2009 at 4:00 PM, Igor Vaynberg <
> igor.vaynberg@gmail.com
> > >wrote:
> > >
> > >> put it into <pre> tags
> > >>
> > >> -igor
> > >>
> > >> On Fri, Jul 24, 2009 at 3:58 PM, Swapna
> > >> Rachamalla<sw...@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-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
> >
> >
>



-- 
http://www.autoladu.ee  - kõik varuosad ühes kohas

Re: Reg next line character in the passed String

Posted by Swapna Rachamalla <sw...@gmail.com>.
HI Igor

I have tried with you suggestions..now it is displaying the whole content
but it is not displaying in the next line wherever i need to display..

Here is the code in HTML:
<div class="marginLeft20" wicket:id="mfg">

            <a class="bottomCellLinks" href="#" wicket:id="mfgLink">
            <pre wicket:id="mfgName">
            <!--  <span wicket:id="mfgName">[Manufacturer Name]</span> -->
            </pre></a> </div>

Here is the Java Code:
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";
        String CMfgNames = "\n\n"+" C "+"\n\n";
        String DMfgNames = "\n\n"+" D "+"\n\n";
        String EMfgNames = "\n\n"+" E "+"\n\n";
        String FMfgNames = "\n\n"+" F "+"\n\n";
        String GMfgNames = "\n\n"+" G "+"\n\n";
        String HMfgNames = "\n\n"+" H "+"\n\n";
        for(Manufacturer mfg: mfgs)
        {

            String mfgName = mfg.getName();
            //if(Pattern.matches("[aA][a-zA-Z_0-9]*",mfgName ))
            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 +" | ";
            if(Pattern.matches("[cC][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
                CMfgNames = CMfgNames + mfgName +" | ";
            if(Pattern.matches("[dD][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
                DMfgNames = DMfgNames + mfgName +" | ";
            if(Pattern.matches("[eE][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
                EMfgNames = EMfgNames + mfgName +" | ";
            if(Pattern.matches("[fF][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
                FMfgNames = FMfgNames + mfgName +" | ";
            if(Pattern.matches("[gG][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
                GMfgNames = GMfgNames + mfgName +" | ";
            if(Pattern.matches("[hH][\\w\\W\\s\\S\\d\\D.]*",mfgName ))
                HMfgNames = HMfgNames + mfgName +" | ";


           // s = s +  mfg.getName()+" | ";
                s = s +  mfgName +" | ";
            mfgLink = ManufacturerDetailPage.getBookmarkableLink("mfgLink",
mfg);
            mfgLinkA =
ManufacturerDetailPage.getBookmarkableLink("mfgLinkA", mfg);
            mfgLinkB =
ManufacturerDetailPage.getBookmarkableLink("mfgLinkB", mfg);
            mfgLinkC =
ManufacturerDetailPage.getBookmarkableLink("mfgLinkC", mfg);
            mfgLinkD =
ManufacturerDetailPage.getBookmarkableLink("mfgLinkD", mfg);
            mfgLinkE =
ManufacturerDetailPage.getBookmarkableLink("mfgLinkE", mfg);
            mfgLinkF =
ManufacturerDetailPage.getBookmarkableLink("mfgLinkF", mfg);
            //mfgLink.add(new Label("index", new Model(index++)));

        }
        finalString = finalString + AMfgNames + BMfgNames + CMfgNames +
DMfgNames + EMfgNames + FMfgNames + GMfgNames + HMfgNames ;
 mfgLink.add(new Label("mfgName", finalString).setRenderBodyOnly(true));
wmc.add(mfgLink);
rv.add(wmc);
add(rv);
}

On Fri, Jul 24, 2009 at 8:55 PM, Jeremy Thomerson <jeremy@wickettraining.com
> wrote:

> You said in your email that you are using span tags.  What is the
> generated HTML?  Do you have span tags inside pre tags?  Have you
> tried setRenderBodyOnly(true)?  Or just attach the wicket:id to the
> pre tags directly?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Fri, Jul 24, 2009 at 6:38 PM, Swapna
> Rachamalla<sw...@gmail.com> wrote:
> > Hi Igor
> >
> > I am using <pre> tag.
> >
> > It is displaying
> >
> > A
> >
> > A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear | ABT
> |
> > AC Delco | ACCESS
> >
> > but the actual String value is the following:
> >
> > A
> >
> > A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear | ABT
> |
> > AC Delco | ACCESS HD | ACCUSCREEN | ACD SYSTEMS LICENSING | ACP - MEMORY
> > UPGRADES | Accell | Accell Corp | Acer | Acme Hitch | Acomdata | Acoustic
> > Research | Actiontec Electronics | Active Thermal Management | Activision
> > Blizzard | Activision Blizzard Inc | ADAPTEC - RAID | ADAPTEC SW |
> ADDONICS
> > | ADIC (ADVANCED DIGITAL INFO. CORP.) | ADMINISTAFF | ADS | ADTRAN
> > INTERNATIONAL | ADTRAN TOTAL ACCESS 1500 PRODUCT | ADVANCED MATRIX TECH.
> > INC. | Adcom | Addlogix | Adesso Inc. | Adobe Licensing | Adobe Software
> |
> > Adobe Software | Adrians | Adtran | Advance Clocks | AEC SOFTWARE |
> Aethra
> > SpA | AGFA | AGT | AIC | AIMETIS | AIPTEK | AIRDRIVES | AIRMAGNET
> ENTERPRISE
> > | AIRVAC/M&S SYSTEMS | AIS (American Industrial System) | AITECH |
> > Air-Trekkers | Airhead | Airsoft | Airway | AKG | Akadema | ALACRITECH
> INC.
> > | ALCOHAWK | ALLIED - NET.COVER | ALLIED TELESIS | Alcatel | Aleen |
> > Aleratec | All Components | Alliance Systems | Allsop | Allworx | Alpen |
> > Alpha Telecom | Altec Lansing | Altronix | Aluratek | AMBICOM | AMBIR
> > TECHNOLOGY | AMC | AMD | AMERICAN BATTERY | AMERICAN HARVEST | AMERICAN
> > TERMINAL | AMERIPHONE | AML | Ambico | American Digital Accessories |
> > American International | American Power Conversion | American Recorder |
> > Amplivox | ANIXTER  INC. | ANYCOM | Anderson Teak | Andis Company | Anoma
> Na
> > Corp | Ant Commandos | Antec Inc | Antennas Direct | AOC International |
> > AOPEN - SOLUTIONS | APEX | APPLE OPTIONS | Ape Case | Applica | Apricorn
> |
> > Aqua Blox | AR | ARCHITECH | ARRAY NETWORKS | ARRAY NETWORKS - SUPPORT |
> > ARROW FASTNERS | Archos | Aristocrat | Arkon | ArtDio | Artec | ASTRA |
> > Aspyr | Astatic | Asus Notebooks | AT&T | ATEK INC. | ATHOC | ATI | ATN |
> > ATREND | ATT/Vtech | ATTACHMATE - VPA | ATTO TECHNOLOGY | ATV Logic |
> Atari
> > | Atcom | Atdec | Aten Corp | Athenatech | Atlantic | Atlas | Atlus USA |
> > Aton | AUTODESK PSG | Audible Phone Technology | Audio Messaging
> Solutions |
> > Audio Technica | Audio-Technica Pro | AudioCodes | AudioSource | Audiovox
> |
> > Aurora Printing Calculators | Autoloc | AVERATEC | AVERY DENNISON | AVG
> BOX
> > | AVI DIGITAL SIGNAGE | AVOCENT-EQUINOX | Avanti | Avaya | Avermedia Tech
> |
> > Avital | Avteq | AXIS | AXIS COMMUNICATION INC. | AXSYS | Axcess
> Technology
> > | Axion | Axxess | Azden |
> >
> > Thanks
> > Swapna.
> >
> > On Fri, Jul 24, 2009 at 4:00 PM, Igor Vaynberg <igor.vaynberg@gmail.com
> >wrote:
> >
> >> put it into <pre> tags
> >>
> >> -igor
> >>
> >> On Fri, Jul 24, 2009 at 3:58 PM, Swapna
> >> Rachamalla<sw...@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-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: Reg next line character in the passed String

Posted by Jeremy Thomerson <je...@wickettraining.com>.
You said in your email that you are using span tags.  What is the
generated HTML?  Do you have span tags inside pre tags?  Have you
tried setRenderBodyOnly(true)?  Or just attach the wicket:id to the
pre tags directly?

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




On Fri, Jul 24, 2009 at 6:38 PM, Swapna
Rachamalla<sw...@gmail.com> wrote:
> Hi Igor
>
> I am using <pre> tag.
>
> It is displaying
>
> A
>
> A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear | ABT |
> AC Delco | ACCESS
>
> but the actual String value is the following:
>
> A
>
> A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear | ABT |
> AC Delco | ACCESS HD | ACCUSCREEN | ACD SYSTEMS LICENSING | ACP - MEMORY
> UPGRADES | Accell | Accell Corp | Acer | Acme Hitch | Acomdata | Acoustic
> Research | Actiontec Electronics | Active Thermal Management | Activision
> Blizzard | Activision Blizzard Inc | ADAPTEC - RAID | ADAPTEC SW | ADDONICS
> | ADIC (ADVANCED DIGITAL INFO. CORP.) | ADMINISTAFF | ADS | ADTRAN
> INTERNATIONAL | ADTRAN TOTAL ACCESS 1500 PRODUCT | ADVANCED MATRIX TECH.
> INC. | Adcom | Addlogix | Adesso Inc. | Adobe Licensing | Adobe Software |
> Adobe Software | Adrians | Adtran | Advance Clocks | AEC SOFTWARE | Aethra
> SpA | AGFA | AGT | AIC | AIMETIS | AIPTEK | AIRDRIVES | AIRMAGNET ENTERPRISE
> | AIRVAC/M&S SYSTEMS | AIS (American Industrial System) | AITECH |
> Air-Trekkers | Airhead | Airsoft | Airway | AKG | Akadema | ALACRITECH INC.
> | ALCOHAWK | ALLIED - NET.COVER | ALLIED TELESIS | Alcatel | Aleen |
> Aleratec | All Components | Alliance Systems | Allsop | Allworx | Alpen |
> Alpha Telecom | Altec Lansing | Altronix | Aluratek | AMBICOM | AMBIR
> TECHNOLOGY | AMC | AMD | AMERICAN BATTERY | AMERICAN HARVEST | AMERICAN
> TERMINAL | AMERIPHONE | AML | Ambico | American Digital Accessories |
> American International | American Power Conversion | American Recorder |
> Amplivox | ANIXTER  INC. | ANYCOM | Anderson Teak | Andis Company | Anoma Na
> Corp | Ant Commandos | Antec Inc | Antennas Direct | AOC International |
> AOPEN - SOLUTIONS | APEX | APPLE OPTIONS | Ape Case | Applica | Apricorn |
> Aqua Blox | AR | ARCHITECH | ARRAY NETWORKS | ARRAY NETWORKS - SUPPORT |
> ARROW FASTNERS | Archos | Aristocrat | Arkon | ArtDio | Artec | ASTRA |
> Aspyr | Astatic | Asus Notebooks | AT&T | ATEK INC. | ATHOC | ATI | ATN |
> ATREND | ATT/Vtech | ATTACHMATE - VPA | ATTO TECHNOLOGY | ATV Logic | Atari
> | Atcom | Atdec | Aten Corp | Athenatech | Atlantic | Atlas | Atlus USA |
> Aton | AUTODESK PSG | Audible Phone Technology | Audio Messaging Solutions |
> Audio Technica | Audio-Technica Pro | AudioCodes | AudioSource | Audiovox |
> Aurora Printing Calculators | Autoloc | AVERATEC | AVERY DENNISON | AVG BOX
> | AVI DIGITAL SIGNAGE | AVOCENT-EQUINOX | Avanti | Avaya | Avermedia Tech |
> Avital | Avteq | AXIS | AXIS COMMUNICATION INC. | AXSYS | Axcess Technology
> | Axion | Axxess | Azden |
>
> Thanks
> Swapna.
>
> On Fri, Jul 24, 2009 at 4:00 PM, Igor Vaynberg <ig...@gmail.com>wrote:
>
>> put it into <pre> tags
>>
>> -igor
>>
>> On Fri, Jul 24, 2009 at 3:58 PM, Swapna
>> Rachamalla<sw...@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-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: Reg next line character in the passed String

Posted by Swapna Rachamalla <sw...@gmail.com>.
Hi Igor

I am using <pre> tag.

It is displaying

A

A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear | ABT |
AC Delco | ACCESS

but the actual String value is the following:

A

A2B TRACKING SOLUTIONS | Aastra | Aastra Phones | ABBYY | ABO Gear | ABT |
AC Delco | ACCESS HD | ACCUSCREEN | ACD SYSTEMS LICENSING | ACP - MEMORY
UPGRADES | Accell | Accell Corp | Acer | Acme Hitch | Acomdata | Acoustic
Research | Actiontec Electronics | Active Thermal Management | Activision
Blizzard | Activision Blizzard Inc | ADAPTEC - RAID | ADAPTEC SW | ADDONICS
| ADIC (ADVANCED DIGITAL INFO. CORP.) | ADMINISTAFF | ADS | ADTRAN
INTERNATIONAL | ADTRAN TOTAL ACCESS 1500 PRODUCT | ADVANCED MATRIX TECH.
INC. | Adcom | Addlogix | Adesso Inc. | Adobe Licensing | Adobe Software |
Adobe Software | Adrians | Adtran | Advance Clocks | AEC SOFTWARE | Aethra
SpA | AGFA | AGT | AIC | AIMETIS | AIPTEK | AIRDRIVES | AIRMAGNET ENTERPRISE
| AIRVAC/M&S SYSTEMS | AIS (American Industrial System) | AITECH |
Air-Trekkers | Airhead | Airsoft | Airway | AKG | Akadema | ALACRITECH INC.
| ALCOHAWK | ALLIED - NET.COVER | ALLIED TELESIS | Alcatel | Aleen |
Aleratec | All Components | Alliance Systems | Allsop | Allworx | Alpen |
Alpha Telecom | Altec Lansing | Altronix | Aluratek | AMBICOM | AMBIR
TECHNOLOGY | AMC | AMD | AMERICAN BATTERY | AMERICAN HARVEST | AMERICAN
TERMINAL | AMERIPHONE | AML | Ambico | American Digital Accessories |
American International | American Power Conversion | American Recorder |
Amplivox | ANIXTER  INC. | ANYCOM | Anderson Teak | Andis Company | Anoma Na
Corp | Ant Commandos | Antec Inc | Antennas Direct | AOC International |
AOPEN - SOLUTIONS | APEX | APPLE OPTIONS | Ape Case | Applica | Apricorn |
Aqua Blox | AR | ARCHITECH | ARRAY NETWORKS | ARRAY NETWORKS - SUPPORT |
ARROW FASTNERS | Archos | Aristocrat | Arkon | ArtDio | Artec | ASTRA |
Aspyr | Astatic | Asus Notebooks | AT&T | ATEK INC. | ATHOC | ATI | ATN |
ATREND | ATT/Vtech | ATTACHMATE - VPA | ATTO TECHNOLOGY | ATV Logic | Atari
| Atcom | Atdec | Aten Corp | Athenatech | Atlantic | Atlas | Atlus USA |
Aton | AUTODESK PSG | Audible Phone Technology | Audio Messaging Solutions |
Audio Technica | Audio-Technica Pro | AudioCodes | AudioSource | Audiovox |
Aurora Printing Calculators | Autoloc | AVERATEC | AVERY DENNISON | AVG BOX
| AVI DIGITAL SIGNAGE | AVOCENT-EQUINOX | Avanti | Avaya | Avermedia Tech |
Avital | Avteq | AXIS | AXIS COMMUNICATION INC. | AXSYS | Axcess Technology
| Axion | Axxess | Azden |

Thanks
Swapna.

On Fri, Jul 24, 2009 at 4:00 PM, Igor Vaynberg <ig...@gmail.com>wrote:

> put it into <pre> tags
>
> -igor
>
> On Fri, Jul 24, 2009 at 3:58 PM, Swapna
> Rachamalla<sw...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Reg next line character in the passed String

Posted by Igor Vaynberg <ig...@gmail.com>.
put it into <pre> tags

-igor

On Fri, Jul 24, 2009 at 3:58 PM, Swapna
Rachamalla<sw...@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org