Re: AjaxSortableList goes bad on second row movement.
Re: AjaxSortableList goes bad on second row movement.
- Subject: Re: AjaxSortableList goes bad on second row movement.
- From: Lon Varscsak <email@hidden>
- Date: Wed, 06 Jun 2012 09:32:06 -0700
listItemIDKeyPath should be a key path to a unique id that represents
the object.
-Lon
On Wed, Jun 6, 2012 at 6:16 AM, James Cicenia <email@hidden> wrote:
> Hello-
>
> My list works great on the first use. Move a row. Perfect.
> However, when you move a second row, the saved sort goes all fubar'd.
>
> I have a basic setup and my action code is as follows:
>
> public WOActionResults sortList(){
> for(int i=0;i<theList.count();i++){
> EOEnterpriseObject object = (EOEnterpriseObject) theList.objectAtIndex(i);
> object.takeValueForKey(new Integer( i+1), "sequenceOrder");
> }
> ec().saveChanges();
> return null;
> }
>
> My Bindings:
>
> Sortable: AjaxSortableList {
> list = theList;
> item = theItem;
> listItemIDKeyPath = "sequenceOrder";
> id = "list-container-id";
> listClass = "sortableList";
> listItemClass = "sortableListItem";
> ghosting = true;
> action = sortList;
> index = index;
> handle = "sub-col-item drag";
> }
>
> Does this all look correct, wrong, or I should be looking somewhere else for
> my issue?
>
> Thanks
> James
>
> _______________________________________________
> 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