Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2006 at 08:13 AM
    wdContext.node<Node>().bind((Collection)null);
    

    would also work.

    Armin

    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.