SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 81 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

At the end of the request, Tapestry will wipe
clean the variables of the instance of any user-specific data.
This mechanism makes Tapestry very efficient. But we have to remember that even
if we think that we are dealing with the same page, in most cases the page will be
represented by a different instance (may be even coming from a completely different
server, in a clustered environment), and the next instance will have no idea of what
we have just told the previous instance. That is, unless we take special care and make
sure that the information is passed between instances properly.
What happened when we tried to pass a message to the Another page is that we
took an instance of it, and put our message into it. Then we told Tapestry to show
the Another page to this user. What Tapestry 5 does is that it tells the user's browser:
"Okay, thank you, I have successfully handled your submission; now go on and ask
me to show you Another page". When the browser requests for the Another page, it
takes a fresh instance of that page from the pool and uses it to produce the output.
Unfortunately, that fresh instance will know nothing about the message we wanted
to pass.
So how can we make our application work with all this instance pooling and
jiggling? Should there be a way to make Tapestry remember the information we have
put into the page, no matter which instance of that page is being used?
There are actually two approaches to this:
We can make a page field persistent.


Pages:
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
druga wojna światowa Free English grammar and study guid hotel jelenia góra Russian bride counter strike 1.6