I have a use case. A page will be displayed with a button. User will click on that button, and then a popup will be displayed showing the table of departments. User will select the desired radio button. After that, the popup will close and the list of employees should get displayed in the page.
I have written a method in the valuechangeevent property of the radio button (autosubmit is also set as true), but still I am not able to get the current row. I actually need the value of departmentid.
Can anyone guide me?
public void onClickRadio(ValueChangeEvent valueChangeEvent) {
// Add event code here...
System.out.println("onClickRadio Begins");
hidePopup("p1");
DCBindingContainer bc =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter =
bc.findIteratorBinding("DepartmentsView1Iterator");
Row row = iter.getCurrentRow();
Number departmentId = (Number)row.getAttribute("DepartmentId");
System.out.println("departmentId: " + departmentId);
OperationBinding method =
(OperationBinding)bc.get("displayEmployeeTable");
method.getParamsMap().put("departmentId", departmentId);
method.execute();
AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
System.out.println("onClickRadio Ends");
}
JDev 11.1.1.6