WOPopUpButton returns null
WOPopUpButton returns null
- Subject: WOPopUpButton returns null
- From: Drew Thoeni <email@hidden>
- Date: Mon, 19 Jan 2004 11:12:20 -0500
I hate to post such a basic question, but as a newbie I have not been
able to get a WOPopUpButton to work. I've spent several hours reading
and trying apparently every combination but the one that works. Help if
you can and thanks in advance.
The scene;
Address.java contains a field "state"
State.java is a class that contains fields: stateAbbreviation and
stateName. State.java is initialized at the application level (since it
does not change and may be accessed by all users). Here's the code:
public class Application extends WOApplication {
protected NSArray stateCodeList = new NSArray();
protected StateCode aStateCode = new StateCode();
<snip>
public static void main(String argv[]) {
WOApplication.main(argv, Application.class);
}
public Application() {
super();
setPageRefreshOnBacktrackEnabled(true);
// fetch State Code table
fetchSpec =
EOFetchSpecification.fetchSpecificationNamed("FetchIsLegalStateCodeList"
, "StateCode");
stateCodeList =
sharedEc.objectsWithFetchSpecification(fetchSpec);
}
public WOResponse handleSessionRestorationErrorInContext(WOContext
context) {
SessionTimeOut errorPage = (SessionTimeOut)
pageWithName("SessionTimeOut", context);
return errorPage.generateResponse();
}
}
In WOBuilder I have these set:
displayString: application.aStateCode.stateName
item: application.aStateCode
list: application.stateCodeList
selection: newAddress.state
If I replace the WOPopUpButton with a WOTextField and type a value into
the WOTextField bound to newAddress.state (say "FL"), it works fine.
Using the WOPopUpButton, however, I get "The state property of Address
is not allowed to be null."
I'm sure I'm missing something obvious... just not to me.
Regards,
Drew
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.