You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sourabh Chandan <so...@interglobetechnologies.com> on 2007/05/22 09:36:25 UTC

Wrap data in struts


Hi,

Anyone has idea about how can be wrapped the text when we use <bean:write
name="..." property="....">
. I tried to use wrap attribute of text area. But it doesn't work because I
am using struts <html:textarea/>

It can be done if there is an attribute to break lines.

It works if i enter data and press enter key after 40 characters.

Sourabh


+++++++++++++++++++++++++++++++++++++++++
CONFIDENTIALITY NOTICE & DISCLAIMER

The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it was addressed and may also be privileged.  If you are not the addressee of this e-mail you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever.  If you have received this e-mail in error please e-mail the sender by replying to this message. The recipient should check this email and any attachments for the presence of viruses. InterGlobe accepts no liability for any damage caused by any virus transmitted by this email.
+++++++++++++++++++++++++++++++++++++++++



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Wrap data in struts

Posted by Antonio Petrelli <an...@gmail.com>.
2007/5/22, Sourabh Chandan <so...@interglobetechnologies.com>:
>
>
>
> Hi,
>
> Anyone has idea about how can be wrapped the text when we use <bean:write
> name="..." property="....">
> . I tried to use wrap attribute of text area. But it doesn't work because
> I
> am using struts <html:textarea/>



What do you mean with "wrapped"?

Antonio

Re: Wrap data in struts

Posted by Laurie Harper <la...@holoweb.net>.
Sourabh Chandan wrote:
> 
> Hi,
> 
> Anyone has idea about how can be wrapped the text when we use <bean:write
> name="..." property="....">
> .. I tried to use wrap attribute of text area. But it doesn't work because I
> am using struts <html:textarea/>
> 
> It can be done if there is an attribute to break lines.
> 
> It works if i enter data and press enter key after 40 characters.

bean:write just outputs the text value of the property you name. It's up 
to the browser how/if that text gets wrapped, according to the 
surrounding HTML.

It *sounds* like you are using bean:write to provide the body (content) 
of a text area HTML input, via a surrounding html:textarea. Look at the 
resulting HTML and determine how it needs to change to achieve the 
in-browser rendering you want, then figure out how to get Struts and/or 
your app to produce that markup.

In this case, it sounds like you may need to pre-process the value you 
are writing to include literal line breaks at suitable intervals, but 
without seeing your code or data it's hard to say.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org