I am getting an error while trying to choose item from drop down list in jsf
<h:form id="form">
<h:selectOneMenu value="#{currenccyRatesModel.mainCurrency}" converter="currencyDto"
valueChangeListener="#{currencyRatesController.loadCurrencyRates}">
<f:selectItems value="#{currenccyRatesModel.bankCurrencies}"
var="selectedCurrency" itemValue="#{selectedCurrency}"
itemLabel="#{selectedCurrency.curLabe}" />
<f:ajax render="currencyRatesTable" event="change" />
</h:selectOneMenu>
<h:dataTable id="currencyRatesTable" var="currencyRate"
value="#{currenccyRatesModel.currencyRates}">
<h:column>
<h:outputText value="#{currencyRate.targetCurrency}" />
</h:column>
<h:column>
<h:outputText value="#{currencyRate.ccrRate}" />
</h:column>
</h:dataTable>
</h:form>
the error thrown in the web browser is cannot convert currency@323536 java.lang.String to type ....CurrencyDto
is there somting wrong with this, I used the same thing in a previous project and is worked fine.
Thanks for help