• 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
Re: Direct Action Multiple Parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Direct Action Multiple Parameters


  • Subject: Re: Direct Action Multiple Parameters
  • From: Janice Cheung <email@hidden>
  • Date: Wed, 02 Mar 2005 16:22:21 -0500

   Hi David,

   I was actually hoping to see how I could process all those parameters ..
   They are reading from an XSL file and retrieving XML data, so these
   multiple parameters cannot be hardcoded, as they oscillate between
   search requests.  How would I handle variable, multiple parameters?

    For example, in this particular instance, "formValues" include values
   x, y, Language, BatchSize, SessionId, and BatchIndex,  but another
   request will include x, y, Insurance, Lastname, Criteria, Specialty, and
   BatchIndex, BatchSize, and SessionId.

   I really appreciate your help.  Thanks very much!

   Best regards,
   Janice

David LeBer wrote:


On Mar 2, 2005, at 3:04 PM, Janice Cheung wrote:

     Hi David,

     I did come across your page when I was searching on Google.

     :).

Can I see some sample code to better understand how to implement this?


<snip>

My NSLog.out.appendln("request=" +request) statement shows that my request contains this:

formValues={SessionID = ("Q3ftncuOduDgpJtI7tA1q0"); x = ("9"); Language = ("Spanish"); y = ("7"); BatchSize = ("20"); BatchIndex = ("1"); }

How do I get them out for my Direct Action?


Is this what you are looking for?

public WOActionResults demoAction() {
WOComponent page = pageWithName("PageName");
String xValue = (String)this.request().formValueForKey("x");
String languageValue = (String)this.request().formValueForKey("Language");
String yValue = (String)this.request().formValueForKey("y");
String batchSizeValue = (String)this.request().formValueForKey("batchSize");
String batchIndexValue = (String)this.request().formValueForKey("batchIndex");
// Do something with all these values
return page;
}


;david

--
David LeBer
Codebase Software Systems
site:   http://www.codebase.ca
blog: http://david.codebase.ca

_______________________________________________
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


  • Follow-Ups:
    • Re: Direct Action Multiple Parameters
      • From: Colin Clark <email@hidden>
References: 
 >MySQL and BigDecimal rounding (From: David Griffith <email@hidden>)
 >Re: MySQL and BigDecimal rounding (From: Robert Walker <email@hidden>)
 >Direct Action Multiple Parameters (From: Janice Cheung <email@hidden>)
 >Re: Direct Action Multiple Parameters (From: David LeBer <email@hidden>)
 >Re: Direct Action Multiple Parameters (From: Janice Cheung <email@hidden>)
 >Re: Direct Action Multiple Parameters (From: David LeBer <email@hidden>)

  • Prev by Date: Re: Direct Action Multiple Parameters
  • Next by Date: Re: Direct Action Multiple Parameters
  • Previous by thread: Re: Direct Action Multiple Parameters
  • Next by thread: Re: Direct Action Multiple Parameters
  • Index(es):
    • Date
    • Thread