Oracle ADF Programmatically current row selection
public void selctListener(SelectionEvent selectionEvent) {
//Getp
previous selected row key
RowKeySet oldKeySet
= selectionEvent.getRemovedSet();
RichTable table =
(RichTable) selectionEvent.getSource();
if (1 == 2) {
invokeEL("#{bindings.DepartmentsVO1.collectionModel.makeCurrent}", new Class[]
{ SelectionEvent.class }, new Object[] {
selectionEvent });
} else {
table.setSelectedRowKeys(oldKeySet);
AdfFacesContext
adfFacesCtx = AdfFacesContext.getCurrentInstance();
adfFacesCtx.addPartialTarget(table);
FacesContext fctx =
FacesContext.getCurrentInstance();
fctx.addMessage("Wrong Move", new FacesMessage("Can not select new row due to validation failure"));
fctx.renderResponse();
}
}
replace if(1==2) with your
condtion if(checkAllow.equals("good")
No comments:
Post a Comment