问题描述
我正在使用JSF2.0,并且我有一个inputTextArea组件,并希望阻止最终用户调整其大小.我该怎么办.我尝试了resize ="false",但它不接受.
I am using JSF2.0 and I have an inputTextArea component and want to prevent the enduser from resizing it.How can I do it.I tried resize="false" but it is not accepting.
推荐答案
这可以通过使用CSS resize
属性来实现,该属性需要设置为none
.
This is to be achieved using the CSS resize
property which needs to be set to none
.
例如
<h:inputTextarea ... style="resize: none" />
或者更好,
<h:inputTextarea ... styleClass="unresizable" />
将其保存在完全有价值的CSS文件中
with this in a fullworthy CSS file
.unresizable {
resize: none;
}
相同的情况适用于PrimeFaces等效的<p:inputTextarea>
.您不清楚使用的是哪一个.您的问题标题和正文表示标准的JSF,但您标记了PrimeFaces.
The same story applies to the PrimeFaces equivalent <p:inputTextarea>
. You wasn't exactly clear on which one you were using. Your question title and body implied standard JSF, but you tagged PrimeFaces.
这篇关于JSF中inputTextarea组件的调整大小选项是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!