Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Inporting the Vaadin Spreadsheet into the dashboard demo

René Malmgren
6 years ago Oct 15, 2015 9:26pm

Hello. 

I have been trying, so far with little luck to use the spreadsheet component in the dashboard demo. För some reason when I try to add this component it does not work. 

The thing I have done, so far

1. Add the dependency to the project ( via Maven ) 

2. Try to add a Spreadsheet to the transaction view

    Spreadsheet spreadsheet;
    
    public TransactionsView() {
        
        spreadsheet = new Spreadsheet();        
        addComponent(spreadsheet);
        
        setSizeFull();

Unfortunatly no matter whay I try, now spreadsheet wants to apeer. Anybody got any ideers what I am missing?

I have done "mvn vaadin:update-theme", and checked that the spreadsheet is addons.scss contains @import and @include

The page can be found here: http://es.labs.h3.se:8080/quicktickets-dashboard/#!transactions

 

James Byrne
6 years ago Jan 06, 2016 4:24pm
Jarno Rantala
6 years ago Jan 08, 2016 11:04am

Hi René and James,

I'm sorry to hear, that your trial with Spreadsheet didn't go smoothly.

You have done right by updating the theme as Spreadsheet contains its own styles. Anyway, it seems that currently the dashboard demo does not include addons.scss as it should.

Update the styles.scss file as follows:

// Import all the mixins for this theme
@import "addons.scss";
@import "dashboard";

.dashboard {
  // Output the actual theme selectors
  @include addons;
  @include dashboard;
}

Now, you should be able to see the spreadsheet in the view.

BR,
Jarno

James Byrne
6 years ago Jan 13, 2016 9:19am
James Byrne
6 years ago Jan 14, 2016 5:21pm
Jarno Rantala
6 years ago Jan 15, 2016 8:57am