------ Solution ---------------------------------------- ----

this ?
------ Solution ---------------------------------------- ----

------ Solution --------------------------------------------
public PageInfo(long rowesPage,long currsPage,long totalRows,int pageCount) //依次分别为每页行数,当前页数,总页数,以及需要显示的页的个数
{
this(rowesPage,currsPage, totalRows);
this.noPage=new long[pageCount];
long index=pageCount/2;
long indes=pageCount%2;
long n=1;
if (currsPage>index+indes)
{
if (currsPage+index+indes>this.totalPage)
{
n=this.totalPage-pageCount+1;
}
else
{
n=currsPage-index;
}
}
for (int i=0;i<pageCount;i++)
{
noPage[i]=n+i;
}
}
Other realized in accordance with your original Previous, Next way to achieve fine.
------ For reference only -------------------------------------- -
memory paging

------ For reference only ---------------------------------------
just beginning to learn struts, concern . . . .
------ For reference only -------------------------------------- -
struts already supports paging method
------ For reference only ---------------------------- -----------
first heard struts support paging
------ For reference only ------------ ---------------------------
paging is to write your own SQL statement
page display can also write your own plug-ins
jquery easyui good
------ For reference only -------------------------- -------------
...... I am using a sql statement to query paging ...... First , Previous, Next , Last function basically ...... however Previous and between those who represent the next few pages of the first digital connection how do
------ For reference only --------------------- ------------------
you say jQERY not know much about
------ For reference only ---------- -----------------------------
first heard struts support pagination I do not know
------ For reference only ------------------------------ ---------
...... I am using a sql statement to query paging ...... First , Previous, Next , Last function basically ...... but Previous and Next between those who represent the first few pages of how to engage digital connection your data on each page to check out page , each page that links this should not be a problem , ah, now the question is what specific
------ For reference only ---------------------------------------
http://blog.csdn. net/caisenbin2009/article/details/8923627

At this point you can get out of the drop-down box to display a page

------ For reference only ---------------------------------- -----
...... I am using a sql statement to query paging ...... First , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages of how to engage digital connection
recently wrote a page , a page is written in classes, attributes , there are a number of rows , you point Previous, Next will be recorded , so like queries
--- --- For reference only ---------------------------------------
...... I am using a sql statement to query paging ...... first , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages of how to engage digital connection your data on each page to check out page , each page that links this should not be a problem , ah, now the question is what specific you see my problem yet ?
------ For reference only -------------------------------------- -
I think you this is no difficulty ...... read directly judgment is not less than the total number pages ...... address bar passing parameters on it ...... I said right now ...... if I achieve is generally seen on the website page and the next page for each page between those who represent the connected digital ...... how to achieve
------ For reference only ------------ ---------------------------
...... I am using a sql statement to query paging ...... First , Previous , next page last page features basic realization ...... but those between Previous and Next represents the first few pages of how to engage digital connection your data on each page to check out page , each page that links this should not be a problem , ah, now the question is what specific you see my problem yet ? do not quite understand your question , so I want to ask you to give a slightly more detailed description of the problem points , whether you are Xiangnong out between the first and last pages of those pages to see if you give back downstairs guess, I do not know whether it ?
------ For reference only -------------------------------------- -
...... I am using a sql statement to query paging ...... first , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages how to engage in digital connection your data on each page to check out page , each page that links this should not be a problem , ah, now the question is what specific you see my problem yet ?
I know what you mean, you do not know the previous page, next page, how to know the specific is the first few pages , I do not know how to pass to the background , is this mean?
------ For reference only -------------------------------------- -
...... I am using a sql statement to query paging ...... first , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages how to engage in digital connection your data on each page to check out page , each page that links this should not be a problem , ah, now the question is what specific you see my problem yet ? do not quite understand your question , so I want to ask you to give a slightly more detailed description of the problem points , whether you are Xiangnong out between the first and last pages of those pages to see if you give back downstairs guess, I do not know whether it ?
...... I am using a sql statement to query paging ...... First , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages of how digital connection do your data on each page to check out page , each page that links this should not be a problem , ah, now the question is what specific you see my problem yet ?
I know what you mean, you do not know the previous page, next page, how to know the specific is the first few pages , I do not know how to pass to the background , is this mean?


see the difference between the two maps . . . Is what I want. . Seeking answers.
------ For reference only -------------------------------------- -
...... I am using a sql statement to query paging ...... first , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages how to engage in digital connection your data on each page to check out page , each page that links this should not be a problem , ah, now the question is what specific you see my problem yet ?
I know what you mean, you do not know the previous page, next page, how to know the specific is the first few pages , I do not know how to pass to the background , is this mean?
...... I am using a sql statement to query paging ...... First , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages of how digital connection do your data on each page to check out page , each page that links this should not be a problem , ah, now the question is what specific you see my problem yet ? do not quite understand your question , so I want to ask you to give a slightly more detailed description of the problem points , whether you are Xiangnong out between the first and last pages of those pages to see if you give back downstairs guess, I do not know whether it ?
Ha ha ha at the wrong. Is this


is this two . . I just made a mistake. .
------ For reference only -------------------------------------- -
really nobody will do, , , Great God appeared ah . . .
------ For reference only -------------------------------------- -
me dizzy,
select top (pageIndex-1)*pageCoun * from New where ID not in (select top pageCoun ID from New)
reference to it ( is the sqlserver )
------ For reference only --------------------------- ------------
reference to this bar
String select="select top "+pageCount+" * from news where newsid not in (select top "+(pageIndex-1)*pageCount+" newsid from news)";
displayed on the page , then there is a good variety of paging methods , Previous necessary this page (pageIndex) +1, Next will this page (pageIndex) -1, of course, pay attention to judgment
- ----- For reference only ---------------------------------------
write tabs ..
the current page number , page number display the total number of records , requested URL pass into
then fight on the inside ..
------ For reference only ---------------------------------- -----
how judgment , I made the two graphs difference
------ For reference only --------------- ------------------------
seems really Meirenhuida nutritious do ? ? ? master. . .
------ For reference only -------------------------------------- -
Query query = session.createQuery (Dbsy_hql)
. setFirstResult ((CurrentPage - 1) * 4). setMaxResults (pageSize);
CurrentPage for the current page , pageSize is one there are several data .
------ For reference only -------------------------------------- -
I do not know what relationship paging with struts2 , I wrote pagination is through sql, look sql, then the paging required parameters into account , so on ok
------ For reference only ---------------------------------------
receive faxes using a pageIndex page number to it, learn it through the EL expression ? The first page is pageIndex = 1, the last one pageIndex equal to the total number of pages , as the total number of pages , we are also required to write a method and judgment , so as to do it !
------ For reference only -------------------------------------- -
I want you to look at this . . . Total
Home
Previous
$ {c-c + pagecount}
->
Next
; " > End
You want to know what I'm asking . , .
------ For reference only -------------------------------------- -
I want to get is a number between Previous and Next links . . . . You understand me ? ?
------ For reference only -------------------------------------- -
I know this , I would like to ask is the mountain a number between and Next links above to run my program on other websites screenshots and screenshots . . . . I want to achieve is the part which is not the same . you know . .
------ For reference only -------------------------------------- -
I have been using SQL statements paging, do not know if there was a more convenient way
------ For reference only ----------------- ----------------------
there ah. . Come up with a model in memory and then paging. .
------ For reference only -------------------------------------- -
looks like this can be used directly packaged , can be called directly .
------ For reference only -------------------------------------- -
specific point
------ For reference only -------------------------------- -------
recommend google, you can search a lot of useful information ,
------ For reference only --------------- ------------------------
now to study paging, novice it
------ For reference only ---- -----------------------------------
json can be combined to achieve paging
- ---- For reference only ---------------------------------------
< img src = "http://img.bbs.csdn.net/upload/201309/18/1379468069_168311.png" alt = "" />
this ?
------ For reference only -------------------------------------- -
those numbers link generation, almost with your Next , change the actual number of pages on the line, such as your current page +1 Next is to come, all those numbers calculated should be right.
------ For reference only -------------------------------------- -
First, how many days you want each page of data , and then displays the first page first , as computational problems , you can take the math on when training exercise
------ For reference only ---------------------------------------
see it ! ! !
------ For reference only -------------------------------------- -

------ For reference only -------------------------------------- -
you write and I write the same ah. . . Can you look at the front I paid two pictures , the simplest is what I wrote, that there is 1,2,3,4,5,6,7 . . . What I want
------ For reference only -------------------------------- -------
this is not what I want. . . Like you and I wrote , and you can look at the chart in front of me to pay . . . . Former like you that I wrote , and, that is not the same as I wanted. . .
------ For reference only -------------------------------------- -
seeking guiding long
------ For reference only ------------------------------ ---------
pagination are generally in the dao layer to achieve, it has a relationship with wooden struts . If you use the oracle , then use rownum paging , sqlserver with top, mysql use limit. Then put the result into a List paged spread jsp page , with the struts iterate display .
------ For reference only -------------------------------------- -
I'll give you to find a method, you look altered to become. http://aimilin6688.iteye.com/blog/1249234
------ For reference only ------------------------- --------------
paging with the use struts2 does not matter how you put emphasis on the selected number of pages transmitted to the background , and then go to filter data , specifically how the Internet is definitely a pass source .
------ For reference only -------------------------------------- -
enen expectations
------ For reference only ---------------------------------- -----
http://aimilin6688.iteye.com/blog/1249234 refer to it , I do not know what you want to do ?
------ For reference only -------------------------------------- -
...... I am using a sql statement to query paging ...... first , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages how to engage in digital connection jsp page you have pageNo, pageSize attribute , backstage have totalPage maximum page number , previous is pageNo-1, Next is pageNo +1, Home pageNo = 1, last page is pageNo = totalPage. I 've written , for your reference !
<td align="left" >
第<s:property value="page" />/
<s:property value="totalPage" />页
(共<s:property value= 'totolSize'/>条记录)
<a onclick="query(1)" style="cursor: pointer; text-decoration: underline;color:blue">首页</a>
<a onclick="query(<s:property value="page-1" />)" style="cursor: pointer; text-decoration: underline;color:blue">上页</a>
<a onclick="query(<s:property value="page+1" />)" style="cursor: pointer; text-decoration: underline;color:blue">下页</a>
<a onclick="query(<s:property value="totalPage" />)" style="cursor: pointer; text-decoration: underline;color:blue">尾页</a>
每页显示<input name="pageSize" type="text" style="width: 25px" value="<s:property value='pageSize'/>" onblur="change();"/>条
跳
<input type="text" id="pageNo" size="2" value="<s:property value="page" />"/>页
<a id="go" onclick="goPage()" style="cursor: pointer; text-decoration: underline;color:blue">翻页</a>
</td>
------ For reference only ----------------------------------- ----
...... I am using a sql statement to query paging ...... First , Previous, Next , Last function basically ...... but those between Previous and Next representatives first few pages of how to engage digital connection jsp page you have pageNo, pageSize attribute , backstage have totalPage maximum page number , previous is pageNo-1, Next is pageNo +1, Home pageNo = 1, last page is pageNo = totalPage. I 've written , for your reference !
<td align="left" >
第<s:property value="page" />/
<s:property value="totalPage" />页
(共<s:property value= 'totolSize'/>条记录)
<a onclick="query(1)" style="cursor: pointer; text-decoration: underline;color:blue">首页</a>
<a onclick="query(<s:property value="page-1" />)" style="cursor: pointer; text-decoration: underline;color:blue">上页</a>
<a onclick="query(<s:property value="page+1" />)" style="cursor: pointer; text-decoration: underline;color:blue">下页</a>
<a onclick="query(<s:property value="totalPage" />)" style="cursor: pointer; text-decoration: underline;color:blue">尾页</a>
每页显示<input name="pageSize" type="text" style="width: 25px" value="<s:property value='pageSize'/>" onblur="change();"/>条
跳
<input type="text" id="pageNo" size="2" value="<s:property value="page" />"/>页
<a id="go" onclick="goPage()" style="cursor: pointer; text-decoration: underline;color:blue">翻页</a>
</td>
This is better.
------ For reference only -------------------------------------- -
landlord this question is fundamental problem , which is the basis for the program code .
------ For reference only -------------------------------------- -
d: table
------ For reference only ------------------------------- --------
calculated, based on how many queries per page and you pageindex, pagemax
------ For reference only ------------ ---------------------------
ah ah, , foundation, brother you to try
------ for reference only ---------------------------------------
...... I use pagination is sql statement to query ...... first , Previous, Next , Last function basically ...... but those between Previous and Next represents the first few pages of how to engage digital connection jsp page you have pageNo, pageSize attribute , backstage have totalPage maximum page number , previous is pageNo-1, Next is pageNo +1, Home pageNo = 1, last page is pageNo = totalPage. I 've written , for your reference !
nutritious. . . +1024
<td align="left" >
第<s:property value="page" />/
<s:property value="totalPage" />页
(共<s:property value= 'totolSize'/>条记录)
<a onclick="query(1)" style="cursor: pointer; text-decoration: underline;color:blue">首页</a>
<a onclick="query(<s:property value="page-1" />)" style="cursor: pointer; text-decoration: underline;color:blue">上页</a>
<a onclick="query(<s:property value="page+1" />)" style="cursor: pointer; text-decoration: underline;color:blue">下页</a>
<a onclick="query(<s:property value="totalPage" />)" style="cursor: pointer; text-decoration: underline;color:blue">尾页</a>
每页显示<input name="pageSize" type="text" style="width: 25px" value="<s:property value='pageSize'/>" onblur="change();"/>条
跳
<input type="text" id="pageNo" size="2" value="<s:property value="page" />"/>页
<a id="go" onclick="goPage()" style="cursor: pointer; text-decoration: underline;color:blue">翻页</a>
</td>
------ For reference only ------------------------------------ ---
heroes , I encountered a problem, and you say , that is the sqlserver2005 realize paging , give examples, or to write a piece of code , I learn from him. Brother grateful ah
------ For reference only --------------------------------- ------
struts page is in fact a time on the page number of the page to get the incoming server , and then spliced to the paging query sql statement . Finally do not get a set of queries to do ? Then the page is rendered to the last data, the generated every time a new collection with
------ For reference only -------------------------------------- -
not sqlserver2005 the row_number () can achieve paging do ? ? How to do . . . Give a simple example . . .
------ For reference only -------------------------------------- -
an unclear formulation problems , out of a lot , the landlord sB, looked under the title , guess : First you come up on the page 1,2,3,4,5 . . . This can be based on the total number of pages you get hold of for the background out out , and then you make your 1,2,3,4,5 spread out the background of the address represents the corresponding pages , then you know bar. . . .
------ For reference only -------------------------------------- -
in jsp page write cycle those numbers do not come out yet !
------ For reference only -------------------------------------- -
href = "eBOrderAllAction.do? currentPage = $ {requestScope.current-1}"> Previous
Previous
$ {page}
$ {page}
href = "eBOrderAllAction.do? currentPage = $ {requestScope.current +1}"> Next
Next
good look
------ For reference only ------------------------------- --------
wool . . . . Your IQ unpredictable ah. . . .
------ For reference only -------------------------------------- -
this feature I realized . . .
------ For reference only -------------------------------------- -
clear in his speech . . . we do not curse okay . . .
------ For reference only -------------------------------------- -
I seem to have written . Back to look for the code .
------ For reference only -------------------------------------- -
trouble you. .
------ For reference only -------------------------------------- -
Thank you . . . . Good lot of ah , you're one of them Oh
------ For reference only ---------------------------- -----------
Thank you . . . . Good lot of ah , you're one of them huh
little effort . Just this side just wrote .
------ For reference only -------------------------------------- -
layer select multiple sets can be a good solution to this problem , it is hereby recorded statement is as follows : select * from (select a. *, rownum row_num ; from (select * from mytable t order by t.id desc) a) b where b.row_num between 1 and 10
see behind that one , and 10 do ? These numbers can be connected via struts pass over the value of the view layer , and finally through to the paging parameters to the sql statement to OK it . Do not know can not receive such written
------ For reference only ------------------------------- --------
heroes , I encountered a problem, and you say , that is the sqlserver2005 realize paging , give examples, or to write a piece of code , I learn from him. Brother grateful ah
Baidu sqlserver top paging, many examples . . Regardless sql2000 and sql2005 , are the same.
没有评论:
发表评论