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 7160253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:22:08+00:00 2026-05-28T13:22:08+00:00

I am new to vaadin and have a databinding problem. I have posted allready

  • 0

I am new to vaadin and have a databinding problem. I have posted allready in the vaadin forum, but no answer up to now.
if you answer here, I will of course reward it anyway.

https://vaadin.com/forum/-/message_boards/view_message/1057226

thanks in advance.
greets,
Andreas

Additional information: I tried allready to iterate over the items in the container, after pressing a save button. After deleting all original elements in the model collection, and adding copies from the container, the GUI breaks. Some other GUI elements do not respond anymore.

  • 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-28T13:22:09+00:00Added an answer on May 28, 2026 at 1:22 pm

    I have personally never used ListSelect, but I found this from the API docs:

    This is a simple list select without, for instance, support for new items, lazyloading, and other advanced features.

    I’d recommend BeanItemContainer. You can use it like this:

    // Create a list of Strings
    List<String> strings = new ArrayList<String>();
    strings.add("Hello");
    
    // Create a BeanItemContainer and include strings list
    final BeanItemContainer<String> container = new BeanItemContainer<String>(strings);
    container.addBean("World");
    
    // Create a ListSelect and make BeanItemContainer its data container
    ListSelect select = new ListSelect("", container);
    
    // Create a button that adds "!" to the list
    Button button = new Button("Add to list", new Button.ClickListener() {
        public void buttonClick(ClickEvent event) {
            container.addBean("!");
        }
    }
    
    // Add the components to a layout
    myLayout.addComponent(button);
    myLayout.addComponent(select);
    

    The downside (or benefit, it depends 🙂 of this is that you can’t add duplicate entries to a BeanItemContainer. In the example above the exclamation mark gets only added once.

    You can get a Collection of Strings by calling:

    Collection<String> strings = container.getItemIds();
    

    If you need to support duplicate entries, take a look at IndexedContainer. With IndexedContainer you can add a String property by calling myIndexedContainer.addContainerProperty("caption", String.class, ""); and give each Item a unique itemId (or let the container generate the id’s automatically).

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

Sidebar

Related Questions

I have a really strange Problem with my new Vaadin Project. If I start
I am new to Vaadin. I have created template for my web application in
I am new to java vaadin framework. I have installed APACHE TOMCAT 6 and
new here and new to jQuery. I've searched for an answer to my question/
I have a download action implemented on my Vaadin application but for some reason
(New to Objective-C, but well versed in C/C++). Presently I have an Objective-C class
I'm very new to vaadin ( and to java). i have an table that
new to python. This is probably simple but I haven't found an answer. rndStr
New to iPhone app development, I have a problem compiling (or Build and Run)
I'm starting the development of a new application based on Vaadin. I'm a big

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.