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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:25:56+00:00 2026-06-10T17:25:56+00:00

I’m currently on a project using Vaadin 6.8.1 + Spring 3, which is structured

  • 0

I’m currently on a project using Vaadin 6.8.1 + Spring 3, which is structured as a Vaadin interface that calls Spring services (and Hibernate behind).

Thanks to LazyQueryContainer (LQC), I could load from services my data and display it in Vaadin tables and comboboxes. At this point, everything is fine and great. However, I have a form which contains a combobox, with data from a LQC, that doesn’t select properly the correct item when the form’s setItemDataSource method is called.

For instance, my application manages a list of persons and companies in a database. There are 2 classes : Person and Company. And the relationship is as simple as a person is member of a company. So, the class Person has a field company of type Company.
Now, I have a Vaadin Form that manages a Person. And in this form is a combobox that displays all companies in the database, and the selected company is the company which the person is registered to.

Since my application is divided in services, I can’t use a JPAContainer or HibernateContainer to directly access my data. I’ve then choosed the LazyQueryContainer with its AbstractBeanQuery. I created a datasource for the Person and Company classes, and they display properly in a table and comboboxes. The Vaadin Form displays also properly the Person’s String fields in the text inputs.

However, I wanted to manage the Company field with the combobox instead of the default textbox. So, I implemented a FormFieldFactory and binded the field to the combobox. There is indeed no more default company textbox, which means the binding is working, but the selected value in the combobox is blank (null).

I implemented the equals and hashcode methods in the Company class, but it didn’t change anything. I thought also that I should load all the data in the combobox (since the number of items is low) but I don’t know how to get manually an object from the LQC object. And without source code, there’s no way to debug.

Any help would be very welcome.
Thanks.

  • 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-06-10T17:25:58+00:00Added an answer on June 10, 2026 at 5:25 pm

    I think you issue is that the LazyQueryContainer is using Long as item ID’s but the Vaadin form is trying to set your Company as the combo box value. Since this id (the Company instance) is not part of the LazyQueryContainer id list the selection remains null.

    You need to find out first the id of you Company that the LazyQueryContainer assigned to it, then set that value to the combo box. You will also need to create a custom field and subclass the ComboBox so you can handle the setValue when it’s called by the form.

    Side Note: The Vaadin BeanItemContainer uses your JavaBean as it’s item id. This is why myCombo.setValue (myCompany) works.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words

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.