You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Siggelkow <bi...@bellsouth.net> on 2004/08/03 17:53:34 UTC
Re: How to allow users enters html links in text input area and h
ow t o display it
Well, text in a text area is not HTML markup -- it's just text -- to
render the links you will have to output the data using bean:write
filter="false" -- since you need to preserve line breaks take a look at
this thread
http://marc.theaimsgroup.com/?l=struts-user&m=106685398105831&w=2
Good Luck!
Bill
Jirole, Amar wrote:
> We are displaying the text in text area as well. The reason we are doing
> this is we want to preserve para and other formatting info which gets lost
> in plain bean:write
>
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Siggelkow
> Sent: Tuesday, August 03, 2004 10:03 AM
> To: user@struts.apache.org
> Subject: Re: How to allow users enters html links in text input area and h
> ow t o display it
>
>
> Hmmm -- if a user enters the following into the text area:
>
> My favorite site is <a href='http://struts.apache.org'>Struts</a>
>
> Then you render this using <bean:write filter="false"/> it should work.
>
> If the users are just entering the URLs (the http://... part) then you
> will need to generate the "<a href" part yourself.
>
> Jirole, Amar wrote:
>
>
>>The links are displayed as plain text and nothing happens when I click
>>it (of course because its treated as plain text)
>>
>>-----Original Message-----
>>From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Siggelkow
>>Sent: Tuesday, August 03, 2004 9:37 AM
>>To: user@struts.apache.org
>>Subject: Re: How to allow users enters html links in text input area
>>and how t o display it
>>
>>
>>Jirole, Amar wrote:
>>
>>
>>
>>>Hi All,
>>>Our users would like to enter urls in the text input area and when
>>>click the link bring up the page. I tried using filter="false" for
>>>bean:write but that did not work. We use simple struts-jsp
>>>architecture. Any ideas? Thanks in Advance
>>>-Amar
>>
>>I have done this before without issue -- please clarify "did not work"
>>-- also, take a look at the page source of the generated page -- this
>>should clue you in to what is happening.
>>
>>Bill Siggelkow
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org