How to keep track of how many records to display in a page.

Hi All:
I am using Weblogic 9.2, Web Services Client, and Struts.
I have a java client in struts that calls a web services.
The "ID" field contains a Java integer.
The "First_Name" is a Java String.
The "Effective_Date" field is a Java date field.
The web service returns an arrayList of a class called Result.
Code for Result.java:
>
public class Result
int id;
String first_Name;
Date effective_Date;
public int getId
return id;
public void setId(int id)
this.id=id;
public String getFirst_Name()
return first_Name;
public void setFirst_Name(String first_Name)
this.first_Name = first_Name;
public Date getEffective_Date()
     return effective_Date;
public void setEffective_Date(Date effective_Date)
     this.effective_Date=effective_Date;
From the arrayList, I displayed the result as the following:
ID FIRST_NAME EFFECTIVE_DATE
3 John 9/10/2007
2 Andrew 1/11/2006
5 Peter 3/4/2006
The "ID" header is a link.
The "First Name" header is a link.
The "EFFECTIVE_Date" is a link.
If I clicked on the link "ID", the first time, it will sort the rows in ascending
order like the following:
ID FIRST_NAME EFFECTIVE_DATE
2 Andrew 1/11/2006
3 John 9/10/2007
5 Peter 3/4/2006
If I clicked on the link "ID", the second time, it will sort the rows in descending
order like the following:
ID FIRST_NAME EFFECTIVE_DATE
5 Peter 3/4/2006
3 John 9/10/2007
2 Andrew 1/11/2006
If I clicked on the "First_Name" field the first time, it will sort the rows in
desceding order.
If I clicked on the "First_Name" field the second time, it will sort the rows in
ascending order.
This applies the same for the "EFFECTIVE_DATE".
If the arrayList returns 80 records of class Results.java.
I needed to displayed only the first 50 records for the first page and 30 records for the second page.
How do I keep track of that so that when I am in the second page, I know to display only record 51 to 80?
If I have a arrayList that returns 120 records of class Results.java.
In the first page, it displayed only 50 records.
In the second page, it displayed only 50 records.
In the third page, it displayed only 20 records.
Assuming I am able to sort the rows by ID, FirstName and Effective_Date by using Results.java implementing the
Java Comparator class. Is it still possible to keep track of how many records displayed in the first page and how many records should
be dispalyed in the second page?
Any hint would be greatly appreciate.
Yours,
Frustrated.

Hi,
Access the table through SM30. It comes blank as standard. Click "New Entries" and make entries for changes to be tracked. For example, whenever an org. unit changes 002 and 003 relationship, you will make entries like:
01 O 1001 B002 Activate box checked
01 O 1001 B003 Activate box checked
Here, 01 is your active plan version, O is org. unit, 1001 is infotype and B002 and B003 are the subtypes. You can also use * for infotype and subtype which means every change will be logged.
If you then run the report RHCDOC_DISPLAY through SA38, it will pick up all the changes pertaining to B002 and B003 relationship for org. units (in the above example).
Similarly, you can set up this table for other object types.
For more information, follow SPRO>Personnel Management>OM>Basic Settings>Activate change documents and go through the documentation for that node. Also, read up the documentation for the report.
Hope this helps.
Donnie

Similar Messages

  • How to keep track of how many times a link has been clicked?

    How to keep track of how many times a link has been clicked or accessed? Do I need to use database for this?

    Hi
    Proably something like this can work,
    1> Have a servlet/bean invoked when the link is linked
    2> have a static variable in that servlet/bean wich gets incremented before the control is passed to another desired page..
    The problem with this approach is that care has to be taken that the servlet/bean is not re-instalised, in case of which the static variable will also be instalised and the data would be lost.
    The best thing is to store the count in the database.
    Regards
    Arathi.

  • How to keep track of which tab is currently active in the page using Session object?

    Hi,
    Just curious as to whether it is possible to have a PL/SQL event fire on an active tab.
    The reason is I want to keep track of which tab is currently active on the page is that I have "generic" forms and reports published as portlets that I wish to be able to determine from the session object what page/tab the user is coming from and apply certain restrictions etc.
    kind regards,
    Matt.
    null

    Hi Konstantina,
    Yes You can do like that 2012-->q1-->January
    Steps:
    1. Create time dimension hierarchy as by following like Total--> year--> Quarter--> Month--> if you need you can keep Description.
    2. Drag the Year column from period dimension table to the dimension hierarchy of year.
    3. Drag the quarter column from period dimension table to the dimension hierarchy of Quarter.
    4. Drag the month column from period dimension table to the dimension hierarchy of month.
    5. Drag the hierarchy to period dimension table in presentation layer.
    In Answer side keep as it as Default: drill in primary and secondary interaction under column properties.
    For more refer : http://mkashu.blogspot.com
    Regards
    VG

  • How do I keep track of how many times a method is called inside anthr clas?

    I am writing code for a program that solves a Knight's Tour. A Knight's Tour is a path a Knight Chess piece can take around the board starting at any spot, touching every square once, and only once. I have to write 2 classes and one is provided. The provided class is encrypted and written by our professor. All I know that it does is simulates the game using the two classes I write and provides a print out and prompts to ask the user which square they want to move to next.
    The square class I have to write consists of a constructor that makes a square object that keeps track of its color (white/black) and its status (whether it has been visited, is occupied by the knight, or is free and has not be visited).
    The GameBoard class I have to write is what I am having problems with. I am writing a method that determines how many squares have been visited. The previous mentioned class that my professor wrote for me contains a method moveKnight();. The way the program works is that every time moveKnight() is called a square's status is changed to occupied and therefore visited later. moveKnight() will only work if the move requested by the user is a valid move.
    SO! My main problem (sorry for all the explaining, just trying to give you all the information) is that I don't know how to keep track of how many times moveKnight() is called by the program. If i can figure this out it should be simple. I'm new to java but i believe...
    if(moveKnight() is called)
    {count++;} //count is a member variable already initialized
    return count;
    the moveKnight() is called section within the if() statement is what I am unclear how to do. Please help.
    Thanks, Veritas

    in your case you want 'count' to be a class attribute rather than a local variable. But yes, incrementing it each time that the method is called will serve your purpose.

  • How to keep track of the changes done in ALV GRID Report

    Hi Experts,
    how to keep track of the changed record in ALV GRID Report. how to set the field to be editable even for the entire row also. Can anybody guide along with code also?...
    Valuable answers will be rewarded.
    Thanks,
    Satish.

    Hi,
    Access the table through SM30. It comes blank as standard. Click "New Entries" and make entries for changes to be tracked. For example, whenever an org. unit changes 002 and 003 relationship, you will make entries like:
    01 O 1001 B002 Activate box checked
    01 O 1001 B003 Activate box checked
    Here, 01 is your active plan version, O is org. unit, 1001 is infotype and B002 and B003 are the subtypes. You can also use * for infotype and subtype which means every change will be logged.
    If you then run the report RHCDOC_DISPLAY through SA38, it will pick up all the changes pertaining to B002 and B003 relationship for org. units (in the above example).
    Similarly, you can set up this table for other object types.
    For more information, follow SPRO>Personnel Management>OM>Basic Settings>Activate change documents and go through the documentation for that node. Also, read up the documentation for the report.
    Hope this helps.
    Donnie

  • Trying to keep track of how many objects I create

    Hello everyone I'm trying to keep track of how many message objects I created and Assign them to a data member.
    Right now it assigns all the Message objects the same number at the end which is 3. I wanted it to assign 1 to the first object it create, 2 for the 2nd, and 3 for the 3rd.
    here's a small version of my code:
    package ss;
    import java.util.ArrayList;
    import java.util.Iterator;
    public class MainTest {
         public static void main(String [] args)
              Message msg = null;
              ArrayList<Message> msgList = new ArrayList<Message>();
              for(int i = 0; i < 3; i++)
                   msg = new Message();
                   msgList.add(msg);
              System.out.println(msgList);
    package ss;
    //this class will hold the Event/Message
    import java.util.List;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.ArrayList;
    import java.util.Set;
    import java.util.Iterator;
    public class Message {
         //these are datamembers that will be used during
         //the sending of the message to the reciever
         //PacketID should be incremented each time a new message is created
         static int PacketID = 0;
         Message()
              PacketID +=1;
         public String toString() {
              return("PacketID: " + this.PacketID
                        + "\n");
    }output:
    [PacketID: 3
    , PacketID: 3
    , PacketID: 3
    Any ideas what I'm doing wrong?
    Thanks!

    Thanks BigDaddyLovehandles,
    Well there's the problem, I just posted a simpler problem to a bigger one. So I am keeping them in a collection as you can see below.
    I'm keeping these message stored in a multi map, and it is multi-threaded. Everytime a user connects to my server I create a new thread, and start adding the "messages" to the database.
    But I must have a packetID, meaning every new message created I need to assign that number to the message object.
    I also see a problem with this like you said, its not thread safe, if 2 clients connect to the server, and both send me events, there are going to be 2 different maps, copying events from the client and storing them in their own seperate databases.
    This might not be a problem because after I get the events on each thread, i send them to another server for processing.
    Here's an example of what my database looks like that stores the messages:
    //this class should store all the Messages or "Events" and
    //you can access them based on their Serial key.
    public class MessageDB {
         //database to hold the information
         //     holds the Alerts/messages
         Map<String, List<Message>> AlertMap;
         //Constructor
         MessageDB() {
              AlertMap = new HashMap<String, List<Message>>();
         //print, outputs the contents of the hashMap
         public void print() {
              //want to print out the Key and all the Messages
              //associated with that key
              //print, outputs the contents of the hashMap
                   for (String key : AlertMap.keySet())
                        System.out.println("\n\nSerial (key): " + key
                                  + "\nValues in Map: \n" + AlertMap.get(key));
         void add(Message msg) {
              //getting the position of the List by EntityID if avaiable
              List<Message> AlertList = AlertMap.get(msg.Serial);
              //checking to see if there is a unique Key already in the Map.
              if (AlertList == null) {
                   //if there isnt a key in the map, add a new key, and a new List mapping
                   //to the key EntityID;
                   AlertList = new ArrayList<Message>();
                   AlertMap.put(msg.Serial, AlertList);
                   AlertList.add(msg);
              } else {
                   //adding message to List
                   AlertList.add(msg);
         }Any suggestions on what I can to number all these messages and it will be thread safe?

  • How to keep track of the users who are all currently logged in

    Hi All,
    I have basic knowledge of Session and Servlets. I am wondering how to keep track of the users who are all currently logged in. There should be some way of achieving it.
    I thought of it and come up with having an Application variable that hold it when ever a user successfully logged in.
    Thanks in advance for any reply.

    You can do this by keeping data in a static veriable in a some class of yours. The variable will need to be a collection.
    Whenever a user loogs in to the site a servlet/jsp should put the users information in to the collection and when logs off or when the session expires the entry should be take off.
    You can achive this by storing the velues in a some sort of a week collection where the entries are automaticaly removed when all the other refferences to the entry goes out of scope.
    You might need to read bit about java.lang.ref package and WeekReference
    Or you can make the entry in the collection contain the last time that the user visited any of the pages and a thread can run time to time and clean up the older entries which have timed out

  • How to keep Track of the wagetype Changes

    Hi Experts,
    How to keep Track of the Changes after changing the wagetype values.If any body has made changes to the existing wagetype, how do we keep a track of what changes has done, is there any standard Tcode through  which we can get the information.
    Thanks in advance,
    Regards,
    Magesh.S

    Hi,
    Access the table through SM30. It comes blank as standard. Click "New Entries" and make entries for changes to be tracked. For example, whenever an org. unit changes 002 and 003 relationship, you will make entries like:
    01 O 1001 B002 Activate box checked
    01 O 1001 B003 Activate box checked
    Here, 01 is your active plan version, O is org. unit, 1001 is infotype and B002 and B003 are the subtypes. You can also use * for infotype and subtype which means every change will be logged.
    If you then run the report RHCDOC_DISPLAY through SA38, it will pick up all the changes pertaining to B002 and B003 relationship for org. units (in the above example).
    Similarly, you can set up this table for other object types.
    For more information, follow SPRO>Personnel Management>OM>Basic Settings>Activate change documents and go through the documentation for that node. Also, read up the documentation for the report.
    Hope this helps.
    Donnie

  • How to keep track of changes made for a particular Inq Doc number.

    hi all,
    my senario is as follows :
    the requirement is to send mail every time we take print for a sapscript for inquiry ..however the header and the body of the mail will change depending whether the user created a new inquiry doc or changes an existing doc. how to keep track of the changes.
    please give me some suggestion.
    thanks in advance
    Srinivas

    its time cosuming process :
    check table CDHRD/CDPOS tables to keep track of changes.
    Regards
    Prabhu

  • How to keep track of the sequence of the BSP Pages being invoked.

    Hi,
    How to keep track of the sequence of the BSP Pages being invoked.
    I have a BSP Page A.htm. There are two other pages B.HTM and C.HTM in the same BSP Application.
    The page B.HTM has a link A.HTM. The page C.HTM also has a link A.HTM. On clicking  these links the Page A.HTM would be invoked. Is there any way to keep track which BSP Page  (i.e B.HTM or C.HTM) invoked the page A.HTM.
    Any input on this Regard would be of great help.
    Thanks and Regards,
    Pavithra

    Hi Pavithra,
    Declare in page attributes:
    appl_url type string
    In the onClick event of the link that calls the A.htm page , use:
    call method runtime->get_url
    receiving
    URL = appl_url.
    Now appl_url contains the url (also name) of the page that invoked A.htm .
    Hope it helps.
    Anubhav.

  • How to keep track of emails btn Blackberry & Outlook???

    Hi,
    I'm considering buying a Blackberry Curve (Sprint).  My hangup thus far is that I want to have all of my sent emails in my Outlook on my home computer.  My solution thus far has been to use GoToMyPC so that I can connect to my home PC from any computer and take care of my emails.  Also, I work mostly from home, so this isn't a huge problem in terms of convenience and efficiency. 
    Most people tell me that they CC themselves when they send an important email from their Blackberry.  This is how they keep track of important emails sent from their Blackberry.  IS THERE ANOTHER WAY?  A MORE RELIABLE WAY?  IS THERE A WAY TO HAVE ALL EMAILS SYNC'D WITH OUTLOOK WHEN (THEORETICALLY) SYNCING MY BLACKBERRY WITH MY HOME COMPUTER?  IF NOT, WHAT IS THE BEST WAY?
    Thanks in advance,
    Gary 
    Solved!
    Go to Solution.

    I have two (2) EMails addresses; on is my blackberry address, and the other is my Outlook.  I mostly give out my Outlook address so I could have it on my PC at home, and when Isync it is there,. Or, in the field if I inadvertantly delete a message, I know it will still  be on my PC at Home. I think your friend is correct. If she has the Blackberry
    Enterprise System through her IT Dept. at work. I have the BIS (Blackberry Internet Service).
    I hope this helps. It is quite confusing
    Writer~
    Thanks,
    Writer~

  • How to keep track of what I've previously draw

    They said:
    Everytime the paint method is called, everything that was drawn before must be redrawn. The paint method has no way to keep track of what you've previously drawn, it is your responsibility as the programmer to keep track of such things.
    Is this right?
    How can keep track of my random shades of random amounts?
    Is there a simple way to do that?
    In a example, I must use getGraphics to get JPanel's graphics, then I use it to random draw something in the JPanel.
    I just want to keep them in my JPanel when it resizes.I haven't get the answer yet.
    Can you help me?

    Ok I haven't got time to write the code for you, but here's the idea:
    //User drags mouse around to draw on screen
    //use mouseActionListener to catch MouseDragged event
    int x = mouseEvent.getX();
    int y = mouseEvent.getY();
    Point p = new Point(x,y);
    arrayListOfPoints.add(p);
    // end mouse action capture
    //override paint method of component
    public void paint(Graphics g){
        super(g);
        Iterator it = arrayListOfPoints.iterator();
        while(it.hasNext()){
            Point p = (Point)it.next();
            g.drawLine(p.getX(),p.getY(),p.getX(),p.getY())   

  • How to keep track of last song played?

    Hi!
    Does anyone know how to keep track of which song played last time before itunes was closed? I have a big list of songs in my playlist and I play it everyday while I'm working. If I shut down my computer and start it again the next day, I have to manually look for the song I played the previous evening. Is there a way where it will keep track of the last song and play it from that?
    Thanks
    JB

    Subwaygirl, welcome to the Mac family! I'm not sure whether you're asking about beginning to play from the last song played on your iPod or iTunes so I'll answer both.
    From the iPod, simply hit Play and it will begin at the next song. It cannot go back to the last song played.
    From iTunes, use my answer to Chris to add the Last Played column, sort by that and select the song at the top of the list. That is your most recently played song. If you hit the >> or Next button you will then go to the next song in the randomly-sorted list.
    Powerbook G3 Mac OS X (10.3.9)

  • How to keep Industry sector and Material Type in Display for Tcode MM01

    How to keep Industry sector and Material Type in Display for Tcode MM01( create material Initial screen)
    Thanks,

    Hi
    Yes, your requirement is possible using screen variant
    1. use tcode SHD0
    2. give transaction as MM01
    3. goto screen variant tab - assign some name - enter program name and screen name
       (from mm01 - F1 help)
    4. goto transaction variant tab - assign some name - assign already defined screen variant name
    5. goto standad variant tab - transaction variant name already fetched automatically - click on active button (it was placed after transaction variant name
    Raju

  • How to keep track of views of a particular mysql entry

    I have a dynamic website through php and mysql. How do I get my website to keep track of the amount of views each entry got (and for the amount of views to be recorded in my mysql table? Is there an easy way to do this with dreamweaver?

    i do have a column for views but i have do not know how the results would be inputed.
    how do i use that "update statement" you mentioned to input increment view amounts in my column?
    table_name has column for views.
    page is a column in table that is used to dynamically display content based on title in URL parameter ie
    website.com/?page=home
    website.com/?page=about_us
    etc.
    Use query to update views+1 where page = the URL parameter that is entered into address bar to display the dynamic page content.
    $page = "-1";
    if (isset($_GET['page'])) {
    $page = $_GET['page'];
    $query_hits = sprintf("UPDATE table_name
    SET views = views+1
    WHERE page = %s", GetSQLValueString($page, "text"));
    $hits = mysql_query($query_hits, $connection) or die(mysql_error());
    best,
    Shocker

Maybe you are looking for