日期:2014-05-18  浏览次数:20755 次

怎么在jsf的area里显示message
<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>