Thursday, December 16, 2010

java.lang.ClassNotFoundException: oracle.bpel.services.workflow.WorkflowException

Error during deployment of ADF 11g application server:
In Application Resources Pallette -> weblogic-application.xml add below lines

Thursday, December 2, 2010

ADF SelectOneChoice without base datasource

PageDefinition:
Create Iterator in your executables section.
and create a list binding in your bindings section to this iterator.
Sample page definition code:




















Page:
Drag and drop the selectonechoice component and bind it to above created binding.

Note that selectonechoice will return index, use iterator bind to get the value at selected index below is backing bean code
public void choiceListListener(ValueChangeEvent valueChangeEvent) {
DCIteratorBinding iter=((DCBindingContainer)getBindings()).findIteratorBinding("Departments1View1Iterator");
Row r=iter.getRowAtRangeIndex((Integer)valueChangeEvent.getNewValue());
System.out.println("Attr names"+r.getAttribute("DepartmentId"));
System.out.println("Attr names"+r.getAttribute("DepartmentName"));
System.out.println("atr1");
//set value of your variable equal to "value"
}

Monday, April 12, 2010

Iterator throws java.lang.NullPointerException

1) Go to page defination of JSF page
2) Select the Iterator you are using
3) Right click -> go to properties
4) In porperties change the RangeSize property to -1

Thursday, January 7, 2010

ADF 11g: Execute Operation defined in page defination from backing bean

BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("ExecuteWithParams");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
System.out.println("ERROR");
return null;
}

Thursday, October 29, 2009

Deploy ADF application on weblogic server (10.3)

(prerequisite) Create JNDI on weblogic server
In JDeveloper in
Model-> Rt clk your ApplicationModule file-> Configuration
- Edit both the setting (AppLocal & AppShared)
- Select Connection type to JDBC datasource (default is JDBC URL)
- Give proper DS name e.g java:comp/env/jdbc/MyDS (Note: Same DS name should be thr in weblogic server)
- Follow this for AppShared
- Now, Right clk ur application -> Deploy to EAR file
you can deploy EAR file on WEBLOGIC

Sunday, October 18, 2009

ADF 11g : Failed to lock the record, another user holds the lock.

Change the jbo.lockingmode property to optimistic

Select application module-> rt clik -> Configurations -> Edit -> (Properties tab)
Property: jbo.locking.mode replace pessimistic with optimistic

Sunday, October 4, 2009

1) Programmatically accessing values from managed bean & Programmatically executing view with parameters

UserDetailsPersist obj1 = (UserDetailsPersist)JSFUtils.getFromSession("UserDetailsPersistent");
String startDayNo="";

ApplicationModule am = ADFUtils.getApplicationModuleForDataControl("RotaAppDataControl");
ViewObject vo = am.findViewObject("StartDay");
vo.setNamedWhereClauseParam("locId",obj1.getLocationId());
vo.executeQuery();

while (vo.hasNext())
{
StartDayRowImpl currRecd = (StartDayRowImpl) vo.next();
System.out.println("Now accessing department " + currRecd.getWeekDesc());
startDayNo = currRecd.getWeekDesc().toString();
}

System.out.println("Start day no"+startDayNo);