wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BrianWilliams <brianwilliams33...@yahoo.com>
Subject Re: Adding checkbox column to DefaultDataTable
Date Wed, 31 Jul 2013 16:53:29 GMT
Sorry to take so long to reply.  I've been working on other things.  Looking
at this again I had to change the model I was using, and my problem is
solved with this CheckboxColumn:

    private class CheckboxColumn<T> extends HeaderlessColumn<T, Object> {

        private String expression;
        public CheckboxColumn(String expression) {
            this.expression = expression;
        }

        @Override
        public Component getHeader(String componentId) {
            return new Label(componentId, new Model<String>("Select"));
            // return new CheckGroupSelector(componentId, checkGroup);
        }

        @Override
        public void populateItem(Item<ICellPopulator&lt;T>> cellItem, String
componentId, IModel<T> rowModel) {
            Panel panel = new CheckboxPanel(componentId, rowModel) {};
            cellItem.add(panel);
            panel.add(new Check("checkbox", rowModel));
        }
    }

Thank you for your consideration.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-checkbox-column-to-DefaultDataTable-tp4660374p4660578.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message