Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

adding new tab to existing Tabbed Panel

 
Ayub ali khan
Ranch Hand
Posts: 394
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to add a new tab to an existing tabbed Panel. When user clicks on a row (in dataTable) a new tab should be added.

Below is the code of my action method.

HtmlTabbedPanel haTab= (HtmlTabbedPanel) findComponentInRoot("tabbedPanel1");
HtmlBfPanel bfPanel = new HtmlBfPanel();

bfPanel.setId("Manual");
bfPanel.setName("John Smith");
bfPanel.setRendered(true);
bfPanel.setShowFinishCancelButton(false);
haTab.getChildren().add(bfPanel);

This method is executing, however the new tab is not displayed. Please let me know whats the issue with the code.

I am using odc:tabbedPanel tag.

Thank you.

Regards
Ayub
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to bind the component to the backing bean instead of obtaining it from the view root. Use the 'binding' attribute of the component to bind it with its component representation, the HtmlTabbedPanel.
 
Ayub ali khan
Ranch Hand
Posts: 394
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have part of the Tabbed Panel from existing jsp page. I need to add a new tab to this existing TabbedPanel on click of a row in Table. Could you give me some more hint or code example of doing this using the backing bean ?

Thank you
--Ayub
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic