This content has been marked as final.
Show 3 replies
-
1. Re: invalid value expression listshuttle [ RichFaces 3.3.3CR1]
psini Feb 19, 2010 4:32 AM (in response to psini)With more time i noticed that this happens where the listshuttle is reRerendered from another component:
another example is :
<h:form > <h:outputText value="Coordinatori "/><br /> <h:selectOneListbox id="coordinatori" value="#{assegnaCoordinatori.selectedCoordinatore}" converter="ENTCONV_UT" validator="ENTVAL" immediate="true" styleClass="select_style"> <s:selectItems value="#{assegnaCoordinatori.listaCoordinatori}" var="age" label="#{age.codFisc}" /> <a4j:support event="onchange" action="#{test.onSelectCoordinatore}" reRender="tes" > </a4j:support> </h:selectOneListbox> <rich:listShuttle id="tes" targetValue="#{test.listaOut}" sourceValue="#{test.listaIn}" var="items" fastOrderControlsVisible="false" orderControlsVisible="false" sourceRequired="false" targetRequired="false"> <rich:column> <h:outputText value="#{items}"></h:outputText> </rich:column> <a4j:support event="onlistchanged" action="#{test.save}" immediate="true" /> </rich:listShuttle> </h:form>
and the test bean is :
public List<String> listaIn; public List<String> listaOut; public test() { super(); listaIn= new ArrayList<String>(); listaOut=new ArrayList<String>(); listaIn.add("A"); listaIn.add("B"); listaIn.add("C"); listaOut.add("D"); } public List<String> getListaIn() { return listaIn; } public void setListaIn(List<String> listaIn) { this.listaIn = listaIn; } public List<String> getListaOut() { return listaOut; } public void setListaOut(List<String> listaOut) { this.listaOut = listaOut; } public void save(){ return; } public void onSelectCoordinatore(){ listaOut.add("K"); return; }
and the error :
sourceId=j_id62:tes[severity=(ERROR 2), summary=("Component j_id62:tes has invalid value expression K"), detail=("Component j_id62:tes has invalid value expression K")]
-
2. Re: invalid value expression listshuttle [ RichFaces 3.3.3CR1]
ilya_shaikovsky Feb 19, 2010 4:50 AM (in response to psini)For the second case - you have no converter at all.
for the first case - I gues converter just works in wrong way or equals() and hasCode() methods implemented wrong. This thread was risen many times at this forum and it's always had a solution by just debugging converter methods.
Provide simple war sample for investigation if will not be able to solve on your own.
-
3. Re: invalid value expression listshuttle [ RichFaces 3.3.3CR1]
psini Feb 19, 2010 5:01 AM (in response to ilya_shaikovsky)the solution is to use a <a4j:keepAlive> with the bean name .
Thanks a lot.