Saturday, 24 September 2016

How We can use id For Jquerry in ADF Application(jsf page)

In This Tutorial we will learn basic jquerry in adf Application Normally we use jquerry in html page but we can also use jquerry with a little bit change in our code

Follow These Steps to Use jquerry in JSF Page

First of all include CDN or download library and put it into your Resources\Js folder

<af:resource type="javascript"source="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">

</af:resource>

Then Write Your code of jquerry,keep in mind always write the jquerry below


<af:document title="Animation.jsf" id="d1">

<af:resource type="javascript">

write your code here.........



</af:resource>


Keep in mind that we use class in jsf page to use jquerry


Following simple example will Clear your Confusion



?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE html>
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <af:document title="Animation.jsf" id="d1">
  <af:resource type="javascript" source="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></af:resource>
  <af:resource type="javascript">
  
 $(document).ready(function(){
    $(".button").click(function(){
        $(".box").hide();
    });
});
  
  
  
  </af:resource>
    <af:form id="f1">
      <af:panelStretchLayout id="psl1" inlineStyle="height:100%;" styleClass="AFStretchWidth">
        <f:facet name="start"/>
        <f:facet name="end"/>
        <f:facet name="top">
          <af:toolbar id="t1">
            <af:button text="button 1" id="b1" styleClass="button"/>
          </af:toolbar>
        </f:facet>
        <f:facet name="bottom"/>
        <f:facet name="center">
          <af:panelBox id="pb1" inlineStyle="height:300px;width:400px;background-color:red;" styleClass="box" text="PanelBox1">          
            <f:facet name="toolbar"/>
          </af:panelBox>
        </f:facet>
     
      </af:panelStretchLayout>
    </af:form>
  </af:document>

</f:view>


When we click on the button then box will be Hide by using the above code example



Thanx


Mushtaq Wattu

ADF UI Developer

Friday, 23 September 2016

Using Java Script Function For In Jsf Page

In this Tutorial lets talk about the java Script Function
While we are Working on jsf in property section we can see the java script function
AS Shown

These are built in function And Automatically called when we run the Function
lets take a very little example

For This Purpose drag and drop a button .
Choose java Script Function as I Choose onClick()
and when you will run the page and click on Button
Hope So You Will Enjoy The easy Tutorial
Thanx






Thursday, 22 September 2016

Use Java Script In adf Applications

We can use Java Script in Adf  Applications.There are two types of java script that we can use in our adf applications .They are external and internal cs.

We can prefer external cs because if we have long code then we can easily understand the code
we can use java script in adf application and write our code in the head of html page and in jsf page we can use code  under the af:Document

Example of writing script in adf Application is
 


    <af:document title="Button.jsf" id="d1">
<af:resource type="javascript"

   function(){

write some code here
}
</af:resource>

So Follow The Step To Use Basic Js For Your Applicatioon

1)Write Java Script Code as Above Mentioned  Under The Document and define your Java Script Function
2) Drag and drop A button to perform JS
3)Now Problem Is that in which component/faces You Are Trying To Use java Script ( like button ,input text ,output text  etc)

4)Drag and Drop client listener on component for which you want to use java script figure willl clearify your Confuision

Write The Name of function in pop up container and meathed on which you want to use  Js Function

Now Run your page and click button



For Complete Understand Here Is the full Code

I hope You will Enjoy Easy Tutorial

Thank You For your Participation

Mushtaq Wattu



Wednesday, 31 August 2016

Important Groovey Expression In ADF

Today We will Discuss Some Groovey Expression in ADF
Calling AM method for bind variable using groovy expression

adf.object.applicationModule.methodName()

Calling VOImpl method using groovy expression from bind variable expression.

adf.object.viewObject.methodName()

Assigning sequence next value in Entity Object attribute using groovy.



Groovey Expression To Show Current Time
adf.currentDate

new oracle.jbo.server.SequenceImpl(“YOUR_SEQ_NAME”, object.getDBTransaction()).getSequenceNumber()

Get Current user from groovy.

adf.context.securityContext.userName or adf.context.securityContext.getUserPrincipal().getName()

Get Current user role from groovy.

adf.context.securityContext.userInRole

Get current date with tuncated time using groovy.

adf.currentDate

Get current date with time stamp value using groovy.

adf.currentDateTime

Raise an error in Entity Validation.

adf.error.raise(“YOUR_MESSAGE”)

Expression to get Old Value and New Value using groovy.

newValue, oldValue

Get the ADF Context object using groovy.

adf.context

Get user session object using groovy.

adf.userSession

Get userData object by groovy

adf.userSession.userData

get value of variable from userData object using groovy

adf.userSession.userData.employeeID

Friday, 26 August 2016

How To Call Report In ADF from Form 6i

Hello every Body
Today i will  discuss how to report calling from 6i to adf
Now a days people are moving to ADF teachnology


First of all make a jsf page and drag and drop a button  from componenet pallate
In The action Listener Of Button make a bean and meathod
write the follwing code in meathod


Meathed is Explained In this picture all the detail to fetch reports from adf Is given in this post


When U will Run The Jsf Page The Report Will be View



If U feel Any Confusion Reach Me


Thanx
Muhammad Mushtaq

ADF Devloper

Tuesday, 9 August 2016

Create LOV (List Of Values) For Your ADF Application

Today We will discuss How to create list of values in ADF
First Of We should have idea about what is list of value

ADF Faces provides two list-of-values (LOV) input components that can display multiple attributes of each list item and can optionally allow the user to search for the needed item. These LOV components are useful when a field used to populate an attribute for one object might actually be contained in a list of other objects, as with a foreign key relationship in a database. For example, suppose you have a form that allows the user to edit employee information. Instead of having a separate page where the user first has to find the employee record to edit, that search and select functionality can be built into the form, as shown in Figure




In this Tutorial We will Learn Complete Lov Application


First Of All create Fusion Web Application

After This Click on model choose New and then from Gallery choose adf buisness componenent

after this choose Buiesness Component from table





Create Your Connection as shown in picture and Test Your Conection



After clicking ok then follow the below picture




Click Next then click Move Available to selected


After clicking next,next then click finish


Now Make A view Object to create Lov  click on the AppModule and then click on the new then view Object As shown in figure






After click on view Object Write The Name and Type of view Object Select "Sql  Querry Based View Object"  

Click Next  And Then Click Querry Builder


A screen will open Follow The Follwing Steps To create Querry you can also write your Querry





After click many time then click finish
Now click DepartmentView then click Department Id Because We have To craete
 LOV(list of values ) for DepartmentId  Pictorial view Show The Step one by one



After clicking on the List of Values Then you Will click on the First Tab Configatration 
select your View Object you have Recently created and then click  The Item you want to show in lov



Click Ok ...Your LOV is created and Ready to use it Create a jsf page from view Controller
and then from appmodule data control drag and drop departments View and drop into jsf page and then run the page 




When You run the page u will get the follwing    result




Download Your Application Here 

Thanks All 

Muhammad Mushtaq
ADF Developer
































Monday, 8 August 2016

Download Skining Of All Type of Animated Button in ADF

Helo everyone

I am sharing some skin of all type of button in adf

I used Global Selectors for button like this


 af|commandButton
{
//Some code Here
    }

I used Some Custom Classes


.outputtext{
//
}

                                        Download Here
                                      ADF Buttons Skins
 


Tuesday, 2 August 2016

How To Convert Date And Time In ADF Application

By using adf new component adf date Converter you can convert date and time accordin to your own Will .By default if you will choose date then Date Will Be show As in example
If u want to convert date  According To your Own Will drag and drop Convert date and time from component Pallate
Then go to properties of af:CovertDateTime write the pattern for you want to choose
for example    

dd-MMM-yyy HH:mm:ss 
After This Run Your Programm and check your date pattern (example Leave Date)



For All that The XML  Code Will Be

<af:inputDate label="Leave Date" id="it3" inlineStyle="width:300px; height:30px;"
                        
                           
                                      contentStyle="width:200px;padding:5px">
                            <af:convertDateTime pattern="dd-MMM-yyy HH:mm:ss"/>
                        </af:inputDate>

Thanx 
Mushtaq Wattu






Create Entity Object For ADF Apllication

In this tutorial we Will how to Create And Use Entity Object For Our Application Before Going to Practical Implementation we Should Know What Is entity Object:So first Step Is to Create ADF Application

Enter Application Name and than click on Finish

Right Click on Model and choose New

From the Business Tire category select ADF Business Components and from items select Business Components from Tables

Create the Connection to the Oracle Database

Query the Database Schema and move the Entities from Available to Selected window. In my case I am moving Department and Employees Entities. Rename the Package model from model.eo (for ease to remember)

Create the Entities based Views and rename the package as shown and than click on Finish

We can define two types of attribute

a) Control Functionality and behaviour such as Mandatory fields, Default values of the fields and also set the database interaction properties etc.
b) UI Hints – default UI representation such as Label of the fields, Tooltip, Format mask and control types etc
Expand the model.eo package and open the Employees entity. Click on Attributes and select the hiredate field from Employees entity. Now we will set the following attributes on the hiredate field.
1) Setting the default date value using the Groovy Expression
2) Setting the Label, Tool Tip, Format Type and Format on hiredate field

Save the Project. Expand model.vo package, right click on AppModule and choose run.

Oracle ADF provides swing based interface to interact our View Object. Double Click on EmployeesView1 and than click on plus sign to create a record. You will see that the default value of the hiredate date filed, Label is also set as we did. Move the mouse cursor to the hiredate field, Tool Tip will also appear automatically.



Thanx 
Mushtaq Wattu

Monday, 1 August 2016

How To get Dynamic Menues Using Custom SQL view Object part(2)

In perevious tutorial we learn about how to create view object which is the sub part of how to get view dyanamic menues from database
for this we learb step by step 

First you have to idea about view Object and View Links

Create three view Object For  and Then For Linking Create Three View Links

  • Menues 
  • Sub Menues
  • Forms And Reports


 For This Purpose I am Sharing The Snapshot


After This Take a menu bar Where you want to show menues For Example In template page
Make The Follwing Struture to show Menues
Now WE have to Assign Values To The Af:Iterator and AF:Menues
Assign a value To the iterator Which You will call in menu and The Name of Main menu in data Controls
Now Focus On values and Var of  Iterator
Now Click on Menues and in output text write The First entry of your menu with the variable you declare    #{mainMenu.Mainmenu}      Where mainMenu Is var you decleared and MainMenu Is from data Controls The Firts Entry of all attributes Showing in Example


After This You will repeat The Steps for Submenues and Then For Forms and Reports

Now For Other Iterator Write This 



AFter This Write The Follwing Code which is mention in text for sub menues  


 After Giving value to last iteror whose picture is not showing here we will assign value to text which is decleared in iterator


Follow Thes steps after Doing All This You will Get Drop Down Menues like This
To get This Project U  can Approach me..
Thanx 
Mushtaq Wattu
ADF UI devloper



Saturday, 30 July 2016

How To get Dynamic Menues Using Custom SQL view Object

Today we will Discuss How to get Dyamic Menues In Jsf Page from Menues
For this Purpose We should Have The follwing Concept


  • View Objects
  • View Links
  • Collection Model Tree,Iterotor

So we Will Complete This Topic In Three Tutorial first Of All we should have the basic idea of View Object Which is discuss in this tutorial

Sql Querry base view ViewObject decribes how the application will view and update data. A View Object may be Entity based or non-Entity based. In the former case, the View Object consists of one or more Entity bases. The first one of these is referred to as the primary Entity base. The rest are called secondary Entity bases. An Entity based View Object maps its attribute (View Attributes) to attributes in the Entities (Entity Attributes). An Entity based View Object may map all its Entity Attributes or only some of them. However, an Entity based View Object is required to map all primary key attributes of the Entity bases. An Entity based View Object may additional include attributes that are not mapped to an Entity Attribute. Such an attribute is referred to View level attribute.  A non-Entity based View Object is one where it does not have any Entity base. All its attributes are View level attributes.  View Object is responsible for managing database query statement. Regardless of whether the View Object is Entity based or not, it may have a SQL statement from which it draws its data. As rows are read from this query, it will populate a RowSet (of this View Object) with View rows.  View Object provides a number of APIs through which the client can modify and augment the query statement during runtime. For example, see ViewObject#setWhereClause().  A View level attribute (not mapped to an Entity attribute) may map to a column or a SQL expression in the query statement. It may be a transient attribute (whose data is purely in memory and not mapped to any database column/expression. Or, it may be a dynamic attribute. 


SQL Query Base View Object

 sql query base view object are used to get data from database the example of query base view  are when we get dynamic menus from database in our jsf page
Now we will discuss how to create sql queery base view object from database
Follow The Follwing Steps To Create View Object


  1. Click On model and choose View Object From Gallery To create view Object
  2. Change The Name Of view Object And Choose custom Sql Querry Then Click Next
  3. After that write Your Sql Querry (Which ever you want to get from database) and then  on bottom click "Test And Explain" the follwing message will be show "Your Querry executed Successfully"
  4. After That Click Next on attribute mapping Choose any one option
  5. After This Choose Primary Key and checked the filed "Key Attribute

  6. Then you can click next ,next and in application module checked the boxed add to application module 



Your View Object Is Ready To Use You can Access it in jsf Page

 Next Tutorial We will Leran How To link View Object  and Then Complete How to Get Dynamic Menues Using Iteroror


Thanx 
Mushtaq Wattu


Thursday, 28 July 2016

Skining And Balancing Of ADF Form

ADF form are Very important because in buisness application forms are mostly used .they are backbone of every adf application so today i will discuss you how to design form for your adf application
Follow the follwing steps To create form in adf Application page
 
1)After Creating Jsf Page Drag and Drop panel group layout to you page and set its layout to vertical

2)Now drag a view(for example Employees) and choose form from option  and drop it to
 panel group layout


3)Then change the rows and columns of panel form layout according to your desire


4)now You have to skin your form 
change the background color adf form


 5)now we have to focus input text of our application 
input tex has three part for skin
they are mentoned in the picture below


content style is for input text part and label style is for output text part we can add inline css as well as extrenal css



6) Now we have to balnace all the input text of our form for this purpse  we will write height and width in content style

7 ) Now write this code to chagne the background color of input text we will write this code in adf skin  for global selectors 
    




Your form is ready to use  in perfect balance form






Thanx For Corporating

Mushtaq Wattu