Can i create grid without bean class in Vaadin 8?

Viewed 2345

I am working on product development using Vaadin. Till date we are using Vaadin 7.

We need to display data on tabular form as well as chart in based on rule. Also user can modify the rule any time from configuration option. so can not define bean with fix number of variables.

In Vaadin 7, using container we can create empty container object and add column run time. But in Vaadin 8 does not allowing as per my knowledge.

With 7 compatible package, it will work for 7 grid.

Example in scala i was creating container from dataframe

def getcontainer(dataframe: Dataset[Row]): IndexedContainer = {

    var container = new IndexedContainer();
/*get number column need to create in data frame. it will be change on evertime based on output dataframe.*/
    val columns = dataframe.columns

    for (x <- columns) {
      try {
        container.addContainerProperty(x, classOf[Any], "");
      } catch {
        case e: NullPointerException =>
          e.printStackTrace()
          println("Column name must not be null")
        case e: Exception =>
          e.printStackTrace()
          println("Some went wrong with dataframe")

      }
    }
return container
}

So how can i do same thing in Vaadin 8?

Any help will be appreciated.

1 Answers
Related