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);
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
* <p>
* @author Roland Haeder
*/
-@FacesConverter (forClass = CellphoneProvider.class, value = "country")
+@FacesConverter (value = "country")
public class CountryConverter implements Converter {
/**
* <p>
* @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
*/
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) {
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
+ }
+ }
+
}