0

I want to limit number of showing character in dropdown menu in inputComboboxListOfValues component. af:inputText have a truncateAt attribute. Is any way to do the same with inputComboboxListOfValues?

My code:

<af:inputComboboxListOfValues id="xxxxx" autoSubmit="true" popupTitle=""
                                                                      value="#{xxxxx.yyyyy}" label=""
                                                                      model="#{bindings.xxxxxx.zzzzzzzzzzz}" placeholder="#{msg['zzzzzzz.xxxxxxxx']}"
                                                                      required="false" shortDesc="#{bindings.zzzzzzzzz.yyyyyyyy}" launchPopupListener="#{pageFlowScope.xxxxxMB.yyyyyyyy}">
                                            <af:autoSuggestBehavior suggestedItems="#{xxxxx.yyyyyy}"/>
                                        </af:inputComboboxListOfValues>
J W
  • 15
  • 1
  • 5

1 Answers1

0

You can set the max-width CSS with the af:inputComboboxListOfValues inlineStyle property.

In your case, inspired from Setting a max character length in css. :

<af:inputComboboxListOfValues id="xxxxx" autoSubmit="true" popupTitle=""
                              value="#{xxxxx.yyyyy}" label=""
                              model="#{bindings.xxxxxx.zzzzzzzzzzz}" placeholder="#{msg['zzzzzzz.xxxxxxxx']}"
                              required="false" shortDesc="#{bindings.zzzzzzzzz.yyyyyyyy}" launchPopupListener="#{pageFlowScope.xxxxxMB.yyyyyyyy}"
                               inlineStyle="overflow: hidden!important; text-overflow: ellipsis!important;  white-space: nowrap!important; max-width: 20px!important;"  >
    <af:autoSuggestBehavior suggestedItems="#{xxxxx.yyyyyy}"/>
</af:inputComboboxListOfValues>

Note: Don't forget to add the !important at the end of the max-width property to override the component css

Cedric
  • 977
  • 2
  • 11
  • 23