.localeResolver(new JsfAwareLocaleResolver()) .messageResolver(new JsfAwareApplicationMessagesMessageResolver()) .messageInterpolator(new FacesMessageInterpolator(elProvider, argumentFilter)) .addMessageHandler(new JsfAwareMessageHandler()) .create();
/** * if the argument isn't serializable we aren't allowed to store the instance itself * -> we have to store the string instead * (if we are aware of the context and the parameter implements {@link Localizable} we use the localized value) * * @param argument current argument * @return the string value of the argument */ private String processNoneSerializableArgument(Object argument) { if(argument instanceof Localizable && this.getMessageContextConfig() != null) { return ((Localizable)argument).toString(this.getMessageContextConfig().use().create()); } else { return argument != null ? argument.toString() : "null"; } }
.localeResolver(new JsfAwareLocaleResolver()) .messageResolver(new JsfAwareApplicationMessagesMessageResolver()) .messageInterpolator(new FacesMessageInterpolator(elProvider, argumentFilter)) .addMessageHandler(new JsfAwareMessageHandler()) .create();
.localeResolver(new JsfAwareLocaleResolver()) .messageResolver(new JsfAwareApplicationMessagesMessageResolver()) .messageInterpolator(new FacesMessageInterpolator(elProvider, argumentFilter)) .addMessageHandler(new JsfAwareMessageHandler()) .create();
/** * if the argument isn't serializable we aren't allowed to store the instance itself * -> we have to store the string instead * (if we are aware of the context and the parameter implements {@link Localizable} we use the localized value) * * @param argument current argument * @return the string value of the argument */ private String processNoneSerializableArgument(Object argument) { if(argument instanceof Localizable && this.getMessageContextConfig() != null) { return ((Localizable)argument).toString(this.getMessageContextConfig().use().create()); } else { return argument != null ? argument.toString() : "null"; } }
/** * if the argument isn't serializable we aren't allowed to store the instance itself * -> we have to store the string instead * (if we are aware of the context and the parameter implements {@link Localizable} we use the localized value) * * @param argument current argument * @return the string value of the argument */ private String processNoneSerializableArgument(Object argument) { if(argument instanceof Localizable && this.getMessageContextConfig() != null) { return ((Localizable)argument).toString(this.getMessageContextConfig().use().create()); } else { return argument != null ? argument.toString() : "null"; } }
/** * {@inheritDoc} */ public MessageContext cloneContext() { return config().use().create(); }
/** * {@inheritDoc} */ public MessageContext cloneContext() { return config().use().create(); }