Skip to Content
author's profile photo
Former Member

Create and delete value list dynamically.

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Posted on Aug 06, 2004 at 11:12 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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.