Re: Backtrack and re-submit WOSubmitButton behaviour
Re: Backtrack and re-submit WOSubmitButton behaviour
- Subject: Re: Backtrack and re-submit WOSubmitButton behaviour
- From: John Pollard <email@hidden>
- Date: Mon, 28 Sep 2009 17:20:31 +0100
And that fixed it, thanks George.
Just ensure a new instance of the page is created for the two stages,
don't return the same page instance.
On 28 Sep 2009, at 13:01, George Domurot wrote:
John, I think you're probably hunting in the wrong place. Your on-
screen controls work, if you click Edit Billing Details, you see
that the box was unchecked --- the value didn't change. If you then
uncheck and proceed forward, it works fine.
Is this a single component that you are updating state on to
determine which area to display? Or, are you actually returning a
new component with each button press? My guess is that this is
probably a component which you're updating its state to display with
conditionals. In this case, when you backtrack the state of your
component doesn't match the state of what the user sees. Any fields
that you edit do not save, not just your checkbox. When you click
the submit button to move forward, your clicking something that
actually doesn't exist within your page's state --- and you end up
simply getting a refresh to its current state.
You may want to consider creating a controller class that can be
handed off between pages, and actually creating a new page when
moving forward in your check-out, and passing this object forward
with each new page. This will allow you to keep your existing
layout with a few tweaks, and it will allow your users to backtrack,
change and re-submit correctly.
-George
On Sep 28, 2009, at 3:20 AM, John Pollard wrote:
It was suggested to me to check
WOApplication.setPageRefreshOnBacktrackEnabled() but that didn't
help unfortunately. The default for this setting is true and I
don't call it. Experimental setting of this flag made no
difference. Does the behaviour I describe sound weird, or is it
normal for WOCheckBox not to pass through their value when
unticked? I am using the "checked" binding only.
Thanks, John
On 25 Sep 2009, at 15:46, John Pollard wrote:
Hi List, I am struggling with a simple backtrack scenario with our
web-site shopping cart.
To observe the behaviour, please use this link to put a delightful
pair of gloves in the cart on our test server:
http://test.inrax.com/wa/4/43/4004/120494.html
then click CHECKOUT, enter some rubbish into the mandatory fields
and TICK THE "Deliver to an alternative address?" box, then click
NEXT STEP.
This takes you to the next checkout page where you can enter the
alternate delivery address.
Now you realise that you don't want a separate delivery address
after all, so you backtrack one page and untick the "Deliver to an
alternative address?" box and click NEXT STEP again.
This is where things go wrong and the behaviour depends on the
browser:
Safari on Leopard: the new toggle selection is completely ignored
and your second click on NEXT STEP does not result in my
submitDetails() method being called at all; this is the action
method on the NEXT STEP WOSubmitButton. Tellingly (I suspect), if
you do the opposite and initially do NOT tick the Alternate
Delivery Address toggle, but change your mind, backtrack and then
tick it, the submitDetails() is called and it works as expected.
IE8 on WinXP: When you try to backtrack, IE doesn't let you,
saying: Webpage has expired, Most likely cause: The local copy of
this webpage is out of date, and the website requires that you
download it again. etc. and if you opt to refresh it tells you not
to do so if you are buying something!
Firefox on Leopard: On clicking the backtrack button, you are told
Firefox must send info to repeat the action and clicking Resend
has the end result of leaving you where you are effectively
blocking the backtrack.
John
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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