import java.util.Vector;
import lotus.domino.AgentBase;
import lotus.domino.AgentContext;
import lotus.domino.Database;
import lotus.domino.Document;
import lotus.domino.NotesException;
import lotus.domino.Session;
import lotus.domino.View;
import lotus.domino.ViewEntry;
import lotus.domino.ViewEntryCollection;
// 表单显示代理1.0
// 作者:wnight88
// 2009年2月27日
public class showfileNew extends AgentBase
{
String htmlString = "";
String path = "";
String viewName = "";
public String getHeadHtml(Vector headList)
{
String tempString = "";
tempString = tempString
+ "class=tbbg align=center cellpadding=2 cellspacing=1>";
";
currentDoc.replaceItemValue( "htmlStr", htmlString);
// 显示分页信息
int prePageNo, nextPageNo, firstPageNo, lastPageNo;
if (currentPage <= 1)
{
prePageNo = 1;
nextPageNo = 2;
}
else if (currentPage >= totalPage)
{
prePageNo = currentPage - 1;
nextPageNo = currentPage;
}
else
{
prePageNo = currentPage - 1;
nextPageNo = currentPage + 1;
}
firstPageNo = 1;
lastPageNo = totalPage;
String firstPageURL, lastPageURL, prePageURL, nextPageURL;
firstPageURL = "/" + url + "&page=" + firstPageNo;
lastPageURL = "/" + url + "&page=" + lastPageNo;
prePageURL = "/" + url + "&page=" + prePageNo;
nextPageURL = "/" + url + "&page=" + nextPageNo;
htmlString = "";
htmlString = htmlString
+ ""
";
currentDoc.replaceItemValue( "pageStr", htmlString);
// (Your code goes here)
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
import lotus.domino.AgentBase;
import lotus.domino.AgentContext;
import lotus.domino.Database;
import lotus.domino.Document;
import lotus.domino.NotesException;
import lotus.domino.Session;
import lotus.domino.View;
import lotus.domino.ViewEntry;
import lotus.domino.ViewEntryCollection;
// 表单显示代理1.0
// 作者:wnight88
// 2009年2月27日
public class showfileNew extends AgentBase
{
String htmlString = "";
String path = "";
String viewName = "";
public String getHeadHtml(Vector headList)
{
String tempString = "";
tempString = tempString
+ "
"
+ headList.get(i) + " | ";
选择 | ";
";
if (((String) fieldsList.get(i)).equals(fieldNameOfLink)) { tempString = tempString + ""; tempString = tempString + doc.getItemValueString((String) fieldsList.get(i)); tempString = tempString + ""; } else { tempString = tempString + doc.getItemValueString((String) fieldsList.get(i)); } tempString = tempString + " | ";
"
+ "class='hinput' type='checkbox' name='SelDoc' value=" + doc.getUniversalID() + "> | ";
currentDoc.replaceItemValue( "htmlStr", htmlString);
// 显示分页信息
int prePageNo, nextPageNo, firstPageNo, lastPageNo;
if (currentPage <= 1)
{
prePageNo = 1;
nextPageNo = 2;
}
else if (currentPage >= totalPage)
{
prePageNo = currentPage - 1;
nextPageNo = currentPage;
}
else
{
prePageNo = currentPage - 1;
nextPageNo = currentPage + 1;
}
firstPageNo = 1;
lastPageNo = totalPage;
String firstPageURL, lastPageURL, prePageURL, nextPageURL;
firstPageURL = "/" + url + "&page=" + firstPageNo;
lastPageURL = "/" + url + "&page=" + lastPageNo;
prePageURL = "/" + url + "&page=" + prePageNo;
nextPageURL = "/" + url + "&page=" + nextPageNo;
htmlString = "";
htmlString = htmlString
+ "
";
htmlString = htmlString + "共有" + totalDoc + "个文档 合计" + totalPage + "页 "; htmlString = htmlString + "[首页] "; htmlString = htmlString + "[上一页] "; htmlString = htmlString + "[下一页] "; htmlString = htmlString + "[尾页] "; htmlString = htmlString + " | ";
currentDoc.replaceItemValue( "pageStr", htmlString);
// (Your code goes here)
}
catch (Exception e)
{
e.printStackTrace();
}
}
}