You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Newton <ne...@yahoo.com> on 2007/06/06 12:21:21 UTC
OT] Re: is there anyway to store the previous added lateExtraAmount
--- prasad kumar <pr...@yahoo.co.in> wrote:
> String newLateExtraAmount =
> new Double(Double.parseDouble(model.getAmount())
+ lateExtraAmount).toString().
>
> model.setAmount(String.valueOf(newLateExtraAmount));
Why do you do a String.valueOf on a String?
> but the problem with the above code is whenever
> i am going to that screen the amount is
incrementing.
It's still not clear to me exactly what you are trying
to do. Someone else mentioned keeping it in session;
that may work fine. You may also want to consider
representing it in your data model somehow.
Are you using doubles to do real-world floating-point
monetary arithmetic?
d.
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org