MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-1283

dataScroller encounters javascript error and stops working when including tomahawk-sandbox jar

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.1.5
    • Component/s: Data Scroller
    • Labels:
      None
    • Environment:
      Windows XP
      Tomcat 5.5

      Description

      I have a simple dataTable and dataScroller, which works fine, until I include the tomahawk-sandbox-1.1.6.jar or tomahawk-sandbox-1.1.6-SNAPSHOT or tomahawk-sandbox-1.1.7-SNAPSHOT jars. As soon as I include one of those, clicking on the different page numbers in the datascroller stops working and I see the following javascript error:

      Error: document.forms._idJsp0.elements['_idJsp0:scrollerForNamesTable'] has no properties
      Source File: http://localhost:8080/JSFSandbox/test.faces
      Line: 1

      The tomahawk-sandbox-1.1.6.jar was downloaded from http://repo1.maven.org/maven2/org/apache/myfaces/tomahawk/tomahawk-sandbox/. The snapshot jars were downloaded from: http://people.apache.org/maven-snapshot-repository/org/apache/myfaces/tomahawk/tomahawk-sandbox/

      Here is what my JSP page looks like:
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
      <head>
      <title>Test Program</title>
      <meta http-equiv="pragma" content="no-cache">
      <meta http-equiv="cache-control" content="no-cache">
      <meta http-equiv="expires" content="0">
      </head>

      <body>
      <f:view>
      <h:form>
      <h:panelGrid columns="1">
      <t:dataTable
      id="namesTable"
      forceId="true"
      value="#

      {testBean.names}

      "
      var="nameBean"
      preserveDataModel="false"
      rowClasses="oddTableRow,evenTableRow"
      varDetailToggler="detailToggler"
      preserveSort="true"
      renderedIfEmpty="false"
      rows="2">

      <t:column defaultSorted="true" sortable="true">
      <f:facet name="header">
      <h:outputText value="Name" style="font-size:10pt;"/>
      </f:facet>
      <h:outputText style="width:8em;text-align:left;"
      value="#

      {nameBean.name}

      "/>
      </t:column>
      </t:dataTable>
      </h:panelGrid>
      <%-- Pager --%>
      <h:panelGroup style="background-color:#c2c1a3;width=100%;text-align:center;">
      <t:dataScroller
      id="scrollerForNamesTable"
      for="namesTable"
      fastStep="1"
      pageCountVar="pageCount"
      pageIndexVar="pageIndex"
      styleClass="scroller"
      paginator="true"
      paginatorMaxPages="9"
      paginatorTableClass="paginator"
      paginatorActiveColumnStyle="font-weight:bold;">
      </t:dataScroller>
      </h:panelGroup>
      </h:form>
      </f:view>
      </body>
      </html>

      Here's my faces-config.xml:
      <?xml version="1.0"?>
      <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
      <faces-config>
      <managed-bean>
      <description>Testing bean</description>
      <managed-bean-name>testBean</managed-bean-name>
      <managed-bean-class>TestBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      </faces-config>

      Here's the TestBean.java class:
      public class TestBean {
      private NameBean[] myNames;
      public NameBean[] getNames()

      { return myNames; }

      public void setNames(NameBean[] theNames)

      { myNames = theNames; }

      public TestBean()

      { myNames = new NameBean[6]; myNames[0] = new NameBean("Jon"); myNames[1] = new NameBean("Jim"); myNames[2] = new NameBean("Jane"); myNames[3] = new NameBean("Janet"); myNames[4] = new NameBean("Jeff"); myNames[5] = new NameBean("Jen"); }

      }

      Here's the NameBean.java class:

      public class NameBean {
      private String myName;
      public String getName()

      { return myName; }

      public void setName(String theName)

      { myName = theName; }

      public NameBean(String myName)

      { super(); this.myName = myName; }

      public NameBean()

      { super(); }

      }

      Here's my classpath:
      <?xml version="1.0" encoding="UTF-8"?>
      <classpath>
      <classpathentry kind="src" output="WEB-INF/classes" path="src"/>
      <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
      <classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>
      <classpathentry kind="lib" path="WEB-INF/lib/commons-beanutils-1.7.0.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/commons-codec-1.3.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/commons-collections-3.1.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/commons-digester-1.6.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/commons-el-1.0.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/commons-lang-2.1.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/commons-logging-1.0.4.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/htmlib.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/jstl-1.1.0.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/log4j-1.2.9.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/myfaces-api-1.1.3.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/myfaces-impl-1.1.3.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/standard.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/tomahawk-1.1.6.jar"/>
      <classpathentry kind="lib" path="WEB-INF/lib/tomahawk-sandbox-1.1.6.jar"/>
      <classpathentry kind="output" path="WEB-INF/classes"/>
      </classpath>

      1. JSFSandbox.zip
        5.48 MB
        Christina Sickelco

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Christina Sickelco
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development