• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF dataTable

 
Supriya Pramod
Greenhorn
Posts: 10
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can i explicitly add a row in dataTable.
For example , if the dataTable loads two rows from the backing bean , can i insert the third row explicitly

Thanks,
Supriya
 
Srinivas Krishnamoorthy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.

We can only add rows to the datatable from the pagebean.

You can add an empty item in the List (an empty map for example) to the list which is bound to the data table.

Regards,
Srinivas
 
Supriya Pramod
Greenhorn
Posts: 10
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made one of the columns in the table as a link and when i click , i need to get a iframe exactly below that row. Do you have any idea about how to do this or any other alternative way.

Thanks,
Supriya
 
Srinivas Krishnamoorthy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to add another row in the table, you can use the getRowData method of HtmlDataTable to get the row which is cliked and insert a new row in the list of the datatable below the current row.

About iframe : HtmlDataTable doesn't allow any HTML content inside it, so try to enclose you HTML code in f:verbatim tag.
 
Jerwin Louise Uy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are asking if you can dynamically add components to the current HtmlDataTable then the answer is yes.

If simply want to alter the number of rows without altering the format of the data table, then you can either bind the HtmlDataTable to a backing bean and change the value property or have a property wired to the value attribute of the HtmlDataTable.

If you want to dynamically alter the child components of a specific UIColumn bound to a HtmlDataTable and add an iframe, you have to create a custom component that simulates all the functions of an iframe and simply add the component as a child component of a UIColumn.

Regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic