• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Should constants go in resource bundle

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

We have a JSF application and we use resource bundle for static text that is to be displayed on JSP pages.

Is it advisable to put constant values as well in resource bundle files (considering that any non Java person can also do the change)?

For example, consider below constant,



It is already a constant and if it changes we will do change at only 1 place. Still should we go ahead and put such constants in resource bundle files?

-Regards
Ajay
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ajay Kamble wrote:Is it advisable to put constant values as well in resource bundle files (considering that any non Java person can also do the change)?


As usual, with a question like this, the answer is: it depends.

1. Do you want non-Java people changing these values?
2. Are they likely to change (ie, are they really 'configuration' items)?
3. Do they give people access to information that they shouldn't have?

Unfortunately, only you can answer those questions (and there are probably several that I've missed). If the answers suggest that that's the place for them, then I don't see any reason why you shouldn't put them in there.

Winston
 
Ajay Kamble
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Winston.

I will use your explanation to find the answer.
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ajay Kamble wrote:Thank you Winston.
I will use your explanation to find the answer.


You're welcome, and good luck.

Winston
 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What effect does changing TARGET_PAGE have on the application? The answer to this should give an indication as to whether or not you want a non-technical person changing this value.
 
a wee bit from the empire
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic