You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeff Kyser <kt...@comcast.net> on 2003/05/09 20:34:41 UTC
[OT]Re: General Java Question
What, you switched to Guinness?
On Friday, May 9, 2003, at 01:29 PM, Mark Galbreath wrote:
> Thanks Jarnot and Chris - I've got to stop drinking all this cough
> syrup
> while programming!
>
> -----Original Message-----
> From: Chris Winters [mailto:cwinters@optiron.com]
> Sent: Friday, May 09, 2003 2:04 PM
> To: Struts Users Mailing List
> Subject: Re: General Java Question
>
>
> Mark Galbreath wrote:
>> Am I being opaquely obtuse? Why isn't <sum> accumulating? I get
>> nothing but "0.00" returned (yes, the List is populated). My Action
>> class is using a utility class to validate entries and sum columns in
>> the ActionForm and returning the totals to the user (or so it is
>> supposed to...).
>>
>> protected String getSum( List amounts ) {
>> BigDecimal sum = new BigDecimal( "0.00" ).setScale( 2,
>> BigDecimal.ROUND_HALF_UP );
>>
>> for( int i = 0; i < amounts.size(); i++ ) {
>> sum.add( new BigDecimal(( String ) amounts.get( i )));
>> }
>>
>> return( sum.toString() );
>> }
>
> IIRC BigDecimal is immutable so you need to do something like:
>
> sum = sum.add( new BigDecimal(( String ) amounts.get( i )));
>
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Struts/JMS
Posted by Stefan Trcko <st...@aladin-eng.si>.
Try http://www.mvnforum.com/mvnforumweb/index.jsp
Stefan
----- Original Message -----
From: "Mohan Radhakrishnan" <mr...@cellexchange.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Monday, May 12, 2003 7:10 AM
Subject: Struts/JMS
> Hi
> We are trying to create a struts based intranet application. The
intranet
> contains a forum, bulletin board and a notification system. Does anybody
> have experience with such a system ?
>
> Mohan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Struts/JMS
Posted by Mohan Radhakrishnan <mr...@cellexchange.com>.
Hi
We are trying to create a struts based intranet application. The intranet
contains a forum, bulletin board and a notification system. Does anybody
have experience with such a system ?
Mohan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: [OT]Re: General Java Question
Posted by Jeff Kyser <kt...@comcast.net>.
so if you followed it with a shot of whiskey, that would
make you a Wild Goose chaser, eh? :)
-jeff
On Friday, May 9, 2003, at 01:40 PM, Mark Galbreath wrote:
> Heh-heh Close: Wild Goose Oatmeal Stout. And it sure ain't Fosters!
>
> -----Original Message-----
> From: Jeff Kyser [mailto:ktrails@comcast.net]
> Sent: Friday, May 09, 2003 2:35 PM
> To: Struts Users Mailing List
> Subject: [OT]Re: General Java Question
>
>
> What, you switched to Guinness?
>
> On Friday, May 9, 2003, at 01:29 PM, Mark Galbreath wrote:
>
>> Thanks Jarnot and Chris - I've got to stop drinking all this cough
>> syrup
>> while programming!
>>
>> -----Original Message-----
>> From: Chris Winters [mailto:cwinters@optiron.com]
>> Sent: Friday, May 09, 2003 2:04 PM
>> To: Struts Users Mailing List
>> Subject: Re: General Java Question
>>
>>
>> Mark Galbreath wrote:
>>> Am I being opaquely obtuse? Why isn't <sum> accumulating? I get
>>> nothing but "0.00" returned (yes, the List is populated). My Action
>>> class is using a utility class to validate entries and sum columns in
>>> the ActionForm and returning the totals to the user (or so it is
>>> supposed to...).
>>>
>>> protected String getSum( List amounts ) {
>>> BigDecimal sum = new BigDecimal( "0.00" ).setScale( 2,
>>> BigDecimal.ROUND_HALF_UP );
>>>
>>> for( int i = 0; i < amounts.size(); i++ ) {
>>> sum.add( new BigDecimal(( String ) amounts.get( i )));
>>> }
>>>
>>> return( sum.toString() );
>>> }
>>
>> IIRC BigDecimal is immutable so you need to do something like:
>>
>> sum = sum.add( new BigDecimal(( String ) amounts.get( i )));
>>
>> Chris
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: [OT]Re: General Java Question
Posted by Mark Galbreath <ma...@qat.com>.
Heh-heh Close: Wild Goose Oatmeal Stout. And it sure ain't Fosters!
-----Original Message-----
From: Jeff Kyser [mailto:ktrails@comcast.net]
Sent: Friday, May 09, 2003 2:35 PM
To: Struts Users Mailing List
Subject: [OT]Re: General Java Question
What, you switched to Guinness?
On Friday, May 9, 2003, at 01:29 PM, Mark Galbreath wrote:
> Thanks Jarnot and Chris - I've got to stop drinking all this cough
> syrup
> while programming!
>
> -----Original Message-----
> From: Chris Winters [mailto:cwinters@optiron.com]
> Sent: Friday, May 09, 2003 2:04 PM
> To: Struts Users Mailing List
> Subject: Re: General Java Question
>
>
> Mark Galbreath wrote:
>> Am I being opaquely obtuse? Why isn't <sum> accumulating? I get
>> nothing but "0.00" returned (yes, the List is populated). My Action
>> class is using a utility class to validate entries and sum columns in
>> the ActionForm and returning the totals to the user (or so it is
>> supposed to...).
>>
>> protected String getSum( List amounts ) {
>> BigDecimal sum = new BigDecimal( "0.00" ).setScale( 2,
>> BigDecimal.ROUND_HALF_UP );
>>
>> for( int i = 0; i < amounts.size(); i++ ) {
>> sum.add( new BigDecimal(( String ) amounts.get( i )));
>> }
>>
>> return( sum.toString() );
>> }
>
> IIRC BigDecimal is immutable so you need to do something like:
>
> sum = sum.add( new BigDecimal(( String ) amounts.get( i )));
>
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org