The below expression is used to get the DB current date time. This expression you can use as default value on EO or VO.
DBTransaction.currentDbTime
If you are looking for app server date or Date time. You can use the below expression
1. adf.currentDate -- Date
2. adf.currentDateTime -- Date time.
Thursday, 6 June 2013
Wednesday, 22 May 2013
Creating SOAP Web Service Data Control
Hi,
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"));
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.setWhereClause(whereClause);
empvo.defineNamedWhereClauseParam("deptBind", null, null);
empvo.setNamedWhereClauseParam("deptBind",new Number(30));
empvo.executeQuery();
Thursday, 17 January 2013
Get current row of table in oracle ADF
The following code is use to get the current row.
DCBindingContainer dcbindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcIt = dcbindings.findIteratorBinding("iteratorname");
RowSetIterator RSIter = dcIt.getRowSetIterator();
Row r = RSIter.getCurrentRow();
Friday, 11 January 2013
Run mysql script in java
package com.test; import java.io.BufferedReader; import java.io.FileReader; import java.io.Reader; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import com.ibatis.common.jdbc.ScriptRunner; public class SqlScript { public static void main(String[] args) throws ClassNotFoundException, SQLException { String aSQLScriptFilePath = "sql/script.sql"; // Create MySql Connection Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/database", "username", "password"); Statement stmt = null; try { // Initialize object for ScripRunner ScriptRunner sr = new ScriptRunner(con, false, false); // Give the input file to Reader Reader reader = new BufferedReader( new FileReader(aSQLScriptFilePath)); // Exctute script sr.runScript(reader); } catch (Exception e) { System.err.println("Failed to Execute" + aSQLScriptFilePath + " The error is " + e.getMessage()); } } }
Note
- sql script should have an semi colen (;) for each end of the statement.
- You sql script does not have any select statement.
Tuesday, 30 October 2012
Oracle ADF-Passing data within a Task Flow
Passing data within a Task Flow
Subscribe to:
Posts (Atom)



