Hi *,
I have a locale problem with spring javascript and the DateTextBox decoration. This is my JSP code:
My problem: The Calendar Popup is always rendered in German (I suppose that's because I use a German Firefox), regardless of the page's locale.HTML Code:<label for="startDate"><fmt:message key="options-top.searchoptions.from" /></label><br/> <form:input path="startDate" id="startDate" /> <a href="javascript:void(0);" onclick="dijit.byId('startDate').focus();"> <img src="<c:url value="/images/calendar_icon.gif" />" alt="Calendar" /> </a> <script type="text/javascript"> Spring.addDecoration(new Spring.ElementDecoration({ elementId : 'startDate', widgetType : 'dijit.form.DateTextBox', widgetAttrs : { required : true, datePattern : 'yyyy-MM-dd', staticDisplay: true } })); </script>
I tried the following to set DOJO's locale, but it does not work:
Code:<bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView" /> <property name="requestContextAttribute" value="rc" /> </bean>HTML Code:<script type="text/javascript"> var djConfig={ locale: '${rc.locale.language}' }; </script> <script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />" ></script>


Reply With Quote