cancel
Showing results for 
Search instead for 
Did you mean: 

Combobox in a table doesn't display values.

former_member186148
Active Participant
0 Kudos

Hello SDN!

I've got a table with data (called it data table). For some of columns I need to create filter which allow users to select filter values from combobox.

For my task I 've created a table with two columns. In first column there is a name of column of data table and in second column there is a combobox with unique values of data table's column. In other words, I need to get somethis like this:

Field A -> {valueA1, valueA2, valueA3}

Field B -> {valueB1, valueB2, valueB3, valueB4}

etc

As you can see there are different values in each row.

Also I've created node with following structure:

FilterNode

......+FilterValues

...........- id

...........- text

...- field

"field" contains column name of data table

"id" contains a value of "field" colulmn

"text" contains text representation of "id"

FilterValues is non-singletone node with cardinality 0...n

Here is a code filled filter node:

	IPrivateScreen1.IFilterNodeNode nodeFilter = wdContext.nodeFilterNode();
	nodeFilter.invalidate();
    for(Iterator it = filters.fieldsIterator(); it.hasNext();){
    	String field = (String) it.next();
		IPrivateScreen1.IFilterNodeElement elemFilter = nodeFilter.createFilterNodeElement();
		elemFilter.setField(field);
		nodeFilter.addElement(elemFilter);
		IPrivateScreen1.IFilterValuesNode nodeFV = elemFilter.nodeFilterValues();
		for(Iterator iv = filters.valuesIterator(field); iv.hasNext();){
			IPrivateScreen1.IFilterValuesElement elemFV = nodeFV.createFilterValuesElement();
			String id = (String)iv.next();
			elemFV.setId( id );
			elemFV.setText( id );
			nodeFV.addElement(elemFV);
		}
		
    }

All "for" loops executed normally. But there are no values in comboboxes...

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member214651
Active Contributor
0 Kudos

Hi,

In this line, u are invalidating before u loop and hence u will not have any values:

IPrivateScreen1.IFilterNodeNode nodeFilter = wdContext.nodeFilterNode();

nodeFilter.invalidate();

remove the invalidate statement or put it at the end.

Regards,

Poojith MV

former_member186148
Active Participant
0 Kudos

Hi!

Unfortunatelly neither removing this line nor put it to the end give no result...

Regards, Lev

Former Member
0 Kudos

Hi,

Please add this line of code after your for loop,

nodeFilter.invalidate();

Regards,

Kishan