On Mar 7, 2007, at 9:44 AM, Amedeo Mantica wrote:

Hello, I have got in trouble...

I have a page with a list of objects, (a WORepetition)...

I can click on an object and go into the page for edit the object. finished editing I click on sve and return to the listing page. All works fine.

The problem:

my listing page have an ordering theh can be by date, title, etc... when i enter in a object detail and return to main page I lost my ordering method previously choosen.

You might want to look at AjaxGrid in Wonder's Ajax framework. It is pretty cool, even if I did write it. It has complex sort orderings, drag and drop column re-ordering, selections that persist across batches, and the user's chosen configuration can be persisted to a string. But I digress....


I can pass the ordering method choosen to the detail page and then return back to the main page, but I think is not the better solution.

How are you returning to the listing page? If you are doing pageWithName(), then it is creating a new object. You probably want to add this to your editing page:

private WOComponent previousPage;

public MyEditingPage(WOContext context) {
    super(context);
    previousPage = context().page();
    ...
}


public WOComponent previousPage() {
    previousPage.ensureAwakeInContext(context());
    return previousPage;
}


Then in your save and cancel methods,

   ...
   return previousPage();
}


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to