8 Replies Latest reply on Mar 23, 2012 4:21 AM by Larry Jiang

    rich:editor forecolor problem

    Agustin Sivoplás Ferrari Expert

      I can`t see the image in color picker (Attachment)

       

      in xhtml

       

      <rich:editor id="textNotificacionTarea" width="300" height="150" value="#{helpdeskBean.contenidoEmail.textoNotificacionTarea}" configuration="editorconfig"/>

       

       

      editorconfig.properties

       

      theme="advanced"

      theme_advanced_buttons1 = "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,charmap"

      theme_advanced_buttons2 = "forecolor,fontselect,fontsizeselect,image,code"

      theme_advanced_toolbar_location="top"

      theme_advanced_toolbar_align="left"

       

      Any have an idea?

        • 1. Re: rich:editor forecolor problem
          Ilya Shaikovsky Master
          sorry but can't reproduce under 3.3.3 snapshots. try 3.3.3 CR1
          • 2. Re: rich:editor forecolor problem
            Agustin Sivoplás Ferrari Expert

            The log display this error

             

            Error send script to client for resource scripts/tiny_mce/themes/advanced/img/colorpicker.jpg

            org.ajax4jsf.javascript.JSMin$UnterminatedStringLiteralException: Unterminated string literal richfaces

             

            I searching in google but i dont have lucky...

            • 3. Re: rich:editor forecolor problem
              Agustin Sivoplás Ferrari Expert

              Copy the complete error

               

              09:39:00,890 ERROR [ScriptRenderer] Error send script to client for resource scripts/tiny_mce/themes/advanced/img/colorpicker.jpg

              org.ajax4jsf.javascript.JSMin$UnterminatedStringLiteralException: Unterminated string literal at line 3 and column 0

              at org.ajax4jsf.javascript.JSMin.action(JSMin.java:191)

              at org.ajax4jsf.javascript.JSMin.jsmin(JSMin.java:289)

              at org.ajax4jsf.resource.ScriptRenderer.send(ScriptRenderer.java:62)

              at org.ajax4jsf.resource.InternetResourceBase.send(InternetResourceBase.java:374)

              at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:219)

              at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:158)

              at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:335)

              at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)

              at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)

              at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:195)

              at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)

              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at uy.com.its.util.AuthenticationFilter.doFilter(AuthenticationFilter.java:82)

              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:230)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

              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:157)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

              at java.lang.Thread.run(Unknown Source)

              • 4. Re: rich:editor forecolor problem
                Agustin Sivoplás Ferrari Expert

                I upgraded to RichFaces 3.3.3 and the error disappeared.

                 

                Regards

                • 5. Re: rich:editor forecolor problem
                  Tiago Peruzzo Newbie

                  the error remains because the image is mapped as javascript.

                   

                   

                  resources-config.xml


                  <resource>

                    <name>scripts/tiny_mce/themes/advanced/img/colorpicker.jpg</name>

                    <path>org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/img/colorpicker.jpg</path>

                    <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>

                  </resource>

                  • 6. Re: rich:editor forecolor problem
                    Larry Jiang Newbie

                    I am using richfaces 3.3.3 final, but i still have this problem! exactly same as you ~~ can you give me suggestion?

                    • 7. Re: rich:editor forecolor problem
                      Tiago Peruzzo Newbie

                      Larry, you can make the correct mapping of this resource to your own project by creating the file WEB-INF/classes/META-INF/resources-config.xml.

                       

                      <?xml version="1.0" encoding="UTF-8"?>

                      <resource-config>

                           <resource>

                                <name>scripts/tiny_mce/themes/advanced/img/colorpicker.jpg</name>

                                <path>org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/img/colorpicker.jpg</path>

                           </resource>   

                      </resource-config>

                      • 8. Re: rich:editor forecolor problem
                        Larry Jiang Newbie

                        Tiago Peruzzo, I tried your method, but it is still not working, I tried richfaces 3.3.1 GA it is working, but the icon of forecolor is not properly generately! and I still need to use richfaces 3.3.3 final. And i will give you my deploy structure: I deloyed my application as a war package in jboss. and inside war are those folders:

                         

                             css, images, META-INF, pages, scripts, template, WEB-INF

                         

                        insiede the WEB-INF  are

                         

                             classes, lib, and config files

                         

                        I did created the folder with the xml file, but still not work.

                        if we created a xml here, how will the application knows that it is going to use this mapping instead of the mapping provided in the richfaces-ui-3.3.3.jar ? should i miss some configuration or something ?