This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Iterate ArrayList & display in JSF...  RSS feed

 
Asela Neligama
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm quite new to JSF & just trying to get a hold of it.
I have a getter in my managed bean where it returns an ArrayList of type MyObject.
Whereas "MyObject" is a bean with 2 Strings (namely fieldName & fieldValue).

Following is my JSP page where I try to Iterate & display the values of this ArrayList.



However when I try to run the application & display the data in the ArrayList, I get the following exception.



It says that #{...} is not allowed in template text, but the examples given in Coreservlets example uses the syntax #{} inside the <h:column></h:column> tags.

Does any one know why I'm getting this or can someone please tell me what mistakes I have done here.

Thanks in advance.
Asela.
 
Asela Neligama
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I just got it fixed.

For any one who's getting the same problem, following is the solution.
Instead of just calling the values as #{myList.filedName} or #{myList.filedValue},
what you have to do is call <h: outputText value="#{myList.fieldName}"/> or <h: outputText value="#{myList.filedValue}"/>

Cheers,
Asela.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!