Andreas Bulling wrote:
Hi Ron,

thanks for your answer!

| I don't fully understand what your ICallback does and where in the work | flow it is activated -

Well, actually as a first version I just took the one from the vlib example...
When the user has been idle for some period of time the login page is shown
again and he is able to re-login. After that the page he had visited
before the session became invalid is shown. But this only works for pages
where no database record has to be read in pageBeginRender() because the
database id (which is normally passed for example as a parameter with a
DirectLink) is unknown and an exception is thrown :(

IMO this design can be improved: Try changing to external page instead of direct link. then use a callback for the external page. The external parameters should contain the "state" - thus the id of the db object you need. creating the callback may be tricky: for that I use callbacks which throw RedirectException to a given URL -

| My solution is to design pages that always work, thus, keep the minimum | necessary in the Visit (eg current logged in user-id) - the rest on the | client -

And in your page classes (probably in a page superclass) you reload the
user object from the id every time a page gets loaded?

yes - if this causes performance problems one can save the whole User object in the session - but I preffer letting hibernate / ehcache do its own the performance optimisation (if needed) and keep the session (Visit?) small...


Sincerly,
  Andreas

---------------------------------------------------------------------
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]

Reply via email to