Re: D2W Query Pages w/ Ajax
Re: D2W Query Pages w/ Ajax
- Subject: Re: D2W Query Pages w/ Ajax
- From: Ramsey Lee Gurley <email@hidden>
- Date: Sun, 28 Nov 2010 10:06:17 -0500
Re Usage:
The AjaxNotifcationCenter must come before any of the observed fields. In the example, I use the aboveDisplayPropertyKeys repetition to enforce that, but it could just as easily exist in displayPropertyKeys, as long as it is first. The observers register their generated id with the notification center, so it has to exist on the page first.
Notification objects are the d2wContext, so each nested page has its own ANC. The observers are just an Ajaxed D2WCustomComponent. So each dependent field needs a couple of rules like:
int: qual => componentName = AjaxObservingSwitch
int: qual => customComponentName = OriginalComponentName
When properties change, they fire a notification and refresh the ANC. The ANC receives the notification and passes the current D2WContext to the propertyChangedDelegate object from the rule system. That tells the delegate which property changed (propertyKey) and the delegate then passes back an NSArray of propertyKeys that require a refresh.
Re ERModern:
I did the example in an ERNeutral project for kicks (^_^) But I also wanted to demonstrate the components can be used in any D2W look and work just the same. That includes ERModern. If added to Wonder, I think it would probably be best to put it in the AjaxLook framework. That way, anyone can use it, whether they choose Modern, Neutral, Diva, etc.
Ramsey
On Nov 28, 2010, at 9:07 AM, David Avendasora wrote:
> Hi Ramsey!
>
> Wow. Early on a holiday weekend sunday morning and I get an answer. Awesome! It may take me a while to wrap my head around it, though.
>
> Have you considered adding this to ERModern? It seems like an excellent extension to it since ERModern already has a lot of Ajaxy goodness.
>
> Dave
>
> On Nov 28, 2010, at 8:30 AM, Ramsey Lee Gurley wrote:
>
>>
>> On Nov 28, 2010, at 8:07 AM, David Avendasora wrote:
>>
>>> Hi all,
>>>
>>> On my the D2W query page for one of my entities, I have several popups for searching on toOne relationships. There's a few whose possible values are dependent upon the values selected for other relationship popups.
>>>
>>> Is there a D2W-way to have the dependent popups update when the depended-upon popups change?
>>>
>>> If not, is it best to just create a custom query page in this instance?
>>>
>>> Dave
>>
>> I have a Ajax dependent popups example here:
>>
>> https://r2d2w.svn.sourceforge.net/svnroot/r2d2w/trunk/ERR2d2w/Support/AjaxLook.zip
>>
>> Using those components, you can add dependent popups without touching page templates at all. The example uses an edit page instead of a query page, but the principal is the same.
>>
>> Ramsey
>
_______________________________________________
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