cancel
Showing results for 
Search instead for 
Did you mean: 

Create and delete value list dynamically.

Former Member
0 Kudos

Hello,

I have some questions about dynamic creation of the value lists for InputFields. Maybe some words about it: i have a table which has got 2 columns, 1. column is the name and the 2. is the value InputField. The Value List of the InputField depends upon the name (upon the selected cell, so i generate InputField in onLeadSelect-handler).

The point is, that there are some InputFields, which don't need to have a value list. How can i delete ValueList after i have generated it once?

The second question: how can i manipulate the ValueSet-Window? I mean to change the size of the columns.

here is some code:

<i>// get access to value list

ISimpleTypeModifiable optionType = wdThis.wdGetAPI().getContext().getModifiableTypeOf(nodePath);

IModifiableSimpleValueSet optionValueList = optionType.getSVServices().getModifiableSimpleValueSet();

if(type.equals("boolean")) {

optionValueList.put("")

}

....

....some other types

....

else if(type.equals("string")) {

// how can i delete value set? i don't want that an empty value set window appears!

}</i>

Thanks for your answers!

With best regards

Belenki Michael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Michael,

> The point is, that there are some InputFields, which

> don't need to have a value list. How can i delete

> ValueList after i have generated it once?

optionType.setSVServices(null);

>

> The second question: how can i manipulate the

> ValueSet-Window? I mean to change the size of the

> columns.

This is not possible AFAIK, there seems to be a fixed width in pixels. Since the dialog is automatically build for you by the WD runtime, no chance.

Hope that helps.

Best regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Thank you very much for your answer.

But now i have one more question:-)

Once i have set optionType.setSVServices(null);, i don't know how to generate SVServices for optionType (i need it if other option will be selected). I have not found any api documentation on such packahgs as com.sap.typeservices, or com.sap.dictionary.runtime.*..

With best regards

Michael Belenki

Former Member
0 Kudos

Hi Michael,

oops, i see. I was a little bit too straightforward there

Please use

optionType.getSVServices().getModifiableSimpleValueSet().clear()

for removing the value help if not used. This has the same effect (removing the valuehelp button). But you can "readd" entries after this

Sorry and best regards

Stefan

former_member374
Active Contributor
0 Kudos

Hi Michael,

You are thanking a poster for his answer.

Please next time also give him points.

See: /people/mark.finnern/blog/2004/08/10/spread-the-love

This time I did it for you.

Remember: When you ask a question you also assume the responsibility to assign points.

Please check your other questions and if the answers were good.

Spread the love and give some points.

Thanks in advance, Mark.

Answers (0)