• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic dataTable Using JSF

 
Ravi Jagtap
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to create a JSF dataTable at runtime. is there any method to do it.
Thanks in adv....
 
Jamie Williams
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly do you mean by 'at runtime'?
 
Ravi Jagtap
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i am doing is
i am fetching the number of employee list from one table.
and their details from another table.
so depending on the number of employees in the table i am showing their details in datatable.
so the no. of datatables will be equal to the number of employees in the database. and this number is decided when i run the application.
hope u will get it...

thanks Jamie
 
Jamie Williams
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok so you want a dataTable for each employee's details, right? I haven't used them myself but I think what you're looking for is nested dataTables.
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and you will need to know which employee is currently being accessed in each iteration? I wrote a grid that has a dynamic number of columns filled with data for each row. What component library are you using? Perhaps I can help you.
 
Ravi Jagtap
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i am using "Sun Java Studio Creator Built-in Components" standard DataTable
let me make it more clear.
as i am fetching the employee and his details from the database..
i am showing this in the datatable so that the employee name will be the title of the table and the table data will be the details of the employee
and so on for the next employee..
Thanks for the replys.....
[ June 09, 2006: Message edited by: Ravi Jagtap ]
 
Andrew Hair
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you found an answer to your problem? I'm having a similar problem and am looking for the solution. Thanks.
 
omkar patkar
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
Even i am having a similar problem, the problem is of MASTER-CHILD tables in the database. I am using ibatis to communicate with database and populate the beans. The scenario is as follows :-

I have two Tables :-
Roles and Nominees. The Roles is master table and the Nominees is the child table. There are many nominees for one role. Following are the attributes of the table :-



Now i want to display all the records from these two tables in frontend as follows :-

----------------------------------------------------------------
Role Treasurer (role id 1)
----------------------------------------------------------------
Nominee 1
Nominee 2
Nominee 3
Nominee 4
----------------------------------------------------------------
Role Chairman (role id 2)
----------------------------------------------------------------
Nominee 5
Nominee 6
Nominee 7
Nominee 9
----------------------------------------------------------------
Role Treasurer (role id 2)
----------------------------------------------------------------
Nominee 8
Nominee 12
Nominee 13
Nominee 25
----------------------------------------------------------------


I am really stuck up on how i can display this kind of output on the front end ! ..Some body please please please Help me !! please help me !

Thanks
Omkar patkar !
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nest two datatables.
 
Jay-ar Bautista
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bauke Scholtz wrote:Nest two datatables.


Hi Bauke,

I have the same problem. I have two tables: inv_item_tbl(list of item) and serial_tbl(list of serial), in every item there are many serial.
These are the attributes of the table:
[inv_item_tbl]
--- item_code
--- item_desc
--- qnty

[serial_tbl]
--- serial_no
--- warranty_no

The output requirement for the report is:

------------------------------------------------
Item Code | Item Desc | Quanity
------------------------------------------------
itemcode1___itemdesc1___5
------------------------------------------------
S: serial1___W: warranty1
S: serial2___W: warranty2
S: serial3___W: warranty3
S: serial4___W: warranty4
S: serial5___W: warranty5
------------------------------------------------
itemcode2___itemdesc2___3
------------------------------------------------
S: serial6___W: warranty6
S: serial7___W: warranty7
S: serial8___W: warranty8
------------------------------------------------


I try to nest two datatables and my output becomes:

Item Code | Item Desc | Quanity | |
---------------------------------------------------------------------------------
itemcode1__itemdesc1____5______S: serial1___W: warranty1
______________________________S: serial2___W: warranty2
______________________________S: serial3___W: warranty3
______________________________S: serial4___W: warranty4
______________________________S: serial5___W: warranty5
---------------------------------------------------------------------------------
itemcode2__itemdesc2____3______S: serial6___W: warranty6
______________________________S: serial7___W: warranty7
______________________________S: serial8___W: warranty8
---------------------------------------------------------------------------------


Note: _ = whitespace

Please help me...

Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic