Wednesday, 22 May 2013

Creating SOAP Web Service Data Control

In this post i am going to show you sample application with webservice data control.

Step 1: 

You must have web service WSDL URL. For this application i am using the below WSDL url. Which will return the IP addres and location.

Step 2: 

Create new fusion web application.

Step 3:

Select Web Service Data Control as shown in below image

Step 4:

Give the service name and Service URL as Shown in image and click on next.

Step 5:
Select the GeoIPServiceSoap and click on next finish.

You will find the data control with Service name

Step 6:
Create one jspx page and drag and drop GetGeoIPContext() method as button and expand GetGeoIPContext method and drag n drop GetGeoIPContextResult as form in page (you can make use of other method also).

Step 7:

Run the application. You will find the below result. 

Tuesday, 7 May 2013

Set Page flow scope using java code

By using the below code you can set and get the page flow scope using java.

AdfFacesContext.getCurrentInstance().getPageFlowScope().put("pageflowScopeVarName","value" );
System.out.println("The value is="+AdfFacesContext.getCurrentInstance().getPageFlowScope().get("pageflowScopeVarName"));

Saturday, 4 May 2013

Creating where clause programmatically and execute view object

       The below code is used to create where clause and bind variable programmatically execute the view object.        
The defineNamedWhereClauseParam () method of ViewObject is used to create the bind variable at run time.

                   ViewObject empvo = this.getEmployeesView1();
                   String whereClause = "Employees.DEPARTMENT_ID = :deptBind";
                   empvo.defineNamedWhereClauseParam("deptBind", null, null);
                   empvo.setNamedWhereClauseParam("deptBind",new Number(30));