<h:inputTextarea id= "area " >
<h:messages layout= "table " globalOnly= "true " errorClass= "error " infoClass= "info " warnClass= "warn "> </h:messages>
</h:inputTextarea>
这样写不可行,会显示在area的外边。
------解决方案--------------------
还有一种方法,用 <h:message for = “xxxx”/>
<h:inputTextarea id= "area " >
</h:inputTextarea>
<h:messages layout= "table " globalOnly= "true " errorClass= "error " infoClass= "info " warnClass= "warn " for= "area "> </h:messages>
------解决方案--------------------
看不出你的2种情况有什么不同:
试试:
<f:verbatim>
<textarea style= "padding:0;margin:0; ">
</f:verbatim>
<h:messages globalOnly= "true " style= "padding:0;margin:0; " />
<f:verbatim>
</textarea>
</f:verbatim>