June 7, 2013

Create new user in Database

If I want to create a new login or user in database, use the below statements.

create user adfuser identified by adfuser;

grant create session, resource, dba to adfuser; 

June 6, 2013

Invoking javascript method from an ADF component

This post is to show how we can invoke a java script method from an ADF component like af:goLink

Write a javascript. We can also use external javascript file but in this example I am writing a small
javascript method using af:resource. Below is my java script method.

<af:resource type="javascript"> 
function sayHello() {
alert(“Welcome to Hello World”);}

Create a af:goLink component on the JSF page like below.

<af:goLink text="Click here" id="gil1" >
<af:clientListener method="sayHello()" type="mouseUp"/>

Webcenter Portal Display issues in lower versions of IE

I have a portal application developed in JDev 1.6. While running the application, it supposed to be 
displayed full of the browser and it is in Firefox, Chrome and even in IE (version greater than 8). But 
I have a requirement to use this in IE7. When I run this app in IE7, the app is displaying in one third 
of the browser. To make my app displays properly in IE7, I need to write some browser specific 
javascript. Below is my javascript code added to my home page. This script will be executed when 
the browser is IE and its version is 7.

<af:resource type="javascript"> 
browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;
if (browser_type == "Microsoft Internet Explorer" ) {
if((browser_version == 4)){
var lineURL = "&lt;style&gt;.af_decorativeBox { width: 100% !important;height: 640px
 !important;}div.af_decorativeBox_center{overflow: hidden !important;}div.af_panelTabbed_body {overflow: auto;}.profileSubHeader{ margin-left: -10px !important}.wid50 input {width: 35px !important;}&lt;/style&gt;";


In the above code, lineURL is a variable which holds css styles which will impact my display in IE7.