Dynamic Tab Implementation in ADF

Well, this can be a common usecase across apps to open tabs dynamically at runtime based on the request.

Well, in order to achieve this you can have a parent container, lets say a panelTab component.Inside panelTab , u can have a showDetailItem inside an af:foreach or an af:iterator binded to a bean static list which will have as many show detail items as you wish to be shown.

something like this.

private static List = { new showDetailItem("1"),new ShowDetailItem("2") ...};

now in the backing bean you can have a method that takes care of rendering and disclosing an specific tab based on the index.

public void openMyTab(){

List<MyItems> list = refToParentContainer.getChildren();
int indexOfTabToBeOpened = //Write a method that will compute the tab index of the next //tab.

list.get(index).setRendered(true);
list.get(index).setDisclosed(true);

similarly you can set other properties too.

}

Else, instead of having af:foreach/iterator iterating through the SD items , you can go for static SDs in the page with render property set to false and then you can follow the same approach to render/disclose it at runtime.


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Talk on ADF (Mail To: vijay.x.mohan@oracle.com)

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today