On Sun, 23 Jan 2011 03:42:09 -0200, Taha Hafeez <tawus.tapes...@gmail.com> wrote:

Hi

Hi, Taha!

This is a simple example of using ComponentClassTransformWorker and also may be used for graceful degradation for ajax in case javascript is disabled
All it does is convert a call
@XHR
Object onClick(){
   //Processing ...
   return zone.getBody();
}

to

Object onClick(){
   //Processing
   if(!request.isXHR()){
      return null;
   }else {
      return zone.getBody();
   }
}

This is a very cool example! Thanks for posting it! :)

Just one suggestion: instead of ignoring @XHR on method that return void, I'd throw an exception, so the developer is warned that the annotation won't work. ;)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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

Reply via email to