title: maxSuggestedItems with Oracle ADF af:autoSuggestBehavior
body: <p>I have written a simple Proof-of-Concept application to test out autocomplete fields using Oracle ADF, and although it mostly works the <code>maxSuggestedItems</code> attribute doesn't seem to have any effect. Oracle's documentation indicates that putting a value other than -1 should limit the list of values returned and include a "More..." item at the bottom that will cause the entire list to be returned. Instead, the entire list is always returned.</p>
  
  <p>Is this something I have to implement manually? If so, how would one approach that?</p>
  
  <p>The JSFF page has the following code in it:</p>
  
  <pre><code>&lt;af:inputText label="Accessories:" id="it4"&gt;
    &lt;af:autoSuggestBehavior suggestItems="#{accessorySuggest.onAccessorySuggest}"
                            maxSuggestedItems="5"/&gt;
  &lt;/af:inputText&gt;
  </code></pre>
  
  <p>The method which returns the suggested values (all hard-coded of course) is as follows:</p>
  
  <pre><code>private static final String[] accessories =
  { "Alloy Wheel", "All-Weather Cargo/Trunk Mat", "All-Weather Floor Mats",
    "Audio Unit - Base", "Audio Unit - Premium", "Auto-Dimming Mirror",
    "Bluetooth", "Body Side Moldings", "Capert Floor Mats - Premium",
    "Car Cover", "Cargo Hooks", "Cargo Liner", "Suggestion 1",
    "Suggestion 2", "Suggestion 3", "Suggestion 4", "Suggestion 5",
    "Suggestion 6", "Suggestion 7", "Suggestion 8", "Suggestion 9",
    "Suggestion 10", "Suggestion 11", "Suggestion 12", "Suggestion 13",
    "Suggestion 14", "Suggestion 15", "Suggestion 16", "Suggestion 17",
    "Suggestion 18", "Suggestion 19", "Suggestion 20", "Suggestion 21",
    "Suggestion 22", "Suggestion 23", "Suggestion 24", "Suggestion 25",
    "Suggestion 26", "Suggestion 27", "Suggestion 28", "Suggestion 29",
    "Suggestion 30" };
  
  public List onAccessorySuggest(FacesContext context,
                                 AutoSuggestUIHints hints) {
      ArrayList&lt;SelectItem&gt; suggestItems = new ArrayList&lt;SelectItem&gt;();
      String submittedValue = hints.getSubmittedValue();
  
      //don't return anything until the user has entered at least 3 characters
      if(hints.getSubmittedValue().length() &lt; 3) {
          return suggestItems;
      }
  
      for (String s : accessories) {
          if (s.toUpperCase().startsWith(submittedValue.toUpperCase())) {
              suggestItems.add(new SelectItem(s));
          }
      }
  
      return suggestItems;
  }
  </code></pre>