Re: [Wonder-disc] WOForm, ERXWOForm and 'secure' binding : another unexpected behaviour
Re: [Wonder-disc] WOForm, ERXWOForm and 'secure' binding : another unexpected behaviour
- Subject: Re: [Wonder-disc] WOForm, ERXWOForm and 'secure' binding : another unexpected behaviour
- From: Serge Cohen <email@hidden>
- Date: Wed, 7 May 2008 00:50:00 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi again;
I've just found a bit of a (couple of) better fix :
either replace this line :
_secure = (WOAssociation) _associations.removeObjectForKey("secure2");
by :
_secure = super._secure;
Or (seems better to me ?) commenting out the instance variable
declaration of _secure (approx. line 68) as well as the line replaced
in the proposal above (hence ERXWOForm is indeed always using
super._secure instead of self._secure which is not defined anymore)...
I'll use that second solution for now, hoping that later version of WO/
Wonder will fix that.
Cheers;
Serge.
Le 7 mai 08 à 00:01, Serge Cohen a écrit :
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list;
Sometimes ago I had a problem with ERXWOForm and WebObject 5.4.1
producing explicit http (NON-https) when the current protocol was
https. This is now solved, thanks to Mike (I guess).
Now I have another "use-case" where I need to have a form with a
"https action" while the current page is http ... As far as I
understood, ERXWOForm as a binding called 'secure' which is just meant
for that. So I basically made sure my form is a ERXWOFrom and set the
binding :
secure = true
This has NO effect when the current protocol is 'http', and when
protocol is 'https', the URL of the action is complete whatever is the
binding value (be it there or not, be it true or false).
I've just added a few print statement in ERXWOForm, to realise that
whatever I do, "_secure" is set to "null"
I have then modified the line getting the binding value to change the
binding name to "secure2". Now line 102 of ERXWOForm.java reads :
_secure = (WOAssociation)
_associations.removeObjectForKey("secure2");
If I'm using new binding name (that is I use secure2 = true in my
*.wod file), I get the behaviour I expected first (that is : complete
action URL when the current protocol is http, and vice-versa :
complete URL if secure2=false and current protocol is https).
Now the thing I find suspicious is that if I make sure that the form
is using WOForm (adding ERXPatcher.setClassForName(WOForm.class,
"WOForm"); in Application.didFinishLaunching()) and I have the
'secure' binding this one is NOT in the generated HTML, but still has
no effect.
For my (very) limited understanding, it seems to me that WOForm is
capturing the association but does NOT use it, so when ERXWOForm is
trying to get the binding's value (after the call to super(...)
constructor) its getting an null value.
Is there a way for ERXWOForm to get the value already "parsed" by
WOForm constructor ? Or should I just stick to my current work-around
(using a different binding name)?
Thanks in advance for any advice !
Serge.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkgg1UUACgkQlz6UVQtc2ux6bwCfUn8UpBReK5dNvxNVKsv5t/R6
E8sAn1+rD8LkM1pyxiUculPYxLi2AtXF
=jnKv
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save
$100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Wonder-disc mailing list
email@hidden
https://lists.sourceforge.net/lists/listinfo/wonder-disc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkgg4JgACgkQlz6UVQtc2uz20gCfU4+nHvbNJrwBHKpEpULUR1SY
kWAAn0V7uI8ZiCeB26vj/QcY1jpfUR6E
=ZRxJ
-----END PGP 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