5 Replies Latest reply on Dec 5, 2011 7:15 AM by Maximilian Faupel

    problem creating HtmlEditor component dynamically

    Maximilian Faupel Newbie

      Hi,

       

      I try to create a HtmlEditor component dynamically and get the following exception. Shouldn't HtmlEditor be casted to UIEditor or is there another possibility to create a richfaces editor component dynamically? Thank you in advance.

       

      Maximilian

       

      UIEditor editor = new HtmlEditor();
      editor.setId(block.getKey());
      editor.setValue(value);
      panelGrid.getChildren().add(editor);
      

       

       

      Error Rendering View[/home.xhtml]: java.lang.IllegalArgumentException: Component form:block17 not instance of org.richfaces.component.UIEditor
          at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:93) [:3.3.3.Final]
          at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:816) [:1.2_15-20100816-SNAPSHOT]
          at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234) [:1.2_15-20100816-SNAPSHOT]
          at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:180) [:1.2_15-20100816-SNAPSHOT]
          at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:127) [:1.2_15-20100816-SNAPSHOT]
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:840) [:1.2_15-20100816-SNAPSHOT]
          at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:236) [:1.2_15-20100816-SNAPSHOT]
          at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:106) [:1.2_15-20100816-SNAPSHOT]
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:840) [:1.2_15-20100816-SNAPSHOT]
          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:166) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157) [:3.3.3.Final]
          at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:124) [:3.3.3.Final]
          at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:685) [:3.3.3.Final]
          at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:556) [:3.3.3.Final]
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930) [:1.2_15-20100816-SNAPSHOT]
          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592) [:2.2.2.Final]
          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) [:3.3.3.Final]
          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) [:3.3.3.Final]
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) [:1.2_15-20100816-SNAPSHOT]
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) [:1.2_15-20100816-SNAPSHOT]
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [:1.2_15-20100816-SNAPSHOT]
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) [:1.2_15-20100816-SNAPSHOT]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [:2.2.2.Final]
          at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [:2.2.2.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final]
          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [:2.2.2.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final]
          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [:2.2.2.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final]
          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [:2.2.2.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final]
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [:3.3.3.Final]
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [:3.3.3.Final]
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [:3.3.3.Final]
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [:3.3.3.Final]
          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [:2.2.2.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final]
          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [:2.2.2.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final]
          at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) [:2.2.2.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final]
          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [:2.2.2.Final]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [:6.0.0.Final]
          at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
          at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
          at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
          at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]