• 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
Bug in WOContext.directActionURLForActionNamed() when using query dictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in WOContext.directActionURLForActionNamed() when using query dictionary


  • Subject: Bug in WOContext.directActionURLForActionNamed() when using query dictionary
  • From: Nathan Hadfield <email@hidden>
  • Date: Wed, 26 Apr 2006 16:49:19 -0600

I seem to have encountered a bug in WOContext.directActionURLForActionNamed(). When I pass it a query dictionary containing more than one key, it returns a string in which the query arguments are separted by '&amp;' instead of just an ampersand. As a result, if I pass a query dictionary containing { arg1 = x; arg2 = y }, it returns a URL looking like this:

	/cgi-bin/WebObjects/AppName.woa/wa/MyActions/go?arg1=x&amp;arg2=y

whereas the correct URL would be

	/cgi-bin/WebObjects/AppName.woa/wa/MyActions/go?arg1=x&arg2=y

I have traced the problem down to a the private static method

com.webobjects.appserver._private.WOURLEncoder.encodeAsCGIFormValues ( NSDictionary dict )


which returns the encoded pairs joined by '&amp;'.

I'm using WO 5.3 with Xcode 2.2.1. I'm pretty sure this was working correctly in earlier versions. My workaround for now is to either replace occurrences of '&amp;' in the result with just '&'--but this would cause problems if there was a legitimate &amp; in one of the query values. Another option is include "amp;" as a prefix when retrieving form values in the direct action.

I have submitted a bug report to Apple but I'm curious whether anyone else has encountered this, or if anyone has a better workaround?

Thanks,
Nathan

_______________________________________________
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: Bug in WOContext.directActionURLForActionNamed() when using query dictionary
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Custom PopUp Problems
  • Next by Date: WebObjects on Rails
  • Previous by thread: Re: Reverse engineering Oracle DB in EOModeler
  • Next by thread: Re: Bug in WOContext.directActionURLForActionNamed() when using query dictionary
  • Index(es):
    • Date
    • Thread