CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Jul 2008
    Posts
    1

    Question java Application help me...ID CARD SWAP IN MUSTER FORMAT

    i have records in my arraylist time
    id date intime outtime
    A01 17 inouttime for that particular date
    A01 18
    A01 20
    A02 21
    A02 22
    A02 23
    i want to show record in muster format
    id 1 2 3 4 5 6 7 8 9 10 ---- 17 18 19 20-----til 31ist
    A01 inout inout inout
    A02 same as follows
    i am getting values in jsp
    Arraylist time= (Arraylist).request.getAttribute("time");
    item= time.get(0);
    String current id= item.getid;
    Arraylist att= new Arraylist();
    Arraylist attdate= new Arraylist();
    Arraylist att1= new Arraylist();


    for(int i=0;i<time.size();i++)
    string id= item.getid();
    if(id.eauals(currentid)){
    att.add(inout);
    attdate.add (date);
    } else{
    int l=1;
    while(l<=31){
    for(k=0;k<=att.size;k++){
    int s= (INTEGER) attdate.get(k);
    if(s==l){
    att1.add(att.get(k));
    l++;k++;i++}else{
    att1.add(null);}
    hashmap.put(currentid, att1)
    att= new arraylist
    currentid=id;
    }
    this code is throwing me INDEXOUT OF BOUND exception.for first record it is showing me all records till that is store in last record in arraylist att after wards it is giving me the above exception
    Last edited by anukatoch; July 31st, 2008 at 01:46 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured