You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jiří Hofman (JIRA)" <de...@myfaces.apache.org> on 2006/11/28 17:12:21 UTC

[jira] Created: (MYFACES-1503) h:selectOneMenu does not update value binding when a custom converter is used

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

       

[jira] Commented: (MYFACES-1503) h:selectOneMenu does not update value binding when a custom converter is used

Posted by "Cagatay Civici (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1503?page=comments#action_12454016 ] 
            
Cagatay Civici commented on MYFACES-1503:
-----------------------------------------

Validation error occurs when the value you've converted is not in the selectitems list provided with f:selectItems, in this case currencies.

> 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

       

[jira] Resolved: (MYFACES-1503) h:selectOneMenu does not update value binding when a custom converter is used

Posted by "Manfred Geiler (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manfred Geiler resolved MYFACES-1503.
-------------------------------------

    Resolution: Incomplete

Jiri, can you give you additional information on this issue? i.e. are there validation errors that prevents model from getting updated?


> h:selectOneMenu does not update value binding when a custom converter is used
> -----------------------------------------------------------------------------
>
>                 Key: MYFACES-1503
>                 URL: https://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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-1503) h:selectOneMenu does not update value binding when a custom converter is used

Posted by "Rafael Smorigo (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1503?page=comments#action_12461507 ] 
            
Rafael Smorigo commented on MYFACES-1503:
-----------------------------------------

Hello I have same error, this message is:     "column": Value is not a valid option. 

> 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

       

[jira] Commented: (MYFACES-1503) h:selectOneMenu does not update value binding when a custom converter is used

Posted by "Volker Weber (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1503?page=comments#action_12454013 ] 
            
Volker Weber commented on MYFACES-1503:
---------------------------------------

>  MyFaces weirdly and SILENTLY skips UPDATE_MODEL_VALUES and INVOKE_APPLICATION and renders current /previous/ view. 
sounds like a validation error, please add a h:messages tag to your jsp to see any errors

> 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