myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sean schofield (JIRA)" <myfaces-...@incubator.apache.org>
Subject [jira] Closed: (MYFACES-60) inputCalendar component inside dataTable component
Date Tue, 19 Apr 2005 14:23:50 GMT
     [ http://issues.apache.org/jira/browse/MYFACES-60?page=all ]
     
sean schofield closed MYFACES-60:
---------------------------------


> inputCalendar component inside dataTable component
> --------------------------------------------------
>
>          Key: MYFACES-60
>          URL: http://issues.apache.org/jira/browse/MYFACES-60
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.7 beta, 1.0.8 beta
>  Environment: WebLogic SP4
>     Reporter: Ronen Naor
>     Assignee: Martin Marinschek
>      Fix For: 1.0.9 beta

>
> I am trying to put the component inputCalendar inside a column of DataTable but it does
not work for more then one line. like :
> <jsp:useBean id="C" class="java.util.Date" scope="application"/>
> <%
>     List l = new Vector();
>     try {
>         l = (List) session.getAttribute("D");
>         if(l == null) {
>             l = new Vector();
>                 l.add(new Date());
>                 l.add(new Date());
>             session.setAttribute("D",l);
>         }
>         System.out.println("l2 = " + l);
>     } catch (Exception e) {
>         System.out.println("e = " + e);
>         e.printStackTrace();
>     }
> %>
> <f:view id="testCalendarInTable" >
> <html>
>     <head>
>         <meta http-equiv="pragma" content="no-cache">
>         <meta http-equiv="cache-control" content="no-cache">
>         <meta http-equiv="expires" content="0">
>         <title>Example</title>
>     </head>
>     <body>
>             <tr:stylesheet path="/classes.css"/>
>             <h2>Misc Test</h2>
>             <h:messages globalOnly="false" errorClass="redBoldFont"  />
>            <h:dataTable id="data"
>                          var="l"
>                          value="#{D}" >
>                 <h:column>
>                     <f:facet name="header">
>                         <h:outputText value="COL 1 - outputText" />
>                     </f:facet>
>                     <h:outputText value="#{l}" />
>                 </h:column>
>                 <h:column>
>                     <f:facet name="header">
>                         <h:outputText value="COL 2 - inputText" />
>                     </f:facet>
>                     <h:inputText value="#{l}" />
>                 </h:column>
>                 <h:column>
>                     <f:facet name="header">
>                         <h:outputText value="COL 3 - calendar A" />
>                     </f:facet>
>                     <h:outputText value="COL 3 - calendar A" />
>                     <x:inputCalendar renderAsPopup="true" value="#{C}"/>
>                </h:column>
>             </h:dataTable>
>           <f:verbatim><br></f:verbatim>
>                 <f:verbatim ><br></f:verbatim>
>             <hr>
>      </body>
>  </html>
>  </f:view>
> It seems that when iterating through the lines, each row iteration makes the calendar
component to add a new inputText to itself in addition to the original inputText and in addition
to the ones that were added in the previous iterations.
> The result is the following exception:
> java.lang.ArrayIndexOutOfBoundsException: 2
>         at javax.faces.component.UIData.saveDescendantComponentStates(UIData.java:258)
>         at javax.faces.component.UIData.saveDescendantComponentStates(UIData.java:260)
>         at javax.faces.component.UIData.saveDescendantComponentStates(UIData.java:260)
>         at javax.faces.component.UIData.saveDescendantComponentStates(UIData.java:213)
>         at javax.faces.component.UIData.setRowIndex(UIData.java:129)
>         at net.sourceforge.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:131)
>         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:317)
>         at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:370)
>         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:278)
>         at net.sourceforge.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:79)
>         at jsp_servlet._jsp.__example1._jspService(example1.jsp:84)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
>         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
>         at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:642)
>         at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423)
>         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)
>         at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:705)
>         at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:816)
>         at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:469)
>         at jsp_servlet._jsp._structurepages.__fivepartslayout._jspService(fivePartsLayout.jsp:45)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
>         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
>         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:328)
>         at net.sourceforge.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:404)
>         at net.sourceforge.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:178)
>         at net.sourceforge.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:287)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
>         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
>         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
>         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>         at net.sourceforge.myfaces.custom.fileupload.MultipartFilter.doFilter(MultipartFilter.java:83)
>         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
>         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
>         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

-- 
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


Mime
View raw message