Sunday, June 28, 2015

ADF Tip: PanelGroupLayout Avoid inner Divs [Any component to create single div]

Problem Description: At times I want only a single div in my html. PanelGroupLayout(vertical) can be used to create a div but then if I put any component in it, all will be surrounded by additional div. I don't want that. But there is no problem with PanelGroupLayout(Vertical). As name suggest vertical layout so it needs to surround inner components with a div. So the problem is to get an ADF component, which only generates a div thats it. No impact on inner component. I do not think there is any other simple component available in ADF, which can only generate a div. I would have been helpful but seems like there is none. All are complex components and even simplest panelgrouplayout add additional complexity.

Solution: I could not get a perfect solution for this but below approach helps me.

Surround inner components of PanelGroupLayout-Vertical with a af:group.
af:group does not generate any html.

Thats it.

No comments:

Post a Comment