From: Roland Haeder Date: Mon, 12 Oct 2015 15:05:49 +0000 (+0200) Subject: forClass OR value :-) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3d441eee91b80e952d6d9895606109d72c680304;p=jfinancials-war.git forClass OR value :-) --- diff --git a/src/java/org/mxchange/addressbook/beans/country/CountryWebBean.java b/src/java/org/mxchange/addressbook/beans/country/CountryWebBean.java index b8dc6c51..3f0de149 100644 --- a/src/java/org/mxchange/addressbook/beans/country/CountryWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/country/CountryWebBean.java @@ -62,7 +62,7 @@ public class CountryWebBean implements CountryWebController { Context context = new InitialContext(); // Try to lookup the bean - this.countryBean = (AddressbookCountrySingletonBeanRemote) context.lookup("java:global/addressbook-ejb/country!org.mxchange.jcountry.data.AddressbookCountrySingletonBeanLocal"); //NOI18N + this.countryBean = (AddressbookCountrySingletonBeanRemote) context.lookup("java:global/addressbook-ejb/country!org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote"); //NOI18N } catch (final NamingException ex) { // Continue to throw throw new FaceletException(ex); diff --git a/src/java/org/mxchange/jcountry/data/CountryConverter.java b/src/java/org/mxchange/jcountry/data/CountryConverter.java index 139bff04..71b108b4 100644 --- a/src/java/org/mxchange/jcountry/data/CountryConverter.java +++ b/src/java/org/mxchange/jcountry/data/CountryConverter.java @@ -31,14 +31,13 @@ import javax.naming.NamingException; import org.mxchange.addressbook.beans.country.CountryWebController; import org.mxchange.jcoreeelogger.beans.local.logger.Log; import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; -import org.mxchange.jphone.phonenumbers.smsprovider.CellphoneProvider; /** * Converter for country instance *

* @author Roland Haeder */ -@FacesConverter (forClass = CellphoneProvider.class, value = "country") +@FacesConverter (value = "country") public class CountryConverter implements Converter { /** diff --git a/src/java/org/mxchange/jphone/phonenumbers/smsprovider/SmsProviderConverter.java b/src/java/org/mxchange/jphone/phonenumbers/smsprovider/SmsProviderConverter.java index 10fc783a..2cfeb90d 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/smsprovider/SmsProviderConverter.java +++ b/src/java/org/mxchange/jphone/phonenumbers/smsprovider/SmsProviderConverter.java @@ -37,15 +37,9 @@ import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; *

* @author Roland Haeder */ -@FacesConverter (forClass = CellphoneProvider.class, value = "cellphoneCarrier") +@FacesConverter (value = "cellphoneCarrier") public class SmsProviderConverter implements Converter { - /** - * Category bean - */ - @Inject - private SmsProviderWebController providerController; - /** * Logger instance */ @@ -53,22 +47,10 @@ public class SmsProviderConverter implements Converter { private LoggerBeanLocal loggerBeanLocal; /** - * Initialization of this converter + * Category bean */ - @PostConstruct - public void init () { - // Try to get it - try { - // Get initial context - Context context = new InitialContext(); - - // Lookup logger - this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N - } catch (final NamingException ex) { - // Continue to throw it - throw new RuntimeException("context.lookup() failed.", ex); //NOI18N - } - } + @Inject + private SmsProviderWebController providerController; @Override public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { @@ -134,4 +116,22 @@ public class SmsProviderConverter implements Converter { return String.valueOf(((SmsProvider) value).getProviderId()); } + /** + * Initialization of this converter + */ + @PostConstruct + public void init () { + // Try to get it + try { + // Get initial context + Context context = new InitialContext(); + + // Lookup logger + this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N + } catch (final NamingException ex) { + // Continue to throw it + throw new RuntimeException("context.lookup() failed.", ex); //NOI18N + } + } + }