Skip to Content
0
Former Member
Jan 21, 2008 at 10:10 AM

problem with implementing down drop list

18 Views

Hi expert,

I want to implement a down drop in my list for selection.

I have created a have simpleType, roType in component controller's context and at the same time a roSelected of type String. I have also map those to the attribute in the view controller's context.

I have retrieved the selection list from the Application Services and want to populate the down drop list for selected. Thus in my component controller, I have this:

/* component controller * /

public void wdDoInit() {

...

IContextElement contextElement = wdContext.currentContextElement();

ISimpleTypeModifiable roType = wdThis.wdGetAPI().getContext().getModifiableTypeOf("roType");

IModifiableSimpleValueSet<String> roValueSet = roType.getSVServices().getModifiableSimpleValueSet();

roValueSet.put("index_0", "name 1");

roValueSet.put("index_1", "name 2");

roValueSet.put("index_2", "name 3");

contextElement.setROType("name3");

}

I have also bind the onSelected in the ViewController to the attribute - roSelected.

i have also link all to callable object to GP.

// also with the following

public void execute (com.sap.caf.eu.gp.co.api.IGPExceutionContext executionContext) {

...

try {

this.executionContext = executionContext;

IGPStructure input = executionContext.getInputStructure();

contextElement.setAttributeValue("o_ro", input.getAttributeAsDate("I_RO");

..

}

..

}

However, my drop down didnt list those selected such as name1, name2, name3. Instead, it list, name3.

Can help?

Thank you.

I am currently using CE 7.1 SP3, web dynpro (for java) with integration with GP.

Edited by: aiwei on Jan 21, 2008 11:14 AM