-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Sometimes it would be usefull to have a scope "desktop" for spring-injection.
I want a shared controller for 2 windows (the 2nd win is detail)- so i can not use "prototype". It work's with "session", but this could be danger when the user is working with a multitab-browser. A scope "desktop" would be nice.
But i'm not a Spring expert. Maybe someone has an idea or some code...plz
/Robert
>> why is dangerous to use session in a multi-tab browser?
problem 1
the controller/composer holds references to gui-elements, the second tab will crash, because the gui-elements belong to another desktop
problem 2
- if you storing i.e. a header field like an order (A) in the session data and the user enter new positions.
- after a telephoncall the user open a new tab and do some work for another order - the session data hold's now another order (B)
- the user continues his work on tab1 and enter new positions on order A/B?
One part that make ZK easy is the scope desktop/page. No headache about threadsafe or not threadsafe controllers - you doing a webapplication but do not share i.e. a servlet for all users.
Of course it is not a problem to avoid the scope "session" with ZK. But a Springscope "desktop" would be a nice feature to share data,
/Robert
Asked: 2009-02-13 01:26:16 +0800
Seen: 574 times
Last updated: Feb 18 '09