Hello.

I am new to JSF and doing some tutorials, reading docs and so on for
learning.
Reading corejsf Book and doing their examples i want to modifiy it for
learning purposes, so i've taken the chapter 5 tutorial and modified it
to use a resultsetmodel, which worked flawless.

The problem now is, if i replace h:dataTable with t:dataTable to use the
tomahawk one, only the table headers are rendered, the data is missing.

Leaving the h:tableData, it works.

Thats my index.jsp:

<html>
   <%@ 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" %>
   <f:view>
      <head>
         <link href="styles.css" rel="stylesheet" type="text/css"/>
         <f:loadBundle basename="com.corejsf.messages" var="msgs"/>
         <title>
            <h:outputText value="#{msgs.pageTitle}"/>
         </title>
      </head>
      <body>
         <h:form>
            <t:dataTable value="#{tableData.customers}" var="customer" 
               styleClass="customers" preserveDataModel="true"
               headerClass="customersHeader"
columnClasses="custid,name">
               <h:column>
                  <f:facet name="header">
                     <h:outputText value="#{msgs.customerIdHeader}"/>
                  </f:facet>
                  <h:outputText value="#{customer.cust_ID}"/>
               </h:column>
               <h:column>
                  <f:facet name="header">
                        <h:outputText value="#{msgs.nameHeader}"/>
                  </f:facet>
                  <h:outputText value="#{customer.name}"/>
               </h:column>
               <h:column>
                  <f:facet name="header">
                     <h:outputText value="#{msgs.phoneHeader}"/>
                  </f:facet>
                  <h:outputText value="#{customer.phone_Number}"/>
               </h:column>
               <h:column>
                  <f:facet name="header">
                     <h:outputText value="#{msgs.addressHeader}"/>
                  </f:facet>
                  <h:outputText value="#{customer.street_Address}"/>
               </h:column>
               <h:column>
                  <f:facet name="header">
                        <h:outputText value="#{msgs.cityHeader}"/>
                  </f:facet>
                  <h:outputText value="#{customer.city}"/>
               </h:column>
               <h:column>
                  <f:facet name="header">
                     <h:outputText value="#{msgs.stateHeader}"/>
                  </f:facet>
                  <h:outputText value="#{customer.state}"/>
               </h:column>
            </t:dataTable>
         </h:form>
      </body>
   </f:view>
</html>



Using h:dataTable instead of t:dataTable works.

Wheres the problem, reading the docs and looking at sortTable.java from
the examples, i thought replacing the original one with tomahawks should
work without any modification?
Tomcat logs are free from errors or warnings, i am using myfaces and
tomahawk 1.1.3.

kind regards 

Torsten

Reply via email to