I am using h:inputTextArea which is populated in the backing bean. The textArea is only for displaying data so I made it readOnly. The problem is that when the form is posted back, the textArea data also gets posted to the server (which I am trying to somehow avoid). The reason for avoiding posting of textArea data is that it is too large to be posted and given the default post size , "java.lang.IllegalStateException: Post too large" is thrown when the form is submitted.
How do I avoid posting of textArea data when the form is submitted?
I started to mention that one as well, but didn't think it offered anything that a pure JSF solution couldn't. I'd forgotten that TextArea scrolls, though. You can do that with a <div> as well, and by extension, a JSF panel control, but it's more work, perhaps.
For best results, however, wrap any raw HTML with the f:verbatim tag.
Joined: Aug 06, 2010
You're very welcome! Just wanted to add one more thing:
You should know that EL-script is unsafe to use in the way I showed it, if it is unprocessed input from the user. It's no problem if you are using your own text, but if you use that textarea to output user-submitted text, know that it exposes your users to cross-site scripting.
Joined: Oct 20, 2010
I am using the textArea to display some messages to the user. These messages come from a text file on the server . These messages have nothing to do with the user input. So I believe, that it wouldn't cause problems related to cross-site scripting (although I don't know much about that term).