0

I would like to extend primefaces column and add a custom boolean attribute. I created custom component extending the primefaces column component.

public class TColumn extends Column {
    private enum PropertyKeys {
        tickable
    }
    public boolean isTickable() {
        return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.tickable, false);
    }
    public void setTickable(boolean _tickable) {
        getStateHelper().put(PropertyKeys.tickable, _tickable);
    }
}

Is this sufficient or do I have to extend datatable renderer as well? Thanks.

Kevin Brechbühl
  • 4,717
  • 3
  • 24
  • 47
  • tried the above, getting this exception, Any suggestions or alternate approach? Thanks. java.lang.IllegalStateException: Component ID already been found in the view. at com.sun.faces.util.Util.checkIdUniqueness – user3154305 Feb 15 '14 at 20:40
  • I think the ColumnHandler is rendering the custom column twice causing the duplicate id issue. Any suggestions? Thanks. – user3154305 Feb 15 '14 at 22:23
  • I think post explains some valid points...please respond if there are any other suggestions. Thanks http://stackoverflow.com/questions/11439886/how-to-create-a-composite-component-for-a-datatable-column – user3154305 Feb 16 '14 at 00:40

0 Answers0