* <p>
* @author Roland Haeder<roland@mxchange.org>
*/
-@FacesConverter (value = "category")
+@FacesConverter ("CategoryConverter")
public class PizzaCategoryConverter implements Converter {
/**
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
+ throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
}
}
this.countryBean = (CountrySingletonBeanRemote) context.lookup("java:global/PizzaService-ejb/country!org.mxchange.jcountry.data.CountrySingletonBeanRemote"); //NOI18N
} catch (final NamingException ex) {
// Continue to throw it
- throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+ throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
}
}
this.providerController = (SmsProviderSingletonBeanRemote) context.lookup("java:global/PizzaService-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemote"); //NOI18N
} catch (final NamingException ex) {
// Continue to throw it
- throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+ throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
}
}
this.userController = (PizzaUserWebSessionController) context.lookup("java:global/PizzaService-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
} catch (final NamingException ex) {
// Continue to throw it
- throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+ throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
}
}
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <h:selectOneMenu class="select" id="productCategory" value="#{adminProductController.productCategory}" required="true" requiredMessage="#{msg.ADMIN_CATEGORY_MUST_BE_SELECTED}" converter="category">
+ <h:selectOneMenu class="select" id="productCategory" value="#{adminProductController.productCategory}" required="true" requiredMessage="#{msg.ADMIN_CATEGORY_MUST_BE_SELECTED}" converter="CategoryConverter">
<f:selectItems value="#{shopController.allCategories}" var="cat" itemValue="#{cat}" itemLabel="#{cat.categoryTitle}" />
</h:selectOneMenu>
</ui:composition>