ADF, ADF View

How to execute bean method when switching tab in ADF?

Quite common requirement is  to execute some logic when navigating between tabs in ADF application. Luckily in ADF there is a straight forward feature enabling you to do this easily. Its enough just to add disclosureListener to showDetailItem of panelTabbed component and point it to dedicated bean method. Like this: Listener method signature must contain DisclosureEvent parameter: Tiny sample application can be…

Continue Reading

ADF, ADF View

ADF how to stretch table vertically and horizontally?

How to stretch ADF table vertically to fill maximum available vertical space in browser? Answer: Put table into af:panelStretchLayout component center facet. Put dimensionsFrom=”parent” attribute into af:panelStretchLayout (parent of af:panelStretchLayout component must stretch its children) How to stretch ADF table horizontally to fill maximum available horizontal space in browser? Answer: Put table into af:panelStretchLayout component center facet. Add styleClass=”AFStretchWidth” attribute to af:panelStretchLayout Example:   <af:panelStretchLayout…

Continue Reading

ADF, ADF View

How to output text with line breaks in ADF ?

If we use regular “af:outputtext” component to print text with line breaks (new line symbols like “n” or  “rn”)  in ADF – we don’t succeed. Text is displayed in one line regardless of those symbols. Instead we need to use  “af:outputFormatted” component. But it is not enough. While it does not understand “n” or “rn” symbols, we need to use HTML…

Continue Reading