Example usage for com.vaadin.ui Grid setReadOnly

List of usage examples for com.vaadin.ui Grid setReadOnly

Introduction

In this page you can find the example usage for com.vaadin.ui Grid setReadOnly.

Prototype

@Override
    protected void setReadOnly(boolean readOnly) 

Source Link

Usage

From source file:com.hack23.cia.web.impl.ui.application.views.common.gridfactory.impl.GridFactoryImpl.java

License:Apache License

@Override
public void createBasicBeanItemNestedPropertiesGrid(final AbstractOrderedLayout panelContent,
        final Indexed datasource, final String caption, final String[] nestedProperties,
        final Object[] columnOrder, final Object[] hideColumns,
        final AbstractPageItemRendererClickListener<?> listener, final String actionId,
        final ListPropertyConverter[] collectionPropertyConverters) {
    final Grid grid = new Grid(datasource);

    grid.setCaption(caption);//from   www . j  av a 2s  .c om
    grid.setSelectionMode(SelectionMode.SINGLE);

    createNestedProperties(datasource, nestedProperties);

    configureColumnOrdersAndHiddenFields(columnOrder, hideColumns, grid);

    configureListeners(listener, grid);

    setColumnConverters(collectionPropertyConverters, grid);

    grid.setSizeFull();

    grid.setStyleName("Level2Header");

    grid.setImmediate(true);
    grid.setReadOnly(true);

    createGridCellFilter(columnOrder, grid);

    panelContent.addComponent(grid);
    panelContent.setExpandRatio(grid, ContentRatio.GRID);
}