On Nov 7, 2009, at 4:58 PM, Mark Wardle wrote:

Hi all. This may be a stupid question...

I've embedded a D2WQuery within a ListPage. It acts as a filter for
the list; in fact I use ERDQueryAnyKey exclusively to allow a
google-like search of the listed entities.  Thank you to all who
helped me make the mental leap to D2W - I don't think I'm quite there
*yet* - and getting me this far....

It's actually working quite well  BUT!

If I type text and click submit, then the list (displaygroup) is
filtered appropriately. However, the text is cleared from the
textfield. I wish to visually indicate that a filter is applied - I
assumed the text would remain within the textfield for the query, but
this is not the case.

I'm guessing when you reload your page, you're loading a fresh embedded query page which loads a fresh ERDQueryAnyKey which wipes out your entered value. ERDQueryAnyKey is not stateless so I think it should be storing the value.

In addition, every time I click submit, I get a wholly new page, even
though I've bound the action binding to a method that returns null.
Therefore, my list page "Back" button (Cancel) no longer returns to
the calling page but to the previous search.

What action binding? The one on the button? The one on the D2WQuery? What is your cancel button bound to?

As always, I'm in danger of being too specific and asking the wrong questions!

You'll need to be more specific (^_^)

1. Is there any way of getting a D2WQuery to maintain input state
after submission?

If you use the showListInSamePage, and set up a specific page configuration for this, it should work with no additional effort. No? You would just have your list embedded in your query instead of your query embedded in your list.

Anyway, it depends on how you bind it. If you store something in a component's local var, then you're subject to that var being wiped out with a reload. If you store the value in a place you can find it outside of the component (On the displayGroup or something) then you can reload it from that known place, even if your component is stateless. I think this is more of a WO question than a D2W one though.

2. Is it possible to pass the cancelAction to the *next* page, or
somehow keep the same list page instance?
3. Am I still making things overly complicated? Should I use an
aboveDisplayPropertyKey and use an embedded component there rather
than customising my list page?

Won't work without modification, because aboveDisplayPropertyKeys in ERNeu doesn't give you a displayGroup or dataSource binding to filter against. You only get your property keys and d2wContext there. Given what you want to do, I think I would still go with the filter field in the batch navigation bar rather than an entire embedded query page.

Many thanks,

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK

Attachment: 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 arch...@mail-archive.com

Reply via email to