Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with dynamic creation of HtmlDataTable

 
Piyush Popli
Greenhorn
Posts: 2
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Piyush Popli
Greenhorn
Posts: 2
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I'm a JSF noob so please bear with me..
I create a HtmlDataTable dynamically in the constructor of the managed bean.. I then bind it to the JSP with a tag.. everything works fine till the page is rendered.. I can see my table with the values.. but as soon as I press the submit() button the post back removes all my table's values and I just see and empty table tag in the html that is rendered back..

MainBean.java


Main.jsp


faces-config.xml


On the first hit the page gets rendered with the table showing up clearly.. but as soon as I press the submit button the post removes all the values and the state gets lost.. I don't do anything in the submit button and the scope of my bean in "session".. shouldn't the state be preserved and the table re-rendered with the values ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic