Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Component Actions: & encoding bug



Hi,

I was just recently bitten by WOContext's directActionURLForActionNamed bug:  The key/value pairs generated by this method are joined by & instead of just &. Obviously, that was a simple bug to work around (just replace & with & as Jeff Schmitz suggested).

But, now for a tougher problem.

I have a component based hyperlink action - but, if the session has timed out I want to keep some state on the URL so I added the state into the WOHyperlink bindings in the same fashion as a direct action:

ProfileHyperlink: WOHyperlink {
action = "">
?pageNumber = currentPage;
?wasLoggedIn = "y";
?wosid = wosid;
}

Guess what it does? It encodes the & as &

When you mouse over the hyperlink it looks like this:
If this image is stripped out by the discussion list then you can find the screen shot here:

And the underlying HREF URL, generated by WebObjects, looks like this:
/cgi-bin/WebObjects/MyWOApp.woa/wo/1dRbs2gZTtHj8lXzV8m3pg/0.5.3.0.0.1?pageNumber=5&wosid=1dRbs2gZTtHj8lXzV8m3pg&wasLoggedIn=y


Does anyone know a workaround for putting state on the URL when dealing with component based actions so that the ampersands aren't encoded?

- Joe

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.