Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1026 → Rev 1027

/hostadmiral/trunk/src/ak/hostadmiral/core/taglib/list/CurrentPageTag.java
0,0 → 1,45
package ak.hostadmiral.core.taglib.list;
 
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import org.apache.struts.util.ResponseUtils;
import org.apache.struts.util.RequestUtils;
import ak.hostadmiral.util.CollectionInfo;
 
public class CurrentPageTag
extends TagSupport
{
protected String infoBean = null;
 
public String getInfoBean()
{
return this.infoBean;
}
 
public void setInfoBean(String infoBean)
{
this.infoBean = infoBean;
}
 
protected String infoProperty = null;
 
public String getInfoProperty()
{
return this.infoProperty;
}
 
public void setInfoProperty(String infoProperty)
{
this.infoProperty = infoProperty;
}
 
public int doStartTag() throws JspException
{
CollectionInfo info = (CollectionInfo)
RequestUtils.lookup(pageContext, infoBean, infoProperty, null);
 
ResponseUtils.write(pageContext, Integer.toString(info.getCurrentPage() + 1));
 
return SKIP_BODY;
}
}