struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V. Cekvenich" <>
Subject Re: Session bean behavior when user creates new browser window......
Date Tue, 01 Apr 2003 02:10:03 GMT
In event driven programing the user is in charge of program flow.
As opposed to procedural programing where programmer is in charge (In 
COBOL you had menu choice 1-5).
So you have to check.
You have to consider most contingencies.

A good practice is to on any submit. (keep the session small 

If the bean saves, good!, continue.
If the bean does not save because xhyz is missing, or wrong step, then 
you forward user to the appropriate place.

See how action/controller comes in handy?

It is a bad practice to have several steps and save at the "end" of 
*YOUR* idea of the flow.
Each "step" is an individual event/submit that should be each processed 

In your case, you have "dirty" data, and you have to decide is this OK 
to save. (If you do not know about dirty writes issues, then you should 
just save based on primary key, and save the dirty data). If this is a 
problem, you have to make a longer where clause based on your bus. reqs.
Then fail the save, and handle in controler.



Al Willingham wrote:
> Suppose a user chooses to create a new browser window during a session
> with a session bean, submits the data in the new window, then goes back
> to the old and submits the old data that has not been refreshed. Is this
> one of those things that the user gets what they deserve for being so
> brain dead, or is there some check that I can perform to prevent this?
> Thanks
> Al

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message