Skip to Content
author's profile photo Former Member
Former Member

Values in the drop down box

Dear all,

I was trying to put the values in the dropdown box but facing problem..

Two error are coming:-

1. ArrayList cannot be resolved

2. the method add() is not suitable..

public void wdDoInit()

{

//@@begin wdDoInit()

String[] y =

new String[] {

"January",

"February",

"March",

"April",

"May",

"June",

"July",

"August",

"September",

"October",

"November",

"December",

};

<b>List x = new ArrayList();</b> for (int i = 0; i < y.length; ++i) {

Pls suggest.

Regds,

Anup. IPrivateSocreationappsView.IXElement month =

wdContext.createXElement();

month.setY(y<i>);

<b>x.addItem(month</b>);

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 06:01 AM

    Hi Anup,

    Instead of doing this, create one simple data type in local dictionary. Now, here, choose Enumeration tab and the give key and description values for all months.

    Now, assign this created simple type to your value attribute's type. Then bind this value attribute to your dropdownbykey ui element.

    Regards,

    Bhavik

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Anup,

      To populate values in dropdown coming from R3 follow as nibu is suggested. That is easy and simple way. But, if you have fix values for dropdown then better to use Dropdownbykey with simple type as i have suggested.

      Choice depends on your requirements.

      Regards,

      Bhavik

      Please award points if answer was helpful. 😉

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 05:00 AM

    Hi,

    Add the import statements

    import java.util.ArrayList;

    import java.util.List;

    Regards, Anilkumar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 12:06 PM

    Hi,

    Organize your imports ....ctrlshiftO. There are simplevalue services available where you can put the values for a modifiable type and map it to the drop down.

    That might be a better option

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.