Hi all,

I've always thought that using caret notation was a good idea when creating reuseable components, but it only seems to work for me about half the time, so I'm not sure I fully understand it.

I have a component that has a textfield whose "default" binding should be inherited from it's parent component bindings:

<wo:textfield value = "$date" id = "$id" size="~format.length()" dateformat = "$format" default="^default"/>

This textfield is embedded within a component named TextFieldCalendar. Here's my usage of TextFieldCalendar in another component:

<wo:TextFieldCalendar date = "$maxBidClosingDate" default = "Bid Closing Before"/>

When I run the application, I get the following exception:

Jun 29 10:44:50 LDC[11001] (ERXNSLogLog4jBridge.java:41) WARN NSLog - <er.extensions.ERXDirectActionRequestHandler>: Exception while handling action named "advancedSearch" on action class "LDC" :com.webobjects.foundation.NSKeyValueCoding $UnknownKeyException: [<TextFieldCalendar name: TextFieldCalendar subcomponents: null > takeValueForKey()]: attempt to assign value to unknown key: 'default'. This WOComponent does not have an instance variable of the name default or _default, nor a method of the name setDefault or _setDefault [2007-06-29 10:44:50 EDT] <WorkerThread10> com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [<TextFieldCalendar name: TextFieldCalendar subcomponents: null > takeValueForKey()]: attempt to assign value to unknown key: 'default'. This WOComponent does not have an instance variable of the name default or _default, nor a method of the name setDefault or _setDefault at com.webobjects.appserver.WOComponent.handleTakeValueForUnboundKey (WOComponent.java:1580) at com.webobjects.foundation.NSKeyValueCoding $Utility.handleTakeValueForUnboundKey(NSKeyValueCoding.java:568) at com.webobjects.foundation.NSKeyValueCoding $_KeyBinding.setValueInObject(NSKeyValueCoding.java:925) at com.webobjects.foundation.NSKeyValueCoding $DefaultImplementation.takeValueForKey(NSKeyValueCoding.java:1293) at com.webobjects.appserver.WOComponent.takeValueForKey (WOComponent.java:1550)
...

I thought that the point of using caret notation was that you didn't have to declare a local variable called "default" in the reuseable component. Am I off track here? Has anyone else noticed this behavior?

Thanks,
Mark
 _______________________________________________
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