on ‎2018 May 02 12:09 PM
Hi Experts,
In the ForgottenPwdForm, there are few annotations which are not working after upgrade, spring message resolver not able to resolve the message key and I am seeing {forgottenPwd.email.invalid} as message, if I submit the form with invalid email.
private String email;
/**
* @return the email
*/
@NotNull(message = "{forgottenPwd.email.invalid}")
@Size(min = 1, max = 255, message = "{forgottenPwd.email.invalid}")
@Email(message = "{forgottenPwd.email.invalid}")
public String getEmail()
{
return email;
}
I suspect that some of the bean in strofront/../spring-mvc-config.xml are not being loaded in proper manner. my setting for the message resolver in sping file as follows:
<!-- Localization -->
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" >
<property name="validationMessageSource" ref="storefrontMessageSource"/>
</bean>
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource" >
<property name="basenames">
<list>
<value>/WEB-INF/messages/base</value>
</list>
</property>
<property name="defaultEncoding" value="UTF-8"/>
<!-- The number of seconds to cache loaded properties files. Set to -1 (never) for production. -->
<property name="cacheSeconds" value="#{configurationService.configuration.getProperty('storefront.resourceBundle.cacheSeconds')}"/>
<property name="fallbackToSystemLocale" value="false"/>
</bean>
<!-- theme message source - falls back to the messageSource -->
<alias name="storefrontMessageSource" alias="themeSource" />
<bean id="storefrontMessageSource" class="com.celio.ecelio.storefront.web.theme.StorefrontResourceBundleSource">
<property name="basenamePrefix" value="/WEB-INF/messages/" />
<property name="basePrefix" value="base" />
<property name="sitePrefix" value="site" />
<property name="themePrefix" value="theme" />
<property name="parentMessageSource" ref="messageSource" />
<property name="requiredAddOnsNameProvider" ref="reqAddOnsNameProvider" />
<!-- The number of seconds to cache loaded properties files. Set to -1 (never) for production. -->
<property name="cacheSeconds" value="#{configurationService.configuration.getProperty('storefront.resourceBundle.cacheSeconds')}"/>
<property name="defaultEncoding" value="UTF-8"/>
<property name="fallbackToSystemLocale" value="false" />
<property name="resourceLoader">
<bean class="org.springframework.core.io.FileSystemResourceLoader"/>
</property>
</bean>
Would appreciate your help!!
Request clarification before answering.
Hi devendra,
I'm facing the same issue.
Have you fixed it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi devendra,
have u fixed the above issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.