1 Reply Latest reply on Mar 17, 2011 12:58 PM by Adriano Schmidt

    special character popuppanel

    Adriano Schmidt Master

      hy, i'm using jsf2 and richfaces4-M4..

       

      my application works fine with special characters.. i'm using filter:

       

      <filter>

      <filter-name>CharsetFilter</filter-name>

      <filter-class>br.com.localhost8080.infrastructure.CharsetFilter</filter-class>

      <init-param>

        <param-name>requestEncoding</param-name>

        <param-value>ISO-8859-1</param-value>

      </init-param>

      </filter>

       

      <filter-mapping>

      <filter-name>CharsetFilter</filter-name>

      <url-pattern>/*</url-pattern>

      </filter-mapping>

       

      public class CharsetFilter implements Filter {

       

          private String encoding;

       

          public void init(FilterConfig config) throws ServletException {

              this.encoding = config.getInitParameter("requestEncoding");

       

              if (this.encoding == null) { this.encoding = "ISO-8859-1"; }

          }

       

          public void doFilter(ServletRequest request, ServletResponse response, FilterChain next) throws IOException, ServletException {

              if (null == request.getCharacterEncoding()) {

                  request.setCharacterEncoding(this.encoding);

              }

       

              response.setContentType("text/html; charset=ISO-8859-1");

              response.setCharacterEncoding("ISO-8859-1");

       

              next.doFilter(request, response);

          }

       

          public void destroy() {}

      }

       

      My unique problem is: When i use the popupPanel.. and i close with h:commandButton the special characters not works... the word "São" is translated to "São".

       

      What can I do?

       

      Thanks,

      Adriano Schmidt

      http://www.localhost8080.com.br/