filterInput problem

Hi all, I use filterinput in my process, to filter an updateable table. In table there are 4000 rows and 200 rows shown in one page. When I use filter input to filter the table, it filters the rows only the page i 'm in.It does not filter the other pages. Do you know the solution for this problem?

Thanks…
Gözde Candan

Hi
I am not sure if you can do server-side filtering using the “Filter Input” Control. For this I use:

  • A text input bound to a server side property that will contain my filter.
  • A FilterableSelectableListTableContentProvider as content provider for your list.
  • Configure the “Row Filter Value Binding” (the column that contains the values to be compared with the filter input) in the provider.
  • In the Async Table mapped to the mentioned content provider, you need to bind the Filter property in the “Expert” tab to the same property you use in the prev mentioned input text.
  • A dummy action to trigger a server roundtrip when you want to filter

hope this helps
Javier

1 Like

for the filter component to filter the data server side, which will apply the filter that are in the data provider, your table or async table needs to be bind to a Filterable data provider like : FilterableSelectableDataProvider.

problem solved.

The provider setup was not correct

This is a good clue - thanks! Unfortunately, Googling FilterableSelectableDataProvider results in only this page from the entire internet, and the docs aren’t 100% helpful here. I’m using webMethods 8.2.

  • Can I right click on an array and create a new filterable provider?
  • If not, and I create one in code, it doesn’t display any results. What properties do I need to set other than Row Type, Row Variable, Row Id Binding and Array?

Thanks!

Worked it out. Posted the answer here:

Thank you Javier! I added an important note (see above in bold) that solved my fallacy.

Best regards,
Marcus

After having implemented this solution, I ran into another problem:
Whenever an asynchronous command (like asyncCommandLink) is triggered inside this table by the user, the corresponding server-side function is not called anymore. Does anybody know why or even has a solution?

Best regards,
Marcus

Solved it! The FilterableSelectableListTableContentProvider was the reason which triggered its own built-in event. I changed the content provider to FilterableListTableContentProvider and it works again.

Best regards,
Marcus

Here is a step by step Solution if your filter Input doesn’t work on async table :

  1. Let us suppose that you have async table. Now create a provider for that output of web service connector as
    ListTableContentProvider. Right click on output of webservice connector you want to make as Provider → New →
    Content Provider →
    Updateable Table with Selection click on that and go to next option. Give the desired Managed
    Bean Name like for ex. filterProvider and click next. Select the checkbox which tells you on which portlet to apply this on. And
    check “Property is writable(setter will be generated)”. Click on finish.

  2. Select Filter Input from palette and drag it inside the form. In property of filterInput pass the async table ID in General
    for property. You can also select async table by clicking on “…” which you will see beside text area of for
    property.

  3. Now go to source code and check for the managed bean provider name filterProvider. Infront of this
    provider name you will see ListTableContentProvider , change it to FilterableSelectableListTableContentProvider.

  4. You need to do this changes in setter and getter as well. Wherever you see ListTableContentProvider change it.Now on
    left side you will see a property panel where you will find Faces Configuration(faces-config.xml). Click on it. Go to source
    code of it and there also you will find the managed bean provider name. Change it’s type from ListTableContentProvider to
    FilterableSelectableListTableContentProvider.

  5. Now you can see your provider name in binding pane area. Click on your async table , go to its value tab in property and change
    it’s value by the name of the provider which we created. You have to change it by clicking something you see like this beside
    Value text area #{…} . Also check Row Variable name in same Value property of async table and pass the same
    name in Data binding tab of Row Variable of managed bean provider property.

  6. You will see a star mark *Row Filter Value binding in the provider which we created, click on it and go to it’s Data binding
    tab → click on #{…} → go to Control Scoped Variables and select the column on which you want to put filter on.

Deploy the code. It will work for sure :slight_smile: