simple question
simple question
- Subject: simple question
- From: Michael Engelhart <email@hidden>
- Date: Sun, 25 Sep 2005 09:12:05 -0500
Hi -
I'm sorry to bug everyone with this probably dumb question but I'm not
sure what I'm doing wrong. I have Tiger running with WO 5.3 and
XCode 2.1. I've tried deleting my build directory and rebuildilng
and running so I don't think the problem is a corrupted build
directory. I think I'm just forgetting some basic tenet of
WebObjects but I can't figure out what.
So, I create a new project with a single component called
CitySearchForm which is defined in code like this:
import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;
public class CitySearchForm extends WOComponent {
protected String queryString;
public CitySearchForm(WOContext context) {
super(context);
}
public String getQueryString() {
return queryString;
}
public void setQueryString(String newQueryString) {
queryString = newQueryString;
}
public WOComponent doCitySearch() {
System.out.println(queryString);
return null;
}
}
The .wod looks like this:
CITY_SEARCH_FORM: WOForm {
}
CITY_SEARCH_SUBMIT_BUTTON: WOSubmitButton {
action = doCitySearch;
}
QUERY_STRING_TEXT_FIELD: WOTextField {
value = queryString;
}
I then add this component to my Main.wo in WOBuilder using the add
Custom element menu selection. But now when I run the application I
get this error:
Error: com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException:
[ valueForKey()]: lookup of unknown key: 'queryString'. This
WOComponent does not have an instance variable of the name queryString
or _queryString, nor a method of the name queryString, _queryString,
getQueryString, or _getQueryString
Reason: [<com.webobjects.appserver.WOComponent name: CitySearchForm
subcomponents: null > valueForKey()]: lookup of unknown key:
'queryString'. This WOComponent does not have an instance variable of
the name queryString or _queryString, nor a method of the name
queryString, _queryString, getQueryString, or _getQueryString
Now I know I've been away from WO for a while but I know I've done
this before and it just worked out of the box. Did something change
in the 5.3 release or am I just forgetting some basic thing.
Thanks for any help.
Mike
_______________________________________________
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