import com.***.it.framework.vo.common.Pagination;
public final class PaginationLinkAjaxTag extends LinkTag{
private String zone;
private String method ;
private String firstValue;
private String nextValue;
private String previoValue;
private String lastValue;
private String gotoPageStart;
private String gotoPageEnd;
protected static final Locale defaultLocale = Locale.getDefault();
protected String localeKey;
protected String bundle;
public int doStartTag() throws JspException {
retrieveMessages();
StringBuffer results = new StringBuffer();
Pagination pagination = (Pagination) RequestUtils.lookup(super.pageContext, name, property, scope);
method = getMethod();
zone=getZone();
results.append(generateHidden(pagination));
results.append(generateTable(pagination));
results.append(generateJS(method));
ResponseUtils.write(super.pageContext, results.toString());
text = null;
return EVAL_BODY_BUFFERED;
}
public int doAfterBody() throws JspException {
if (super.bodyContent != null) {
String value = super.bodyContent.getString().trim();
if (value.length() > 0)
text = value;
}
return SKIP_BODY;
}
private void retrieveMessages() throws JspException {
localeKey = super.getLocale();
bundle = Globals.MESSAGES_KEY;
String sRootPath = ((HttpServletRequest)pageContext.getRequest()).getContextPath();
if(sRootPath.endsWith("/"))sRootPath=sRootPath.substring(sRootPath.length()-1);
firstValue = "<img src='"+sRootPath+"/images/first.gif'"+"/>";
nextValue = "<img src='"+sRootPath+"/images/next.gif'"+"/>";
previoValue = "<img src='"+sRootPath+"/images/previous.gif'"+"/>";