12 Replies Latest reply on Apr 25, 2008 10:57 PM by Diego Coronel

    JSF WYSIWYG control

    John Ament Master

      Hey.  Just wondering if anyone here might know of a good WYSIWYG text area style control for JSF.  The use case would be instead of an inputTextarea, I would use this control to give buttons, kind of like BB code.  Maybe something like what this site is using for the formatting in the drop down, but maybe already laid out like you would see on a phpBB forum or vBulletin.


      Obviously, the other end of it would be the BB code rendering engine.


      Maybe I should just download this site and see how it's doing it, unless there's something already built into seam?


      Thanks,


      John

        • 1. Re: JSF WYSIWYG control
          Mikael Andersson Master

          Hi there


          Seam has support for a wiki like syntax, have a look here in the Seam documentation for the formattedText tag.


          You can vote for a rich editor on the RichFacesFuture wiki page.


          Other wise people seem to be using various other java script wysiwyg editors MyFades wiki


          Cheers,
          Micke

          • 2. Re: JSF WYSIWYG control
            Jason Lee Newbie

            In addition to Micke's suggestions, I have wrapped the YUI RTE as a JSF control in the Mojarra Scales project.  You can see a screen shot here https://scales.dev.java.net/ (sorry about the formatting.  I'll try to fix that.  dev.java.net's web site editing/support is quite lacking, to put it kindly) and a live demo here http://jsftemplating.org/mojarra-scales-demo-facelets/htmlEditor.jsf.

            • 3. Re: JSF WYSIWYG control
              John Ament Master

              I believe that the JSF control that Jason posted is the closest to what I'm looking for.  In my opinion, things like wiki syntax work if you're technical, but for the everyday user it's a pain to learn.


              Jason, how difficult is it to add a second JSF component provider to the mix if I'm already using richfaces?  This looks primarily client side, so I assume the value coming back is only the fully marked up HTML, correct?

              • 4. Re: JSF WYSIWYG control
                Jason Lee Newbie

                John, off hand, I'm not 1005 sure.  In theory, it should work, but I haven't been able to test that yet.  It's on my too long to do list.  If you beat me to it, I'd love to hear your findings.  If it doesn't work now, I'll be sure to make it.

                • 5. Re: JSF WYSIWYG control
                  John Ament Master

                  Well, it did not go as pretty as I had hoped.  I finally got a chance to try this out.


                  This is what I did:


                  1. put the scales jar into the WEB-INF/lib directory.


                  2. On my facelet, added the follow xmlns


                  3. Added the following call to the htmleditor


                  4. Built the app


                  5. Started Jboss


                  6. Cry as I saw this exception


                  javax.faces.FacesException: java.lang.IllegalStateException: No application context active
                       at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:387)
                       at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
                       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
                       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
                       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
                       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
                       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
                       at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                       at org.jboss.web.WebModule.startModule(WebModule.java:83)
                       at org.jboss.web.WebModule.startService(WebModule.java:61)
                       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                       at $Proxy0.start(Unknown Source)
                       at org.jboss.system.ServiceController.start(ServiceController.java:417)
                       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                       at $Proxy44.start(Unknown Source)
                       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                       at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                       at $Proxy45.start(Unknown Source)
                       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                       at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                       at $Proxy9.deploy(Unknown Source)
                       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                       at $Proxy0.start(Unknown Source)
                       at org.jboss.system.ServiceController.start(ServiceController.java:417)
                       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                       at $Proxy4.start(Unknown Source)
                       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                       at $Proxy5.deploy(Unknown Source)
                       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                       at org.jboss.Main.boot(Main.java:200)
                       at org.jboss.Main$1.run(Main.java:508)
                       at java.lang.Thread.run(Thread.java:619)
                  Caused by: java.lang.IllegalStateException: No application context active
                       at org.jboss.seam.Component.forName(Component.java:1799)
                       at org.jboss.seam.Component.getInstance(Component.java:1849)
                       at org.jboss.seam.Component.getInstance(Component.java:1844)
                       at org.jboss.seam.Component.getInstance(Component.java:1821)
                       at org.jboss.seam.Component.getInstance(Component.java:1816)
                       at org.jboss.seam.core.ResourceLoader.instance(ResourceLoader.java:97)
                       at org.jboss.seam.core.SeamResourceBundle.loadBundlesForCurrentLocale(SeamResourceBundle.java:58)
                       at org.jboss.seam.core.SeamResourceBundle.getBundlesForCurrentLocale(SeamResourceBundle.java:48)
                       at org.jboss.seam.core.SeamResourceBundle.handleGetObject(SeamResourceBundle.java:107)
                       at java.util.ResourceBundle.getObject(ResourceBundle.java:378)
                       at java.util.ResourceBundle.getString(ResourceBundle.java:344)
                       at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:151)
                       at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:122)
                       at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277)
                       at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1013)
                       at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1073)
                       at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:493)
                       at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381)
                       ... 137 more



                  I don't suppose you have any insight on this?

                  • 6. Re: JSF WYSIWYG control
                    John Ament Master

                    Ooops, missed the first line.


                    Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener

                    • 7. Re: JSF WYSIWYG control
                      Shane Bryzak Master

                      I really like OpenWYSIWYG, and have integrated it easily into a JSF/Facelets page (although not as a JSF tag).  The code is as simple as this:



                          <script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/openwysiwyg/wysiwyg.js"></script>
                      
                          <h:form id="editpost">
                                <h:inputTextarea id="content" value="#{postAction.post.content}"/>
                                <script type="text/javascript">
                                  <!--
                                  generate_wysiwyg('editpost:content');
                                  // -->
                                </script>  



                      All you need to do is make sure you specify an ID for your form and text area control.

                      • 8. Re: JSF WYSIWYG control
                        Jason Lee Newbie

                        Have you add the jasftemplating-base jar (http://download.java.net/maven/1/com.sun.jsftemplating/jars/jsftemplating-base-1.2-SNAPSHOT.jar)?  I'm guessing/hoping that the 137 more includes a NoClassDefFoundException. 

                        • 9. Re: JSF WYSIWYG control
                          John Ament Master

                          Now I did.  The app starts.  When I try to load a page w/ the html editor on it, I get the following, on the seam debug page:



                          Exception during request processing:
                          Caused by javax.servlet.ServletException with message: "A LayoutDefinition was not provided for 'templates/htmlEditor.xhtml'! This is required."
                          
                          javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                          java.lang.Thread.run(Thread.java:619)
                          
                          Caused by java.lang.IllegalArgumentException with message: "A LayoutDefinition was not provided for 'templates/htmlEditor.xhtml'! This is required."
                          
                          com.sun.jsftemplating.component.TemplateComponentHelper.getLayoutDefinition(TemplateComponentHelper.java:178)
                          com.sun.jsftemplating.component.TemplateInputComponentBase.getLayoutDefinition(TemplateInputComponentBase.java:89)
                          com.sun.jsftemplating.renderer.TemplateRenderer.encodeBegin(TemplateRenderer.java:87)
                          javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
                          org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:184)
                          org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
                          org.jboss.seam.ui.renderkit.ValidateAllRendererBase.doEncodeChildren(ValidateAllRendererBase.java:33)
                          org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
                          org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
                          org.jboss.seam.ui.renderkit.DecorateRendererBase.doEncodeChildren(DecorateRendererBase.java:104)
                          org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                          org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                          org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
                          org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
                          org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
                          javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                          org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                          org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                          org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                          org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:266)
                          org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:261)
                          org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                          org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:143)
                          org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                          org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                          org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
                          org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
                          org.ajax4jsf.context.AjaxContextImpl.renderAjaxRegion(AjaxContextImpl.java:286)
                          org.ajax4jsf.context.AjaxContextImpl$2.invoke(AjaxContextImpl.java:201)
                          org.ajax4jsf.context.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:78)
                          org.ajax4jsf.context.AjaxContextImpl.invokeOnComponent(AjaxContextImpl.java:157)
                          org.ajax4jsf.context.AjaxContextImpl.renderSubmittedAjaxRegion(AjaxContextImpl.java:215)
                          org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:239)
                          com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
                          com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                          com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                          javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                          java.lang.Thread.run(Thread.java:619)
                          
                          Caused by com.sun.jsftemplating.layout.LayoutDefinitionException with message: "No LayoutDefinitionManager available for 'templates/htmlEditor.xhtml'. This may mean the file cannot be found, or is unrecognizable."
                          
                          com.sun.jsftemplating.layout.LayoutDefinitionManager.getLayoutDefinitionManager(LayoutDefinitionManager.java:348)
                          com.sun.jsftemplating.layout.LayoutDefinitionManager.getLayoutDefinition(LayoutDefinitionManager.java:150)
                          com.sun.jsftemplating.component.TemplateComponentHelper.getLayoutDefinition(TemplateComponentHelper.java:175)
                          com.sun.jsftemplating.component.TemplateInputComponentBase.getLayoutDefinition(TemplateInputComponentBase.java:89)
                          com.sun.jsftemplating.renderer.TemplateRenderer.encodeBegin(TemplateRenderer.java:87)
                          javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
                          org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:184)
                          org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
                          org.jboss.seam.ui.renderkit.ValidateAllRendererBase.doEncodeChildren(ValidateAllRendererBase.java:33)
                          org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
                          org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
                          org.jboss.seam.ui.renderkit.DecorateRendererBase.doEncodeChildren(DecorateRendererBase.java:104)
                          org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                          org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                          org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
                          org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
                          org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
                          javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                          org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                          org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                          org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                          org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:266)
                          org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:261)
                          org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                          javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                          org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                          org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:143)
                          org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                          org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                          org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
                          org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
                          org.ajax4jsf.context.AjaxContextImpl.renderAjaxRegion(AjaxContextImpl.java:286)
                          org.ajax4jsf.context.AjaxContextImpl$2.invoke(AjaxContextImpl.java:201)
                          org.ajax4jsf.context.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:78)
                          org.ajax4jsf.context.AjaxContextImpl.invokeOnComponent(AjaxContextImpl.java:157)
                          org.ajax4jsf.context.AjaxContextImpl.renderSubmittedAjaxRegion(AjaxContextImpl.java:215)
                          org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:239)
                          com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
                          com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                          com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                          javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                          java.lang.Thread.run(Thread.java:619)



                          This may be partially due to how I'm loading my facelets.  Default extension is XHTML, so a4j might be thinking it's a facelet, rather than an HTML page.


                          Thoughts?

                          • 10. Re: JSF WYSIWYG control
                            John Ament Master

                            I tried your approach as well.  It didn't render.  Honestly though, I'd prefer the JSF control to anything else.

                            • 11. Re: JSF WYSIWYG control
                              nathan dennis Expert

                              Hey Shane how about a another revision of your code. It doenst render. throws javascript error


                              buttonName has no properties
                              http://foo:8080/foor/foo/wysiwyg/wysiwyg.js
                              Line 246
                              
                              generate_wysiwyg("editpost:content")wysiwyg.js (line 246)
                              [Break on this error] for (var i = 0; i <= buttonName.length;) { 
                              

                              • 12. Re: JSF WYSIWYG control
                                Diego Coronel Apprentice

                                hey, i used fck-faces source to integrate fck-editor with seam, its really simple to use, just


                                writing to my web.xml:



                                <servlet>
                                       <servlet-name>FCK Faces Servlet</servlet-name>
                                       <servlet-class>org.fckfaces.util.Servlet</servlet-class>
                                       <load-on-startup>3</load-on-startup>
                                       <init-param>
                                         <param-name>customResourcePath</param-name>
                                         <param-value>/WEB-INF/</param-value>
                                         <description>Allows to specify the path of the FCKeditor resources</description>
                                       </init-param>
                                     </servlet>



                                and in my xhtml:



                                xmlns:fck="http://www.fck-faces.org/fck-faces"
                                
                                <fck:editor toolbarSet="Default" height="500" width="100%" id="myComponentId" value="#{myManagedBean.text}" />



                                then get latest version of fckEditor and copy in WEB-INF/


                                last step, send me mail and ill send JAR file to you copy in WEB-INF/lib


                                with this you can add converter or validator like any other component JSF.


                                my mail: dcoronel@fpf.br