// Init instance
OpeningTime openingTime = null;
- // Is the instance there?
- if (null == OPENING_TIME_LIST_CONTROLLER) {
- // Get bean from CDI directly
- OPENING_TIME_LIST_CONTROLLER = CDI.current().select(JobssOpeningTimeListWebViewBean.class).get();
- }
-
try {
// Try to parse the value as long
final Long openingTimeId = Long.valueOf(submittedValue);
+ // Is the instance there?
+ if (null == OPENING_TIMES_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ OPENING_TIMES_LIST_CONTROLLER = CDI.current().select(JobsOpeningTimeListWebViewBean.class).get();
+ }
+
// Try to get user instance from it
openingTime = OPENING_TIMES_LIST_CONTROLLER.findOpeningTimeById(openingTimeId);
} catch (final NumberFormatException ex) {