RE: [S2] How to apply formatting to s:property?

2007-08-02 Thread Neil Aggarwal
Dave:

Did you give up on this?

Neil 


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 3:23 PM
To: 'Struts Users Mailing List'
Subject: RE: [S2] How to apply formatting to s:property?

Dave:

OK, so I added this to my struts.xml:

constant name=struts.custom.i18n.resources
value=application.properties/

and I defined application.properties with this
content:

format.money={0,number,currency} 

But, I still get format.money for the output.

Do I need to use the Il8n interceptor somewhere?

Thanks,
Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 3:10 PM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 So, is there no way to define a global format
 for currency?

http://struts.apache.org/2.x/docs/localization.html

d.



 


Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel
and lay it on us.
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-02 Thread Dave Newton
--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 Did you give up on this?

No, I'm just not actually physically attached to my
computer and teh intarwebs 24/7 and the boss keeps
blathering on and on about some sort of do stuff for
me BS.

I haven't done anything with setting the
i18n.resources property, so I can't help you with
that. I'm not sure why you don't just put something in
to a package.properties (it's hierarchical, you can
put it anywhere) or ActionSupport.properties, etc.

I've never run an app w/o the i18n interceptor so I
don't know what effect (if any) that would have.

I would start by doing what it says on the
localization page as a sanity check *then* start to
play configuration / etc. games.

d.

 From: Neil Aggarwal [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 01, 2007 3:23 PM
 Subject: RE: [S2] How to apply formatting to
 s:property?
 
 Dave:
 
 OK, so I added this to my struts.xml:
 
 constant name=struts.custom.i18n.resources
 value=application.properties/
 
 and I defined application.properties with this
 content:
 
 format.money={0,number,currency} 
 
 But, I still get format.money for the output.
 
 Do I need to use the Il8n interceptor somewhere?
 
 Thanks,
   Neil
 
 --
 Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
 FREE! Eliminate junk email and reclaim your inbox.
 Visit http://www.spammilter.com for details.
 
 -Original Message-
 From: Dave Newton [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 01, 2007 3:10 PM
 To: Struts Users Mailing List
 Subject: RE: [S2] How to apply formatting to
 s:property?
 
 --- Neil Aggarwal [EMAIL PROTECTED] wrote:
  So, is there no way to define a global format
  for currency?
 
 http://struts.apache.org/2.x/docs/localization.html
 
 d.
 
 
 
  


 
 Fussy? Opinionated? Impossible to please? Perfect. 
 Join Yahoo!'s user panel
 and lay it on us.

http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
 
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 



  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-02 Thread Neil Aggarwal
Dave:

Thanks for getting back to me.  I was not
assuming you were available 24x7.  I just
wondered if you were frustrated by my
inexperience.   

I put a package.properties file in my
WEB-INF/classes/page directory since that
is the package that contains the action class.
It works perfectly!  Thanks for that.

I tried moving the package.properties to
WEB-INF/classes so it would be application
wide but that seems to be ignored.

I would still really like a way to make a global
properties file if possible.  Any
suggestions on how to do that?

Thanks,
Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 02, 2007 9:12 AM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

I haven't done anything with setting the
i18n.resources property, so I can't help you with
that. I'm not sure why you don't just put something in
to a package.properties (it's hierarchical, you can
put it anywhere) or ActionSupport.properties, etc.

I've never run an app w/o the i18n interceptor so I
don't know what effect (if any) that would have.

I would start by doing what it says on the
localization page as a sanity check *then* start to
play configuration / etc. games.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-02 Thread Dave Newton
--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 I tried moving the package.properties to
 WEB-INF/classes so it would be application
 wide but that seems to be ignored.

Hmm, I guess I would have thought that would work, but
I've never tried.

 I would still really like a way to make a global
 properties file if possible.  Any suggestions on how

 to do that?

If everything extends ActionSupport (my actions do,
out of convenience) you can put it in the
com.opensymphony.xwork2.ActionSupport package.

I'm not sure why the global resources property setting
doesn't work, although I would suspect a property file
naming / location / packaging issue. Comments on
https://issues.apache.org/struts/browse/WW-1647
suggests that it works.

d.



  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-02 Thread Neil Aggarwal
Dave:

Arrgh.  I just figured it out.

I need to set the constant to the name of
the file *without* the .properties extension.

So, in struts.xml, I put this:

constant name=struts.custom.i18n.resources value=application/

and it loads application.properties just fine.

Thank you for your help on this.

Thanks,
Neil


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 02, 2007 10:55 AM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

I'm not sure why the global resources property setting
doesn't work, although I would suspect a property file
naming / location / packaging issue. Comments on
https://issues.apache.org/struts/browse/WW-1647
suggests that it works.

d.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] How to apply formatting to s:property?

2007-08-01 Thread Dave Newton
--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 I am trying to apply formatting to a value
 from s:property.
 
 I tried this:
 
 s:text name=format.currencys:property
 value=retailProductsCount//s:text
 
 but that did not format the value.  It only outputs
 it unchanged.

What does your format.currency property look like?

d.



  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Dave Newton
--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 So, is there no way to define a global format
 for currency?

http://struts.apache.org/2.x/docs/localization.html

d.



  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Big Stick
D- 

Should that doc be updated? 
s:property value=getText('some.key') /

I thought you could simply use the key attr now. 

Scott 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Dave:

OK, so I added this to my struts.xml:

constant name=struts.custom.i18n.resources
value=application.properties/

and I defined application.properties with this
content:

format.money={0,number,currency} 

But, I still get format.money for the output.

Do I need to use the Il8n interceptor somewhere?

Thanks,
Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 3:10 PM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 So, is there no way to define a global format
 for currency?

http://struts.apache.org/2.x/docs/localization.html

d.



 


Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel
and lay it on us.
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Dave Newton
--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 I moved it to a struts.properties file:
 
 format.money={0,number,currency}
 
 with no change to the output.
 
 Also, according to this page, I should be able
 to put it in either struts.xml or struts.properties:
 

http://struts.apache.org/2.x/docs/constant-configuration.html
 
 Any ideas?

Yes.

Put it in a properties file used by an *action*, not
an *S2 configuration file*. See, the point of putting
a format into a properties file is so it can be
locale-specific. AFAIK config files are not
localization files.

d.



   

Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.
http://autos.yahoo.com/carfinder/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Dave:

So, is there no way to define a global format
for currency?

Thanks,
Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 2:56 PM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 I moved it to a struts.properties file:
 
 format.money={0,number,currency}
 
 with no change to the output.
 
 Also, according to this page, I should be able
 to put it in either struts.xml or struts.properties:
 

http://struts.apache.org/2.x/docs/constant-configuration.html
 
 Any ideas?

Yes.

Put it in a properties file used by an *action*, not
an *S2 configuration file*. See, the point of putting
a format into a properties file is so it can be
locale-specific. AFAIK config files are not
localization files.

d.



   


Choose the right car based on your needs.  Check out Yahoo! Autos new Car
Finder tool.
http://autos.yahoo.com/carfinder/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Dave Newton
--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 s:text name=format.moneys:param name=value
 value=12345//s:text
 
 The outputs format.money instead of $12.345.00 which
 I expected.
 
 I defined the format in the struts.xml file like
 this:
 
 constant name=format.money
 value={0,number,currency} / 
 
 Any ideas?

Try putting it in a properties file.

http://struts.apache.org/2.x/docs/text.html

d.



   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Hello:

I did some more testing.

I tried this:

s:text name=format.moneys:param name=value value=12345//s:text

The outputs format.money instead of $12.345.00 which
I expected.

I defined the format in the struts.xml file like
this:

constant name=format.money value={0,number,currency} / 

Any ideas?

Thanks,
Neil


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.
-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 2:20 PM
To: 'Struts Users Mailing List'
Subject: [S2] How to apply formatting to s:property?

Hello:

I am trying to apply formatting to a value
from s:property.

I tried this:

s:text name=format.currencys:property
value=retailProductsCount//s:text

but that did not format the value.  It only outputs
it unchanged.

Any ideas how to do this?

Thanks, 
Neil


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Dave:

I moved it to a struts.properties file:

format.money={0,number,currency}

with no change to the output.

Also, according to this page, I should be able
to put it in either struts.xml or struts.properties:

http://struts.apache.org/2.x/docs/constant-configuration.html

Any ideas?

Thanks,
Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 2:42 PM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

--- Neil Aggarwal [EMAIL PROTECTED] wrote:
 s:text name=format.moneys:param name=value
 value=12345//s:text
 
 The outputs format.money instead of $12.345.00 which
 I expected.
 
 I defined the format in the struts.xml file like
 this:
 
 constant name=format.money
 value={0,number,currency} / 
 
 Any ideas?

Try putting it in a properties file.

http://struts.apache.org/2.x/docs/text.html

d.



   

Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]