Results 1 to 3 of 3
Thread: Java Paging Problem
- 09-29-2008, 08:29 AM #1
Member
- Join Date
- Jun 2008
- Posts
- 54
- Rep Power
- 0
Java Paging Problem
Hi,
I am in web application Java programmer. I am working on paging in catalog page.
my requirement is:
if our current page 5 and total page 9 than paging:
example: 1....4 5 6 ......9
there some point to doing logic:
1. Always First page and last page is seen. no repeatation.
2. there is no previous button and next button.
3. If there is current page is going on ,than it's previous page number and next page number must be come.
4. If there second last page number is seen than it will be come with last page number.
like : if current page is 7 and total page is 9 :
than 1...6789
5. If there second page number is seen than it will be come with first number.
like: if current page = 2 than
123....9
if current page is 3 than
1234....9
So give me logic and solution.
Manish
- 09-29-2008, 01:59 PM #2
List, read about Java Collections. Possibly may be Set, probably is List datatype.
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
- 09-29-2008, 03:17 PM #3
What does this mean? If current page is 2 then ....like: if current page = 2 than
123....9
if current page is 3 than
1234....9
Do you want to print out: 123....9?
if(currPage == 2)
System.out.println("123....9")
else if (currPage ==3)
System.out.println("1234....9")
What is your program supposed to do?
Is this a string creation/manipulation problem? Given digits start, end and current, create a string with the start and end and current digits plus the digits on both sides of current with ... for gaps.
Write a loop to generate the output string with the above logic to test when to add a digit and when to add ...Last edited by Norm; 09-29-2008 at 03:22 PM.
Similar Threads
-
Struts 2 paging problem using display tag...?
By prabhurangan in forum Web FrameworksReplies: 0Last Post: 07-02-2008, 08:20 AM -
[SOLVED] Display tag paging help..............?
By prabhurangan in forum Web FrameworksReplies: 12Last Post: 06-24-2008, 12:30 PM -
Problem in java
By saytri in forum New To JavaReplies: 4Last Post: 01-16-2008, 10:09 PM -
Problem in java
By saytri in forum New To JavaReplies: 6Last Post: 01-09-2008, 04:13 PM -
JAVA if problem
By toby in forum New To JavaReplies: 2Last Post: 07-25-2007, 07:58 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks