ADFLogger logger;
logger = ADFLogger.createADFLogger(MyClass.class);
InitialContext ctx = new InitialContext();
MBeanServer server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
ObjectName service =new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.
runtime.RuntimeServiceMBean");
ObjectName domain =(ObjectName)server.getAttribute(service, "DomainConfiguration");
rootDir = (String)server.getAttribute(domain, "RootDirectory");
logger.info("Root Dir : " + rootDir);
Search This Blog
Sunday, June 30, 2013
Wednesday, May 22, 2013
Essential Date functions for ADF
public static java.util.Date convertSqlToUtilDate(java.sql.Date date) {
Date utilDate = null;
if (date != null) {
utilDate = new Date(date.getTime());
}
return utilDate;
}
public static oracle.jbo.domain.Date convertSqlToJboDate(java.sql.Date date) {
oracle.jbo.domain.Date jboDate = null;
if (date != null) {
jboDate = new oracle.jbo.domain.Date(date);
}
return jboDate;
}
public static java.sql.Date convertUtilToSQLDate(java.util.Date date) {
java.sql.Date sqlDate = null;
if (date != null) {
sqlDate = new java.sql.Date(date.getTime());
}
return sqlDate;
}
public static oracle.jbo.domain.Date convertUtilToJboDate(java.util.Date date) {
oracle.jbo.domain.Date jboDate = null;
if (date != null) {
jboDate = new oracle.jbo.domain.Date(convertUtilToSQLDate(date));
}
return jboDate;
}
public static java.sql.Date convertJboToSqlDate(oracle.jbo.domain.Date date) {
java.sql.Date sqlDate = null;
if (date != null) {
sqlDate = (Date)date.getValue();
}
return sqlDate;
}
public static java.util.Date convertJboToUtlDate(oracle.jbo.domain.Date date) {
java.util.Date sqlDate = null;
if (date != null) {
sqlDate = (java.util.Date)date.getValue();
}
return sqlDate;
}
Friday, May 10, 2013
Oracle Projects Navigation Paths
Accounting Calendar : Setup > Financials > Calendar > Periods
Agreement : Billing > Agreements
Agreement Template : Setup > Billing > Agreement Templates
Agreement Types : Setup > Billing > Agreement Types
AR Payment Terms : Setup > Billing > Payment Terms
Assign AutoAccounting Rules : Setup > AutoAccounting > Assign Rules
Assign Descriptive Security Rules : Setup > Flexfields > Descriptive > Security > Assign
Assign Key Flexfield Security Rules : Setup > Flexfields > Key > Security > Assign
AutoAccounting Lookup Sets : Setup > AutoAccounting > Lookup Sets
AutoAccounting Rules : Setup > AutoAccounting > Rules
Bill Rate Schedules : Setup > Billing > Bill Rate Schedules
Billing Extensions : Setup > Billing Extensions
Budget Change Reasons : Setup > Budgets > Change Reasons
Budget Entry Methods : Setup > Budgets > Entry Methods
Budget Types : Setup > Budgets > Budget Types
Budgets Budgets
Burden Cost Codes : Setup > Costing > Burden > Cost Codes
Burden Schedules : Setup > Costing > Burden > Schedules
Burden Structures : Setup > Costing > Burden > Structures
Capital Projects
Class Categories and Codes : Setup > Projects > Classifications
Compensation Rules : Setup > Costing > Labor > Compensation Rules
Contact Types : Setup > Project > Customers > Contact Types
Control Actions : Setup > Activity Management Gateway > Control Actions
Control Billing by Top Task : Billing > Control Billing by Top Task
Cost Bases : Setup > Costing > Burden > Bases
Credit Types : Setup > Billing > Credit Types
Cross Validation Rules : Setup > Flexfields > Key > Rules
Customers : Setup > Customers > Customer Entry
Descriptive Flexfield Security Rules : Setup > Flexfields > Descriptive > Security > Define
Descriptive Flexfield Segments : Setup > Flexfields > Descriptive > Segments
Descriptive Flexfield Values : Setup > Flexfields > Descriptive > Values
Dimensions : Setup > Collection Pack > Dimension
Employee Cost Rates : Setup > Costing > Labor > Employee Cost Rates
Enter Person : Setup > Human Resources > Employees
Event Entry and Inquiry Windows : Billing > Events
Event Types : Setup > Billing > Event Types
Expenditure Batches : Expenditures > Pre-Approved Batches > Enter
Expenditure Batches Summary : Expenditures > Pre-Approved Batches > Review
Expenditure Categories : Setup > Expenditures > Expenditure Categories
Expenditure Inquiry : Expenditures > Expenditure Inquiry Project
Expenditure Inquiry Across Projects : Expenditures > Expenditure Inquiry All
Expenditure Items : Expenditures > Expenditure Inquiry Project or All
Expenditure Types : Setup > Expenditures > Expenditure Types
Find Expenditure Batches : Expenditures > Pre-Approved Batches > Review
Find Invoices : Billing > Invoice Review
Flexfield Security Rules : Setup > Flexfields > Validation > Security > Define
Flexfield Value Sets : Setup > Flexfields > Validation > Sets
Flexfield Values : Setup > Flexfields > Validation > Values
GL Accounts : Setup > Financials > Accounts
Implementation Options : Setup > System > Implementation Options
Invoice Formats : Setup > Billing > Invoice Formats
Invoice Summary : Billing > Invoice Review
Job : Setup > Human Resources > Jobs
Key Flexfield Security Rules : Setup > Flexfields > Key > Security > Define
Key Flexfield Segments : Setup > Flexfields > Key > Segments
Labor Cost Multipliers : Setup > Costing > Labor > Cost Multipliers
Location : Setup > Human Resources > Locations
Maintain PA Period Statuses : Setup > System > PA Periods
Mass Update Batches Project : Maintenance > Mass Update Batches
Non-Labor Resources : Setup > Expenditures > Non-Labor Resources
Organization : Setup > Human Resources > Organizations > Define
Organization Hierarchies : Setup > Human Resources > Organizations > Hierarchies
PA Periods : Setup > System > PA Periods
Payment Terms : Setup > Billing > Payment Terms
Percent Complete Project : Status > Percent Complete
Period Types : Setup > Financials > Calendar > Types
Personal Profile Values : Other > Profile
Pre-Approved Expenditure Batch Review : Expenditures > Pre-Approved Batches > Review
Pre-Approved Expenditure Entry : Expenditures > Pre-Approved Batches > Enter
Project Customer Relationships : Setup > Projects > Customers > Relationships
Project Funding Inquiry : Billing > Funding Inquiry
Project Role Types : Setup > Projects > Role Types
Project Status Inquiry : Project Status > Project Status Inquiry
Project Status Inquiry Columns : Setup > Project Status Columns
Project Statuses : Setup > Projects > Statuses
Project Types : Setup > Projects > Project Types
Projects Templates Summary : Setup > Projects > Project Templates
PTE Employee Assignment to Operating Unit : Setup > Expenditures > PTE-Multiple Org
QuickCodes : Setup > Human Resources > QuickCodes
Request Set : Other > Requests > Set
Resource Lists : Setup > Budgets > Resource Lists
Revenue Categories : Setup > Expenditures > Revenue Categories
Revenue Review Windows : Billing > Revenue Review
Review Online Time and Expense : Expenditures > Online Expenditure Review > Supervisor
or
Expenditures > Online Expenditure Review > All
Review Transactions : Expenditures > Transaction Import > Review Transactions
Role Types : Setup > Projects > Role Types
Rollup Groups : Setup > Flexfields > Key > Groups
Segment Values : Setup > Flexfields > Key > Values
or
Setup > Flexfields > Descriptive > Values
or
Setup > Flexfields > Validation > Values
Service Types : Setup > Projects > Service Types
Set of Books : Setup > Financials > Books
Shorthand Aliases : Setup > Flexfields > Key > Aliases
Source Products : Setup > Activity Management Gateway > Source Products
Submit Requests : Other > Requests > Run
System Options : Setup > Customers > System Options
Transaction Controls Projects. Find the project for which you want to enter transaction controls. Choose Open. Select Transaction Controls from the Project Options.
or
Projects. Find the project. Choose Open. Select Tasks. Chose the task for which you want to enter transaction controls. Choose Options. Choose Transaction Controls from the Task Options.
Transaction Sources : Setup > Expenditures > Transaction Sources
Units : Setup > Expenditures > Units
Value Sets : Setup > Flexfields > Validation Sets
View Burdened Costs : Setup > Costing > Burden > View
Agreement : Billing > Agreements
Agreement Template : Setup > Billing > Agreement Templates
Agreement Types : Setup > Billing > Agreement Types
AR Payment Terms : Setup > Billing > Payment Terms
Assign AutoAccounting Rules : Setup > AutoAccounting > Assign Rules
Assign Descriptive Security Rules : Setup > Flexfields > Descriptive > Security > Assign
Assign Key Flexfield Security Rules : Setup > Flexfields > Key > Security > Assign
AutoAccounting Lookup Sets : Setup > AutoAccounting > Lookup Sets
AutoAccounting Rules : Setup > AutoAccounting > Rules
Bill Rate Schedules : Setup > Billing > Bill Rate Schedules
Billing Extensions : Setup > Billing Extensions
Budget Change Reasons : Setup > Budgets > Change Reasons
Budget Entry Methods : Setup > Budgets > Entry Methods
Budget Types : Setup > Budgets > Budget Types
Budgets Budgets
Burden Cost Codes : Setup > Costing > Burden > Cost Codes
Burden Schedules : Setup > Costing > Burden > Schedules
Burden Structures : Setup > Costing > Burden > Structures
Capital Projects
Class Categories and Codes : Setup > Projects > Classifications
Compensation Rules : Setup > Costing > Labor > Compensation Rules
Contact Types : Setup > Project > Customers > Contact Types
Control Actions : Setup > Activity Management Gateway > Control Actions
Control Billing by Top Task : Billing > Control Billing by Top Task
Cost Bases : Setup > Costing > Burden > Bases
Credit Types : Setup > Billing > Credit Types
Cross Validation Rules : Setup > Flexfields > Key > Rules
Customers : Setup > Customers > Customer Entry
Descriptive Flexfield Security Rules : Setup > Flexfields > Descriptive > Security > Define
Descriptive Flexfield Segments : Setup > Flexfields > Descriptive > Segments
Descriptive Flexfield Values : Setup > Flexfields > Descriptive > Values
Dimensions : Setup > Collection Pack > Dimension
Employee Cost Rates : Setup > Costing > Labor > Employee Cost Rates
Enter Person : Setup > Human Resources > Employees
Event Entry and Inquiry Windows : Billing > Events
Event Types : Setup > Billing > Event Types
Expenditure Batches : Expenditures > Pre-Approved Batches > Enter
Expenditure Batches Summary : Expenditures > Pre-Approved Batches > Review
Expenditure Categories : Setup > Expenditures > Expenditure Categories
Expenditure Inquiry : Expenditures > Expenditure Inquiry Project
Expenditure Inquiry Across Projects : Expenditures > Expenditure Inquiry All
Expenditure Items : Expenditures > Expenditure Inquiry Project or All
Expenditure Types : Setup > Expenditures > Expenditure Types
Find Expenditure Batches : Expenditures > Pre-Approved Batches > Review
Find Invoices : Billing > Invoice Review
Flexfield Security Rules : Setup > Flexfields > Validation > Security > Define
Flexfield Value Sets : Setup > Flexfields > Validation > Sets
Flexfield Values : Setup > Flexfields > Validation > Values
GL Accounts : Setup > Financials > Accounts
Implementation Options : Setup > System > Implementation Options
Invoice Formats : Setup > Billing > Invoice Formats
Invoice Summary : Billing > Invoice Review
Job : Setup > Human Resources > Jobs
Key Flexfield Security Rules : Setup > Flexfields > Key > Security > Define
Key Flexfield Segments : Setup > Flexfields > Key > Segments
Labor Cost Multipliers : Setup > Costing > Labor > Cost Multipliers
Location : Setup > Human Resources > Locations
Maintain PA Period Statuses : Setup > System > PA Periods
Mass Update Batches Project : Maintenance > Mass Update Batches
Non-Labor Resources : Setup > Expenditures > Non-Labor Resources
Organization : Setup > Human Resources > Organizations > Define
Organization Hierarchies : Setup > Human Resources > Organizations > Hierarchies
PA Periods : Setup > System > PA Periods
Payment Terms : Setup > Billing > Payment Terms
Percent Complete Project : Status > Percent Complete
Period Types : Setup > Financials > Calendar > Types
Personal Profile Values : Other > Profile
Pre-Approved Expenditure Batch Review : Expenditures > Pre-Approved Batches > Review
Pre-Approved Expenditure Entry : Expenditures > Pre-Approved Batches > Enter
Project Customer Relationships : Setup > Projects > Customers > Relationships
Project Funding Inquiry : Billing > Funding Inquiry
Project Role Types : Setup > Projects > Role Types
Project Status Inquiry : Project Status > Project Status Inquiry
Project Status Inquiry Columns : Setup > Project Status Columns
Project Statuses : Setup > Projects > Statuses
Project Types : Setup > Projects > Project Types
Projects Templates Summary : Setup > Projects > Project Templates
PTE Employee Assignment to Operating Unit : Setup > Expenditures > PTE-Multiple Org
QuickCodes : Setup > Human Resources > QuickCodes
Request Set : Other > Requests > Set
Resource Lists : Setup > Budgets > Resource Lists
Revenue Categories : Setup > Expenditures > Revenue Categories
Revenue Review Windows : Billing > Revenue Review
Review Online Time and Expense : Expenditures > Online Expenditure Review > Supervisor
or
Expenditures > Online Expenditure Review > All
Review Transactions : Expenditures > Transaction Import > Review Transactions
Role Types : Setup > Projects > Role Types
Rollup Groups : Setup > Flexfields > Key > Groups
Segment Values : Setup > Flexfields > Key > Values
or
Setup > Flexfields > Descriptive > Values
or
Setup > Flexfields > Validation > Values
Service Types : Setup > Projects > Service Types
Set of Books : Setup > Financials > Books
Shorthand Aliases : Setup > Flexfields > Key > Aliases
Source Products : Setup > Activity Management Gateway > Source Products
Submit Requests : Other > Requests > Run
System Options : Setup > Customers > System Options
Transaction Controls Projects. Find the project for which you want to enter transaction controls. Choose Open. Select Transaction Controls from the Project Options.
or
Projects. Find the project. Choose Open. Select Tasks. Chose the task for which you want to enter transaction controls. Choose Options. Choose Transaction Controls from the Task Options.
Transaction Sources : Setup > Expenditures > Transaction Sources
Units : Setup > Expenditures > Units
Value Sets : Setup > Flexfields > Validation Sets
View Burdened Costs : Setup > Costing > Burden > View
Monday, March 4, 2013
Add/Remove row from a table and subsequently Refresh a table
Add/Remove row from a table and subsequently Refresh a table.
The button ID is referenced in the table's "partialTrigger" property so that clicking the button initiates a table refresh
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
//handle errors if any //... return;
}
AdfFacesContext.getCurrentInstance().addPartialTarget( this.getDepartmentsTable());
----------------------------------
1. Creating a binding for the table on which you want to delete the row. Binding creates setter method setMyTable(RichTable table) and getter method like getMyTable() returning RichTable.
2. On a button click or on any other action delete the table row as below.
DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("MyVOIterator");
Row currentRow = dciter.getCurrentRow();
dciter.removeCurrentRow();
AdfFacesContext.getCurrentInstance().addPartialTarget( this.getMyTable());
The button ID is referenced in the table's "partialTrigger" property so that clicking the button initiates a table refresh
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
//handle errors if any //... return;
}
AdfFacesContext.getCurrentInstance().addPartialTarget( this.getDepartmentsTable());
----------------------------------
1. Creating a binding for the table on which you want to delete the row. Binding creates setter method setMyTable(RichTable table) and getter method like getMyTable() returning RichTable.
2. On a button click or on any other action delete the table row as below.
DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("MyVOIterator");
Row currentRow = dciter.getCurrentRow();
dciter.removeCurrentRow();
AdfFacesContext.getCurrentInstance().addPartialTarget( this.getMyTable());
Wednesday, February 20, 2013
JDeveloper closes abruptly on trying to open
Sometimes its frustrating to see Jdev closing immediately on opening. We try restarting the machine, re-installing jdev...and nothing seems to be working.
This is a sign that something got corrupted on Jdeveloper.
Best way to get over this issue is to restore it back to the original setting (Ofcourse you loose all your settings, preferences, svn connection, DB settings, external tools, etc ..).
The way you do this is by removing system11.1.1.* folder under jdeveloper. Yes, not the best soution, but better than re-installing jdeveloper.
On restarting JDeveloper, it creates a new system11.1.1* directory.
Friday, October 26, 2012
Detect the browser type and version in ADF
How-to detect the browser type and version
The Trinidad RequestContext object provides access to the user browser type and browser version. using Expression Language as
#{requestContext.agent.agentName}
#{requestContext.agent.agentVersion}
Trinidad RequestContext class is exposed through the AdfFacesContext class, which means that we can also use
#{adfFacesContext.agent.agentName}
#{adfFacesContext.agent.agentVersion}
The Trinidad RequestContext object provides access to the user browser type and browser version. using Expression Language as
#{requestContext.agent.agentName}
#{requestContext.agent.agentVersion}
Trinidad RequestContext class is exposed through the AdfFacesContext class, which means that we can also use
#{adfFacesContext.agent.agentName}
#{adfFacesContext.agent.agentVersion}
Thursday, October 18, 2012
OAF setup on server before running Oracle Self-Service Web Applications
Configure environment variables and servlet zone list, these are prerequisite before deploying the OAF code on to the server. (Courtesy : Oracle Documentation)
1. Locate the file jserv.properties.
All environment variables are set in this file. It is important to get $CLASSPATH and $LD_LIBRARY_PATH correct here. You can look at APPLSYS.env and adovars.env under $APPL_TOP for these two variable settings.
2. In jserv.properties, modify the following parameters:
wrapper.bin
The wrapper.bin property must contain the full path to the executable for the Java Virtual Machine. It sets which Java Virtual Machine interpreter to use here. For example:
wrapper.bin=/local/java/jdk1.1.6/bin/java
wrapper.classpath
This property contains the CLASSPATH environment value passed to the JVM. The wrapper.classpath property must contain both the JSDK and the JServ jar file. It should probably also contain the JVM's classes.zip file and directives of servlet zones.
The syntax is:
wrapper.classpath=[path]
For example:
wrapper.classpath=/usr/local/ApacheJServ/jservlets
wrapper.classpath=/local/java/jdk1.1.6/lib/classes.zip
wrapper.classpath=/usr/local/ApacheJserv/src/java/ApacheJServ.jar
wrapper.env
This property is an environment name whose value is passed to the JVM.
The syntax is:
wrapper.env=[name]=[value]
You should set the $LD_LIBRARY_PATH variable here to the directory which contains the JDBC library file. For example:
wrapper.env=LD_LIBRARY_PATH=/oracle/db/8.1.6.1/lib
NLS environment variables should also be set here for the JDBC to operate. For example:
wrapper.env=NLS_LANG=AMERICAN_AMERICA
wrapper.env=ORA_NLS33=/opt/tools/ocommon/nls/admin/data
wrapper.env=NLS_DATE_FORMAT=DD-MON-RR
zones
This property lists the servlet zones that JServ manages. The syntax is:
zones=,
For example:
zones=jservlets
You must specify the configuration file location for each servlet zone that is specified. For example:
jservlets.properties=/usr/local/ApacheJServ/jservlets/
1. Locate the file jserv.properties.
All environment variables are set in this file. It is important to get $CLASSPATH and $LD_LIBRARY_PATH correct here. You can look at APPLSYS.env and adovars.env under $APPL_TOP for these two variable settings.
2. In jserv.properties, modify the following parameters:
wrapper.bin
The wrapper.bin property must contain the full path to the executable for the Java Virtual Machine. It sets which Java Virtual Machine interpreter to use here. For example:
wrapper.bin=/local/java/jdk1.1.6/bin/java
wrapper.classpath
This property contains the CLASSPATH environment value passed to the JVM. The wrapper.classpath property must contain both the JSDK and the JServ jar file. It should probably also contain the JVM's classes.zip file and directives of servlet zones.
The syntax is:
wrapper.classpath=[path]
For example:
wrapper.classpath=/usr/local/ApacheJServ/jservlets
wrapper.classpath=/local/java/jdk1.1.6/lib/classes.zip
wrapper.classpath=/usr/local/ApacheJserv/src/java/ApacheJServ.jar
wrapper.env
This property is an environment name whose value is passed to the JVM.
The syntax is:
wrapper.env=[name]=[value]
You should set the $LD_LIBRARY_PATH variable here to the directory which contains the JDBC library file. For example:
wrapper.env=LD_LIBRARY_PATH=/oracle/db/8.1.6.1/lib
NLS environment variables should also be set here for the JDBC to operate. For example:
wrapper.env=NLS_LANG=AMERICAN_AMERICA
wrapper.env=ORA_NLS33=/opt/tools/ocommon/nls/admin/data
wrapper.env=NLS_DATE_FORMAT=DD-MON-RR
zones
This property lists the servlet zones that JServ manages. The syntax is:
zones=
For example:
zones=jservlets
You must specify the configuration file location for each servlet zone that is specified. For example:
jservlets.properties=/usr/local/ApacheJServ/jservlets/
Subscribe to:
Posts (Atom)