Wouldn't the solution be, rather than rewriting the bean:write tag, be
for *someone* to write a tag which in the processing of the body
substitutes \n for <br />.

You would use it like

        <usertag:br><bean:write property='aaaa' /></usertag:br>

I have one which sticks in <tr> </tr> after a given number of <td> or
<th> if you want a sample.

This way there is a clean deliniation between struts and user code.

Edgar

-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@;apache.org] 
Sent: Wednesday, October 23, 2002 12:14 PM
To: Struts Developers List
Subject: Re: HTML formatting of newline characters with bean:write tag




On Thu, 24 Oct 2002, Arron Bates wrote:

> Date: Thu, 24 Oct 2002 02:20:12 +1000
> From: Arron Bates <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: Re: HTML formatting of newline characters with bean:write tag
>
> Craig R. McClanahan wrote:
>
> >Can't you just embed your <bean:write> tag inside a <pre> element and

> >get the same effect?
> >
> >Craig
> >
> pre opens a can of worms if the designers/managers are picky. For one,

> it roots the browsers ability to word wrap. Use a regex in your action

> code or some funky tag and replace them with <br /> 's before output. 
> It's the only way to get a true representation.
>

The other side of the coin is that maintaining line breaks in any
fashion is *not* what people who are simply rendering HTML output want.
At best, one could make this an option, but it's certainly never
something I would use.

> Arron.
>

Craig


--
To unsubscribe, e-mail:
<mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-dev-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to