Re: AjaxSortableList question: Edit after reorder?
Re: AjaxSortableList question: Edit after reorder?
- Subject: Re: AjaxSortableList question: Edit after reorder?
- From: David LeBer <email@hidden>
- Date: Tue, 17 Jul 2012 16:04:17 -0400
If I understand correctly, the AjaxSortableList only communicates the changed indexes of the items, which are used to update the array on the server. However the list isn't refreshed (the move happens in the browser). Any links/buttons/actions etc embedded in the list items will still reference their previous position.
Wrap the list in an update container and update it with a call from the AjaxSortableList onUpdate.
onUpdate: "function(e) { setTimeout(function() {MyListUpdateContainerUpdate();}, 50);}";
// I found I needed a slight delay to get everything to work correctly.
D
--
David LeBer
Codeferous Software
On 2012-07-17, at 3:45 PM, James Cicenia wrote:
> Hello -
>
> I have an AjaxSortableList. After a user moves a row and then tries to edit it, it grabs the wrong item. Am I missing something obvious?
>
> Sortable: AjaxSortableList {
> list = theList;
> item = theItem;
> listItemIDKeyPath = "primaryKey";
> id = "list-container-id";
> listClass = "sortableList";
> listItemClass = "sortableListItem";
> ghosting = true;
> action = sortList;
> index = index;
> handle = "sub-col-item drag";
> }
>
> ModalWindowEdit: AjaxModalDialogOpener {
> dialogId = "ModalEditWindow";
> title = "Edit Skill Set";
> elementName = "a";
> label="Edit";
> action = giveItemToDialog;
> }
>
> public void giveItemToDialog(){
> itemToEdit = theItem;
> }
>
>
>
>
> _______________________________________________
> 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
_______________________________________________
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