<!--
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
Pieces taken from Dojo source to make this file stand-alone
-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<script type="text/javascript" src="isAllowed.js"></script>
<!--
BY DEFAULT THIS FILE DOES NOT WORK SO THAT YOU DON'T ACCIDENTALLY EXPOSE
ALL OF YOUR XHR-ENABLED SERVICES ON YOUR SITE.
In order for this file to work, you need to uncomment the script element,
and you should define a function with the following signature:
function isAllowedRequest(request){
return false;
}
Return true out of the function if you want to allow the cross-domain request.
DON'T DEFINE THIS FUNCTION IN THIS FILE! Define it in a separate file called isAllowed.js
and include it in this page with a script tag that has a src attribute pointing to the file.
See the very first script tag in this file for an example. You do not have to place the
script file in the same directory as this file, just update the path above if you move it
somewhere else.
Customize the isAllowedRequest function to restrict what types of requests are allowed
for this server. The request object has the following properties:
- requestHeaders: an object with the request headers that are to be added to
the XHR request.
- method: the HTTP method (GET, POST, etc...)
- uri: The URI for the request.
- data: The URL-encoded data for the request. For a GET request, this would
be the querystring parameters. For a POST request, it wll be the
body data.
See xip_client.html for more info on the xip fragment identifier protocol.
-->
<!-- Security protection: uncomment the script tag to enable. -->
<!-- script type="text/javascript" -->
// <!--
//Core XHR handling taken from Dojo IO code.
dojo = {};
dojo.hostenv = {};
// These are in order of decreasing likelihood; this will change in time.
dojo.hostenv._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
dojo.hostenv.getXmlhttpObject = function(){
var http = null;
var last_e = null;
try{ http = new XMLHttpRequest(); }catch(e){}
if(!http){
for(var i=0; i<3; ++i){
var progid = dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
http = new ActiveXObject(progid);
}catch(e){
last_e = e;
}
if(http){
dojo.hostenv._XMLHTTP_PROGIDS = [progid]; // so faster next time
break;
}
}
/*if(http && !http.toString) {
http.toString = function() { "[object XMLHttpRequest]"; }
}*/
}
if(!http){
throw "xip_server.html: XMLHTTP not available: " + last_e;
}
return http;
}
dojo.setHeaders = function(http, headers){
if(headers) {
for(var header in headers) {
var headerValue = headers[header];
http.setRequestHeader(header, headerValue);
}
}
}
//MSIE has the lowest limit for URLs with fragment identifiers,
//at around 4K. Choosing a slightly smaller number for good measure.
xipUrlLimit = 4000;
xipIdCounter = 1;
function xipServerInit(){
xipStateId = "";
xipCurrentHash = "";
xipRequestMessage = "";
xipResponseParts = [];
xipPartIndex = 0;
}
function pollHash(){
//Can't use location.hash because at least Firefox does a decodeURIComponent on it.
var urlParts = window.location.href.split("#");
if(urlParts.length == 2){
var newHash = urlParts[1];
if(newHash != xipCurrentHash){
try{
messageReceived(newHash);
}catch(e){
//Make sure to not keep processing the error hash value.
xipCurrentHash = newHash;
throw e;
}
xipCurrentHash = newHash;
}
}
}
function messageReceived(encodedData){
var msg = unpackMessage(encodedData);
switch(msg.command){
case "ok":
sendResponsePart();
break;
case "start":
xipRequestMessage = "";
xipRequestMessage += msg.message;
setClientUrl("ok");
break;
case "part":
xipRequestMessage += msg.message;
setClientUrl("ok");
break;
case "end":
setClientUrl("ok");
xipRequestMessage += msg.message;
sendXhr();
break;
}
}
function sendResponse(encodedData){
//Break the message into parts, if necessary.
xipResponseParts = [];
var resData = encodedData;
var urlLength = xipClientUrl.length;
var partLength = xipUrlLimit - urlLength;
var resIndex = 0;
while((resData.length - resIndex) + urlLength > xipUrlLimit){
var part = resData.substring(resIndex, resIndex + partLength);
//Safari will do some extra hex escaping unless we keep the original hex
//escaping complete.
var percentIndex = part.lastIndexOf("%");
if(percentIndex == part.length - 1 || percentIndex == part.length - 2){
part = part.substring(0, percentIndex);
}
xipResponseParts.push(part);
resIndex += part.length;
}
xipResponseParts.push(resData.substring(resIndex, resData.length));
xipPartIndex = 0;
sendResponsePart();
}
function sendResponsePart(){
if(xipPartIndex < xipResponseParts.length){
//Get the message part.
var partData = xipResponseParts[xipPartIndex];
//Get the command.
var cmd = "part";
if(xipPartIndex + 1 == xipResponseParts.length){
cmd = "end";
}else if (xipPartIndex == 0){
cmd = "start";
}
setClientUrl(cmd, partData);
xipPartIndex++;
}else{
xipServerInit();
}
}
function setClientUrl(cmd, message){
var clientUrl = makeClientUrl(cmd, message);
//Safari won't let us replace across domains.
if(navigator.userAgent.indexOf("Safari") == -1){
parent.location.replace(clientUrl);
}else{
parent.location = clientUrl;
}
}
function makeClientUrl(cmd, message){
var clientUrl = xipClientUrl + "#" + (xipIdCounter++) + ":" + cmd;
if(message){
clientUrl += ":" + message;
}
return clientUrl
}
function xhrDone(xhr){
/* Need to pull off and return the following data:
- responseHeaders
- status
- statusText
- responseText
*/
var response = {};
if(typeof(xhr.getAllResponseHeaders) != "undefined"){
var allHeaders = xhr.getAllResponseHeaders();
if(allHeaders){
response.responseHeaders = allHeaders;
}
}
if(xhr.status == 0 || xhr.status){
response.status = xhr.status;
}
if(xhr.statusText){
response.statusText = xhr.statusText;
}
if(xhr.responseText){
response.responseText = xhr.responseText;
}
//Build a string of the response object.
var result = "";
var isFirst = true;
for (var param in response){
if(isFirst){
isFirst = false;
}else{
result += "&";
}
result += param + "=" + encodeURIComponent(response[param]);
}
sendResponse(result);
}
function sendXhr(){
var request = {};
var nvPairs = xipRequestMessage.split("&");
var i = 0;
var nameValue = null;
for(i = 0; i < nvPairs.length; i++){
if(nvPairs[i]){
var nameValue = nvPairs[i].split("=");
request[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
}
}
//Split up the request headers, if any.
var headers = {};
if(request.requestHeaders){
nvPairs = request.requestHeaders.split("\r\n");
for(i = 0; i < nvPairs.length; i++){
if(nvPairs[i]){
nameValue = nvPairs[i].split(": ");
headers[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
}
}
request.requestHeaders = headers;
}
if(isAllowedRequest(request)){
//The request is allowed, so set up the XHR object.
var xhr = dojo.hostenv.getXmlhttpObject();
//Start timer to look for readyState.
var xhrIntervalId = setInterval(function(){
if(xhr.readyState == 4){
clearInterval(xhrIntervalId);
xhrDone(xhr);
}
}, 10);
没有合适的资源?快使用搜索试试~ 我知道了~
ssh2+pager-taglib实现自动分页
共833个文件
js:413个
gif:179个
html:51个
4星 · 超过85%的资源 需积分: 9 226 下载量 98 浏览量
2013-05-21
08:39:40
上传
评论 4
收藏 20.33MB ZIP 举报
温馨提示
Pager-taglib,支持多种风格的分页显示。实际上她是一个Jsp标签库,为在JSP上显示分页信息而设计的一套标签,通过这些标签的不同的组合,会形成多种不一样的分页页面,风格各异,她自带的DEMO就有七种左右的分页风格,包括Google的分页风格。而需要订制自已的风格的分页页面也非常简单。
资源推荐
资源详情
资源评论
收起资源包目录
ssh2+pager-taglib实现自动分页 (833个子文件)
DojoExternalInterface.as 9KB
DojoExternalInterface.as 7KB
Storage.as 4KB
ExpressInstall.as 3KB
AbstractDao.class 3KB
PageSetInterceptor.class 3KB
DojoFileStorageProvider.class 2KB
AppException.class 2KB
CharsetEncodingFilter.class 1KB
User.class 1KB
SystemContext.class 1KB
UserAction.class 1KB
PagerModel.class 1KB
MyException.class 954B
UserManageImp.class 842B
UserDaoImp.class 632B
AbstractAction.class 324B
IUserManage.class 177B
IUserDao.class 167B
.classpath 588B
org.eclipse.wst.common.component 480B
org.eclipse.wst.jsdt.ui.superType.container 49B
oa.css 6KB
EditorToolbar.css 4KB
TabContainer.css 3KB
TabContainerA11y.css 3KB
DatePicker.css 3KB
TimePicker.css 3KB
FloatingPane.css 2KB
Menu2.css 2KB
TreeV3.css 2KB
DocPane.css 2KB
Wizard.css 1KB
ComboBox.css 1KB
MonthlyCalendar.css 1KB
TreeDocIcon.css 1KB
RemoteTabControl.css 1KB
general.css 1KB
ButtonTemplate.css 1KB
login.css 1KB
Slider.css 993B
DemoItem.css 947B
Menu.css 943B
Show.css 825B
Toolbar.css 816B
showtableborder_gecko.css 791B
PopUpButton.css 741B
SplitContainer.css 704B
Toaster.css 634B
Spinner.css 586B
Checkbox.css 509B
AccordionPane.css 504B
DemoContainer.css 500B
Tree.css 472B
DemoNavigator.css 467B
FisheyeList.css 446B
TaskBar.css 445B
InlineEditBox.css 407B
Tree.css 397B
ProgressBar.css 394B
ResizableTextarea.css 295B
SourcePane.css 247B
DemoPane.css 238B
ResizeHandle.css 210B
Validate.css 192B
ShowSlide.css 180B
TooltipTemplate.css 176B
TreeDisableWrap.css 157B
showtableborder_ie.css 126B
SlideShow.css 121B
TreeEditor.css 65B
storage_dialog.fla 336KB
flash6_gateway.fla 40KB
logo_bg.gif 32KB
logo.gif 7KB
logo_copyright_bg.gif 5KB
aggregate.gif 4KB
test_thumb.gif 3KB
h-bar.gif 3KB
bar.gif 2KB
logo.gif 2KB
tab_right.gif 2KB
tab_top_right.gif 2KB
tab_top_left.gif 2KB
userLogin_button.gif 2KB
i_long.gif 2KB
check.gif 2KB
slider-bg-progress-vert.gif 2KB
slider-bg-vert.gif 2KB
userLogin.gif 2KB
soriaPressed-r.gif 2KB
soriaPressed-l.gif 2KB
soriaActive-r.gif 2KB
soriaActive-l.gif 2KB
soriaPressed-c.gif 1KB
soriaActive-c.gif 1KB
addpic.gif 1KB
tab_right_r_curr.gif 1KB
tab_bot_right_curr.gif 1KB
slider-bg.gif 1KB
共 833 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
shan9liang
- 粉丝: 3235
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页