1 Reply Latest reply on Jul 12, 2013 3:05 AM by Lukáš Fryč

    How to extend rich:datatable with CDK

    Sergey Zubarev Newbie

      Hello. I want to extend rich:datatable with CDK (ver 4.3.1.Final)

       

      I created maven project using cdk wiki and created 2 files: component and package-info.

      Project compiled, but if I include my custom datatable in page nothing displayed. No errors, warning, just nothing.

       

      How can I extend rich datatable with cdk?

       

      AbstractDataTableExt.java

      package ru.zpage.projects.richfaces.datatable.component;
      
      import java.io.Serializable;
      
      import javax.faces.component.UIComponent;
      
      import org.richfaces.cdk.annotations.*;
      import org.richfaces.component.AbstractDataTable;
      import org.richfaces.component.UIDataTableBase;
      
      @JsfComponent(
              type = "ru.zpage.projects.richfaces.datatable.DataTableExt", 
              family = AbstractDataTable.COMPONENT_FAMILY,
              renderer = @JsfRenderer(type = "org.richfaces.DataTableRenderer"), 
              tag = @Tag(name = "dataTable", 
              handler = "org.richfaces.taglib.DataTableHandler", 
              type = TagType.Facelets), attributes = {
              "style-prop.xml", "styleClass-prop.xml", "iteration-props.xml", "rows-prop.xml", "sequence-props.xml",
              "events-row-props.xml" })
      public abstract class AbstractDataTableExt extends UIDataTableBase implements Serializable{
      
          public static final String CAPTION_FACET_NAME = "caption";
          
      
          @Attribute
          public abstract String getCaptionClass();
          
          @Attribute
          public abstract String getStyleClass();
      
          @Facet
          public abstract UIComponent getCaption();
      
      }
      

       

       

      package-info.java

      @TagLibrary(uri="http://zpage.ru/richfaces",shortName="zpageLib")
      package ru.zpage.projects.richfaces.datatable.component;
      import org.richfaces.cdk.annotations.TagLibrary;