I want to pass values from a WOPopUpButton and a text field to a search page using a direct action. "Main" is the component holding the form whose bindings are: directActionName = "search", and actionClass = "DirectAction".

My direct action:
public WOActionResults searchAction() {
        NSDictionary searchDict = this.request().formValues();
        System.out.println(searchDict);
        System.out.println(this.request().formValueKeys());
ListingSearch searchPage = (ListingSearch)pageWithName ("ListingSearch");
        Basic aBasic = (Basic)this.request().formValueForKey("basicType");
String cityString = (String)this.request().formValueForKey ("cityString");
        searchPage.takeValueForKey(aBasic, "basicType");
        searchPage.takeValueForKey(cityString, "cityString");
        return searchPage;
}

My WOPopUpButton bindings:
BasicType : WOPopUpButton {
        list = allBasicTypes; (meathod returning NSArray)
        item = theBasic;
        value = theBasic;
        displayString = theBasic.listingType;
        selectedValue = aBasic;
        name = "basicType";
}

The declarations in Main.java:
public Basic theBasic;
public Basic aBasic;
private String cityString; (has getter/setter meathods)

I can make it work if I change everything to transfer a String value to the next page instead of a "Basic" object which is what I am attempting to accomplish here. When I want to transfer a String value, I just set the value binding to theBasic.listingType and change the search action to cast type strings. What I don't understand is how selectedValue is brought into everything. From what I have done, I bind it to a value, but the value always ends up null when I run the application. What do I bind selectedValue to and how do I use it in my searchAction?

Thanks,
Awbrey
 _______________________________________________
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]

Reply via email to