As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<show-property name="my:textproperty" component-generator="TinyMCETextAreaGenerator">
package org.alfresco.module.WebClientTinyMCESupport.ui; //… public class TinyMCETextAreaGenerator extends TextAreaGenerator { private static final Log logger = LogFactory .getLog(TinyMCETextAreaGenerator.class); public UIComponent generate(FacesContext context, String id) { logger.info("TinyMCETextAreaGenerator invoked."); UIComponent component = context.getApplication().createComponent( ComponentConstants.JAVAX_FACES_INPUT); component.setRendererType("org.alfresco.module.WebClientTinyMCESupport.ui.TinyMCETextArea"); // (*) FacesHelper.setupComponentId(context, component, id); return component; } }
package org.alfresco.module.WebClientTinyMCESupport.ui; //… public class TinyMCETextAreaRenderer extends BaseRenderer { public void encodeBegin(FacesContext context, UIComponent component) throws IOException { logger.info("encodeBegin"); // never executed!! } // … }
<managed-bean> <managed-bean-name>TinyMCETextAreaGenerator</managed-bean-name> <managed-bean-class>org.alfresco.module.WebClientTinyMCESupport.ui.TinyMCETextAreaGenerator</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <render-kit> <renderer> <component-family>javax.faces.input</component-family> <renderer-type>org.alfresco.module.WebClientTinyMCESupport.ui.TinyMCETextArea</renderer-type> <renderer-class>org.alfresco.module.WebClientTinyMCESupport.ui.TinyMCETextAreaRenderer</renderer-class> </renderer> </render-kit>
Is it something you'd contribute to the core?