I think this may be the old directActionURLForActionNamed(...) bug. In your method that generates the URL, try this:

return directActionURLForActionNamed("MyAction", paramDict).replace("&", "&");

See if that does the trick.

--
Galen Rhodes
[EMAIL PROTECTED]


On Dec 18, 2007, at 5:39 PM, Edgar Klein wrote:

Hi,

On 18-Dec-07, at 11:41 AM, Edgar Klein wrote:

I was searching the internet but didn't find anything on this topic, however, I cannot imagine that no one ever tried to do s.th. similar.

I have to call an external URL from my application and I'd like to call it by clicking on a WOSubmitButton (reason: consistency of design b/c I already have other two submit buttons). How would I do that? Do I have to use java script, or is there an obvious and easy WebObjects solution for the problem?

in another thread Galon (thanx) gave a very similar example that I've been using to solve my own problem. My solution looks like:

<wo:AjaxSubmitButton value="$localizer.ShopLookAndFeelEditPage.PREVIEW" onClick="newWindowScript()"/>
<script>
        function newWindowScript() {
newWindow = window.open('<wo:string value="$previewURL" />', 'newWindow');
                newWindow.focus();
        }
</script>

Where $previewURL is a method in my java file returning a String containing the correct URL. Now, this almost seems to solve my problem b/c now I have the problem of the characters b/c the & will be interpreted and replaced as &amp; in the URL. This is quite bad b/ c my URL happens to be a DirectAction URL.

Do you have a solution for that problem? Any hints, tipps, or suggestions will be appreciated :)

Thanx,
Edgar

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/grhodes%40thissmallworld.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to