Monday, February 8, 2016

Reset View Criteria (af:QueryListener) on tab diclosure ADF

 private RichQuery queryComp;      
    public void setQueryComp(RichQuery queryComp) {
        this.queryComp= queryComp;
    }

    public RichQuery getQueryComp() {
        return queryComp;
    }
 public void onTabDisclosure(DisclosureEvent disclosureEvent) {
        RichQuery queryComp = this.queryComp;
        QueryModel queryModel = queryComp.getModel();
        QueryDescriptor queryDescriptor = queryComp.getValue();
        queryModel.reset(queryDescriptor);
        queryComp.refresh(FacesContext.getCurrentInstance());
        ADFUtils.findIterator("ViewObjectROVOIterator").executeQuery();
        AdfFacesContext.getCurrentInstance().addPartialTarget(treeTable);
        return;
    }

No comments: