1,10 → 1,10 |
package ak.hostadmiral.core.taglib.list; |
|
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.jsp.JspException; |
import org.apache.struts.taglib.html.LinkTag; |
import org.apache.struts.util.RequestUtils; |
import ak.backpath.BackPath; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.jsp.JspException; |
import org.apache.struts.taglib.html.LinkTag; |
import org.apache.struts.util.RequestUtils; |
import ak.backpath.BackPath; |
import ak.hostadmiral.util.CollectionInfo; |
|
public abstract class PageTagBase |
13,56 → 13,56 |
public static String BACKPATH_KEY = BackPath.DEFAULT_KEY + "_list"; |
public static String PAGE_PARAM_NAME = "pg"; |
|
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; |
} |
|
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; |
} |
|
protected BackPath findBackPath() |
throws JspException |
{ |
try { |
return BackPath.findBackPath((HttpServletRequest)pageContext.getRequest(), |
throws JspException |
{ |
try { |
return BackPath.findBackPath((HttpServletRequest)pageContext.getRequest(), |
BACKPATH_KEY, BackPath.DEFAULT_PARAM, |
new String[] { "backpath", PAGE_PARAM_NAME }, |
BackPath.DEFAULT_ZIP); |
} |
catch(Exception ex) { |
throw new JspException(ex); |
} |
} |
BackPath.DEFAULT_ZIP); |
} |
catch(Exception ex) { |
throw new JspException(ex); |
} |
} |
|
protected String calculateURL() |
throws JspException |
{ |
String urlStr = findBackPath().getCurrentUrl(); |
if(urlStr == null) return "/"; |
throws JspException |
{ |
String urlStr = findBackPath().getCurrentUrl(); |
if(urlStr == null) return "/"; |
|
StringBuffer url = new StringBuffer(urlStr); |
boolean hasParams = (url.indexOf("?") > 0); |
|
if(hasParams) |
url.append("&").append(PAGE_PARAM_NAME + "=").append(getDisplayPage()); |
else |
if(hasParams) |
url.append("&").append(PAGE_PARAM_NAME + "=").append(getDisplayPage()); |
else |
url.append("?").append(PAGE_PARAM_NAME + "=").append(getDisplayPage()); |
|
return url.toString(); |
74,14 → 74,14 |
protected CollectionInfo getCollectionInfo() |
throws JspException |
{ |
return (CollectionInfo) |
RequestUtils.lookup(pageContext, infoBean, infoProperty, null); |
} |
return (CollectionInfo) |
RequestUtils.lookup(pageContext, infoBean, infoProperty, null); |
} |
|
public void release() |
{ |
super.release(); |
infoBean = null; |
infoProperty = null; |
} |
{ |
super.release(); |
infoBean = null; |
infoProperty = null; |
} |
} |