Hi,I tried to use AjaxSelectionList. Additional to the example in the AjaxExamples I like to add buttons to move elements up and down.
Moving up I realised in the following way:
"Move up" is bound to this method: int index = itemlist.indexOfObject(selectedItem); if (index > 0) { MyObject temp = itemlist.objectAtIndex(index-1); itemlist.removeObjectAtIndex(index-1); itemlist.insertObjectAtIndex(temp, index); selectedItem = itemlist.objectAtIndex(index-1); } return null;where itemlist is my NSArray of MyObjects and selectedItem is bound to the selection binding.
Selecting the last element and pressing the "Move up" button, the code is executed and the last element changes position with the element before. Works fine. Pressing the "Move up" button again does not work as expected unfortunately. It seems that in the JavaScript code the selection is still on the last item. So when the method is called for the next time, the selectedItem is no longer the item which was the selectedItem when the method was finished the last time.
Is there any way to synchronize the JS with the WO results? Regards, Helmut
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]