我在表单中有表单,我有ui重复至重复输入表单,我想将输入文本的值保存在bean中:
<ui:repeat var="field" value="#{formSettings.studentsFormSettings}" varStatus="form">
<h:inputText required="#{field.valdaite}"
requiredMessage="#{field.requrid}" disabled="#{!field.active}"
rendered="#{field.type eq 'TEXT'}" value="#{formData.data[form.index]}"> </h:inputText>
</ui:repeat>
我创建的bean具有值列表
@ManagedBean
@SessionScoped
public class FormData {
private List<String> data;
// setter and getter
}
我遇到了错误:
javax.el.PropertyNotFoundException: /text.xhtml @23,78 value="#{formData.data[form.index]}": Array index out of range: 0