This blog will cover Oracle ADF, Weblogic, Oracle Application Server, Oracle Collaboration Suite etc....
Tuesday, February 23, 2016
Af:Iterator Issue
The components inside af:iterator was not getting refreshed on ppr.
The reason was the page parent tag was . It started working after I removed the af:group tag
Tree Binding Programmatically
JUCtrlHierNodeBinding and the class is import oracle.jbo.uicli.binding.JUCtrlHierNodeBinding;
And for list binding it is JUCtrlListBinding
import oracle.jbo.uicli.binding.JUCtrlListBinding;
JUCtrlHierNodeBinding wrappedRow = (JUCtrlHierNodeBinding) tbl.getRowData();
Taskflow return listener
In called taskflow you can have backing bean which does some operation and say it puts some value in pageflowscope in the child taskflow using below code
HashMap map = new HashMap();
map.put("userId", userRow.getAttribute("ApplUserId"));
map.put("userName", fullName);
AdfFacesContext.getCurrentInstance().getPageFlowScope().put("userDetail", map);
Define a simple return activity in child taskflow, nothing special here
Now in parent taskflow’s jspx/jsff page button/event which calls child taskflow add a returnlistener
The method code looks like
public void onTaskFlowReturn(ReturnEvent returnEvent) {
bhcLogger.entering("UserRoleMaintain.class", "onTaskFlowReturn");
HashMap userDetail = (HashMap)returnEvent.getReturnParameters().get("userDetail");
}
Where in the child’s taskflow attributes are captured in returnEvent object.


The region component with id: r1 has detected a page fragment with multiple root components
create only one PageGroupLayout at root level , and keep what ever the components inside that.
Surround the components in pgl they should not be at root level.
Thursday, January 29, 2015
Selectonechoice current index
Valuechangelistener does not get fired on when selectonechoice default value is selected e.g. Select. Hence we should have additional button and in that button we should evaluate the index of select one choice as below
public String goButtonAction(ActionEvent actionEvent) {
// Add event code here...
Integer selectedPlatformIndex = (Integer)JSFUtils.resolveExpression("#{row.bindings.PlatformName_lov.inputValue}");
System.out.println("The gobutton clicked value: >>>>>>>>>>>>>>>>>>"+selectedPlatformIndex.toString());
if(selectedPlatformIndex == 0 ){
showMessage("Please select a Platform");
return null;
}
else
return "gotoRelease";
}
Tuesday, September 4, 2012
Named Criteria: ViewCriteria
Named Criteria:
Create new view criteria for viewobject. If you have added this view object to app module remove it and add it again. Once you add this viewobject with viewcriteria refresh data controls pallet and under viewobject named criteria you will see the custom created named criteria.
Wednesday, July 18, 2012
AutoSuggest For InputTextField
AutoSuggest is a very good feature in terms of LOV
Below are the step to create AutoSuggest
1)Create a ViewObject (EmployeesVO)
2)For Department Attribute Define List Of Values - Note below items when you define this
- You will have to define VO on Read Only access through SQL Query (You need this becasue in this query you need to have an attribute to hold department name for autosuggest to pull this value you need to create a query like below and make sure in Viewobject for each attribute you set the updateable property to Always)
SELECT Emp.FirstName,
Emp.LastName,
Emp.DeptId,
(SELECT Dept.DeptName FROM Department Dept WHERE Dept.DeptId = Emp.DeptId) DeptName
FROM Employees Emp
You autoSuggest will work on this attribute.
3)Define default viewobject for Departments table, this will be the lov for the attribute DeptNm in Employees.
4) In EmployeesVO select attribute DeptName and define lov, make sure when you select DepartmentVO in list datasource in your return value you should have two values something like
ViewAttribute ListAttribute
DeptName DepartmentName
DeptId DepartmentId
What will happen is when ever you whill select department name using autosuggest the corresponding value for deptid will be copied to DeptId column in EmployeeVO.
5) In UI Hints select InputText with List Of Values and diplay attribute set to Department Name
5) Now on you JSF page drag and drop EmployeesVO as table for the DepartmentName attribute copy below line before the closing column tag
af:autoSuggestBehavior suggestedItems="#{row.bindings.DeptName.suggestedItems}"/
No need to add any list in page definition it will automatically pick up from the LOV defined in the viewobject.
Subscribe to:
Posts (Atom)