Reputation: 413
I have An inputText that i'm trying to Make Resizible
and i've put it in AF:PanelStrechLayout but it didn't work
and this my code
<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>
im also have an inputText in popup that don't resize depend on the Text Length and the text is truncated
and this is the code for it
<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>
Upvotes: 0
Views: 1118
Reputation: 7624
The correct way is to set styleClass="AFStretchWidth" on the af:inputText tag like so:
<af:inputText rendered="#{bindings.commentType1.inputValue eq 'out'}" autoSubmit="true" simple="true" value="#{bindings.newCommentValue.inputValue}" />
The previous answer although it works is an overkill, since richTextEditor although a plain text input field, is not comparable to inputText since it can also accept HTML formatting tags for rich text content and has higher heavy heap consumption on the page.
Further update based on MrAdibou's comment: If drag resize handle is needed, set rows attribute on af:inputText to a value of 2 or more which converts the input field to a text area. Text area control gets the drag handle in the bottom right corner in most browsers.
Upvotes: 1
Reputation: 977
In ADF, to have a resizable input you should use the af:richTextEditor component instead of your af:inputText.
In your case :
<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>
Upvotes: 1