Solved

diplay data and page number

Posted on 2007-03-22
6
144 Views
Last Modified: 2010-03-31
I am trying to get data from db and would like to display the bottom.
each row contains 4 products ( 4 cols) and if the row count is 4, then add one from the previous id...
if the row id is equal to 3 then...make another page number which is added one from the provious.
would you please help....

<page id="1">
      <row id="1" cols="4">
            <product product_id="1" />
            <product product_id="2" />
                        <product product_id="3" />
                        <product product_id="5" />
      </row>
      <row id="2" cols="4">
            <product product_id="7" />
            <product product_id="8" />
            <product product_id="9" />
            <product product_id="10" />
      </row>
      <row id="3" cols="4">
            <product product_id="11" />
            <product product_id="12" />
            <product product_id="13" />
            <product product_id="15" />
      </row>
</page>
<page id="2">
            <row id="4" cols="4">
            <product product_id="" />
            <product product_id="" />
            <product product_id="" />
            <product product_id="" />
      </row>
      <row id="5" cols="4">
            <product product_id="" />
            <product product_id="" />
            <product product_id="" />
            <product product_id="" />
      </row>
      <row id="6" cols="4">
            <product product_id="" />
            <product product_id="" />
            <product product_id="" />
            <product product_id="" />
      </row>

</page>
....
....
...
0
Comment
Question by:bbvic
  • 2
  • 2
  • 2
6 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 18771659
0
 
LVL 30

Expert Comment

by:mayankeagle
ID: 18772542
>> if the row id is equal to 3 then...make another page number

You can create new pages based on multiples of 3:

if ( currentRowNnum % 3 == 0 )
{
  pageNumber ++ ;
  showNewPage () ;

}
0
 

Author Comment

by:bbvic
ID: 18777465
using java, diplays like the above xml format...

caan you provide more detail code?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 30

Expert Comment

by:mayankeagle
ID: 18777473
0
 

Author Comment

by:bbvic
ID: 18784361
using  java code, the below structure diplays like the above format

<page id="value1">
      <row id="value2" cols="value3">
            <product product_id="value4" />
            <product product_id="value5" />
                        <product product_id="value6" />
                        <product product_id="value7" />
      </row>
</page>

How can i create java code?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18835178
:-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
hash value 2 38
Tools or ways to handle development of complex web applications 4 74
network + 7 73
wordcount challenge 11 76
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now