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



       
---------------------------------
 Did you know? You can CHAT without downloading messenger.  Know how!

Reply via email to