-----Message d'origine-----
De : Stephan Windmüller [mailto:stephan.windmuel...@cs.tu-dortmund.de]
Envoyé : mercredi 22 juillet 2009 10:50
À : Tapestry users
Objet : Re: Passing data to the same page - Understanding 
PersistanceContext.FLASH

De Saint Steban Emmanuel wrote:

> PersistanceContext.FLASH is storing the object for only one time.
> The data will be deleted after the first access.

        Okay, but what is meant by "first access"? Even writing the data with a
        debug logger? Or after the onActivate-method is finished? Is there a way
        to keep the data in the page and pass it with the next request?

As says in the Tapestry documentation : 
http://tapestry.apache.org/tapestry5/guide/persist.html

flash strategy

The flash strategy stores information in the session as well, just for not very 
long. Values are stored into the session, but then deleted from the session as 
they are first used to restore a page's state.

The flash is typically used to store temporary messages that should only be 
displayed to the user once.

To keep data in the session just use @Persist by default is session persist. If 
you want to force session use @Persist("session")

> Use just @Persist (or if you want to access in all page of your
> application use @ApplicationState

This would break the use of multiple tabs, because I would only have one
store for many pages.

For one store for many page use @ApplicationState (it is store in the session) 
But you can use it in different page.

In each page, juste use

@ApplicationState
private type var;

Juste keep in mind that you can use a type only one time. Tapestry use the type 
to differences the different variable, not the name.

In exemple : You cant have to variable with the same type String. The two 
variable will be the same.

Emmanuel



Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra 
être recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos Origin group liability cannot be triggered 
for the message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to