• 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: [WO 5.2] Secure binding doesn't work on WOActiveImage inside WOForm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [WO 5.2] Secure binding doesn't work on WOActiveImage inside WOForm


  • Subject: Re: [WO 5.2] Secure binding doesn't work on WOActiveImage inside WOForm
  • From: Jonathan Rochkind <email@hidden>
  • Date: Tue, 18 Mar 2003 13:48:14 -0600

It's surprising to me that it worked in 5.1.

The way HTML works, a form has a single URL it is going to post to. Each submit button in it does not get it's own URL, each just causes the form---with a single URL---to submit.

So that's why WOSubmitButton doesn't have a secure binding. Recall that WOActiveImage will magically become either a submit button OR a hyperlink, depending on whether it's in a form or not--I'm betting that it only pays attention to the secure binding when it's a hyperlink.

But you'd expect a 'secure' binding on WOForm. You should file a bug report requesting such a binding. It ought to be there. (bugreport.apple.com -- you need a (free) ADC membership to log in).

Without it there... you can do your own hack to implement it. Bind the 'href' of the WOForm to your own method. Your own method can call context().componentActionURL() to get the URL that WO _would_ have put there for you, if you had left href unbound. Now you need to parse it yourself to replace the http:// with https://.

But that method will be called at the time the form is generated, and that URL will be assigned to the HTML form. How do you some different submit buttons in the form to use http, and others in the same form to use https? Well, if it was working before, maybe there's some mysterious way to do it I do not know. But the only way I know to do it is javascript---have client side javascript that gets executed when one (or more) of your buttons are clicked, and dynamically CHANGES the form post URL before the form is actually submitted. I've never done this, but it should be possible, if a pain.

--Jonathan

At 12:09 PM 3/18/2003 -0700, you wrote:
Thanks for the reply Steve.

Unfortunately WOImageButton doesn't have a secure binding for some reason,
so that's why I was using a WOActiveImage. I need to submit the form, so
that's why I can't use WOHyperlink. There's also no secure binding on
WOForm. But I'm using multiple submits where one button is secure, and the
rest are not secure. Worked fine in WO 5.1.

Thanks,

___________________________

Brendan Duddridge

ClickSpace Interactive Inc.
Calgary & Vancouver, Canada
(403) 277-5591
http://www.clickspace.com

> From: Steve Quirk <email@hidden>
> Date: Tue, 18 Mar 2003 13:24:06 -0500 (EST)
> To: Brendan Duddridge <email@hidden>
> Subject: Re: [WO 5.2] Secure binding doesn't work on WOActiveImage inside
> WOForm
>
> We do something similar to this with no problems (switching http/https
> depending on a system property).
>
> A couple of things could get you around whatever bug your afflicted with:
>
> - Apple recommends using WOImageButton instead of WOActiveImage inside
> a form. Try switching. I've experienced stange bugs with WOActiveImage
> (and have sworn them off - just use WOHyperlink-wrapped <img> tags).
> - if your form doesn't need multiple submit buttons, assuming that the
> form action is https you can use a static <input type="image"..> tag
> to cause the form submit.
> - if the "CheckoutActiveImage" doesn't require a form data to be submitted
> by all means switch to WOHyperlink.
>
> - steve
>
> On Tue, 18 Mar 2003, Brendan Duddridge wrote:
>
>> Hi,
>>
>> I have a WOForm with a WOActiveImage inside:
>>
>> CheckoutActiveImage: WOActiveImage {
>> action = checkout;
>> secure = goSecure;
>> src = "/ir/i/shop/but_checkout.gif";
>> }
>>
>>
>> goSecure is a method as follows:
>>
>> public Boolean goSecure() {
>> String secure = System.getProperty("DISGoSecure").trim();
>> if (secure != null && secure.equals("NO")) {
>> return new Boolean(false);
>> } else {
>> return new Boolean(true);
>> }
>> }
>>
>> I do it this way because in development I don't want the button to go to
>> https, but in production I do. So in my command line arguments in Java
>> Monitor, I set DISGoSecure to YES. That overrides what's in my Properties
>> file.
>>
>> This worked fine in WO 5.1. But it seems to be broken in WO 5.2.
>>
>> Has anyone else seen this problem? If so, how did you get around it if you
>> have?
>>
>> I tried changing it to a WOHyperlink around a WOImage and that sort of
>> worked, but there were two problems with it. First, it makes the url like
>> this: https://www.mystore.com:443/cgi-bin/WebObjects/ etc... Notice the port
>> number. For some reason Camino 0.7 doesn't generate my next page properly if
>> it has the port number in the URL. If I manually take out the port number,
>> Camino renders my next page correctly. It works fine in IE and Safari with
>> our without the 443 port number. Second, WOHyperlinks don't submit my form,
>> so I don't want to use that.
>>
>> I'm going to file a Radar bug for it with Apple.
>>
>> Thanks,
>>
>> ___________________________
>>
>> Brendan Duddridge


_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: WebObjects 5.2: Using Java 1.3.1 With Mac OS X After Java 1.4.1 Is Installed
  • Next by Date: SELECT DISTINCT with Display group
  • Previous by thread: WebObjects 5.2: Using Java 1.3.1 With Mac OS X After Java 1.4.1 Is Installed
  • Next by thread: SELECT DISTINCT with Display group
  • Index(es):
    • Date
    • Thread