2

I have a requirement in which i have to dynamically add facets to a panel box layout and then add elements to the same such as text and buttons.

I have searched multiple forums but to no avail.

I have tried the following code as well:

RichPanelBox panelBox=new RichPanelBox();
panelBox.getFacet("top").getChildren().add(Button);

but this returns with null pointer exception as

panelBox.getFacet("top") 

is null.

any pointers how can i add facet( tag in Jspx) to the panelbox programmatically..??

pnuts
  • 58,317
  • 11
  • 87
  • 139
Fr_nkenstien
  • 1,923
  • 7
  • 33
  • 66

1 Answers1

2

The panelBox doesn't have a top facet. There is a toolbar facet. http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_panelBox.html

So you should just add a child layout component into the af:panelBox that will give you the breakdown of layout you need in the box.

Waynn Lue
  • 11,344
  • 8
  • 51
  • 76
Shay Shmeltzer
  • 3,693
  • 1
  • 13
  • 9
  • Thanks Shay..I realized my mistake...i should have added Panel Border Layout first to the PanelBox...It has methods for adding facets..:) – Fr_nkenstien May 20 '14 at 06:41