Oracle ADF table column customizing the filtering component Method ____oracle

Source: Internet
Author: User

  <f:facet name= "Filter" >
                        <af:selectonechoice required= "#{bindings. Pay0detailVO1.hints.Vsource.mandatory} "
                                            shortdesc=" #{bindings. Pay0detailVO1.hints.Vsource.tooltip} "id=" Soc41 "
                                            contentstyle=" width:100px; "Value=" #{ Vs.filterCriteria.Vsource} ">
                           <f:selectitem itemlabel=" "itemvalue=" id = "Si9"/> <f 
                          : Selectitems value= "#{bindings. Vsource.items} "id=" si42/>
                        </af:selectOneChoice>
                      </f:facet>

The query area for the filtered rows of the af:table component that is normally dragged is just the text input field.

As shown in figure:

However, if the design requirement is to edit on a new line, if some columns are search Help or Drop-down boxes, text filtering in the filtered area will not get the desired result

As shown in figure:

Simply entering payment increases when filtering the settlement direction Code column does not filter out the desired results. Because each row of data is a dictionary entry from the database.

Also, the value stored in this column is the dictionary entry code, and the dictionary item name is displayed on the UI. So in the filter is actually input 01 02 03 Such data dictionary code to get the desired results

But the user does not know the dictionary code. So now you want to achieve the following diagram effect


A Drop-down box in the filter area to read the database dictionary entries to filter to meet the requirements.

The operation method is as follows: Enter the page pagedefine.xml

Add a dropdown box list as shown:


Select the second select one value list that update a base data source


Then select model Driven list to find the lov of the field

The code generated in the XML is as follows, the proficiency of the word after the direct copy on the line

<list iterbinding= "Pay0detailvo1iterator" staticlist= "false" uses= "Lov_vsource" id= "Vsource" DTSupportsMRU= "true "
          selectitemvaluemode=" ListObject "nullvalueflag=" "Start"/>
The name of the Lov that users are using iterbinding is the iteration of which table is used

Once the page definition file is complete, you can draw a filtered drop-down box on the page with the F:facet name = "Filter" Property in the column field

Usage:

  <f:facet name= "Filter" >
                        <af:selectonechoice required= "#{bindings. Pay0detailVO1.hints.Vsource.mandatory} "
                                            shortdesc=" #{bindings. Pay0detailVO1.hints.Vsource.tooltip} "id=" Soc41 "
                                            contentstyle=" width:100px; "Value=" #{ Vs.filterCriteria.Vsource} ">
                           <f:selectitem itemlabel=" "itemvalue=" id = "Si9"/> <f 
                          : Selectitems value= "#{bindings. Vsource.items} "id=" si42/>
                        </af:selectOneChoice>
                      </f:facet>

Here value value is bound to Vs.filtercriteria. Required fields;

Why should there be <f:selectitem and <f:selectitems as pictured? Because the Uihintschoice setting in Lov is as shown

There will be a good selection of filtering areas, but can not return to the original blank phenomenon;

So before F:selectitems add F:selectitem and Itemvalue= ""

This is an example of a drop-down box that implements a custom filter component.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.