• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [D2W] Conditionally changing property level components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [D2W] Conditionally changing property level components


  • Subject: Re: [D2W] Conditionally changing property level components
  • From: Mike Gee <email@hidden>
  • Date: Sat, 26 Feb 2011 16:39:03 -0700

Solution works well in practice too!!!

I was using the files from the zip but will now use the (updated) framework. Now that the update and refresh are working I am moving on to figuring out how to prevent the user from editing the updated value once set.

Thanks again.

Mike


On 2011-02-26, at 3:41 PM, Ramsey Gurley wrote:

>
> On Feb 26, 2011, at 3:25 PM, Mike Gee wrote:
>
>> Thanks for the components, Ramsey!
>>
>> Is there an easy way to drop the AjaxNotificationCenter onto an ERMODWizardCreationPage without subclassing it (adding aboveDisplayPropertyKeys). Or would having AjaxNotificationCenter extend ERDCustomEditComponent be the better way to go and include in displayPropertyKeys? I am looking to have a selection from a popup (ERD2WEditToOneRelationship) set some text field values. Using the delegate pattern from your example I know my attributes are getting set but so far haven't been able to get the AjaxNotificationCenter on the page.
>>
>> Thanks
>>
>> Mike
>
> Are you using the ones in the zip file or the ones in the AjaxLook framework?  I would have thought that the following methods would have handled the object and key bindings for a displayPropertyKeys repetitions... Perhaps that solution works better in theory than practice... (^_^)
>
> 	/**
> 	 * Since this component uses synchronization to update observers when the
> 	 * d2wContext changes, it cannot be non-synchronizing. However, if we want
> 	 * to be able to drop this component anywhere, it needs to be able to
> 	 * accept any binding value. So this method simply returns value for key
> 	 * from the dynamicBindings dictionary.
> 	 */
> 	public Object handleQueryWithUnboundKey(String key) {
> 		if(log.isDebugEnabled()) {
> 			log.debug("Handling unbound key: " + key);
> 		}
> 		return dynamicBindings().objectForKey(key);
> 	}
>
> 	/**
> 	 * Since this component uses synchronization to update observers when the
> 	 * d2wContext changes, it cannot be non-synchronizing. However, if we want
> 	 * to be able to drop this component anywhere, it needs to be able to
> 	 * accept any binding value. So this method simply adds value for key
> 	 * to the dynamicBindings dictionary.
> 	 */
> 	@SuppressWarnings("unchecked")
> 	public void handleTakeValueForUnboundKey(Object value, String key) {
> 		if(log.isDebugEnabled()) {
> 			log.debug("Take value: " + value + " for unbound key: " + key);
> 		}
> 		dynamicBindings().setObjectForKey(value, key);
> 	}
>
> 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

References: 
 >Re: [D2W] Conditionally changing property level components (From: Mike Gee <email@hidden>)
 >Re: [D2W] Conditionally changing property level components (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: install with embedded frameworks
  • Next by Date: Re: _rewriteURL not firing
  • Previous by thread: Re: [D2W] Conditionally changing property level components
  • Next by thread: inner join query help
  • Index(es):
    • Date
    • Thread