SuggestMethod <tc:suggest>

The suggestMethod attribute of <tc:suggest/> is deprecated. Please use <tc:selectItems/> instead. For more examples please have a look at the Suggest section.

Deprecated

<tc:in label="Language">
  <tc:suggest totalCount="10" suggestMethod="#{suggestController.getInputSuggestItems}"/>
</tc:in>

Replacement

<tc:in label="Language">
  <tc:suggest totalCount="10" query="#{suggestController.query}">
    <tc:selectItems value="#{suggestController.solarObjects}" var="name" itemValue="#{name}"/>
  </tc:suggest>
</tc:in>
<?xml version="1.0" encoding="UTF-8"?> <!-- * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. --> <ui:composition template="/main.xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:tc="http://myfaces.apache.org/tobago/component" xmlns:ui="http://java.sun.com/jsf/facelets"> <ui:param name="title" value="#{demoBundle.suggest_method} &lt;tc:suggest&gt;"/> <p>The <code>suggestMethod</code> attribute of <code class="language-markup">&lt;tc:suggest/></code> is deprecated. Please use <code class="language-markup">&lt;tc:selectItems/></code> instead. For more examples please have a look at the <tc:link label="#{demoBundle.suggest}" outcome="/content/20-component/010-input/20-suggest/suggest.xhtml"/> section.</p> <tc:section label="Deprecated"> <pre><code class="language-markup">&lt;tc:in label="Language"> &lt;tc:suggest totalCount="10" suggestMethod="\#{suggestController.getInputSuggestItems}"/> &lt;/tc:in></code></pre> <tc:in id="deprecated" label="Language"> <tc:suggest totalCount="10" suggestMethod="#{suggestController.getInputSuggestItems}"/> </tc:in> </tc:section> <tc:section label="Replacement"> <pre><code class="language-markup">&lt;tc:in label="Language"> &lt;tc:suggest totalCount="10" query="\#{suggestController.query}"> &lt;tc:selectItems value="\#{suggestController.solarObjects}" var="name" itemValue="\#{name}"/> &lt;/tc:suggest> &lt;/tc:in></code></pre> <tc:in id="replacement" label="Language"> <tc:suggest totalCount="10" query="#{suggestController.query}"> <tc:selectItems value="#{suggestController.solarObjects}" var="name" itemValue="#{name}"/> </tc:suggest> </tc:in> </tc:section> </ui:composition>