0 Replies Latest reply on Jan 31, 2013 9:05 AM by Daniel015

    return two values from autosuggest

      hi i have inputtext with autosuggest,i what to return two values when i select the values for example if i select cityname i must return cityname and citypostacode for that city.this is how i did my inputtext autosuggest
      <af:inputText label="#{bindings.Cityname.hints.label}" columns="20"
                                              id="itc4" simple="true"
                                            partialTriggers="it19" autoSubmit="true"
                                            shortDesc="Enter City Name Or Click Refresh To re-enter City Name">
                                  <af:autoSuggestBehavior suggestedItems="#{pageFlowScope.addressbean.oncitySuggest}"/>
          public List oncitySuggest(String searchCityName) {
          ArrayList<SelectItem> selectItems = new ArrayList<SelectItem>();
              searchCityName = searchCityName.toUpperCase();
          //get access to the binding context and binding container at runtime
          BindingContext bctx = BindingContext.getCurrent();
          BindingContainer bindings = bctx.getCurrentBindingsEntry();
          //set the bind variable value that is used to filter the View Object
          //query of the suggest list. The View Object instance has a View
          //Criteria assigned
          OperationBinding setVariable = (OperationBinding) bindings.get("setBind_city");
          setVariable.getParamsMap().put("value", searchCityName);
          //the data in the suggest list is queried by a tree binding.
          JUCtrlHierBinding hierBinding = (JUCtrlHierBinding) bindings.get("CityViewLOV1");
          //re-query the list based on the new bind variable values
          //The rangeSet, the list of queries entries, is of type
          List<JUCtrlValueBindingRef> displayDataList = hierBinding.getRangeSet();
          for (JUCtrlValueBindingRef displayData : displayDataList){
          Row rw = displayData.getRow();
          //populate the SelectItem list
          selectItems.add(new SelectItem(
          return selectItems;