Wednesday, May 29, 2013

ADF GUI : Call method when you click Ok on Dialog

I have seen many times developers just write code in listener without comparing what action was taken on user interface component.

In this case , I am talking about ADF Faces Dialog component. I am executing the logic only if  OK button is clicked.

 <af:dialog id="dialog1"                   
            dialogListener="#{Bean.method}"/>
public void method(DialogEvent event{
        // okCancel dialog
        if (event.getOutcome().equals(DialogEvent.Outcome.ok)){
            //Logic
        }
} 

ADF GUI : PanelGridLayout in PS6

Don’t forget to research on PanelGrid Layout , It solves lot of complex GUI layout for arranging component on User Interface.

It will remind you of HTML table (Td,tr)

image

image

ADF BC : Check your ADF Page is dirty

If you move from one page to another in ADF application and want to verify whether data is modified or not.  you can use the following api for ADF.

BindingContext bindingCtx = BindingContext.getCurrent();
DataControlFrame dataCtrlFrame = bindingCtx.findDataControlFrame(bindingCtx.getCurrentDataControlFrame());
Collection<DCDataControl> dataCol = dataCtrlFrame.datacontrols();
for (DCDataControl dcDaCtrl : dataCol) {
if (!dcDaCtrl.getName().equals("DataControlName1") && !dcDaCtrl.getName().equals("DataControlname2"))
    dirty = dCDataControl.isTransactionDirty() == true ? return true : false;
}

Thursday, May 23, 2013

Webcenter Single Sign-on

There are various way to make Webcenter Portal Single Sign-on work.

- Oracle Access Manager (OAM)

- Oracle Single Sign-on (OSSO)

-SAML-based single sign-on solution for Oracle Webcenter Portal Applications Only

- SSO Solution for Microsoft Clients, using Window Authentication based on the Simple and Protected Negotiate (SPNEGO) mechanism and the Kerberos protocol.

Oracle OAM 11G is the recommended single sigh-on solution for Oracle Webcenter Portal 11g Installations.