cancel
Showing results for 
Search instead for 
Did you mean: 

WDA - filter data in a table - is there another approach?

0 Kudos

Hello,

I'm actually trying to filter some data in a table.

I created a context node which is bound to the table. I assigned an additional attribute as filterValue and also created the onFilter method.

So far, so good ... everything works , except the filtering ;o) - I know this has to be programmed .... what I found so far while searching the SDN was a blog that explained the problem for WDJ.

As I understood the code, the idea is to loop through all entries in the context node, check if they could be used for the filtering criteria and otherwise remove them from the context.

This approach also works for WDA - but my "removed" entries are lost (unless I store them somewhere).

To avoid this, I created two nodes. The first node (Node1) is populated by its Supply Function and holds the data (until it's changed / reloaded). The other node (Node2) is bound to the table and is filled initially with the content of Node1. Each time the filter functionality is called, I loop through the entries of Node1 and copy the suitable ones to Node2. This works so far, but I dislike this way, because I have to maintain two nodes.

It's not possible to reload the data from the backend before assigning the filter criteria to it (there's a lot of aggregation, that is done in the Supply Function - this would last too long).

Is there a better sloution?

Thanks in advance,

Waldemar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi:

try:

/people/peter.vignet/blog/2007/01/03/generic-web-dynpro-java-table-filter

regards