📄 searchlistbuttontag.java
字号:
/*
* Created on 2005/11/18
*/
package com.leeman.common.web.ui.tags;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.tagext.TagSupport;
import java.util.ArrayList;
import com.leeman.wkexs.web.base.BaseConstants;
/**
* @author Dennis
*/
public class SearchListButtonTag extends TagSupport{
private String searchListId;
private String returnFieldNames;
private String sourceFieldNames;
private String preloadFieldNames;
private String otherOnclickMethod;
private String otherParameters = "";
private String preCheckOnclickMethod;
private String url;
public int doEndTag() throws javax.servlet.jsp.JspException{
try
{
HttpServletRequest request =(HttpServletRequest)pageContext.getRequest();
String contextPath = request.getContextPath() + "/";
String imageDirPath = contextPath + "common/images/";
StringBuffer shtml = new StringBuffer();
shtml.append("<input type=\"image\" src=\"" + imageDirPath + "base/lookup_button.gif" + "\"");
shtml.append(" onclick=\"javascript:");
if(preCheckOnclickMethod != null)
{
shtml.append("if(" + preCheckOnclickMethod + "){");
}
shtml.append("popSearchListWithParam('" + searchListId + "','" + url + "','forms[0]',");
shtml.append(" new Array(" + returnFieldNames + "),");
if (sourceFieldNames != null){
shtml.append(" new Array(" + sourceFieldNames + "),");
}
else
{
shtml.append(" null,");
}
if (preloadFieldNames != null)
{
shtml.append(" new Array(" + preloadFieldNames + "),");
}
else
{
shtml.append(" null,");
}
shtml.append("'" + otherParameters + "');" + (otherOnclickMethod==null?"":otherOnclickMethod));
if(preCheckOnclickMethod != null)
{
shtml.append("}");
}
shtml.append("return false;\"");
shtml.append(" align=\"absmiddle\">");
pageContext.getOut().println(shtml.toString());
}catch(Exception e){
throw new javax.servlet.jsp.JspException("Error processing SearchListButtonTag.doEndTag(): " + e.toString());
}
return EVAL_PAGE;
}
/**
* @return
*/
public String getReturnFieldNames() {
return returnFieldNames;
}
/**
* @return
*/
public String getSearchListId() {
return searchListId;
}
/**
* @param string
*/
public void setReturnFieldNames(String string) {
returnFieldNames = string;
}
/**
* @param string
*/
public void setSearchListId(String string) {
searchListId = string;
}
/**
* @return
*/
public String getUrl() {
return url;
}
/**
* @param string
*/
public void setUrl(String string) {
url = string;
}
/**
* @return
*/
public String getPreloadFieldNames() {
return preloadFieldNames;
}
/**
* @param string
*/
public void setPreloadFieldNames(String string) {
preloadFieldNames = string;
}
/**
* @return
*/
public String getSourceFieldNames() {
return sourceFieldNames;
}
/**
* @param string
*/
public void setSourceFieldNames(String string) {
sourceFieldNames = string;
}
/**
* @return
*/
public String getOtherOnclickMethod() {
return otherOnclickMethod;
}
/**
* @param string
*/
public void setOtherOnclickMethod(String string) {
otherOnclickMethod = string;
}
/**
* @return
*/
public String getOtherParameters() {
return otherParameters;
}
/**
* @param string
*/
public void setOtherParameters(String string) {
otherParameters = string;
}
/**
* @return
*/
public String getPreCheckOnclickMethod() {
return preCheckOnclickMethod;
}
/**
* @param string
*/
public void setPreCheckOnclickMethod(String string) {
preCheckOnclickMethod = string;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -