2 Replies Latest reply on Sep 12, 2011 5:55 AM by Tilman Keskinöz

    Excel characterSet

    Rafael Rodriguez Newbie

      How i can change the charset of Seam Excel?
      I tried


      <e:workbook characterSet="ISO-8859-1">



      and get


      java.lang.NumberFormatException: For input string: ISO-8859-1


      i tried to change de html charset too but whiteout success.


      i need to use some characters like ç, á, é, etc.


      from:


      <e:cell style="xls-wrap:true">
          <ui:repeat value="#{equipamento.variavelSiteSurveyAssocs}" var="assocs">
              #{assocs.variavelSiteSurvey.varname}
          </ui:repeat>
      </e:cell>



      complete code:


      <html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:e="http://jboss.com/products/seam/excel"
           xmlns:f="http://java.sun.com/jsf/core">
           <e:workbook>
                <e:worksheet value="#{siteSurveyHome.instance.equipamentos}" var="equipamento">
                     <e:column style="xls-column-autosize: true;">
                          <f:facet name="header">
                               <e:cell value="Site"/>
                          </f:facet>
                          <e:cell value="#{equipamento.site.nmSite}"/>
                     </e:column>
                     <e:column style="xls-column-autosize: true;">
                          <f:facet name="header">
                               <e:cell value="Equipamento"/>
                          </f:facet>
                          <e:cell value="#{equipamento.siteSurveyTipoEquip.nome}"/>
                     </e:column>
                     <e:column style="xls-column-autosize: true;">
                          <f:facet name="header">
                               <e:cell value="Servicos"/>
                          </f:facet>
                          <e:cell style="xls-wrap:true">
                               <ui:repeat value="#{equipamento.variavelSiteSurveyAssocs}" var="assocs">
      #{assocs.variavelSiteSurvey.varname}
                               </ui:repeat>
                          </e:cell>
                     </e:column>
                </e:worksheet>
           </e:workbook>
      </html>


        • 1. Re: Excel characterSet
          Nicklas Karlsson Master

          Could you post the full stack trace so I see where it's coming from?

          • 2. Re: Excel characterSet
            Tilman Keskinöz Newbie

            Still present in 2.2.2-Final


            java.lang.NumberFormatException: For input string: UTF-8
                 at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
                 at java.lang.Integer.parseInt(Integer.java:449)
                 at java.lang.Integer.valueOf(Integer.java:554)
                 at org.jboss.el.lang.ELSupport.coerceToNumber(ELSupport.java:278)
                 at org.jboss.el.lang.ELSupport.coerceToNumber(ELSupport.java:256)
                 at org.jboss.el.lang.ELSupport.coerceToType(ELSupport.java:333)
                 at org.jboss.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:46)
                 at org.jboss.seam.el.SeamExpressionFactory.coerceToType(SeamExpressionFactory.java:70)
                 at com.sun.facelets.tag.BeanPropertyTagRule$LiteralPropertyMetadata.applyMetadata(BeanPropertyTagRule.java:45)
                 at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
                 at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
                 at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:144)
                 at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
                 at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                 at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
                 at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
                 at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
                 at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
                 at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
                 at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
                 at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
                 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                 at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
                 at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:295)
                 at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:393)
                 at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:520)
                 at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                 at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:436)
                 at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:384)
                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                 at java.lang.Thread.run(Thread.java:662)