In that case, yes.
Because wo will try to assign all the bindings :
<wo:TextFieldCalendar date = "$maxBidClosingDate" default = "Bid
Closing Before"/>
setDate(...);
setDefault(...); .... oops doesn't work !
So yes you do not want to sync the bindings if you can't do
'setDefault()'
But you could still sync the bindings, have an empty 'setDefault'
implementation. And the caret would work, it's equivalent to the
'super' prefix of java method call, but for bindings.
- jfv
Le 07-06-29 à 10:59, Steven Mark McCraw a écrit :
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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/
jean_francois_veillette%40yahoo.ca
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/
jean_francois_veillette%40yahoo.ca
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/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]