h:selectOneMenu does not update value binding when a custom converter is used
-----------------------------------------------------------------------------

                 Key: MYFACES-1503
                 URL: http://issues.apache.org/jira/browse/MYFACES-1503
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.1.4
         Environment: JBoss 4.0.5
            Reporter: Jiří Hofman
            Priority: Blocker


When used custom converter MyObject -> String Id, String Id -> MyObject, 
h:selectOneMenu does not update value binding. I was testing the binding with 
h:inputText and there it works OK.

Following works:
<h:inputText value="#{GlossInstrumentCapture.instrument.denominationCurrency}" 
/>

Following does not:
<h:selectOneMenu
        value="#{GlossInstrumentCapture.instrument.denominationCurrency}">
        <f:selectItems
                value="#{GlossInstrumentCapture.definition.currencies}" />
</h:selectOneMenu>

public InstrumentLabel getDenominationCurrency();
public void setDenominationCurrency(InstrumentLabel denominationCurrency);

        for (InstrumentLabel currency : definition.getCurrencies()) {
                SelectItem item = new SelectItem(currency, currency.getName());
                currencies.add(item);
        }

        public List<SelectItem> getCurrencies() {
                return currencies;
        }

Converter is called properly, works properly. When the form is submitted, 
converter is called and in case of inputText value binding 
(GlossInstrumentCapture.instrument.denominationCurrency) is updated. In case of 
selectOneMenu, MyFaces weirdly and SILENTLY skips UPDATE_MODEL_VALUES and 
INVOKE_APPLICATION and renders current /previous/ view.

Thanks, Jiri


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to