Thanks Christophe.
I'll try this,
It would be nice if Tapestry could do this automatically.
Julien.
Cordenier Christophe a écrit :
I think you must manage the non-XHR state by yourself, and for exemple use a
delegate component in your zone to display the block if Ajax is not supported
by the browser. Hope this helps !
Christophe.
-----Message d'origine-----
De : Julien [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 20 juin 2008 11:19
À : Tapestry users
Objet : Re: [T5] ajax graceful degradation
Hello,
By returning null, the same page is reloaded.
But the content of my zone should be updated, replaced by the content of
the block component.
Julien
Cordenier Christophe a écrit :
Hello,
Change your method to "public Object onActionFromModifyDisplay()" and return a
Page instance or whatever redirect the user to a page instead of Block.
Christophe.
-----Message d'origine-----
De : Julien [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 20 juin 2008 10:47
À : Tapestry users
Objet : [T5] ajax graceful degradation
Hi,
I've used the zone and block components to create an ajax refreshed page
part.
When the user click the actionlink, the content of the zone is replaced
by the content of the block. It works great :)
But I'd like my page to gracefully degrade when javascript is turned off.
request.isXHR() works well, but how to replace the content of the zone
in a non-ajax request, that refresh the whole page ?
Here's the code:
private Block onActionFromModifyDisplay(){
if(!request.isXHR()){
//what to do here ?
return null;
}
return displayBlock;
}
Thx
Julien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]