Re: Caret Notation
Re: Caret Notation
- Subject: Re: Caret Notation
- From: Chuck Hill <email@hidden>
- Date: Fri, 29 Jun 2007 09:41:45 -0700
Correct.
On Jun 29, 2007, at 7:59 AM, Steven Mark McCraw wrote:
So caret notation only works if you're not synchronizing bindings?
On Jun 29, 2007, at 10:54 AM, Jean-François Veillette wrote:
The component TextFieldCalendar should not synchronize it's bindings.
- jfv
Le 07-06-29 à 10:50, Steven Mark McCraw a écrit :
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@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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