title: primefaces autocomplete and it search properly. But it is not works properly
body: <p>I use primefaces autocomplete and  search properly. When I click Save ,Show this error message.</p>
  
  <pre><code>/entryPages/usDistributorDetails/Create.xhtml @95,71 itemLabel="#{territory.territoryName}": Property 'territoryName' not found on type java.lang.String
  </code></pre>
  
  <p>My xhtml code:</p>
  
  <pre><code> &lt;p:autoComplete id="territoryId11"
       value="#{usDistributorDetailsController.selected.territoryId}"
       completeMethod="#{usDistributorDetailsController.completeTerritory}"
       var="territory" itemLabel="#{territory.territoryName}"
       itemValue="#{territory.territoryId}"
       size="37"
       style="width: 264px" &gt;
  
  &lt;/p:autoComplete&gt;
  </code></pre>
  
  <p>My Java Code:</p>
  
  <pre><code>public List&lt;UsTerritory&gt; completeTerritory(String query11) {
  
      List&lt;UsTerritory&gt; results = new ArrayList&lt;UsTerritory&gt;();
      List&lt;UsTerritory&gt; territoryListA = getJpaTerritoryController().findUsTerritoryEntities();
  
      for (UsTerritory abc : territoryListA) {
  
           if (abc.getTerritoryName().startsWith(query11)) {
              results.add(abc);
          }
  
      }
  
      return results;
  }
  </code></pre>