myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brummeline Braaten <brummel...@gmail.com>
Subject Re: t:datatable and newspapercolumns
Date Fri, 09 Mar 2007 09:41:47 GMT
Yaron Spektor <yaron.spektor <at> b6systems.com> writes:

> 
> Have you tried it with value instead of binding?
> 
> This is a code I use:
> <t:dataTable newspaperOrientation="horizontal" value="#{bean.valueList}"
> newspaperColumns="10" rowIndexVar="col"  var="index"
> columnClasses="#{bean.styleClassString}" >....
> 
> Yaron 
> 
> I'm trying to wrap a long column over multiple columns with the 
> t:dataTable newspapercolumns attribute.The problem is that I get an
> error that says: 
> Unable to find setter method for attribute: newspaperColumns
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
> 
> The code works when I don't use the newspapercolumn attribute, 
> but then the column doesn't get wrapped over multiple columns 
> as I want it to.
> 
> My code is like this:
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <% <at> taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
> <% <at> taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <% <at>  taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
> <html>
> <f:view>
> <head>
> <meta http-equiv="content-type"
>    content="text/html; charset=iso-8859-1">
> <title>Nytt i helse</title>
> <link rel="stylesheet" href="../css/frontend.css"
>    type="text/css"media="screen">
> </head>
> <body>
> <h:form id="main">
> <f:verbatim>
> <div id="category_list_heading">
>    Vennligst velg kategori:
> </div>
> </f:verbatim>
> <t:dataTable id="kategorier" var="rader" 
> newspaperColumns="5"binding="#{tabnavigering.categoryTable}" rows="5">
> <f:facet name="spacer">
> <f:verbatim>   </f:verbatim>
> </f:facet>
> <h:column>
> <t:commandLink style="category_list" 
> styleClass="category">
> <h:outputText value="#{rader.categoryName}" />
> </t:commandLink>
> </h:column>
> </t:dataTable>
> </h:form>
> </body>
> </f:view>
> </html>
> 
> Hope you can give me a hint to how I can solve it. 
> It's getting a bit annoying:)
> 
> 
I've tried with value instead, and I now get this error:

javax.servlet.ServletException: Bean: javax.faces.component.UIData, 
property: categoryName javax.faces.webapp.FacesServlet.
service(FacesServlet.java:152)

And when I look at the console in MyEclipse I see this:
ERROR [RendererUtils] Property not found - called by component : 
{Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: 
/innhold/kategoriliste.jsp][Class: javax.faces.component.html.HtmlForm,Id:
 main][Class: org.apache.myfaces.custom.newspaper.HtmlNewspaperTable,Id: 
_idJsp1][Class: javax.faces.component.UIColumn,Id: _idJsp3][Class: 
org.apache.myfaces.component.html.ext.HtmlCommandLink,Id: _idJsp4][Class: 
javax.faces.component.html.HtmlOutputText,Id: _idJsp5]}
javax.faces.el.PropertyNotFoundException: Bean: javax.faces.component.UIData, 
property: categoryName

This is so strange, because it finds the categoryName when I just use a normal
dataTable.




Mime
View raw message