As far as interceptors look at the docs/source code. If your writing
your own interceptor then you can control when it is executed.
So here is a scenario for you. Two users are working on the same
account. User 1 updates the address. Now user 2 updates the address.
Since you are not re-fetching the data from the database, user 1 will
not know of the change. Even if he/she refreshes the page.
Mansour wrote:
Adam Ruggles wrote:
The problem with the store in session solution is what if two people
are working on the same account at the same time?
Hummm,
Good point. But wait ! what's wrong with this ? they don't have access
to each other sessions. May be store it in the request ?
Now how do I get a variable from the page and store it in the request
or session through an interceptor.
example:
public String intercept(ActionInvocation invocation) throws Exception {
//I need to get some variable from the page called account that
holds an object of Account
AccountAction action = (AccountAction)invocation.getAction();
action.setAccount( theAccountFromThePage);
return "beer";
}
And how do I know if the Interceptor being processed before of after
the action ?
Mansour wrote:
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
I see what you mean now. and after I call update,
then I have to populate it again to redisplay the modified
account. There's now not to re-select form the DB.
Unless it's stored in session or the form contained
all the data you needed to re-display I don't see how
reloading the bean could be avoided.
Perfect, now we are talking. So, I can store the Account obj in a
request or session.
What I am going to do, write an interceptor to set the account in
the request, and I think this should do it.
right ?
Can I push it into the stack ? Is there away ?
d.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]