• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

disabling and rendering components using private boolean - more elegant solution?  RSS feed

Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i have a cosmetic problem. I'm using
(+ getters and setters)

for inner logic of application. And in the JSF I'm calling it for rendering or disabling components, for example
And it works. But it seems to me a bit ugly.
Is there some other way to achieve the same functionality?

I'm looking for more elegant solution. Because JSF wants it private + getters and setters, and the other JAVA class wants it private STATIC + get, sets. So I sometimes need to use two booleans for one thing and it makes a bit of mess...

Thank you
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ultimately, all the JSF EL is looking for is a public getter or setter named setProduction(value) or getProduction() as members of your backing bean. Yuo can make it static if you need to, or even add a little business logic in those setters or getters if need be.
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
global solutions you can do in your home or backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!