Solved

diplay data and page number

Posted on 2007-03-22
6
148 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 86

Accepted Solution

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

Expert Comment

by:Mayank S
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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 30

Expert Comment

by:Mayank S
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb on wildfly 5 63
printf performancy 11 104
Java array 21 150
activeMQ Queue Messages Enqueued and Messages Dequeued 1 119
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses

739 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