Create ADF popup for value change event(For select one choice component).
Oracle ADF - Add new custom attribute for view object using Expression
Oracle ADF Client-side Validators
Oracle ADF Association sample for Department and Employee
Thursday, June 9, 2011
Oracle ADF - How to redirect URL in bean class.
Monday, May 30, 2011
Oracle ADF - Popup behavior in clientside
Thursday, May 26, 2011
Oracle ADF - Create View Criteria and Execute using Bean.
In this Example shows View Criteria define for BatchId, Filtered records for relevant batch by passing batchId.
1)First thing is you have to create a View Object in mine TraineeVo
2)In TraineeVO Select Query and add bind variable in mine batchId
3)Press + Sign for add View Criteria and make criteria as follows
4)Add method for AppModuleImpl class to execute View Criteria In mine
public void executeTraineeBatchId(String batchId) {
ViewObjectImpl traineeVO = this.getTraineeVO(); //relaventVO
traineeVO.setNamedWhereClauseParam("batchId", batchId); //bindVariable name and pass value
traineeVO.setApplyViewCriteriaName("TraineeVOCriteriaForBatchId"); //criteriaName
traineeVO.executeQuery(); //executeVO with Criteria
}
5)To expose this method to ViewController must add to client interface in AppModule
And press SaveAll
6)Refresh the Data Controls and check whether it available in relevant AppModule
7)Now in View Criteria in data control > TraineeVO > Named Criteria can drag to page as “ADF query panel with Table” but here example is using bean class.
To access View Criteria must “executeTraineeBatchId” bind to page
Click Bindings>+>methodAction>and Create action binding
8)Add InputText and Command button and in Action listener of button get batchId and execute view criteria as follows
public void searchBtnAl(ActionEvent actionEvent) {
String batchId = ""+itBatchId.getValue();//get batchId
if (batchId != null && !batchId.equals("")) {
executeSearchCriteria("executeTraineeBatchId", "batchId", "" + batchId);
}
}
private Object executeSearchCriteria(String sCriteria, String sParamName, String sParamVal) {
BindingContainer bindings = getBindings();
OperationBinding ob = bindings.getOperationBinding(sCriteria);
Map params = ob.getParamsMap();
params.put(sParamName, sParamVal);
return ob.execute();
}
public BindingContainer getBindings() {
return BindingContext.getCurrent().getCurrentBindingsEntry();
}
See Results

Thursday, May 5, 2011
Oracle ADF - Close browser current window using button
FacesContext facesContext = FacesContext.getCurrentInstance();
org.apache.myfaces.trinidad.render.ExtendedRenderKitService service = org.apache.myfaces.trinidad.util.Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
service.addScript(facesContext, "window.close();window.opener.location.href = window.opener.location.href;");
Wednesday, April 20, 2011
Oracle ADF - How to instantiate application module
Here are two sample ways to instantiate application module using Bindingcontex Class and Configuration Class.
(1)Using Bindingcontex class: (Have to give DataControler name and AppModuleImpl class )
oracle.adf.model.BindingContext bc = oracle.adf.model.BindingContext.getCurrent();
JUApplication japp = (JUApplication)bc.getCurrentBindingsEntry().get("AppModuleDataControl");
AppModuleImpl am = (AppModuleImpl)japp.getApplicationModule();
(2)Using Configuration class (Have to give path for AppModule and name "AppModuleLocal")
AppModuleImpl am = (AppModuleImpl)oracle.jbo.client.Configuration.createRootApplicationModule("model.am.AppModule",
"AppModuleLocal");
Wednesday, April 6, 2011
Oracle - ADF How to add methodCall in taskFlow
Monday, April 4, 2011
Oracle ADF - How to access viewScope , pageFlowScope and SessionScope parameters by bean class
(1)PageFlowScope
AdfFacesContext context = AdfFacesContext.getCurrentInstance();
Map pfScope = context.getPageFlowScope();
pfScope.get("paramName");
AdfFacesContext context = AdfFacesContext.getCurrentInstance();
Map vScope = context.getViewScope();
vScope.get("paramName");
(3)SessionScope
FacesContext fctx = FacesContext.getCurrentInstance();
ExternalContext ectx = fctx.getExternalContext();
Map sessionScope = ectx.getSessionMap();
sessionScope.get("paramName");//paramName can be a bean class