希望如下整理能对大家有些帮助;
希望和大家互相学习.
import java.util.List;
/**
* @version
* Class Name:JAVACONTROL
* Create By: Tony Song (greefsong)
* Create Date:2014-4-13
* @description User Common control Exp: Button TextBox HyperLinkk Gridview DropdownList Calender E.t.c
*/
public class JAVACONTROL {
public JAVACONTROL(){
ID=ControlID(10);
}
public void Clear(){
Html_Str="";
DataSource=null;//数据源
list=null;//Gridview 数据源
TitleList=null;//gridview标题字符串
HTMLSTR="";
htmlstr="";
ReturnStr="";
DropLabel="";
ClassCSS="";//样式类名称
Label="";//控件标签信息
ID="";//控件ID
Text="";//控件输入提示
IDStrLength=0;//控件自动生成ID时ID长度
LinkUrl="";//链接地址; EditFlag="";//gridview 是否允许编辑
CheckBoxFlag="";//gridview 是否允选择
DelFlag="";//gridview 是否允删除
DetailFlag="";//gridview 是否允显示详细链接
AddFlag="";//gridview 是否允添加
OPFlag=0;//gridview 是否允有操作
TabIndex=0;//Tab索引
name="";
}
private String Html_Str="";
public List<String> DataSource;//数据源
public List<Object[]> list;//Gridview 数据源
public List<String> TitleList;//gridview标题字符串private String HTMLSTR="";
private String htmlstr="";
private String ReturnStr="";
public String DropLabel="";
public String ClassCSS="";//样式类名称
public String Label="";//控件标签信息
public String ID="";//控件ID
public String Text="";//控件输入提示
public int IDStrLength=0;//控件自动生成ID时ID长度
public String LinkUrl="";//链接地址;public String EditFlag="";//gridview 是否允许编辑
public String CheckBoxFlag="";//gridview 是否允选择
public String DelFlag="";//gridview 是否允删除
public String DetailFlag="";//gridview 是否允显示详细链接
public String AddFlag="";//gridview 是否允添加
public int OPFlag=0;//gridview 是否允有操作
public int TabIndex=0;//Tab索引
public String name="";//制件name属性
public String ControlID(){ StringBuffer array = new StringBuffer();
for (int i = 0; i <= 9; i++) {
array.append(i);
}
for (int i = (int) 'a'; i <= (int) 'z'; i++) {
array.append((char) i);
}
for (int i = (int) 'A'; i <= (int) 'Z'; i++) {
array.append((char) i);
}
int length = array.length();
int n = 10;
if(IDStrLength>0){
n=IDStrLength;
}
// 存储最后生成的字符串
StringBuffer str = new StringBuffer("Words:");
for (int i = 0; i < n; i++) {
// 获得随机位置的字符
char c = array.charAt((int)(Math.random()) * length);
str.append(c);
}
return str.toString();
}
public String ControlID(int strlength){ StringBuffer array = new StringBuffer();
for (int i = 0; i <= 9; i++) {
array.append(i);
}
for (int i = (int) 'a'; i <= (int) 'z'; i++) {
array.append((char) i);
}
for (int i = (int) 'A'; i <= (int) 'Z'; i++) {
array.append((char) i);
}
int length = array.length();
int n = 10;
if(IDStrLength>0){
n=IDStrLength;
}
if(strlength>0){
n=strlength;
}
// 存储最后生成的字符串
StringBuffer str = new StringBuffer("Words:");
for (int i = 0; i < n; i++) {
// 获得随机位置的字符
char c = array.charAt((int)(Math.random()) * length);
str.append(c);
}
return str.toString();
}
public String DropDownList(List<Object[]> list,String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}public String DropDownList(){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}
public String DropDownList(List<Object[]> list){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}
public String DropDownList(List<Object[]> list,String Text){ if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(DropLabel.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+DropLabel.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr="<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}
public String DropDownList(String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
else{
name=ID;
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}public String TextBox(String Text,String ClassCSS ,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\""+ClassCSS.toString()+"\" type=\"text\" value=\"\" />";
}else{
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'"+Text.toString()+"'}}\" type=\"text\" value=\"\" />";
}
else
{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'请输入'}}\" type=\"text\" value=\"\" />";
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String TextBox(String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\""+ClassCSS.toString()+"\" type=\"text\" value=\"\" />";
}else{
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'"+Text.toString()+"'}}\" type=\"text\" value=\"\" />";
}
else
{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'请输入'}}\" type=\"text\" value=\"\" />";
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String TextBox(String Text){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\""+ClassCSS.toString()+"\" type=\"text\" value=\"\" />";
}else{
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'"+Text.toString()+"'}}\" type=\"text\" value=\"\" />";
}
else
{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'请输入'}}\" type=\"text\" value=\"\" />";
}
}
ReturnStr=htmlstr;
return ReturnStr;
}
public String TextBox(){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\""+ClassCSS.toString()+"\" type=\"text\" value=\"\" />";
}else{
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'"+Text.toString()+"'}}\" type=\"text\" value=\"\" />";
}
else
{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'请输入'}}\" type=\"text\" value=\"\" />";
}
}
ReturnStr=htmlstr;
return ReturnStr;
}
public String HyperLink(){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" id=\""+ID.toString()+"\" name=\""+name+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}
public String HyperLink(String Text){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String HyperLink(String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String HyperLink(String Text,String LinkUrl,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}
public String HyperLink(String Text,String LinkUrl,String ClassCSS,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String Button(){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Text.toString().trim().length()>0){
}
else
{
Text="button";
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}else{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}
ReturnStr=htmlstr;
return ReturnStr;
}public String Button(String Text){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(Text.toString().trim().length()>0){
}
else
{
Text="button";
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}else{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}
ReturnStr=htmlstr;
return ReturnStr;
}public String Button(String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Text.toString().trim().length()>0){
}
else
{
Text="button";
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}else{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}
ReturnStr=htmlstr;
return ReturnStr;
}public String Button(String Text,String ClassCSS,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(Text.toString().trim().length()>0){
}
else
{
Text="button";
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}else{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}
ReturnStr=htmlstr;
return ReturnStr;
}//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,String CheckBoxFlag,String EditFlag,String DelFlag,String DetailFlag,String AddFlag,String OPStr ){
Html_Str="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+" </th>";
}
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
if(OPStr.toString().trim().length()>0){
htmlstr=htmlstr+OPStr;
}else{
htmlstr=htmlstr+" 操作";}
htmlstr=htmlstr+" </th>";
htmlstr=htmlstr+" ";
htmlstr=htmlstr+" </tr>";
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<tr align=\"center\" class=\"data\" id=\"rows"+i+"\">";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <td>";
htmlstr=htmlstr+" <input id=\"Checkbox"+ObArr[0].toString()+"\" name=\"checkboxlist\" ";
htmlstr=htmlstr+"type=\"checkbox\" value=\""+ObArr[0].toString()+"\" />";
htmlstr=htmlstr+"</td>"; }
for(int j=1;j<ObArr.length-1;j++){
htmlstr=htmlstr+"<td>";
htmlstr=htmlstr+ ObArr[j].toString() ;
htmlstr=htmlstr+"</td>";
}
htmlstr=htmlstr+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"editBtn"+ObArr[0].toString()+"\" name=\"EditBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"DetailBtn"+ObArr[0].toString()+"\" name=\"DetailBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"delBtn"+ObArr[0].toString()+"\" name=\"DelBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"ADDBtn"+ObArr[0].toString()+"\" name=\"AddBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+AddFlag.toString()+"</a> ";
}
htmlstr=htmlstr+"</td>";
htmlstr=htmlstr+"</tr>";
}
Html_Str=htmlstr+"</tbody></table>";
return Html_Str;
}
//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,String RowRegStr,String EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,String RowRegStr){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+String.valueOf((90/TitleList.size()))+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,int EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr><th></th>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>";
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(EditFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"EditBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">编辑</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">详细</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DelBtn$0$\" name=\"delBtn$0$\" tabindex=\"$0$\">删除</a> |";
// REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"AddBtn$0$\" name=\"userEditBtn$0$\" tabindex=\"$0$\"> </a>";
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,String EditFlag,String CheckBoxFlag,String DelFlag,String DetailFlag,String AddFlag,int OPFlag){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<th></th>"; }
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(OPFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
if(CheckBoxFlag.toString().trim().length()>0){
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>"; }
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(OPFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"editBtn$0$\" name=\"EditBtn$0$\" tabindex=\"$0$\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"DetailBtn$0$\" tabindex=\"$0$\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"delBtn$0$\" name=\"DelBtn$0$\" tabindex=\"$0$\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"ADDBtn$0$\" name=\"AddBtn$0$\" tabindex=\"$0$\">"+AddFlag.toString()+"</a> ";
}
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}public String JavaGridView(List<String> TitleList,String CheckBoxFlag,String EditFlag,String DelFlag,String DetailFlag,String AddFlag,String OPStr ){
Html_Str="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+" </th>";
}
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
if(OPStr.toString().trim().length()>0){
htmlstr=htmlstr+OPStr;
}else{
htmlstr=htmlstr+" 操作";}
htmlstr=htmlstr+" </th>";
htmlstr=htmlstr+" ";
htmlstr=htmlstr+" </tr>";
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<tr align=\"center\" class=\"data\" id=\"rows"+i+"\">";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <td>";
htmlstr=htmlstr+" <input id=\"Checkbox"+ObArr[0].toString()+"\" name=\"checkboxlist\" ";
htmlstr=htmlstr+"type=\"checkbox\" value=\""+ObArr[0].toString()+"\" />";
htmlstr=htmlstr+"</td>"; }
for(int j=1;j<ObArr.length-1;j++){
htmlstr=htmlstr+"<td>";
htmlstr=htmlstr+ ObArr[j].toString() ;
htmlstr=htmlstr+"</td>";
}
htmlstr=htmlstr+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"editBtn"+ObArr[0].toString()+"\" name=\"EditBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"DetailBtn"+ObArr[0].toString()+"\" name=\"DetailBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"delBtn"+ObArr[0].toString()+"\" name=\"DelBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"ADDBtn"+ObArr[0].toString()+"\" name=\"AddBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+AddFlag.toString()+"</a> ";
}
htmlstr=htmlstr+"</td>";
htmlstr=htmlstr+"</tr>";
}
Html_Str=htmlstr+"</tbody></table>";
return Html_Str;
}
//OK
public String JavaGridView(List<String> TitleList,String RowRegStr,String EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(List<String> TitleList,String RowRegStr){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+String.valueOf((90/TitleList.size()))+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(List<String> TitleList,int EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr><th></th>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>";
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(EditFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"EditBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">编辑</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">详细</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DelBtn$0$\" name=\"delBtn$0$\" tabindex=\"$0$\">删除</a> |";
// REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"AddBtn$0$\" name=\"userEditBtn$0$\" tabindex=\"$0$\"> </a>";
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}//OK
public String JavaGridView(List<String> TitleList,String EditFlag,String CheckBoxFlag,String DelFlag,String DetailFlag,String AddFlag,int OPFlag){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<th></th>"; }
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(OPFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
if(CheckBoxFlag.toString().trim().length()>0){
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>"; }
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(OPFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"editBtn$0$\" name=\"EditBtn$0$\" tabindex=\"$0$\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"DetailBtn$0$\" tabindex=\"$0$\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"delBtn$0$\" name=\"DelBtn$0$\" tabindex=\"$0$\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"ADDBtn$0$\" name=\"AddBtn$0$\" tabindex=\"$0$\">"+AddFlag.toString()+"</a> ";
}
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}public String JavaGridView(String CheckBoxFlag,String EditFlag,String DelFlag,String DetailFlag,String AddFlag,String OPStr ){
Html_Str="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+" </th>";
}
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
if(OPStr.toString().trim().length()>0){
htmlstr=htmlstr+OPStr;
}else{
htmlstr=htmlstr+" 操作";}
htmlstr=htmlstr+" </th>";
htmlstr=htmlstr+" ";
htmlstr=htmlstr+" </tr>";
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<tr align=\"center\" class=\"data\" id=\"rows"+i+"\">";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <td>";
htmlstr=htmlstr+" <input id=\"Checkbox"+ObArr[0].toString()+"\" name=\"checkboxlist\" ";
htmlstr=htmlstr+"type=\"checkbox\" value=\""+ObArr[0].toString()+"\" />";
htmlstr=htmlstr+"</td>"; }
for(int j=1;j<ObArr.length-1;j++){
htmlstr=htmlstr+"<td>";
htmlstr=htmlstr+ ObArr[j].toString() ;
htmlstr=htmlstr+"</td>";
}
htmlstr=htmlstr+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"editBtn"+ObArr[0].toString()+"\" name=\"EditBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"DetailBtn"+ObArr[0].toString()+"\" name=\"DetailBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"delBtn"+ObArr[0].toString()+"\" name=\"DelBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"ADDBtn"+ObArr[0].toString()+"\" name=\"AddBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+AddFlag.toString()+"</a> ";
}
htmlstr=htmlstr+"</td>";
htmlstr=htmlstr+"</tr>";
}
Html_Str=htmlstr+"</tbody></table>";
return Html_Str;
}
//OK
public String JavaGridView(String RowRegStr,String EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(String RowRegStr){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+String.valueOf((90/TitleList.size()))+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(int EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr><th></th>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>";
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(EditFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"EditBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">编辑</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">详细</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DelBtn$0$\" name=\"delBtn$0$\" tabindex=\"$0$\">删除</a> |";
// REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"AddBtn$0$\" name=\"userEditBtn$0$\" tabindex=\"$0$\"> </a>";
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}//OK
public String JavaGridView(String EditFlag,String CheckBoxFlag,String DelFlag,String DetailFlag,String AddFlag,int OPFlag){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<th></th>"; }
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(OPFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
if(CheckBoxFlag.toString().trim().length()>0){
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>"; }
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(OPFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"editBtn$0$\" name=\"EditBtn$0$\" tabindex=\"$0$\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"DetailBtn$0$\" tabindex=\"$0$\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"delBtn$0$\" name=\"DelBtn$0$\" tabindex=\"$0$\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"ADDBtn$0$\" name=\"AddBtn$0$\" tabindex=\"$0$\">"+AddFlag.toString()+"</a> ";
}
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<th></th>"; }
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(OPFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
if(CheckBoxFlag.toString().trim().length()>0){
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>"; }
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(OPFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"editBtn$0$\" name=\"EditBtn$0$\" tabindex=\"$0$\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"DetailBtn$0$\" tabindex=\"$0$\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"delBtn$0$\" name=\"DelBtn$0$\" tabindex=\"$0$\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"ADDBtn$0$\" name=\"AddBtn$0$\" tabindex=\"$0$\">"+AddFlag.toString()+"</a> ";
}
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}}
package com.hemin.weapon.common;
import java.util.List;
/**
* @version
* Class Name:JAVACONTROL
* Create By: Tony Song (greefsong)
* Create Date:2014-4-13
* @description User Common control Exp: Button TextBox HyperLinkk Gridview DropdownList Calender E.t.c
*/
public class JAVACONTROL {
public JAVACONTROL(){
ID=ControlID(10);
}
public void Clear(){
Html_Str="";
DataSource=null;//数据源
list=null;//Gridview 数据源
TitleList=null;//gridview标题字符串
HTMLSTR="";
htmlstr="";
ReturnStr="";
DropLabel="";
ClassCSS="";//样式类名称
Label="";//控件标签信息
ID="";//控件ID
Text="";//控件输入提示
IDStrLength=0;//控件自动生成ID时ID长度
LinkUrl="";//链接地址; EditFlag="";//gridview 是否允许编辑
CheckBoxFlag="";//gridview 是否允选择
DelFlag="";//gridview 是否允删除
DetailFlag="";//gridview 是否允显示详细链接
AddFlag="";//gridview 是否允添加
OPFlag=0;//gridview 是否允有操作
TabIndex=0;//Tab索引
name="";
}
private String Html_Str="";
public List<String> DataSource;//数据源
public List<Object[]> list;//Gridview 数据源
public List<String> TitleList;//gridview标题字符串private String HTMLSTR="";
private String htmlstr="";
private String ReturnStr="";
public String DropLabel="";
public String ClassCSS="";//样式类名称
public String Label="";//控件标签信息
public String ID="";//控件ID
public String Text="";//控件输入提示
public int IDStrLength=0;//控件自动生成ID时ID长度
public String LinkUrl="";//链接地址;public String EditFlag="";//gridview 是否允许编辑
public String CheckBoxFlag="";//gridview 是否允选择
public String DelFlag="";//gridview 是否允删除
public String DetailFlag="";//gridview 是否允显示详细链接
public String AddFlag="";//gridview 是否允添加
public int OPFlag=0;//gridview 是否允有操作
public int TabIndex=0;//Tab索引
public String name="";//制件name属性
public String ControlID(){ StringBuffer array = new StringBuffer();
for (int i = 0; i <= 9; i++) {
array.append(i);
}
for (int i = (int) 'a'; i <= (int) 'z'; i++) {
array.append((char) i);
}
for (int i = (int) 'A'; i <= (int) 'Z'; i++) {
array.append((char) i);
}
int length = array.length();
int n = 10;
if(IDStrLength>0){
n=IDStrLength;
}
// 存储最后生成的字符串
StringBuffer str = new StringBuffer("Words:");
for (int i = 0; i < n; i++) {
// 获得随机位置的字符
char c = array.charAt((int)(Math.random()) * length);
str.append(c);
}
return str.toString();
}
public String ControlID(int strlength){ StringBuffer array = new StringBuffer();
for (int i = 0; i <= 9; i++) {
array.append(i);
}
for (int i = (int) 'a'; i <= (int) 'z'; i++) {
array.append((char) i);
}
for (int i = (int) 'A'; i <= (int) 'Z'; i++) {
array.append((char) i);
}
int length = array.length();
int n = 10;
if(IDStrLength>0){
n=IDStrLength;
}
if(strlength>0){
n=strlength;
}
// 存储最后生成的字符串
StringBuffer str = new StringBuffer("Words:");
for (int i = 0; i < n; i++) {
// 获得随机位置的字符
char c = array.charAt((int)(Math.random()) * length);
str.append(c);
}
return str.toString();
}
public String DropDownList(List<Object[]> list,String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}public String DropDownList(){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}
public String DropDownList(List<Object[]> list){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}
public String DropDownList(List<Object[]> list,String Text){ if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(DropLabel.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+DropLabel.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr="<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}
public String DropDownList(String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
else{
name=ID;
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" class=\"DROP"+ClassCSS+"\">";
}else{
htmlstr=htmlstr+"<select name=\""+name+"\" id=\""+ID.toString()+"\" style=\"width:120px;\">";
}
htmlstr=htmlstr+"<option value=\"0\">";
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+Text.toString();
}
else{
htmlstr=htmlstr+" --不限-";}
for(int i=0;i<list.size();i++){
htmlstr=htmlstr+"</option>";
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<option value=\""+ObArr[0].toString()+"\">";
htmlstr=htmlstr+ObArr[1].toString();
htmlstr=htmlstr+"</option>";
}
htmlstr=htmlstr+"</select>";
ReturnStr=htmlstr;
return ReturnStr;
}public String TextBox(String Text,String ClassCSS ,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\""+ClassCSS.toString()+"\" type=\"text\" value=\"\" />";
}else{
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'"+Text.toString()+"'}}\" type=\"text\" value=\"\" />";
}
else
{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'请输入'}}\" type=\"text\" value=\"\" />";
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String TextBox(String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\""+ClassCSS.toString()+"\" type=\"text\" value=\"\" />";
}else{
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'"+Text.toString()+"'}}\" type=\"text\" value=\"\" />";
}
else
{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'请输入'}}\" type=\"text\" value=\"\" />";
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String TextBox(String Text){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\""+ClassCSS.toString()+"\" type=\"text\" value=\"\" />";
}else{
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'"+Text.toString()+"'}}\" type=\"text\" value=\"\" />";
}
else
{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'请输入'}}\" type=\"text\" value=\"\" />";
}
}
ReturnStr=htmlstr;
return ReturnStr;
}
public String TextBox(){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\""+ClassCSS.toString()+"\" type=\"text\" value=\"\" />";
}else{
if(Text.toString().trim().length()>0){
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'"+Text.toString()+"'}}\" type=\"text\" value=\"\" />";
}
else
{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" size=\"10\" maxlength=\"10\" class=\"{required:true,minlength:2,messages:{required:'请输入'}}\" type=\"text\" value=\"\" />";
}
}
ReturnStr=htmlstr;
return ReturnStr;
}
public String HyperLink(){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" id=\""+ID.toString()+"\" name=\""+name+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}
public String HyperLink(String Text){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String HyperLink(String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String HyperLink(String Text,String LinkUrl,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}
public String HyperLink(String Text,String LinkUrl,String ClassCSS,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
else{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS+"\">HyperLink</a>";
}
}
}
}else{
if(LinkUrl.toString().trim().length()>0){
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\""+LinkUrl.toString()+"\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}else{
if(Text.toString().trim().length()>0){
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">"+Text.toString()+"</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\">"+Text.toString()+"</a>";
}
}
else{
if(TabIndex>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" tabindex=\""+TabIndex+"\">HyperLink</a>";
}
else
{
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" name=\""+name+"\" id=\""+ID.toString()+"\" >HyperLink</a>";
}
}
}
}
ReturnStr=htmlstr;
return ReturnStr;
}public String Button(){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Text.toString().trim().length()>0){
}
else
{
Text="button";
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}else{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}
ReturnStr=htmlstr;
return ReturnStr;
}public String Button(String Text){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(Text.toString().trim().length()>0){
}
else
{
Text="button";
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}else{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}
ReturnStr=htmlstr;
return ReturnStr;
}public String Button(String Text,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(Text.toString().trim().length()>0){
}
else
{
Text="button";
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}else{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}
ReturnStr=htmlstr;
return ReturnStr;
}public String Button(String Text,String ClassCSS,String ID){
if(ID.toString().trim().length()>0){}
else{
ID=ControlID();
}
if(name.toString().trim().length()<1){
name=ID.toString();
}
if(ClassCSS.toString().trim().length()>0){}
else
{
ClassCSS="btn";
}
if(Text.toString().trim().length()>0){
}
else
{
Text="button";
}
if(Label.toString().trim().length()>0)
{
if(ClassCSS.toString().trim().length()>0){
htmlstr="<span class=\"LBL"+ClassCSS+"\">"+Label.toString()+":</span>";
}else{
htmlstr="<span class=\"add-on\">"+Label.toString()+":</span>";
}
}
else{
htmlstr="";
}
if(ClassCSS.toString().trim().length()>0){
//htmlstr="<span class=\"LBL"+ClassCSS+"\">"+DropLabel.toString()+":</span>";
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" class=\""+ClassCSS.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}else{
htmlstr=htmlstr+"<input name=\""+name+"\" id=\""+ID.toString()+"\" type=\"button\" value=\""+Text.toString()+"\" />";
}
ReturnStr=htmlstr;
return ReturnStr;
}//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,String CheckBoxFlag,String EditFlag,String DelFlag,String DetailFlag,String AddFlag,String OPStr ){
Html_Str="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+" </th>";
}
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
if(OPStr.toString().trim().length()>0){
htmlstr=htmlstr+OPStr;
}else{
htmlstr=htmlstr+" 操作";}
htmlstr=htmlstr+" </th>";
htmlstr=htmlstr+" ";
htmlstr=htmlstr+" </tr>";
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<tr align=\"center\" class=\"data\" id=\"rows"+i+"\">";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <td>";
htmlstr=htmlstr+" <input id=\"Checkbox"+ObArr[0].toString()+"\" name=\"checkboxlist\" ";
htmlstr=htmlstr+"type=\"checkbox\" value=\""+ObArr[0].toString()+"\" />";
htmlstr=htmlstr+"</td>"; }
for(int j=1;j<ObArr.length-1;j++){
htmlstr=htmlstr+"<td>";
htmlstr=htmlstr+ ObArr[j].toString() ;
htmlstr=htmlstr+"</td>";
}
htmlstr=htmlstr+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"editBtn"+ObArr[0].toString()+"\" name=\"EditBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"DetailBtn"+ObArr[0].toString()+"\" name=\"DetailBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"delBtn"+ObArr[0].toString()+"\" name=\"DelBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"ADDBtn"+ObArr[0].toString()+"\" name=\"AddBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+AddFlag.toString()+"</a> ";
}
htmlstr=htmlstr+"</td>";
htmlstr=htmlstr+"</tr>";
}
Html_Str=htmlstr+"</tbody></table>";
return Html_Str;
}
//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,String RowRegStr,String EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,String RowRegStr){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+String.valueOf((90/TitleList.size()))+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,int EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr><th></th>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>";
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(EditFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"EditBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">编辑</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">详细</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DelBtn$0$\" name=\"delBtn$0$\" tabindex=\"$0$\">删除</a> |";
// REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"AddBtn$0$\" name=\"userEditBtn$0$\" tabindex=\"$0$\"> </a>";
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}//OK
public String JavaGridView(List<Object[]> list,List<String> TitleList,String EditFlag,String CheckBoxFlag,String DelFlag,String DetailFlag,String AddFlag,int OPFlag){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<th></th>"; }
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(OPFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
if(CheckBoxFlag.toString().trim().length()>0){
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>"; }
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(OPFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"editBtn$0$\" name=\"EditBtn$0$\" tabindex=\"$0$\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"DetailBtn$0$\" tabindex=\"$0$\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"delBtn$0$\" name=\"DelBtn$0$\" tabindex=\"$0$\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"ADDBtn$0$\" name=\"AddBtn$0$\" tabindex=\"$0$\">"+AddFlag.toString()+"</a> ";
}
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}public String JavaGridView(List<String> TitleList,String CheckBoxFlag,String EditFlag,String DelFlag,String DetailFlag,String AddFlag,String OPStr ){
Html_Str="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+" </th>";
}
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
if(OPStr.toString().trim().length()>0){
htmlstr=htmlstr+OPStr;
}else{
htmlstr=htmlstr+" 操作";}
htmlstr=htmlstr+" </th>";
htmlstr=htmlstr+" ";
htmlstr=htmlstr+" </tr>";
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<tr align=\"center\" class=\"data\" id=\"rows"+i+"\">";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <td>";
htmlstr=htmlstr+" <input id=\"Checkbox"+ObArr[0].toString()+"\" name=\"checkboxlist\" ";
htmlstr=htmlstr+"type=\"checkbox\" value=\""+ObArr[0].toString()+"\" />";
htmlstr=htmlstr+"</td>"; }
for(int j=1;j<ObArr.length-1;j++){
htmlstr=htmlstr+"<td>";
htmlstr=htmlstr+ ObArr[j].toString() ;
htmlstr=htmlstr+"</td>";
}
htmlstr=htmlstr+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"editBtn"+ObArr[0].toString()+"\" name=\"EditBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"DetailBtn"+ObArr[0].toString()+"\" name=\"DetailBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"delBtn"+ObArr[0].toString()+"\" name=\"DelBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"ADDBtn"+ObArr[0].toString()+"\" name=\"AddBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+AddFlag.toString()+"</a> ";
}
htmlstr=htmlstr+"</td>";
htmlstr=htmlstr+"</tr>";
}
Html_Str=htmlstr+"</tbody></table>";
return Html_Str;
}
//OK
public String JavaGridView(List<String> TitleList,String RowRegStr,String EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(List<String> TitleList,String RowRegStr){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+String.valueOf((90/TitleList.size()))+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(List<String> TitleList,int EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr><th></th>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>";
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(EditFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"EditBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">编辑</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">详细</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DelBtn$0$\" name=\"delBtn$0$\" tabindex=\"$0$\">删除</a> |";
// REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"AddBtn$0$\" name=\"userEditBtn$0$\" tabindex=\"$0$\"> </a>";
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}//OK
public String JavaGridView(List<String> TitleList,String EditFlag,String CheckBoxFlag,String DelFlag,String DetailFlag,String AddFlag,int OPFlag){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<th></th>"; }
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(OPFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
if(CheckBoxFlag.toString().trim().length()>0){
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>"; }
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(OPFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"editBtn$0$\" name=\"EditBtn$0$\" tabindex=\"$0$\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"DetailBtn$0$\" tabindex=\"$0$\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"delBtn$0$\" name=\"DelBtn$0$\" tabindex=\"$0$\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"ADDBtn$0$\" name=\"AddBtn$0$\" tabindex=\"$0$\">"+AddFlag.toString()+"</a> ";
}
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}public String JavaGridView(String CheckBoxFlag,String EditFlag,String DelFlag,String DetailFlag,String AddFlag,String OPStr ){
Html_Str="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+" </th>";
}
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\"3%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
if(OPStr.toString().trim().length()>0){
htmlstr=htmlstr+OPStr;
}else{
htmlstr=htmlstr+" 操作";}
htmlstr=htmlstr+" </th>";
htmlstr=htmlstr+" ";
htmlstr=htmlstr+" </tr>";
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
htmlstr=htmlstr+"<tr align=\"center\" class=\"data\" id=\"rows"+i+"\">";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <td>";
htmlstr=htmlstr+" <input id=\"Checkbox"+ObArr[0].toString()+"\" name=\"checkboxlist\" ";
htmlstr=htmlstr+"type=\"checkbox\" value=\""+ObArr[0].toString()+"\" />";
htmlstr=htmlstr+"</td>"; }
for(int j=1;j<ObArr.length-1;j++){
htmlstr=htmlstr+"<td>";
htmlstr=htmlstr+ ObArr[j].toString() ;
htmlstr=htmlstr+"</td>";
}
htmlstr=htmlstr+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"editBtn"+ObArr[0].toString()+"\" name=\"EditBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"DetailBtn"+ObArr[0].toString()+"\" name=\"DetailBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"delBtn"+ObArr[0].toString()+"\" name=\"DelBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<a href=\"javascript:void(0)\" id=\"ADDBtn"+ObArr[0].toString()+"\" name=\"AddBtn"+ObArr[0].toString()+"\" tabindex=\""+ObArr[0].toString()+"\">"+AddFlag.toString()+"</a> ";
}
htmlstr=htmlstr+"</td>";
htmlstr=htmlstr+"</tr>";
}
Html_Str=htmlstr+"</tbody></table>";
return Html_Str;
}
//OK
public String JavaGridView(String RowRegStr,String EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag.toString().trim().length()>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(String RowRegStr){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+String.valueOf((90/TitleList.size()))+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(int EditFlag ){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr><th></th>";
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(EditFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>";
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(EditFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"EditBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">编辑</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"editBtn$0$\" tabindex=\"$0$\">详细</a> |";
REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"DelBtn$0$\" name=\"delBtn$0$\" tabindex=\"$0$\">删除</a> |";
// REGHTML=REGHTML+" <a href=\"javascript:void(0)\" id=\"AddBtn$0$\" name=\"userEditBtn$0$\" tabindex=\"$0$\"> </a>";
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}//OK
public String JavaGridView(String EditFlag,String CheckBoxFlag,String DelFlag,String DetailFlag,String AddFlag,int OPFlag){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<th></th>"; }
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(OPFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
if(CheckBoxFlag.toString().trim().length()>0){
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>"; }
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(OPFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"editBtn$0$\" name=\"EditBtn$0$\" tabindex=\"$0$\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"DetailBtn$0$\" tabindex=\"$0$\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"delBtn$0$\" name=\"DelBtn$0$\" tabindex=\"$0$\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"ADDBtn$0$\" name=\"AddBtn$0$\" tabindex=\"$0$\">"+AddFlag.toString()+"</a> ";
}
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}
//OK
public String JavaGridView(){
Html_Str="";
String TableHeader="";
String TableBody="";
String TableTail="";
String htmlstr="";
htmlstr="<table id=\"data-grid\" class=\"grid\" cellspacing=\"0\">";
htmlstr=htmlstr+" <tbody>";
htmlstr=htmlstr+" <tr>";
if(CheckBoxFlag.toString().trim().length()>0){
htmlstr=htmlstr+"<th></th>"; }
for(int h=0;h<TitleList.size();h++){
htmlstr=htmlstr+" <th width=\""+(90/TitleList.size())+"%\">";
htmlstr=htmlstr+TitleList.get(h).toString();
htmlstr=htmlstr+" </th>";
}
if(OPFlag>0){
htmlstr=htmlstr+" <th style=\"text-align: center;\" width=\"10%\">";
htmlstr=htmlstr+" 操作";
htmlstr=htmlstr+" </th>";
}
htmlstr=htmlstr+" </tr>";
TableHeader=htmlstr;
String RowRegStr="";
String REGHTML="<tr align=\"center\" class=\"data\" id=\"rows$0$\">";
if(CheckBoxFlag.toString().trim().length()>0){
REGHTML=REGHTML+" <td>";
REGHTML=REGHTML+" <input id=\"Checkbox$0$\" name=\"checkboxlist\" ";
REGHTML=REGHTML+" type=\"checkbox\" value=\"$0$\" />";
REGHTML=REGHTML+" </td>"; }
if(TitleList.size()>0){for(int jh=0;jh<TitleList.size();jh++){
REGHTML=REGHTML+" <td >$"+jh+"$</td>";
}
}
if(OPFlag>0){
REGHTML=REGHTML+" <td class=\"handlelist\" style=\"text-align: center;\" nowrap>";
if(EditFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"editBtn$0$\" name=\"EditBtn$0$\" tabindex=\"$0$\">"+EditFlag.toString()+"</a> |";
}
if(DetailFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"DetailBtn$0$\" name=\"DetailBtn$0$\" tabindex=\"$0$\">"+DetailFlag.toString()+"</a> |";
}
if(DelFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"delBtn$0$\" name=\"DelBtn$0$\" tabindex=\"$0$\">"+DelFlag.toString()+"</a> |";
}
if(AddFlag.toString().trim().length()>0){
REGHTML=REGHTML+"<a href=\"javascript:void(0)\" id=\"ADDBtn$0$\" name=\"AddBtn$0$\" tabindex=\"$0$\">"+AddFlag.toString()+"</a> ";
}
REGHTML=REGHTML+" </td>";}
REGHTML=REGHTML+" </tr>";
RowRegStr=REGHTML;
htmlstr=RowRegStr;
for(int i=0;i<list.size();i++){
Object[] ObArr = list.get(i);
String HTMLstr=htmlstr;
for(int j=0;j<ObArr.length;j++){
String oldstr="$"+j+"$" ;
HTMLstr=HTMLstr.toString().replace(oldstr,ObArr[j].toString());
}
TableBody=TableBody+HTMLstr;
}
TableTail="</tbody></table>";
Html_Str=TableHeader+TableBody+TableTail;
return Html_Str;
}}
什么是java控件 java控件有哪些
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
android 在什么控件之下 android的控件有哪些
Android基本控件及表单三大控件 一、上节回顾: (一)、需要掌握的n个UI控件、组件名称: (二)、基本控件:—— TextView: text textColor
android 在什么控件之下 android android开发 ui 控件