Loop problem in JSP
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, February 28, 2006 09:41 PM

hi, I am having a loop problem here, hope someone can advice me for me to go further :) I want to do loop without rewrite the value that I want to store.I want to get value for each row, but from my loop statement I always got the last value/ replace my value until the last... pls help my loop ------- for (int i=0; i < Cnt; i++){ if (request.getParameter("status"+arrOfRec_to_update[i]).equals ("R") && i==0) { Body="This is to inform you that your Material Requisition was REJECTED on " +dte+ " by " +SenderREJ+ " " +"Details"+ " "    More>>

hi,


I am having a loop problem here, hope someone can advice me for me to go further :)


I want to do loop without rewrite the value that I want to store.I want to get value for each row, but from my loop statement I always got the last value/ replace my value until the last... pls help


my loop

-------


for (int i=0; i < Cnt; i++){

if (request.getParameter("status"+arrOfRec_to_update[i]).equals ("R") && i==0) {


Body="This is to inform you that your Material Requisition was REJECTED on "
+dte+
" by "
+SenderREJ+
"

"
+"Details"+
"
"
+"No."+" | "+"Material Item Code"+" | "+"Material Description"+" | "+"Qty/UM"+" | "+"Reason"+"
"+cnt
+"|"+mtr_cde+"|"+in_desc_combine+"|"+qty+umdesc+"|"+pur+"|"+rec_status+"|"+remark+"
"
+"
"
+"Regards"+
"
"+"BCT";


rCnt = rCnt + 1;
}


else if(request.getParameter("status"+arrOfRec_to_update[i]).equals ("R") && i!=0)
{


Body=cnt+"|"+mtr_cde+"|"+in_desc_combine+"|"+qty+umdesc+"|"+pur+"|"+rec_status+"|"+remark;

rCnt = rCnt + 1;
}

}


thank you    <<Less
About | Sitemap | Contact