Methods Summary |
---|
public int | doAfterBody()Method for processing the body content of the tag.
BodyContent body = getBodyContent();
try {
body.writeOut(getPreviousOut());
} catch (IOException e) {
throw new JspTagException("IterationTag: " + e.getMessage());
}
// clear up so the next time the body content is empty
body.clearBody();
if (msgNum < messageCount) {
getMessage();
return BodyTag.EVAL_BODY_TAG;
} else {
return BodyTag.SKIP_BODY;
}
|
public int | doStartTag()Method for processing the start of the tag.
messageinfo = new MessageInfo();
try {
Folder folder = (Folder)pageContext.getAttribute(
getFolder(), PageContext.SESSION_SCOPE);
FlagTerm ft = new FlagTerm(new Flags(Flags.Flag.DELETED), false);
messages = folder.search(ft);
messageCount = messages.length;
msgNum = 0;
} catch (Exception ex) {
throw new JspException(ex.getMessage());
}
if (messageCount > 0) {
getMessage();
return BodyTag.EVAL_BODY_TAG;
} else
return BodyTag.SKIP_BODY;
|
public java.lang.String | getFolder()folder attribute getter method.
return folder;
|
private void | getMessage()Helper method for retrieving messages.
message = messages[msgNum++];
messageinfo.setMessage(message);
pageContext.setAttribute(getId(), messageinfo);
|
public java.lang.String | getSession()session attribute getter method.
return session;
|
public void | setFolder(java.lang.String folder)folder setter method.
this.folder = folder;
|
public void | setSession(java.lang.String session)session attribute setter method.
this.session = session;
|