Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get the row of a department in a popup using a radio button

myinceptionMay 21 2013 — edited May 21 2013
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
This post has been answered by Sudipto Desmukh on May 21 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2013
Added on May 21 2013
7 comments
208 views