]> git.mxchange.org Git - jjobs-war.git/blobdiff - src/java/org/mxchange/jjobs/converter/mobile/JobsMobileNumberConverter.java
Please cherry-pick:
[jjobs-war.git] / src / java / org / mxchange / jjobs / converter / mobile / JobsMobileNumberConverter.java
index 69472ec4d79509fc9b19fc9e5b5832a48d93460d..b31921fffb10d4da2bc782a57ab16c0608a1c56c 100644 (file)
@@ -22,6 +22,9 @@ import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
 import javax.faces.convert.FacesConverter;
+import org.mxchange.jjobs.beans.mobile.list.JobsMobileListWebViewBean;
+import org.mxchange.jjobs.beans.mobile.list.JobsMobileListWebViewController;
+import org.mxchange.jphone.exceptions.mobile.MobileEntityNotFoundException;
 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 
 /**
@@ -48,16 +51,16 @@ public class JobsMobileNumberConverter implements Converter<DialableMobileNumber
                // Init instance
                DialableMobileNumber mobileNumber = null;
 
+               // Is the instance there?
+               if (null == MOBILE_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       MOBILE_LIST_CONTROLLER = CDI.current().select(JobssMobileListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long mobileNumberId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == MOBILE_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               MOBILE_LIST_CONTROLLER = CDI.current().select(JobsMobileListWebViewBean.class).get();
-                       }
-
                        // Try to get mobile instance from it
                        mobileNumber = MOBILE_LIST_CONTROLLER.findMobileNumberById(mobileNumberId);
                } catch (final NumberFormatException ex) {