GeeCON Prague 2014*
The moose likes JSF and the fly likes Problem with dynamic creation of HtmlDataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with dynamic creation of HtmlDataTable" Watch "Problem with dynamic creation of HtmlDataTable" New topic
Author

Problem with dynamic creation of HtmlDataTable

Piyush Popli
Greenhorn

Joined: Sep 19, 2007
Posts: 2

Piyush Popli
Greenhorn

Joined: Sep 19, 2007
Posts: 2

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 ??
 
GeeCON Prague 2014
 
subject: Problem with dynamic creation of HtmlDataTable