Forums Register Login

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

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Forget the question. I figured out the best way to do this is encapsulate the logic



and in the view

There is no "i" in denial. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 826 times.
Similar Threads
How does System.out.println (Works)
Annoying view expired error
My solution of Rosetta Codes 100 Doors puzzle does absolutely nothing!
Help with program: Monty Hall Problem
mysql connection
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:05:57.