We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vaadin version 8.4.5, Spreadsheet 2.1.0.alpha1
Minimal example to reproduce - just click the button.
package foo.bar; import javax.servlet.annotation.WebServlet; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Sheet; import com.vaadin.addon.spreadsheet.Spreadsheet; import com.vaadin.addon.spreadsheet.SpreadsheetComponentFactory; import com.vaadin.annotations.Theme; import com.vaadin.annotations.VaadinServletConfiguration; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServlet; import com.vaadin.ui.Button; import com.vaadin.ui.ComboBox; import com.vaadin.ui.Component; import com.vaadin.ui.UI; import com.vaadin.ui.VerticalLayout; @Theme("mytheme") public class MyUI extends UI { @Override protected void init(VaadinRequest vaadinRequest) { final VerticalLayout layout = new VerticalLayout(); Spreadsheet sheet = new Spreadsheet(6, 6); sheet.setSpreadsheetComponentFactory(getFactory()); Button b = new Button("New entry"); b.addClickListener(e -> addRow(sheet)); layout.addComponent(b); layout.addComponent(sheet); setContent(layout); } private SpreadsheetComponentFactory getFactory() { SpreadsheetComponentFactory f = new SpreadsheetComponentFactory() { @Override public void onCustomEditorDisplayed(Cell cell, int rowIndex, int columnIndex, Spreadsheet spreadsheet, Sheet sheet, Component customEditor) { } @Override public Component getCustomEditorForCell(Cell cell, int rowIndex, int columnIndex, Spreadsheet spreadsheet, Sheet sheet) { return null; } @Override public Component getCustomComponentForCell(Cell cell, int rowIndex, int columnIndex, Spreadsheet spreadsheet, Sheet sheet) { if((columnIndex==1)) return new ComboBox(); else return null; } }; return f; } private void addRow(Spreadsheet sheet) { int rows = sheet.getRows(); sheet.shiftRows(1, rows, 1); sheet.setMaxRows(rows + 1); } @WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) @VaadinServletConfiguration(ui = MyUI.class, productionMode = false) public static class MyUIServlet extends VaadinServlet { } }
Possibly similar cause as #459 but at a different place in the code.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Vaadin version 8.4.5, Spreadsheet 2.1.0.alpha1
Minimal example to reproduce - just click the button.
Possibly similar cause as #459 but at a different place in the code.
The text was updated successfully, but these errors were encountered: