lovin
lovin

Reputation: 563

need help for fixing selectonechoice error in ADF

i have a selectonechoice with three values :A,B,C but i am getting following error on its change event:

<SimpleSelectOneRenderer> <_getSelectedIndex> Could not find selected item matching value "B" in RichSelectOneChoice[UIXEditableFacesBeanImpl, id=soc1]

My selectonechoice is configured as :

<af:selectOneChoice label="Condition Codes :" id="soc1"
                        valueChangeListener="#{myManageBean.onCondCodeChg}"
                        binding="#{myManageBean.propConditionCode}"
                        autoSubmit="true" valuePassThru="true"
                        unselectedLabel="Please Select"">
    <f:selectItems value="#{myManageBean.conditionCodes}" id="si1"/>
</af:selectOneChoice>

Pls help!!!! where am i wrong ?

Upvotes: 3

Views: 4170

Answers (2)

Mounika
Mounika

Reputation: 451

The issue is because even after the value is set, somehow the it's being overwritten by null value.

For me, the issue got solved by using component.resetValue() in the corresponding bean after the setter is called and value is set.

Upvotes: 1

Ajay Garg
Ajay Garg

Reputation: 9

use code bellow for you problem

<f:selectItems value="#{myManageBean.conditionCodes}" id="si1"/>

Upvotes: 0

Related Questions