Skip to Content
avatar image
Former Member

Lead selection issues with item box

Hi,

I have a requirement, where i am using two contextual panel UI element and inside the contextual area of both ,item list ui element is placed.

I have enabled the multiple selection for both item list box.If user selects multiple records say from item list box A and press a button then these selected values should be created in item list box B and at the very sametime it should be deleted from item list box A .

As of now what i did is .

i used get_element_count ,and looped that many times and inside the loop i am checking with is_selected method and if its true i am using get_attribute and the creating element in second node which is part of item list box B and setting the attribute and finally binding the context element to node.

The issue right now i am facing is,suppose i select 3 or any record from item list box A and press the button,its creating element in item list box B with the first element of item list box A.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 21, 2011 at 02:53 PM

    hi,

    i can not see how you programmed

    get_attribute and the creating element in second node which is part of item list box B and setting the attribute and finally binding the context element to node.

    I assume that the table is not sorted, sorted table loses the selection. There is SAP note about that.

    There is a method get_selected_elements in if_wd_context_node . You can use that to get the selected elements. See that in debug if it returns 3 elements.

    One you have the table from get_selected_elements , just bind that table (if the line types are same ) to the list box B context node.

    Loop through the node to remove the elements from node A.

    Add comment
    10|10000 characters needed characters exceeded