I have 2 spaces in the itemValue "03 R MAIN1"
. While doing ajax submit, panel is getting reRendered, at that time i could see 2 space has been replaced with one space, because of this values are matching which is selected and the one is in the dropdown. so i am even geting "Validation Error: Value is not valid". Please see the code below:
<a4j:form>
<a4j:outputPanel ajaxRendered="true" id="TEST">
<h:messages layout="table" errorClass="errormsg noticeMsg" fatalClass="errormsg noticeMsg"
infoClass="infomsg noticeMsg" styleClass="table-center dont-capitalize" id="err_succ_message" />
<h:outputText value="Display DropDown Values" />
<h:selectOneMenu value="#{nonLocationSpecificBackingBean.testing}">
<f:selectItem itemValue="03 R MAIN1"/>
</h:selectOneMenu>
<a4j:commandButton value="Save" action="#{nonLocationSpecificBackingBean.test}" reRender="err_succ_message,TEST"></a4j:commandButton>
<a4j:commandButton value="Test" reRender="TEST"></a4j:commandButton>
</a4j:outputPanel>
</a4j:form>
Please help on this. Thanks