Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-20 Thread David E Jones


It's actually even easier than that... just do a client-side redirect  
after the request-event in order to render the view instead of  
returning the view immediately. This can be done with a handy response  
type supported by the ControlServlet (in the controller.xml file).  
There can be side-effects to this, so be sure to test...


You can use things to ID each rendered form and protect the  
submissions based on that, but it can be quite error-prone depending  
on how implemented, and for anything other than sensitive forms it is  
usually not necessary. However, we could certainly implement something  
like that, and using the form widget and the service event handler to  
help we could make it pretty generic (ie implement once and apply  
everywhere)... for FTL files and other event handlers it would require  
changes for each form to support it.


-David


On Jan 20, 2009, at 1:25 AM, Bilgin Ibryam wrote:


Here is a discussion for using Synchronizer token pattern to solve it:
http://ofbiz.markmail.org/search/?q=prevent+double 
+submit#query:prevent%20double%20submit+page:1+mid:6ydr3b2jhauda7pq+state:results


Bilgin
On Jan 20, 2009, at 9:03 AM, Adrian Crum wrote:

On the other hand, there are limitations to GET that will not work  
with most HTML forms - that's why POST is used instead.


-Adrian


--- On Mon, 1/19/09, Raj Saini  wrote:


From: Raj Saini 
Subject: Re: F5 ( refresh of browser ) causes another item to be  
added to the cart

To: user@ofbiz.apache.org
Date: Monday, January 19, 2009, 7:25 PM
In HTTP protocol GET method is considered idempotent that is
multiple
calls to the same resource should result in the same
result. In Contrast
POST method is no idempotent and therefore if a URL with
POST method is
refreshed browsers will through a warning message.

Therefore, we should use GET method for the safe operations
such as
fetching a list of records based on input parameters and
POST for
transaction which can change the state of application for
example
inserting a record in database.

Thanks,

Raj

Adrian Crum wrote:

Most browsers have a warning popup window that tells

the user that a screen refresh will result in reposting
data. Maybe you could supplement that with a similar warning
on the web page itself.


-Adrian


--- On Mon, 1/19/09, Rees Watkins

 wrote:




From: Rees Watkins 
Subject: Re: F5 ( refresh of browser ) causes

another item to be added to the cart

To: user@ofbiz.apache.org
Date: Monday, January 19, 2009, 11:13 AM
Hi

I have customised ofbiz for the travel industry. I

do not

hold any
product. All product sold is reserved and booked

on a 3rd

party site.
Generally cancellation has heavy penalties. In the

even a

customer buys
an additional item by mistake one of the parties

will lose

50 - 100% on
a refund. I would like to customise my ofbiz to

prevent

items been
added on refresh. Does anyone have any suggestion

or

comments on how
best to do this?

Thanks
Rees

















Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-20 Thread Bilgin Ibryam

Here is a discussion for using Synchronizer token pattern to solve it:
http://ofbiz.markmail.org/search/?q=prevent+double+submit#query:prevent 
%20double%20submit+page:1+mid:6ydr3b2jhauda7pq+state:results


Bilgin
On Jan 20, 2009, at 9:03 AM, Adrian Crum wrote:

On the other hand, there are limitations to GET that will not work  
with most HTML forms - that's why POST is used instead.


-Adrian


--- On Mon, 1/19/09, Raj Saini  wrote:


From: Raj Saini 
Subject: Re: F5 ( refresh of browser ) causes another item to be  
added to the cart

To: user@ofbiz.apache.org
Date: Monday, January 19, 2009, 7:25 PM
In HTTP protocol GET method is considered idempotent that is
multiple
calls to the same resource should result in the same
result. In Contrast
POST method is no idempotent and therefore if a URL with
POST method is
refreshed browsers will through a warning message.

Therefore, we should use GET method for the safe operations
such as
fetching a list of records based on input parameters and
POST for
transaction which can change the state of application for
example
inserting a record in database.

Thanks,

Raj

Adrian Crum wrote:

Most browsers have a warning popup window that tells

the user that a screen refresh will result in reposting
data. Maybe you could supplement that with a similar warning
on the web page itself.


-Adrian


--- On Mon, 1/19/09, Rees Watkins

 wrote:




From: Rees Watkins 
Subject: Re: F5 ( refresh of browser ) causes

another item to be added to the cart

To: user@ofbiz.apache.org
Date: Monday, January 19, 2009, 11:13 AM
Hi

I have customised ofbiz for the travel industry. I

do not

hold any
product. All product sold is reserved and booked

on a 3rd

party site.
Generally cancellation has heavy penalties. In the

even a

customer buys
an additional item by mistake one of the parties

will lose

50 - 100% on
a refund. I would like to customise my ofbiz to

prevent

items been
added on refresh. Does anyone have any suggestion

or

comments on how
best to do this?

Thanks
Rees















Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-20 Thread David E Jones


That interpretation of GET in the RFC may not be correct, and is  
certainly not used in practice. If it was then hitting a URL with GET  
would always result in the same response. That not true of any site  
with personalization, data shown from a session, date/time text on the  
page, even a hit counter. There just aren't very many HTTP resources  
in the world that would qualify for that interpretation. And if it  
means only server-side state and not what is returned then it is still  
rarely the case, even logging the request would violate that rule.


-David


On Jan 19, 2009, at 8:25 PM, Raj Saini wrote:

In HTTP protocol GET method is considered idempotent that is  
multiple calls to the same resource should result in the same  
result. In Contrast POST method is no idempotent and therefore if a  
URL with POST method is refreshed browsers will through a warning  
message.


Therefore, we should use GET method for the safe operations such as  
fetching a list of records based on input parameters and POST for  
transaction which can change the state of application for example  
inserting a record in database.


Thanks,

Raj

Adrian Crum wrote:
Most browsers have a warning popup window that tells the user that  
a screen refresh will result in reposting data. Maybe you could  
supplement that with a similar warning on the web page itself.


-Adrian


--- On Mon, 1/19/09, Rees Watkins  wrote:



From: Rees Watkins 
Subject: Re: F5 ( refresh of browser ) causes another item to be  
added to the cart

To: user@ofbiz.apache.org
Date: Monday, January 19, 2009, 11:13 AM
Hi

I have customised ofbiz for the travel industry. I do not
hold any
product. All product sold is reserved and booked on a 3rd
party site.
Generally cancellation has heavy penalties. In the even a
customer buys
an additional item by mistake one of the parties will lose
50 - 100% on
a refund. I would like to customise my ofbiz to prevent
items been
added on refresh. Does anyone have any suggestion or
comments on how
best to do this?

Thanks
Rees












Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-19 Thread Adrian Crum
On the other hand, there are limitations to GET that will not work with most 
HTML forms - that's why POST is used instead.

-Adrian


--- On Mon, 1/19/09, Raj Saini  wrote:

> From: Raj Saini 
> Subject: Re: F5 ( refresh of browser ) causes another item to be added to the 
> cart
> To: user@ofbiz.apache.org
> Date: Monday, January 19, 2009, 7:25 PM
> In HTTP protocol GET method is considered idempotent that is
> multiple 
> calls to the same resource should result in the same
> result. In Contrast 
> POST method is no idempotent and therefore if a URL with
> POST method is 
> refreshed browsers will through a warning message.
> 
> Therefore, we should use GET method for the safe operations
> such as 
> fetching a list of records based on input parameters and
> POST for 
> transaction which can change the state of application for
> example 
> inserting a record in database.
> 
> Thanks,
> 
> Raj
> 
> Adrian Crum wrote:
> > Most browsers have a warning popup window that tells
> the user that a screen refresh will result in reposting
> data. Maybe you could supplement that with a similar warning
> on the web page itself.
> >
> > -Adrian
> >
> >
> > --- On Mon, 1/19/09, Rees Watkins
>  wrote:
> >
> >   
> >> From: Rees Watkins 
> >> Subject: Re: F5 ( refresh of browser ) causes
> another item to be added to the cart
> >> To: user@ofbiz.apache.org
> >> Date: Monday, January 19, 2009, 11:13 AM
> >> Hi
> >>
> >> I have customised ofbiz for the travel industry. I
> do not
> >> hold any
> >> product. All product sold is reserved and booked
> on a 3rd
> >> party site.
> >> Generally cancellation has heavy penalties. In the
> even a
> >> customer buys
> >> an additional item by mistake one of the parties
> will lose
> >> 50 - 100% on
> >> a refund. I would like to customise my ofbiz to
> prevent
> >> items been
> >> added on refresh. Does anyone have any suggestion
> or
> >> comments on how
> >> best to do this?
> >>
> >> Thanks
> >> Rees
> >> 
> >
> >
> >   
> >
> >


  


Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-19 Thread Raj Saini
In HTTP protocol GET method is considered idempotent that is multiple 
calls to the same resource should result in the same result. In Contrast 
POST method is no idempotent and therefore if a URL with POST method is 
refreshed browsers will through a warning message.


Therefore, we should use GET method for the safe operations such as 
fetching a list of records based on input parameters and POST for 
transaction which can change the state of application for example 
inserting a record in database.


Thanks,

Raj

Adrian Crum wrote:

Most browsers have a warning popup window that tells the user that a screen 
refresh will result in reposting data. Maybe you could supplement that with a 
similar warning on the web page itself.

-Adrian


--- On Mon, 1/19/09, Rees Watkins  wrote:

  

From: Rees Watkins 
Subject: Re: F5 ( refresh of browser ) causes another item to be added to the 
cart
To: user@ofbiz.apache.org
Date: Monday, January 19, 2009, 11:13 AM
Hi

I have customised ofbiz for the travel industry. I do not
hold any
product. All product sold is reserved and booked on a 3rd
party site.
Generally cancellation has heavy penalties. In the even a
customer buys
an additional item by mistake one of the parties will lose
50 - 100% on
a refund. I would like to customise my ofbiz to prevent
items been
added on refresh. Does anyone have any suggestion or
comments on how
best to do this?

Thanks
Rees




  

  




Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-19 Thread Adrian Crum
Most browsers have a warning popup window that tells the user that a screen 
refresh will result in reposting data. Maybe you could supplement that with a 
similar warning on the web page itself.

-Adrian


--- On Mon, 1/19/09, Rees Watkins  wrote:

> From: Rees Watkins 
> Subject: Re: F5 ( refresh of browser ) causes another item to be added to the 
> cart
> To: user@ofbiz.apache.org
> Date: Monday, January 19, 2009, 11:13 AM
> Hi
> 
> I have customised ofbiz for the travel industry. I do not
> hold any
> product. All product sold is reserved and booked on a 3rd
> party site.
> Generally cancellation has heavy penalties. In the even a
> customer buys
> an additional item by mistake one of the parties will lose
> 50 - 100% on
> a refund. I would like to customise my ofbiz to prevent
> items been
> added on refresh. Does anyone have any suggestion or
> comments on how
> best to do this?
> 
> Thanks
> Rees


  


Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-19 Thread David E Jones

Just do a redirect after add to cart.


-David


On Jan 19, 2009, at 12:13, Rees Watkins  wrote:


Hi

I have customised ofbiz for the travel industry. I do not hold any
product. All product sold is reserved and booked on a 3rd party site.
Generally cancellation has heavy penalties. In the even a customer  
buys
an additional item by mistake one of the parties will lose 50 - 100%  
on

a refund. I would like to customise my ofbiz to prevent items been
added on refresh. Does anyone have any suggestion or comments on how
best to do this?

Thanks
Rees





Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-19 Thread Rees Watkins
Hi

I have customised ofbiz for the travel industry. I do not hold any
product. All product sold is reserved and booked on a 3rd party site.
Generally cancellation has heavy penalties. In the even a customer buys
an additional item by mistake one of the parties will lose 50 - 100% on
a refund. I would like to customise my ofbiz to prevent items been
added on refresh. Does anyone have any suggestion or comments on how
best to do this?

Thanks
Rees



  

Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-18 Thread Ashish Nagar
I too faced this thing.However i think it should be considered as an 
issue.As if due to some browser specific problem, if a customer tries to 
refresh the browser, unnecessary one extra item will be added to the 
cart.Let me know if i am thinking wrong.


Regards:
--
Ashish Nagar

Jacques Le Roux wrote:

Should this be really considered an issue ?

Jacques

From: "Rees Watkins" 
Hi

If I add an item to the shopping cart and then refresh the browser 
this causes the same item to be added to the cart again. I presume 
this is not correct. Is this a known issue?


Cheers
Rees








Re: F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-18 Thread Jacques Le Roux

Should this be really considered an issue ?

Jacques

From: "Rees Watkins" 
Hi

If I add an item to the shopping cart and then refresh the browser this causes the same item to be added to the cart again. I 
presume this is not correct. Is this a known issue?


Cheers
Rees






F5 ( refresh of browser ) causes another item to be added to the cart

2009-01-17 Thread Rees Watkins
Hi

If I add an item to the shopping cart and then refresh the browser this causes 
the same item to be added to the cart again. I presume this is not correct. Is 
this a known issue?

Cheers
Rees