--- Raghuveer Rawat <[EMAIL PROTECTED]> wrote:
> Hi, I want to user to preview s:textarea value before sending to db.
> but when I am displaying <s:textarea> value using <s:property> it is not
> formatting it correctly and wrapping it.
> <s:textarea name="articleDesc" cols="58" rows="10" />
> 
> <s:property value="article.articleDesc"/>

I'm not sure what you mean by the <s:property.../> tag isn't formatting the
value correctly etc.

You won't be able to use <s:property.../> to display a value before you've
filled its property in the action. Above you're using two different
properties, one in the <s:textarea.../> and one in the <s:property.../>.

Do you mean you want to submit the form, then show the information on a new
page, and submit the information to the DB from the second page?

If so, you need to understand that <s:property.../> is just going to display
the text as HTML. In other words if there are carriage returns, lots of
spaces, tabs, etc. the browser will not display them in the same way an HTML
<textarea...> would.

If you want to preserve the formatting from a <textarea...> tag you'll need
to wrap it in an HTML <pre> tag or something similar.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to