Dynamic Table Creation and Data Binding

I am new to the whole JSF and Creator 2. I have been struggling for this problem for 2 days now.... still no luck.

Here is my problem: I need to create an application which generates dynamic tables.

the database model here is top-down hierarchy structure as projects->folders->files. when user select a project, all files in every folders belong to this project will be populated.

So for each folder, i dynamically create a table with a binding data provider passing folder_id parameter.

Notice the number of folder tables for each project is correct... yet the content for each table is the same.... means i got multiple tables with identical contents.

My code is based on the following link to create dynamic tables: http://developers.sun.com/prodtech/javatools/jscreator/reference/tips/2/createT ableDynamically.html

For each folder in project, create table like this:

...

Table folderTable = new Table();

...

TableRowGroup rowGroup = new TableRowGroup();

rowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{Page1.newTableDataProvider}"));

...

I do realized the problem causing by the value binding for each rowgroup which seems to bind to the same data provider component - "Page1.newTableDataProvider".

So my question is, how to dynamically create a data provider in my case?

I am not sure if I have stated my question clearly. Thanks advance for your help.

Message was edited by:

FSJ@JSF

[1541 byte] By [FSJ@JSF] at [2007-11-26 9:09:35]
# 1
Sorry. i didn't do a thorough search in the forum.solution found here: http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=99699 great forum... thanks a lot.!!!!
FSJ@JSF at 2007-7-6 23:27:31 > top of Java-index,Development Tools,Java Tools...