Could someone help me decipher this?
Could someone help me decipher this?
- Subject: Could someone help me decipher this?
- From: Baiss Eric Magnusson <email@hidden>
- Date: Mon, 22 Aug 2005 10:20:30 -0700
I have some code:
In DirectAction
public WOActionResults changeRegionAction() {
Main main = (Main)pageWithName("Main");
main.changeCookie( cookie1, cookie2, cookie3 );
In Main
public void changeCookie( WOCookie cookie1, WOCookie cookie2,
WOCookie cookie3 ) {
System.out.println("changeCookie-> " + cookie1.toString());
curRegionName = (String)cookie1.valueForKey("region");
***************
The <println> yields:
changeCookie-> <com.webobjects.appserver.WOCookie name=region
value=Northwest path=/ domain=.nwDUP.org isSecure=false>
But an exception is thrown:
<DirectAction>: Exception in performActionNamed() on the action
"changeRegion" with the message:
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException:
<com.webobjects.appserver.WOCookie 0x507aaf> valueForKey(): lookup of
unknown key: 'region'.
Stack trace:
WOCookie.java 542 valueForKey com.webobjects.appserver
Main.java 116 changeCookie Main
DirectAction.java 57 changeRegionAction DirectAction
I stare at it, and I see the <name=region> in the output, and wonder
why it is not seeing that key?
----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
<http://www.CascadeWebDesign.com>
_______________________________________________
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