Dealing with CheckBoxRenderer behavior


I’m using CheckBoxRenderer in a grid column, on each row populating this grid ; the thing is that, when clicking the provided checkbox, it doesn’t only get checked or unchecked : the whole raw perimeter is over lined in blue and option
are displayed, (cf attachment) ; is it possible to get rid of this click event listener, (if it is about this) ? The idea being that one ore many checkboxes could be selected and then, a delete button would do the job.

reportsList = new Grid(beanReportContainer);
reportsList.setColumns("reports", "create", "delete");
CheckboxRenderer cbr = new CheckboxRenderer();



Hi, I see you have set the row editor enabled (the blue outline plus the save/cancel buttons) - do you actually need it? It should only appear if you double-click the row though, not when (single) clicking a CheckBoxRenderer checkbox. Even so, double-clicking a checkbox should not open the editor either; if that happens it’s a bug.

I did try to set the row editor to false, but, if so, the checkboxes dynamicaly provided on each row aren’t clickable. Maybe it comes from the way I generate each row, using a basic pojo looking like this :

public class ReportFile implements Serializable {
        final Boolean delete) {
        this.reports = reports;
        this.create = create;
        this.delete = delete;


and then, fulfilling a container, with instances of this pojo :

BeanItemContainer beanReportContainer;

beanReportContainer = new BeanItemContainer(ReportFile.class);

int i = 0;
for (final String reportName : reportDAO.getReports(8)) {
final String namefile = String.valueOf(reportName.subSequence(0,
beanReportContainer.addBean(new ReportFile(i++, “” + namefile + “”,
new ThemeResource(“icons/13.png”), false));


reportsList = new Grid(beanReportContainer);
[/code]What do you think about it ?

Actually, when grid. setEditorEnabled() is set to false, the checkbox is checkable or de-checkable, (my mistake, from what I had declared in my previous post), but it throws a java.lang.IllegalStateException: Item editor is not enabled

PM com.vaadin.server.DefaultErrorHandler doDefault
java.lang.IllegalStateException: Item editor is not enabled
        at com.vaadin.ui.Grid.editItem(
        at org.vaadin.grid.cellrenderers.CheckboxRenderer$
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at com.vaadin.event.ListenerMethod.receiveEvent(
        at com.vaadin.event.EventRouter.fireEvent(
        at com.vaadin.event.EventRouter.fireEvent(
        at com.vaadin.server.AbstractClientConnector.fireEvent(
        at com.vaadin.ui.renderers.ClickableRenderer.access$300(
        at com.vaadin.ui.renderers.ClickableRenderer$
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at com.vaadin.server.ServerRpcManager.applyInvocation(
        at com.vaadin.server.ServerRpcManager.applyInvocation(
        at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(
        at com.vaadin.server.communication.ServerRpcHandler.handleRpc(
        at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(
        at com.vaadin.server.SynchronizedRequestHandler.handleRequest(
        at com.vaadin.server.VaadinService.handleRequest(
        at com.vaadin.server.VaadinServlet.service(
        at javax.servlet.http.HttpServlet.service(

So is there a solution or work-around to this? I have a large grid of checkboxes and having each reveal an independant “Save/Cancel” panel is completely unworkable. There’s got to be some way to disable that behavior.

pseudo code… to explain my basic problem.

mGrid.setColumns(“function”, “complexity”, “resources”, …);

CheckboxRenderer req = new CheckboxRenderer();
CheckboxRenderer cmplx = new CheckboxRenderer();
CheckboxRenderer rsrcs = new CheckboxRenderer();

mGrid.getColumn(“resources”.setRenderer(rsrcs) ;

I’m left with checkboxes as I like, however each checkbox, when changed launches the dreaded Save/Cancel dialog. Do we need to override all the actions? That seems like a great deal of work for a feature that should have been optional rather than default.