data not displayed from List using <h:datatable>

hi iam getting the error:Error getting property 'cell' from bean type of java.lang.String...can u please tell where might i have gone wrong.....and actually what does this error mean...iam using jsf 1.1,netbeans 5.5 and tomcat 5.5.17thanks in advance
[294 byte] By [honey17a] at [2007-11-27 2:31:10]
# 1
It looks like that you're passing List<String> to the datatable instead of List<DTO>. Or, at least, trying to invoke getCell() on a String object while it isn't available.Check http://balusc.xs4all.nl/srv/dev-jep-dat.html how to use datatables.
BalusCa at 2007-7-12 2:45:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

hi.......thank you very much

iam getting different error :Error getting property 'Cell' from bean of type org.TData1

here iam sending necessary part of code as the code is large....can u please check where iam going wrong..

bean class

public class Htpg

{

List data=new ArrayList();

UIData projectTable;

private TData1 td;

public Htpg() { }

public List getData()

{

try {

..............

Element element;

int total = 0;

while(i.hasNext()) {

element=(Element)i.next();

if(element.getName().equalsIgnoreCase("tr")) {

if(i.hasNext()){

element = (Element)i.next();

if(element.getName().equalsIgnoreCase("td")) {

td=new TData1(); // has getters and setters

td.setCell(element.getContent().toString().trim());

element = (Element)i.next();

td. setMade(element.getContent().toString().trim());

element = (Element)i.next();

total++;

data.add(td);

}//if

}//if

}//if

}//while

} catch (Exception e) {

System.out.println("exception");

}

return data;

}

public void setData(List data)

{

this.data=data;

}

public UIData getProjectTable() {

return projectTable;

}

public void setProjectTable(UIData ProjectTable) {

this.projectTable = projectTable;

}

public String selectData()

{

td=(TData1)projectTable.getRowData();

return "found";

}

}

jsp page

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>JSP Page</title>

</head>

<body>

<h1>JSP Page</h1>

<f:view>

<h:form>

<h:dataTable value="#{htpg.data}" var="td" binding="#{htpg.projectTable}">

<h:column>

<f:facet name="header">

<h:outputText value="CELL" />

</f:facet>

<h:outputText value= "#{td.Cell}" />

</h:column>

<h:column>

<f:facet name="header">

<h:outputText value="MADE" />

</f:facet>

<h:outputText value= "#{td.Made}" />

</h:column>

</h:dataTable>

</h:form>

</f:view>

</body>

</html>

getters and setters

public class TData1 {

private String Cell;

private String Made;

public TData1() {}

public String getCell() {

return Cell;

}

public void setCell(String Cell) {

this.Cell = Cell;

}

public String getMade() {

return Made;

}

public void setMade(String Made) {

this.Made = Made;

}

}

faces-config.xml

<faces-config>

<managed-bean>

<managed-bean-name>htpg</managed-bean-name>

<managed-bean-class>org.Htpg</managed-bean-class>

<managed-bean-scope>request</managed-bean-scope>

</managed-bean>

<navigation-rule>

<from-view-id>/index.jsp</from-view-id>

</navigation-rule>

</faces-config>

iam trying from so many days.........i have to submit this....so this is very much needed..

thanks in advance...

honey17a at 2007-7-12 2:45:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
I'm not going to debug it for you, but the 1st thing I see is that you're not respecting the naming conventions of Java. First fix it and then we'll see further.Useful reference: http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
BalusCa at 2007-7-12 2:45:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
hi BaluCthanks alot.......i concentrated more on the logic ,but i just ignored the simple things .....thanks alot.....thses simple things matter alot.......thnks fr ur help
honey17a at 2007-7-12 2:45:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...