• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to factory produce a static final variable in J2EE 6?

 
Tanya Ruttenberg
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am moving into J2EE 6 from Seam 2 framework. I think this is a simple question, but I can't quite figure it out.

How do I make the equivalent of an out-jected context variable with CDI/JSF2?

I want to make conditional rendering based on a number of items, which should be constant and hard-coded;



How do I access MAX_ALTERNATES from my view more or less like this?



I want MAX_ALTERNATES to be accessed when it is needed, like a factory variable.

TDR
 
Tanya Ruttenberg
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forget the question. I figured out the best way to do this is encapsulate the logic



and in the view

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!