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!

ADF Table af:table column, using multiselect on filter

user10823746Feb 25 2015 — edited Feb 26 2015

Hi All,

I'm using JDeveloper 12.1.3. I'm struck in implementing  'multi select' functionality on Table Filter, I over wrote the filter with SeleceManyChoice and when I select multiple values in filter i'm not getting the correct filtered results.

I overwrote QueryListner with backing bean method.


Can some one help me on this? Here what I'm trying to do.

<af:table ...  queryListener="#{activityNavigatorBean.paTableActionsQueryListnerHandler}">

  <af:column headerText="#{bindings.Table1.hints.Status.label}" id="c4"

                               sortProperty="#{bindings.Table1.hints.Status.name}"

                               filterable="true" sortable="true">

  <af:selectOneChoice value="#{row.bindings.Status.inputValue}"

   label="#{row.bindings.Status.label}"

   required="#{bindings.Table1.hints.Status.mandatory}"

   shortDesc="#{bindings.Table1.hints.Status.tooltip}"

   id="soc9" readOnly="true">

  <f:selectItems value="#{row.bindings.Status.items}" id="si9"/>

  <f:validator binding="#{row.bindings.Status.validator}"/>

  </af:selectOneChoice>

  <f:facet name="filter">

  <af:selectManyChoice label="Label 1" id="smc1"

  value="#{bindings.Table1Query.queryDescriptor.filterConjunctionCriterion.criterionMap.Status.value}">

  <f:selectItems id="si31" value="#{bindings.Table1Query.queryDescriptor.filterConjunctionCriterion.criterionMap.Status.attribute.model}"/>

  </af:selectManyChoice>

  </f:facet>

  </af:column>

</af:table>

Here is the backing bean method.    

    

     FilterableQueryDescriptor descriptor = (FilterableQueryDescriptor) queryEvent.getDescriptor();

        ConjunctionCriterion conjCriteria = descriptor.getFilterConjunctionCriterion();

        FacesContext conetext = FacesContext.getCurrentInstance();

        List<Criterion> critList = conjCriteria.getCriterionList();

        System.out.println("::: conjuction " + conjCriteria.getConjunction());

        System.out.println(conjCriteria.getCriterionList().size());

        for(Criterion criterion : critList){

            AttributeCriterion ac = (AttributeCriterion) criterion;

            System.out.println("value :: " + ac.getValue() + ":: " + ac.getModelList());

            System.out.println("value sdsad:: " + ac.getGroupName());

        }

       

        Map<String, Criterion> map = conjCriteria.getCriterionMap();

        AttributeCriterion aCriterion = (AttributeCriterion) map.get("Status");

        ArrayList<Integer> list = (ArrayList<Integer>) aCriterion.getValue();

   

Where do i set the criterion list?


I really appreciate your help on this.

Thanks,

Srini

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2015
Added on Feb 25 2015
5 comments
1,076 views