p:dialog with resizable="true" 在其 p:inputTextarea 调整大小时不调整大小
p:dialog with resizable="true" doesn't resize when its p:inputTextarea resizes
我有一个 p:dialog
和 resizable="true"
,它包含一个 p:inputTextarea
,它也可以调整大小:
<p:dialog header="Comment" widgetVar="commentDialog" modal="true" resizable="true" height="100">
<h:form>
<h:outputLabel for="comment" value="Comment:"/>
<p:inputTextarea id="comment" title="Comment"
rows="6" cols="33"
value="#{managedBean.comment}"
required="true" styleClass="plainInput"/>
<h:commandButton value="Submit"/>
</h:form>
</p:dialog>
但是,当我在文本区域中输入的文本超过其初始容量时,文本区域会调整大小但对话框不会。
如何使对话框与文本区域一起调整大小?
删除 height="100"
属性或将其设置为 height="auto"
。
*在 Primefaces 5.1.1 中测试
设置 minHeight
和 minWidth
属性。
我有一个 p:dialog
和 resizable="true"
,它包含一个 p:inputTextarea
,它也可以调整大小:
<p:dialog header="Comment" widgetVar="commentDialog" modal="true" resizable="true" height="100">
<h:form>
<h:outputLabel for="comment" value="Comment:"/>
<p:inputTextarea id="comment" title="Comment"
rows="6" cols="33"
value="#{managedBean.comment}"
required="true" styleClass="plainInput"/>
<h:commandButton value="Submit"/>
</h:form>
</p:dialog>
但是,当我在文本区域中输入的文本超过其初始容量时,文本区域会调整大小但对话框不会。
如何使对话框与文本区域一起调整大小?
删除 height="100"
属性或将其设置为 height="auto"
。
*在 Primefaces 5.1.1 中测试
设置 minHeight
和 minWidth
属性。