After writing this, it occurred to me that you could also set up a wizard page 
and have the checkbox one step before the text field. It's not as Ajaxy, but 
should work (^_^)  Anyway, here's an explanation of that example copied from an 
earlier email

> 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.


Ramsey


On Feb 4, 2011, at 9:25 PM, David Holt wrote:

> Thanks Ramsey,
> 
> It'll take me awhile to figure out how you've done what you've done with 
> this. Looks very clever though!
> 
> Thanks,
> 
> David
> 
> 
> On 2011-02-04, at 10:05 AM, Ramsey Gurley wrote:
> 
>> Hi David,
>> 
>> I have an example of dependent popups here:
>> 
>> https://r2d2w.svn.sourceforge.net/svnroot/r2d2w/trunk/ERR2d2w/Support/AjaxLook.zip
>> 
>> I think the same approach should be applicable to what you are describing. 
>> The components to do this are now in wonder in the AjaxLook framework.
>> 
>> Ramsey
>> 
>> On Feb 4, 2011, at 10:35 AM, David Holt wrote:
>> 
>>> Hi all,
>>> 
>>> I have an entity edit page with editable fields. One of the fields is a 
>>> boolean that allows locking of another field to make it uneditable. For the 
>>> lockable attribute I need to change whether it is a display string 
>>> component or an edit string component that displays for that property based 
>>> on the isEditable boolean value. I can easily do this with a custom 
>>> component, but I was wondering if anyone knew of a better way to achieve 
>>> this either with rules or existing property level components in ERD2W?
>>> 
>>> Thanks,
>>> 
>>> David _______________________________________________
>>> 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/rgurley%40smarthealth.com
>>> 
>>> This email sent to [email protected]
>> 
> 
> _______________________________________________
> 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/ramseygurley%40gmail.com
> 
> This email sent to [email protected]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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