[ http://issues.apache.org/jira/browse/MYFACES-225?page=all ]
Grant Smith closed MYFACES-225:
-------------------------------
Fix Version: Nightly Build
Resolution: Fixed
Thanks Thomas
> dataTable ArrayIndexOutOfBoundsException with input fields
> ----------------------------------------------------------
>
> Key: MYFACES-225
> URL: http://issues.apache.org/jira/browse/MYFACES-225
> Project: MyFaces
> Type: Bug
> Environment: MyFaces-extentions 1.09, JSF RI 1.1_01, Tomcat 5.5.7, J2SDK
> 1.4.2_08
> Reporter: zpeedy
> Fix For: Nightly Build
>
> When I submit the form I get an ArrayIndexOutOfBoundsException. My guess the
> problem is that the <x:inputText id="someInputText" required="true"/> doesn't
> render an unique Id.
> == dataTable.jsp ==
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
> <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
> <f:view>
> <html>
> <head>
> </head>
> <body>
> <h:form id="someForm">
> <x:dataTable id="someTable" var="item"
> value="#{applicationBean.someItems}">
> <h:column>
> <h:outputText id="someOutputText" value="#{item}" />
> <x:inputText id="someInputText" required="true"/>
> <h:message for="someInputText" />
> </h:column>
> </x:dataTable>
> <h:commandButton value="submit" action="#"/>
> </h:form>
> </body>
> </html>
> </f:view>
> == ApplicationBean.java ==
> public List getSomeItems()
> {
> ArrayList list = new ArrayList(3);
> list.add("text1");
> list.add("text2");
> list.add("text3");
> return list;
> }
> == Exception stracktrace ==
> java.lang.ArrayIndexOutOfBoundsException: 4
> at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.refreshDescendantDataStates(HtmlDataTableHack.java:174)
> at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.saveDescendantComponentStates(HtmlDataTableHack.java:147)
> at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:71)
> at
> org.apache.myfaces.component.html.ext.HtmlDataTable.setRowIndex(HtmlDataTable.java:186)
> at javax.faces.component.UIData.iterate(UIData.java:989)
> at javax.faces.component.UIData.processDecodes(UIData.java:737)
> at
> org.apache.myfaces.component.html.ext.HtmlDataTable.processDecodes(HtmlDataTable.java:202)
> at javax.faces.component.UIForm.processDecodes(UIForm.java:144)
> at
> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
> at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:306)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira