This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Dynamic t:dataTable display oddness. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamic t:dataTable display oddness." Watch "Dynamic t:dataTable display oddness." New topic
Author

Dynamic t:dataTable display oddness.

Arnie Morein
Greenhorn

Joined: Dec 20, 2006
Posts: 16
I am working on an inquiry program that allows the user to set the select clause of the sql statement. Which means the backing bean has to adapt and creates the t:dataTable object at run time. The thing I don't get - is that the first time a search is done (and therein the page is created), it is displayed w/o any data - tracing shows that this is because the backing bean property that points to the h:panelGroup object is null - so I have nothing to add children to. Subsequent pages get populated and the grid displays. But there is another problem. Clicking the page-forward/end buttons doesn't display the next/last page. I know the event code is firing (traced into it) and the variables are being updated, but the grid's contents never change. I think it has something to do with building the page during the wrong phase, but I'm not sure. I hope someone here can help.

This is using the latest MyFaces and Tomahawk dataTable (org.apache.myfaces.component.html.ext.HtmlDataTable).

This is a snippet of the JSF file where the dynamic part is built.



There is the method that builds the t:dataTable object

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamic t:dataTable display oddness.
 
Similar Threads
JSF dynmaic columns generation
Problem with Dynamic DataTable.
Datatable trying to access non-existent field from Bean
Creating Datatable dynamically
input text inside a datatable not updating