rich:pickList problem with context var
fjtorres Jul 29, 2011 4:44 AMHi all,
I have a problem with my <rich:pickList> I can't submit the items. When executing the application and click in submit button i got the following error.
Caused by: java.lang.IllegalArgumentException: ValueBinding for UISelectMany must be of type List or Array at org.ajax4jsf.util.SelectUtils.getConvertedUISelectManyValue(SelectUtils.java:208) at org.richfaces.renderkit.PickListRenderer.getConvertedValue(PickListRenderer.java:224) at javax.faces.component.UIInput.getConvertedValue(UIInput.java:942) at javax.faces.component.UIInput.validate(UIInput.java:868) at javax.faces.component.UIInput.executeValidate(UIInput.java:1072) at javax.faces.component.UIInput.processValidators(UIInput.java:672) at org.richfaces.component.UISimpleTogglePanel.processValidators(UISimpleTogglePanel.java:152) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058) at javax.faces.component.UIForm.processValidators(UIForm.java:235) at org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:447) at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:240) at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:463) at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) ... 61 more
My picklist code:
...
<rich:pickList id="listaTiposCargo" value="#{tiposSeleccionados}"
copyAllControlLabel="#{messages['app.comun.pickList.copyAllControlLabel']}" copyAllTitle="#{messages['app.comun.pickList.copyAllControlLabel.titulo']}"
copyControlLabel="#{messages['app.comun.pickList.copyControlLabel']}" copyTitle="#{messages['app.comun.pickList.copyControlLabel.titulo']}"
removeAllControlLabel="#{messages['app.comun.pickList.removeAllControlLabel']}" removeAllTitle="#{messages['app.comun.pickList.removeAllControlLabel.titulo']}"
removeControlLabel="#{messages['app.comun.pickList.removeControlLabel']}" removeTitle="#{messages['app.comun.pickList.removeControlLabel.titulo']}"
targetListWidth="305" sourceListWidth="305" required="true" >
<s:selectItems value="#{tipos}" var="tipo" label="#{tipo.descripcion}"/>
<f:converter converterId="tipoConverter"/>
</rich:pickList>
..
My context var, in conversation component:
@Name("myController")
@Scope(ScopeType.CONVERSATION)
@Conversational
public class MyControllerImpl extends BaseControllerImpl implements
MyController
...
// Source for the pickList
@In(required = false, value = "tipos")
@Out(required = false, value = "tipos")
private List<Tipo> listaTipos;
// Target of the picklist
@In(required = false, value = "tiposSeleccionados")
@Out(required = false, value = "tiposSeleccionados")
private List<Tipo> listaTiposSeleccionados;
.....
I don't know what occurs, in other page i have other pickList but not with context var and it's working properly.
My project uses:
Richfaces 3.3.3.Final
Seam 2.2.0.GA
Thanks and regards.