我有一个输入文本,我正在尝试使可调整大小
我把它放在AF:PanelStrechLayout但它没有用
这是我的代码
<af:panelStretchLayout dimensionsFrom="auto" >
<f:facet name="center" >
<af:panelGroupLayout >
<af:inputText rendered="#{bindings.commentType1.inputValue eq 'out'}" autoSubmit="true" simple="true" value="#{bindings.newCommentValue.inputValue}" />
<af:inputText rendered="#{bindings.commentType1.inputValue eq 'mile'}" autoSubmit="true" simple="true" value="#{bindings.newCommentValue1.inputValue}" />
</af:panelGroupLayout >
</f:facet>
</af:panelStretchLayout>
我还在弹出窗口中有一个inputText,它不会调整大小取决于文本长度而且文本被截断
这是它的代码
<af:inputText disabled="true" value="#{bindings.CrOuputComments.inputValue}" simple="true" rendered="#{bindings.commentType1.inputValue eq 'out'}"
required="#{bindings.CrOuputComments.hints.mandatory}"
columns="#{bindings.CrOuputComments.hints.displayWidth}"
maximumLength="#{bindings.CrOuputComments.hints.precision}"
shortDesc="#{bindings.CrOuputComments.hints.tooltip}" id="it39">
<f:validator binding="#{bindings.CrOuputComments.validator}"/>
</af:inputText>
在ADF中,要获得可调整大小的输入,您应该使用af:richTextEditor组件而不是af:inputText。
在你的情况下:
<af:richTextEditor disabled="true" value="#{bindings.CrOuputComments.inputValue}" simple="true" rendered="#{bindings.commentType1.inputValue eq 'out'}"
required="#{bindings.CrOuputComments.hints.mandatory}"
shortDesc="#{bindings.CrOuputComments.hints.tooltip}" id="it39">
<f:validator binding="#{bindings.CrOuputComments.validator}"/>
</af:richTextEditor>
正确的方法是在af:inputText标记上设置styleClass =“AFStretchWidth”,如下所示:
<af:inputText rendered="#{bindings.commentType1.inputValue eq 'out'}" autoSubmit="true" simple="true" value="#{bindings.newCommentValue.inputValue}" />
之前的答案虽然有效,但由于richTextEditor虽然是纯文本输入字段,但它与inputText不可比,因为它还可以接受富文本内容的HTML格式标记,并且页面上的堆耗量更高。
根据MrAdibou的评论进一步更新:如果需要拖动调整大小句柄,请将af:inputText上的rows属性设置为2或更大的值,将输入字段转换为文本区域。在大多数浏览器中,文本区域控件获取右下角的拖动控制柄。