Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem using datatable  RSS feed

 
roque viana
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I�m triying to build a simple datatable as follows:

the prop property of my managed beans return an ArrayList.
I�m getting the following error:


Could someone please tell me what�s going on?

Regards,
Rafael Roque
 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"the prop property of my managed beans return an ArrayList.": it depends on the ArrayList. Your ArrayList should return a List of Maps example:


Originally posted by roque viana:
I�m triying to build a simple datatable as follows:

the prop property of my managed beans return an ArrayList.
I�m getting the following error:


Could someone please tell me what�s going on?

Regards,
Rafael Roque
 
ravi krishna muthireddy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am getting the same problem

An error occurred at line: 17 in the jsp file: /buyerBids.jsp
The method setVar(String) in the type DataTableTag is not applicable for the arguments (JspValueExpression)
14: <h:form>
15: List of bids:
16:
17: <h:dataTable var="item" value="#{buyerBidsBean.bids}" >
18:
19: value="#{buyerBidsBean.bids}" this returns list of objects buyerbid
usign item variable getting values from it

<hutputText value="#{item.id}"></hutputText>
<hutputText value="#{item.desc}"></hutputText>
<hutputText value="#{item.price}"></hutputText>

using jboss 4.2 2
eclipse 3.4
jsf 1.1
[ August 09, 2008: Message edited by: ravi krishna muthireddy ]
 
Robson Vargas Peerless
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Test it:

in your backing bean:



In your JSF Page:

value of datatable: value="#{backing.prop}"
var of datatable: var=current
value of your column: value="#{current.currentNumber}"
 
Robson Vargas Peerless
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
obs:

change,



to it:



i dont test it, but should work!
 
Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem and I think that it is something related to JSF version compatibility.
I've downloaded the JSF and JSTL libraries from
Project Mojarra - JSF
and my problem was solved.

I hope this help someone.


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!