1 Reply Latest reply on Jan 8, 2009 9:17 PM by Nick Belaevski

    getting null Converter using rich:suggestionbox

    Sebastian Müller Newbie

      Thanks for reading this. I`m developing an application with some suggestionbox elements inside a DataTable. My problem is, that the values of this elements are not updated. I get a null Converter message.

      Here is the code of the suggestionbox:

       <h:inputText size="45" id="stationId" value="#{it.station}"/>
       height="200" width="200"
       <h:outputText value="#{suggestStationId}"/>
       <a4j:support event="onselect" >
       <f:setPropertyActionListener value="#{suggestStationId.id}" target="#{it.stationId}">
       <f:converter converterId="stationIdConverter"/>
       <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/>

      it is the iterator var from the datatable:
      <h:dataTable value="#{journeyBean.currentStops}" var="it"

      The autocomplete method has got this signature:
      public final List<Station> autocomplete(final Object event)

      The important value i want to update is the id. The id is a standard int value:
      public void setId(final Integer id) {
       this.id = id;

      The error i get, after selecting one element from the suggestionbox:

      sourceId=j_id31:j_id547:j_id585:1:stationId[severity=(ERROR 2), summary=(Conversion Error setting value 'City1' for 'null Converter'.), detail=(Conversion Error setting value 'City2' for 'null Converter'.)]

      So it seems to me, that the suggestionbox doesn`t send the id of my Station object, but the Name (City1, City2, ...)

      Maybe someone can help me. Thanks!