struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasad kumar <prasad_te...@yahoo.co.in>
Subject is there anyway to store the previous added lateExtraAmount?
Date Mon, 04 Jun 2007 08:47:54 GMT
   hi,
  iam using struts, i have one class i.e LateExtra,in this class
   i have wriiten the code like below
  double lateExtraAmount = calc.calculateLateExtra(currentContract);
   
   from the above iam getting the lateExtraAmount
   for ex:intially the amount is 2000 After that i Updated the amount to 2500,
  then the lateExtraAmount =Updated Amount-Intial amount i.e 500,
  then After that iam setting the value  as
   model.setAmount(String.valueOf(lateExtraAmount));
  After some time I updated the amount from 2500 to 2600 then lateExtraAmount=Updated Amount-Intial
amount i.e 100.
   
   but i want the previous added lateExtraAmount and Latest added lateExtraAmount .for that
i have wriiten the code like below
   
  String newLateExtraAmount=new Double(Double.parseDouble(model.getAmount())+lateExtraAmount).toString().
  model.setAmount(String.valueOf(newLateExtraAmount));
   
   but the problem with the above code is whenever iam going to that screen the amount is
incrementing.
   
  my problem  is there anyway to store the previous added lateExtraAmount? so that i can add
the previous added lateExtraAmount with  Latest added lateExtraAmount.i will get the result
properly
   
  if anybody knows please assist me i have been trying from the last two days...
   
  thanks,
  prasad

       
---------------------------------
 Download prohibited? No problem! CHAT from any browser, without download.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message