• 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: Passing URL parameters to component via direct action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing URL parameters to component via direct action


  • Subject: Re: Passing URL parameters to component via direct action
  • From: Ramsey Gurley <email@hidden>
  • Date: Mon, 11 Aug 2008 11:14:21 -0400

On Aug 11, 2008, at 8:29 AM, Lachlan Deck wrote:

On 11/08/2008, at 10:10 PM, John Pollard wrote:

I have a page containing a WOForm with some dynamically created WOPopUpButtons. The WOForm is set to submit a Direct Action request (using get as opposed to post).

The request received by the DA method contains information from a couple of hidden fields in the form which allows me to construct and configure the right page which is actually just a new instance of the same page.

Is there a really simple way to get the WOPopUpButton values from the request DA URL into the WOForm as if the WOForm had been submitted with those values as a component action?

public String getSomeSelectedValue()
{
if ( someSelectedValue == null )
someSelectedValue = context().request().stringFormValueForKey( "someSelectedValue" );
return someSelectedValue;
}


I tried calling takeValuesFromRequest(request(), context()) from my DA method but that produced a NPE. Perhaps this method can't work from a DA request/context?

What's the stack trace?

Obviously I can parse the DA request, dig out the WOPopUpButton selections and pass them to the page myself and set the popup selections, but it strikes me that there ought to be an easy way.

There's lots of ways to do things.

with regards,
--

Lachlan Deck

I'd just like to add that David LeBer has a *great* series of articles on direct actions. If you haven't seen them already, you can find them here:


http://davidleber.net/?cat=14

Reading his page really cleared up a lot of confusion for me and also clued me into some cool tricks like ?key bindings. He did a couple of podcasts demonstrating a few of those techniques as well.

http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=270165303

Ramsey

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Passing URL parameters to component via direct action (From: John Pollard <email@hidden>)
 >Re: Passing URL parameters to component via direct action (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: [OT] FrontBase problem when copying databases
  • Next by Date: Re: Passing URL parameters to component via direct action
  • Previous by thread: Re: Passing URL parameters to component via direct action
  • Next by thread: Re: Passing URL parameters to component via direct action
  • Index(es):
    • Date
    • Thread