You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Fight Ice <ri...@hotmail.com> on 2012/06/09 09:40:08 UTC
onActivate event and ajax request
java code
String onActivate(EventContext eventContext){
if(eventContext.getCount==0){
return "index";
}
if(eventContext.getCount==1){
//do something
}
// ...
}
Object onSubmitComment(@RequestParameter(COMMENT_PARAM) String comment){
//do something
}
I used firebug and found that client receive "/" as response.
I noticed that the onActivate method had been called.
I have to use both onActivate and onSubmitComment event for my page.
What should I do?
RE: onActivate event and ajax request
Posted by Fight Ice <ri...@hotmail.com>.
@Inject
private Request request;
if(eventContext.getCount()==0){
if(request.isXHR()){
return null;
}
return "index";
}
Any better idea?