• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WOPopUpButton DirectActions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WOPopUpButton DirectActions


  • Subject: WOPopUpButton DirectActions
  • From: Awbrey Hughlett <email@hidden>
  • Date: Wed, 8 Oct 2008 18:12:05 -0500

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Question about search performance
  • Next by Date: Multiple instances and background batch threads.
  • Previous by thread: Fwd: upload via drag and drop
  • Next by thread: Multiple instances and background batch threads.
  • Index(es):
    • Date
    • Thread