Skip to Content
avatar image
Former Member

Issue in DropdownbyIndex

Hi all,

I want to delete the values inserted in the dropdownby index on selection of another dropdownby index UI.

Now I used the following code to delete the entries,

for(int i=0;i<wdContext.nodename().size();i++)

{

wdContext.nodename().removeElement(wdContext.nodename().getElementAt(i));

}

it deletes the entries in odd places only not in the even places. What should I do if I want to delete all the entries.

If any one knows, plz let me know.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 23, 2006 at 05:33 AM

    Hello krishnaveni

    First of all, when tryin to remove elements from a node, always run the <i>for</i> loop in decremental fashion, by that i mean run a <i>for</i> loop like this

    <i>for(int idx = (wdcontext.nodename().size - 1); i>= 0; i--)

    {

    ...

    }</i>

    and can i know the data binding of the dropdownby index UIs..whether its model attribute or value attribute..

    and I hope the code mentioned by you has been written in the <i>onActionSelect</i> method of one of the dropdownbyindex UI.

    Regards

    Kapil

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      Thanks for your quick response.

      As per your suggestion I solved the Issue, by decrementing the size. Issue solved

  • avatar image
    Former Member
    Sep 23, 2006 at 08:13 AM
    wdContext.node<Node>().bind((Collection)null);
    

    would also work.

    Armin

    Add comment
    10|10000 characters needed characters exceeded