| Author |
JSF1001: Managedbean xxx could not be created.
|
Francisco Llaryora
Greenhorn
Joined: Dec 30, 2011
Posts: 9
|
|
Hi, to All.
I'm trying to create a dataTable (HTML component)
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<head>
<title>Widget Catalog</title>
<link rel="stylesheet" type="text/css" href="css/default.css">
</head>
<body>
<f:view>
<h:form>
<h:dataTable value="#{catalogPage.items}"
var="item"
styleClass="resultTable"
headerClass="header"
rowClasses="oddRow, evenRow">
<h:column>
<f:facet name="header">
<h:outputText value="Code"/>
</f:facet>
<h:outputText value="#{item.code}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
<h:outputText value="#{item.name}"/>
</h:column>
</h:dataTable>
</h:form>
</f:view>
</body>
</html>
but i recive
WARNING: init parameter for skin name changed to org.richfaces.SKIN
SEVERE: JSF1001: Managedbean catalogPage could not be created.
next many Exceptions
What is wrong?
My Enviroment is:
Eclipse 3.4 RS2
Jboos tools
Tomcat 6.0.26
I add custom capabilities (RichFaces 3.3) to the proyect
Thanks for read me.
|
 |
Francisco Llaryora
Greenhorn
Joined: Dec 30, 2011
Posts: 9
|
|
Tomcat Lie, be cause i put a System.out.println("Hello world") in the constructor, and print it in the console view.
the real error is:
javax.faces.FacesException: Error performing conversion of value ' of type class java.lang.String to type class java.util.ArrayList for managed bean catalogPage.
Why a dataTable expects to receive a String and not a iterable Object?
|
 |
Jaikiran Pai
Saloon Keeper
Joined: Jul 20, 2005
Posts: 6720
|
|
It's the other way around. The dataTable is expecting a java.util.ArrayList, but the backing method of your application is returning a String.
|
[My Blog] [JavaRanch Journal]
|
 |
Francisco Llaryora
Greenhorn
Joined: Dec 30, 2011
Posts: 9
|
|
SOLVED!!!
Jaime Castillo Montes, has the same problem, he solved the problem in:
http://www.lawebdelprogramador.com/foros/JSF/1059058-DataTable.html
Why Work quitting the property ???
I even time understand less and less the JSF.
|
 |
Francisco Llaryora
Greenhorn
Joined: Dec 30, 2011
Posts: 9
|
|
Hi, Jaikiran Pai, thanks for read me.
why do you mean that my backing bean return String (class) when the property are registered as java.util.ArrayList (the property have Getterand Setter java.util.ArrayList ), and then when i quit the property the data table work?
My eclipse are wrong configured?
Thanks in advance
|
 |
 |
|
|
subject: JSF1001: Managedbean xxx could not be created.
|
|
|