Thứ Hai, 5 tháng 11, 2012

How to change ADF query mode programmatically?


  • Binding the af:query (RichQuery) to backing bean

RichQuery qp;

  • Call below code to toggle the query mode:

qp.getValue().changeMode(QueryDescriptor.QueryMode.ADVANCED); qp.getValue().changeMode(QueryDescriptor.QueryMode.BASIC);

  •  Add the ADF Query (RichQuery) to partial refresh target by calling below code:

AdfFacesContext.getCurrentInstance().addPartialTarget(qp)