Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6710415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:01:14+00:00 2026-05-26T08:01:14+00:00

My Vaadin application provides a little table, which is editable. If the user –

  • 0

My Vaadin application provides a little table, which is editable.

If the user – after changing some fields – clicks on the save button, I will receive all the rows and save the changed rows into the database.

// create a bean item container 
val writers: BeanItemContainer[Person] = new BeanItemContainer[Person](classOf[Person])

// create some person objects 
writers.addBean(new Person("Thomas", "Mann",  1929))
writers.addBean(new Person("W. B.",  "Yeats", 1923))
writers.addBean(new Person("Günter", "Grass", 1999))

// create the table incl. the bean item container  
val table: Table = new Table("Nobel Prize for Literature", writers)

// set some options for the table 
table.setImmediate(true)
table.setEditable(true)
table.setValidationVisible(true)

// create the save button
val saveButton = new Button("save") 

// create a table listener 
saveButton.addListener(new Button.ClickListener() {
  def buttonClick(event: com.vaadin.ui.Button#ClickEvent) {
    table.commit()
    val writerList = table.getItemIds.asInstanceOf[Collection[Person]].asScala.toList
    //
    // **THIS WILL NOT WORK** 
    // 
    //   I received always the original rows, without the
    //   user input, but I needs the user input, the changed rows.
    //                           
    //
    for (item <- writerList) {
      println("firstName ====> " + item.getFirstName)
      println("lastName =====> " + item.getLastName)
      println("year==========> " + item.getYear)
    }
  }
});

How can I receive the changed rows with the user input? Is it necessary to implement a form? If yes, how I can implement a form in this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:01:15+00:00Added an answer on May 26, 2026 at 8:01 am

    Vaadin does not keep track of modified items in a container. You have to track the modifications in your beans (Person). Define setters for all editable properties and set a modified flag if something changes. In the save button listener you can filter out all modified items.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have few Vaadin tabs one of them is displaying an table and some
I have a Vaadin application and I am trying to display a PDF which
I have a download action implemented on my Vaadin application but for some reason
I have a vaadin application and I am trying to provide some REST Urls
I'm developing a Vaadin application and am having extreme difficulty getting some aspects of
I have a vaadin application that redirect after login to a view with header
I'm going to develop a web application using SmartGWT. I've heard about Vaadin framework.
Vaadin and Apache Click seem to be equally good, which one should I choose
In my application I set up the locale when the user get into the
I have an Application which displays a Chart, which is filled with data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.