cancel
Showing results for 
Search instead for 
Did you mean: 

Filter with DropDownList

Former Member
0 Kudos

hi experts,

is there a way to filter a column with a dropdownlist in the filter row instead of an input field ?

if it's possible how can i do that ?

Regards,

FM

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Frantz,

So, but where is the problem? Load all initial data to dedicated context node, copy all data to datasource node, bind context attribute to filter condition value, define action handler for onFilter event from table, in onFilter action handler delete all elements from datasource node, iterate through initial data node, filter elements (using lead selection of subnode bound to DropDownByIndex or just by attribute value in case of DropDownByValue) and add copy elements from initial data node which match fileter criteria to datasource node of table.

best regards, Maksim Rashchynski.

Former Member
0 Kudos

thank you for your answer,

but the filtervalue of a column is a string attribute and cannot be a node composed of some attribute so ...?

(with a dropdown with multiple selection)

And i don't know how to specify that a column have a dropdownlist instead of an input field in the filter row ...

(cause it's automatic when you fullfill the filtervalue of a column)

Former Member
0 Kudos

Frantz,

<i>but the filtervalue of a column is a string attribute and cannot be a node composed of some attribute so ...?</i>

Yes, InputField is the only possible option for "filter" control. There is no way to change this.

<i>(with a dropdown with multiple selection)</i>

DropDownBy(Key|Index) never has an option for multi-select. Be it either table filter or regular editor.

<i>And i don't know how to specify that a column have a dropdownlist instead of an input field in the filter row ...</i>

No way. The only option is to abandon built-in table filter. Use own "regular" controls + "Filter" button/link2action atop of table.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

ok thank you so much for your answer

Regards,

FM

Former Member
0 Kudos

Hi:

try:

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

regards

Former Member
0 Kudos

Peter,

Your blog is an excellent implementation, though I dislike your procedural programming style. But how it correlates with question in this thread? Does it shows how to use DropDown as filtering control instead of InputField?

Or you just advertise your post via adding message to all WD threads with words <b>Table</b> and <b>Filter</b>???

VS

Answers (1)

Answers (1)

Former Member
0 Kudos

I just found this old thread when searching on the same thing.

The solution is in the new version NW CE

http://help.sap.com/saphelp_nwce711/helpdata/en/44/e19921d5c12951e10000000a11466f/content.htm

Use this on the filter node attribute.

IProposalList proposalsCity = wdContext.nodeMyNode().getNodeInfo().getAttribute(IPrivateMyView.IMyNodeElement.CITY).getModifiableSimpleType().getSVServices().getProposals();
   proposalsCity.add("New York");