7 Replies Latest reply on Mar 10, 2009 4:35 AM by mszalay

    rich:calendar is always filtering monthLabels

    mszalay

      Hi all

      I have a problem with my rich:calendar. I want to set the monthLabels. Therefore I set the attribute monthLabels to #{calendarHelper.monthLabels}, which works fine.

      The problem is that german labels with Umlaut are getting filtered: but as the calendar uses javascript, this should be not the case. So, on the page
      März, 2009 as filtered value containing the &#-Number.

      How it is possible to set a non-filtered text?

      Regards Michael

        • 1. Re: rich:calendar is always filtering monthLabels
          mszalay

          I forgot to say: my RichFaces Version is 3.2.2GA, im using the JSF RI 1.2.

          • 2. Re: rich:calendar is always filtering monthLabels
            nbelaevski

            Hello,

            Does this work well for you:

            <rich:calendar locale="de" />
            ?

            • 3. Re: rich:calendar is always filtering monthLabels
              mszalay

               

              "nbelaevski" wrote:
              <rich:calendar locale="de" />
              ?


              I tried this out, but theres the same problem as when setting the locale in the <core:view> tag.

              • 4. Re: rich:calendar is always filtering monthLabels
                nbelaevski

                Michael,

                I cannot reproduce the issue under 3.2.2.GA. Can you please post full page code? What parser is used (are there org.ajax4jsf.xmlparser.* context parameters in web.xml, and if yes, what are their values)?

                BTW, this issue has been reproducible under MyFaces. Can you please recheck that you use RI JSF?

                • 5. Re: rich:calendar is always filtering monthLabels
                  mszalay

                  Yes, I sure I'm using the RI on WebLogic 10, as I can see in the log. I also have MyFaces tomahawk running.

                  log:

                  INFO 10-03 07:54:18,440 (LRUMapCacheFactory.java:createCache:44) -Creating LRUMap cache instance using parameters: {javax.faces.CONFIG_FILES=/WEB-INF/faces-addresses.xml,
                   /WEB-INF/faces-groups.xml, org.ajax4jsf.VIEW_HANDLERS=com....util.ReverseProxyViewHandler, javax.faces.STATE_SAVING_METHOD=client, com.sun.faces.injectionProvider=com.bea.faces.WeblogicInjectionProvider}
                  


                  Web.xml:
                   <!-- config the state saving on the client -->
                   <context-param>
                   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                   <param-value>client</param-value>
                   </context-param>
                  
                   <!-- register our view handler for a4j -->
                   <context-param>
                   <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                   <param-value>com.basis06.ams.address.ui.util.ReverseProxyViewHandler</param-value>
                   </context-param>
                  
                   <!-- filter mappings -->
                   <filter-mapping>
                   <filter-name>ajax4jsf</filter-name>
                   <servlet-name>Faces Servlet</servlet-name>
                   <dispatcher>REQUEST</dispatcher>
                   <dispatcher>FORWARD</dispatcher>
                   <dispatcher>INCLUDE</dispatcher>
                   </filter-mapping>
                   <filter-mapping>
                   <filter-name>MyFacesExtensionsFilter</filter-name>
                   <servlet-name>Faces Servlet</servlet-name>
                   </filter-mapping>
                   <filter-mapping>
                   <filter-name>MyFacesExtensionsFilter</filter-name>
                   <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
                   </filter-mapping>
                  
                   <!-- faces servlet -->
                   <servlet>
                   <servlet-name>Faces Servlet</servlet-name>
                   <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                   <load-on-startup>1</load-on-startup>
                   </servlet>
                  
                   <!-- jsf config files -->
                   <context-param>
                   <param-name>javax.faces.CONFIG_FILES</param-name>
                   <param-value>
                   /WEB-INF/faces-addresses.xml,
                   /WEB-INF/faces-groups.xml
                   </param-value>
                   </context-param>
                   <!-- servlet mapping -->
                   <servlet-mapping>
                   <servlet-name>Faces Servlet</servlet-name>
                   <url-pattern>/faces/*</url-pattern>
                   </servlet-mapping>
                  
                   <!-- ajax jsf filter -->
                   <filter>
                   <filter-name>ajax4jsf</filter-name>
                   <filter-class>org.ajax4jsf.Filter</filter-class>
                   </filter>
                  
                   <!-- tomahawk jsf filter -->
                   <filter>
                   <filter-name>MyFacesExtensionsFilter</filter-name>
                   <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
                   <init-param>
                   <param-name>uploadMaxFileSize</param-name>
                   <param-value>20m</param-value>
                   </init-param>
                   </filter>
                  
                  ...
                  


                  Faces Config
                  <application>
                  
                   <!-- locale settings -->
                   <locale-config>
                   <default-locale>de</default-locale>
                   <supported-locale>de</supported-locale>
                   <supported-locale>fr</supported-locale>
                   <supported-locale>it</supported-locale>
                   <supported-locale>en</supported-locale>
                   </locale-config>
                  
                   <!-- messages bundle to override messages -->
                   <message-bundle>message</message-bundle>
                  
                   <!-- we register out own view handler because we
                   want relative urls -->
                   <view-handler>com....ReverseProxyViewHandler</view-handler>
                   </application>
                  
                   <managed-bean>
                   <managed-bean-name>calendarHelper</managed-bean-name>
                   <managed-bean-class>com.....CalendarHelper</managed-bean-class>
                   <managed-bean-scope>application</managed-bean-scope>
                   </managed-bean>
                  
                  ...
                  


                  JSP Page
                  <%@ page contentType="text/html"%>
                  <%@ taglib uri="http://java.sun.com/jsf/core" prefix="core" %>
                  <%@ taglib uri="http://java.sun.com/jsf/html" prefix="html" %>
                  <%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
                  <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
                  <core:loadBundle var="Home" basename="Home" />
                  <core:view locale="#{userBean.locale}">
                  ...
                   <html:form id="editContactForm" styleClass="formStyle">
                  ...
                   <html:outputLabel for="private_birthday" value="#{Home.birthday}" />
                   <rich:calendar id="private_birthday" popup="true" value="#{addressManager.currentContact.birthday}"
                   enableManualInput="true" datePattern="dd.MM.yyyy"
                   monthLabels="#{calendarHelper.monthLabels}"/>
                  ...
                  </html:form>
                  


                  • 6. Re: rich:calendar is always filtering monthLabels
                    mszalay

                    Your hint with MyFaces showed the way to the truth: the problem appears also when using the RI with the org.apache.myfaces.webapp.filter.ExtensionsFilter. When I take out the this filter, the calendar works, but then my tomahawk file-upload-component is broken.

                    Hmm, I guess I go to look for another simple fileupload component...

                    • 7. Re: rich:calendar is always filtering monthLabels
                      mszalay

                      I found another possible solution: when the tomahawk-component is not on the same page as the rich:calendar, its possible to map the myfaces extension filter only on urls where the tomahawk components are, and then it works too.