Thursday, February 27, 2014

ADF : GoLink & commandLink

Today I had interesting requirement about a hyperlink doing so many things at the same time.

-When you hover , it should show menu

-When you click , it should set some param in request scope , call java method and open hyperlink window in Internet Explorer

That sounds easy and I was able to achieve everything with commandLink except one : opening child window on top of parent window.

I was calling actionlistener method to write java code which has javascript call from managed bean which will ultimately call window.open() and open the window.

However , window.open opened the window and minimized it.

To solve this issue I had to take alternate route practically detour.

I wrote goLink which used following stuff inside.

golink (clientlistener , serverlistener , clientattribute )

ClientListener – calling javascript

ServerListener – Calling managed Bean method

clientattribute – setting param to access in managed bean

Golink – to open hyperlink in new window that will not hide

JDEV Error :- IconOverlayTracker$NodeWatcher:802

 

Due to this wonderful blog here , I was able to know that SVN Tortoise got upgraded and fix the issue.

However , When I open the project It threw following exception and I was unable to use Jdeveloper at all.

[IllegalStateException in o.i.explorer.IconOverLayTracker$NodeWatcher:802]

After few hours of trying so many things in jdeveloper , I found the solution that

I need to uncheck couple of option in Tools –> Preferences –> Versioning –> General to remove

some pain , But still I want to know the root cause of error and why I need to uncheck it.

1. Use Navigator State Overly Icons - Uncheck

2. Use Navigator State Overly Labels – Uncheck

image

This however solved my issue , But please comment if you have time to fix the root cause of problem.

Thursday, February 6, 2014

ADF DVT : Various types of graph using same data control

 

In previous blog , I demonstrated how to develop simple ring subtype of graph for portraying employee by department. Now let me create multiple graph displaying same information.

Here is four different types of graph based for same data set.

image

ADF DVT : Building first DVT component

Let us first develop simple DVT Component that will render count of employee for each department using various representation.

I am using following query using standard HR schema.

SELECT COUNT(*) , DEPARTMENT_NAME  FROM EMPLOYEES E, DEPARTMENTS D
WHERE D.DEPARTMENT_ID= E.DEPARTMENT_ID GROUP BY DEPARTMENT_NAME

When you drag/Drop datacontrol VO for pieGraph Grpah for subtype Ring ,It will create following binding in page definition after you provided configuration for graph slices.


image


When you Drag/Drop graph , It will ask you to provide configuration for Ring , Slices and I gave following.


image


Here is output of graph when you run the project.


image


Now you can use same data control object and try various types of graph instead of above.

Tuesday, February 4, 2014

ADF DVT Graphical Component

ADF Data Visualization Components are expressive set of interactive ADF Faces components which depict the data in analytical format like Various Graph type like Pie ,Area , Bar , Funnel , Pareto , Stock , Line and much more.

All ADF DVT components support Data Control D&D feature.

Let us explore this powerful components in upcoming blogs.

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>