Re: Strange behaviour of AjaxSortableList
Re: Strange behaviour of AjaxSortableList
- Subject: Re: Strange behaviour of AjaxSortableList
- From: "Daniele Corti" <email@hidden>
- Date: Tue, 15 Apr 2008 12:13:49 +0200
2008/4/15 Helmut Schottmüller <
email@hidden>:
Hi Daniele,
Am 15.04.2008 um 11:53 schrieb Daniele Corti:
Just to know, if you remove the "xyzUpdate()" function at the onUpdate event what happen?
everything works as suspected.
The problem is, I need the update of the AjaxSortableList because I have the following configuration:
My Listelements are WOComponents which contain a name and an AjaxUpdateLink which deletes the list entry from the list.
Without calling the update of the enclosing update container the following happens:
Assume I have a list with the following elements
name="Entry A", id = 1
name="Entry B", id = 2
name="Entry C", id = 3
name="Entry D", id = 4
Each element has a AjaxUpdateLink which calls the enclosing update container.
When I move "Entry D" to the top, everything works as suspected. I have an action binding which says that the new order of the list is now:
name="Entry D", id = 4
name="Entry A", id = 1
name="Entry B", id = 2
name="Entry C", id = 3
But when I click on the ajax update link of "Entry D" to delete this list element, the element "Entry C" will be deleted instead because it seems that the _javascript_ of the AjaxSortableList did not realise that the index positions have been changed. The click on "Entry D" still returns the list index 3 which was the previous index of "Entry D" but it's not the actual index.
That's the reason why I tried to call the update function of the enclosing update container to force the AjaxSortableList via Ajax to choose the correct index values.
And that's where the strange behaviour starts.
When I am using the update function, I can instantly click on the AjaxUpdateLink on "Entry D" and "Entry D" will be deleted. But the drag & drop is somehow disturbed.
Well, I think you should consider a way different of Sortablelist to reorder the list... try something like arrow up and down and textfield with the order (in Joomla Style if you know it).
Or you can do two pages, one for reorder and one for delete add modify
Regards,
Helmut
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Daniele Corti
AIM: S0CR4TE5
Messenger:
email@hidden
--
Computers are like air conditioners -- they stop working properly if you open
WINDOWS
--
What about the four lusers of the apocalypse? I nominate:
"advertising", "can't log in", "power switch" and "what backup?"
--Alistair Young
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden