boolean isEndMode=(exeModeObj !=null) && (exeModeObj instanceof String) && exeModeObj.toString().equalsIgnoreCase("end");
// Start
if(!isEndMode) {
if(method==MODE_LOOP) {
throw new TemplateException("invalid context for the tag exit, method loop can only be used in the end tag of a custom tag");
}
else if(method==MODE_EXIT_TAG) {
thistag.setEL("executebody",Boolean.FALSE);
return SKIP_PAGE;
}
}
// End
else if(method==MODE_LOOP) {
thistag.setEL("executebody",Boolean.TRUE);
return SKIP_PAGE;
}
return SKIP_PAGE;
}
// OUTside Custom Tag
if(method==MODE_LOOP) throw new TemplateException("invalid context for the tag exit, method loop can only be used inside a custom tag");
return SKIP_PAGE;
}