I have a rich pick list component - selectedAOI is a List , aoiList is List;
In the UI, i can add the left hand side values to the right hand side but in the back end, once i submit the form , i am getting selectedAOI = null;
<rich:pickList value="#{bDataMgt.selectedAOI}" id="pkListAOI" listHeight="100" listWidth="100"
addAllText=">>" addText=">" removeAllText="<<" removeText="<" orderable="true" converter="#{bDataMgt.aoIdConverter}" >
<f:selectItems value="#{bDataMgt.aoiList}"/>
</rich:pickList>
The converter class :
public class AOIdConverter implements Converter{ @Override
public Object getAsObject( FacesContext arg0, UIComponent arg1, String arg2 )
{
return arg2;
}
@Override
public String getAsString( FacesContext arg0, UIComponent arg1, Object arg2 )
{
Long zoneId = (Long)arg2;
return String.valueOf(zoneId);
}
}
Can you please let me know where am i going wrong and how to populate the selected values in the picklist to the backend