Tuesday, July 9, 2013

ADF Faces : Removing IE Compatibility View Popup

If you are running Webcenter or ADF Application on latest window system with IE 10  browser you will get following message from IE when running application.

image

If you want to get rid of that you have to put following tag inside web.xml.

 

<context-param>
    <param-name>oracle.adf.view.rich.HIDE_UNSUPPORTED_BROWSER_ALERTS</param-name>
    <param-value>IECompatibilityModes</param-value>
 </context-param>

Wednesday, June 12, 2013

Java Script: Get user name of login person

 

Sometime you may have requirement to show message like Welcome User for some type of application and If that application is not authenticated then we can pull user name from window credentials using java script.

<f:view>
    <script type="text/javascript">
      function currentUser() {
        var ntw = new ActiveXObject("WScript.Network");
        alert(ntw.UserName);
      }
    </script>
    <html>
      <head>
        <meta http-equiv="Content-Type"
              content="text/html; charset=windows-1252"/>
        <title>untitled1</title>
      </head>
      <body onload="currentUser();">
        <h:form></h:form>
      </body>
    </html>

Tuesday, June 11, 2013

Jdeveloper 11.1.1.7 : ADF Pagination not working when detailStamp table used.

Please refer to my previous blog for making pagination work with Simple Table component. However , If we try to add child table to detailStamp of table facet then pagination will stop working.

I have used Oracle HR schema and created following structure. I have made Employee as main table and inside detailStamp I have added Department table.

As you can see Pagination works , But as soon as you click arrow to expand the row to see the Department for employee It will disappear.

image

After I expanded any particular Employee to see department records Pagination bar went away. Even If I minimize the employee It will not come back.

image

Jdeveloper 11.1.1.7 : ADF Pagination for Simple Table

Oracle has introduced Pagination feature in 11.1.1.7 Jdeveloper and It is very exciting news for many customer ,so they can have a choice between scrolling or page based options.

Thanks to Frank for posting with extra details here

To make pagination work with table component of ADF following property need to be populated.

  • authoHeightRow property need to be set to 0 (Try to remote this property ,It will not work)
  • Surrounding container provides floating layout and does not stretch (using PanelGroupLayout)
  • Table can be in shape by using styleClass=”AFStretchWidth”

Changes

scrollPolicy=”page” autoHeightRow=”0” and styleClass=”AFStretchWidth”

Table GUI

image

Tuesday, June 4, 2013

Oracle ADF : Map Viewer

Map has become part of our every day business need and If you need Map implementation in ADF business application then you can use.

Oracle Fusion Middleware MapViewer Version 11g ps6

It has all the require steps to configure and start using map viewer functionality in your ADF Application.

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.

Thursday, February 14, 2013

WebCenter PS5 : Make sure you have all lib loaded

If you running in to issue where you cant find the lib for particular webcenter services , Please check following in Jdeveloper.

Help -> About (Extensions)

image

When you create new application in jdeveloper you will notice three different application type.

image