Pages

02 November 2010

Perform actions each time a row in a table is selected

In page:
Set in the af:table component a custom selection Listener


In backing:
    public void rowSelectionListener(SelectionEvent selectionEvent) {
        //Calling parent method, to make the selection
        String operation = "#{bindings.VO.collectionModel.makeCurrent}";
        JSFUtils.invokeMethodExpression(operation, Object.class,
                                        SelectionEvent.class, selectionEvent);
        //do whatever else you want
    }

No comments:

Post a Comment