JSF, A4J (Richfaces) and setting array property in backbean

C

Coutemeier

I have the following backbean:

public class MyBean implements Serializable {

private int[] data = new int[5];

public int[] getData() {
return data;
}

public int getData(int index) {
return data[index]
}

public void setData(int[] data) {
this.data = data;
}

public void setData(int index, int value) {
this.data[index] = value;
}

....
}

And in the jsf page:

<h:form>
(...)
<h:selectOneMenuRadio value="#{myBean.data[0]}">
(...)
<a4j:support event="onchange" reRender="mypanel">
</h:selectOneMenuRadio>
</h:form>


After doing the a4j, JSF is not setting the value of myBean.data[0].
Instead, it is saying me:

sourceId=datos:j_id43[severity=(ERROR 2), summary=(datos:j_id43: An
error occurr
ed when processing your submitted information.), detail=(datos:j_id43:
An error
occurred when processing your submitted information.)]

Any idea?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top