{"id":33410,"date":"2016-02-08T11:00:40","date_gmt":"2016-02-08T09:00:40","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=33410"},"modified":"2019-04-09T13:26:14","modified_gmt":"2019-04-09T10:26:14","slug":"vaadin-combobox-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/","title":{"rendered":"Vaadin Combobox Example"},"content":{"rendered":"<p>A combo box is a graphical user interface widget, a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to either type a value directly or select a value from the list. Vaadin offers a convenient Combobox out of the box for selecting a value in a list or collection.<\/p>\n<p>The Combobox is widely used in web applications to simplify the user interface and restrict the user input to a predefined list of values. In this example I am going to make tree simple Combobox to show the functionality of this useful UI control in Vaadin.<\/p>\n<p>Most cases of the use of a Combobox limit the values that user can choose, values that are invariable. You, as a developer need to fix these values, cause and don&#8217;t want unexpected surprises in your data.\n<\/p>\n<h2>1. The tools<\/h2>\n<ul>\n<li>Java JDK 8<\/li>\n<li>Latest Eclipse Mars<\/li>\n<li>Vaadin 7.6.1<\/li>\n<\/ul>\n<h2>2. Introduction<\/h2>\n<p>With Vaadin Combobox you get out of the box a filter in the textbox that restrict the values showed in the drop-down listbox. Also you can allow the user to add values to the list on the fly, the filter functionality is disabled by default so you need to enable it in your code and you can also choose how the filter works.<\/p>\n<h2>3. Prerequisites<\/h2>\n<ul>\n<li>JDK installed<\/li>\n<li>Eclipse Mars installed and working<\/li>\n<li>Vaadin plugin installed<\/li>\n<\/ul>\n<h2>4. Create the project<\/h2>\n<p>Launch eclipse and in the menu choose File-&gt;New-&gt;Other<\/p>\n<p><figure id=\"attachment_33416\" aria-describedby=\"caption-attachment-33416\" style=\"width: 606px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-Create-New-Project.png\" rel=\"attachment wp-att-33416\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-Create-New-Project.png\" alt=\"01 Create New Project\" width=\"606\" height=\"626\" class=\"size-full wp-image-33416\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-Create-New-Project.png 606w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-Create-New-Project-290x300.png 290w\" sizes=\"(max-width: 606px) 100vw, 606px\" \/><\/a><figcaption id=\"caption-attachment-33416\" class=\"wp-caption-text\">01 Create New Project<\/figcaption><\/figure><\/p>\n<p>Choose Vaadin 7 project and click next.<\/p>\n<p><figure id=\"attachment_33417\" aria-describedby=\"caption-attachment-33417\" style=\"width: 522px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-New-Vaadin-Project.png\" rel=\"attachment wp-att-33417\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-New-Vaadin-Project.png\" alt=\"02 New Vaadin Project\" width=\"522\" height=\"629\" class=\"size-full wp-image-33417\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-New-Vaadin-Project.png 522w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-New-Vaadin-Project-249x300.png 249w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><figcaption id=\"caption-attachment-33417\" class=\"wp-caption-text\">02 New Vaadin Project<\/figcaption><\/figure><\/p>\n<p>Write a name for the project and choose your server. In this case I am using J2EE preview for simplicity, then hit next twice.<\/p>\n<p><figure id=\"attachment_33422\" aria-describedby=\"caption-attachment-33422\" style=\"width: 519px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/03-Name-the-project.png\" rel=\"attachment wp-att-33422\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/03-Name-the-project.png\" alt=\"03 Name the project\" width=\"519\" height=\"624\" class=\"size-full wp-image-33422\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/03-Name-the-project.png 519w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/03-Name-the-project-250x300.png 250w\" sizes=\"(max-width: 519px) 100vw, 519px\" \/><\/a><figcaption id=\"caption-attachment-33422\" class=\"wp-caption-text\">03 Name the project<\/figcaption><\/figure><\/p>\n<p>Select the option &#8220;Generate web.xml deployment descriptor&#8221;, is not needed and you can use annotations instead, so is your choice to use it. Then hit next.<\/p>\n<p><figure id=\"attachment_33424\" aria-describedby=\"caption-attachment-33424\" style=\"width: 521px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/04-Generate-Deployment-Descriptor.png\" rel=\"attachment wp-att-33424\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/04-Generate-Deployment-Descriptor.png\" alt=\"04 Generate Deployment Descriptor\" width=\"521\" height=\"627\" class=\"size-full wp-image-33424\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/04-Generate-Deployment-Descriptor.png 521w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/04-Generate-Deployment-Descriptor-249x300.png 249w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/a><figcaption id=\"caption-attachment-33424\" class=\"wp-caption-text\">04 Generate Deployment Descriptor<\/figcaption><\/figure><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Now select &#8220;Create project template&#8221;, choose the Vaadin version you want to use and click finish.<\/p>\n<p><figure id=\"attachment_33452\" aria-describedby=\"caption-attachment-33452\" style=\"width: 521px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/05-Vaadin-project-specific-details.png\" rel=\"attachment wp-att-33452\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/05-Vaadin-project-specific-details.png\" alt=\"05 Vaadin project specific details\" width=\"521\" height=\"624\" class=\"size-full wp-image-33452\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/05-Vaadin-project-specific-details.png 521w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/05-Vaadin-project-specific-details-250x300.png 250w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/a><figcaption id=\"caption-attachment-33452\" class=\"wp-caption-text\">05 Vaadin project specific details<\/figcaption><\/figure><\/p>\n<p>Now the project is created and you are ready to code.<\/p>\n<h2>5. First ComboBox<\/h2>\n<p>Inside Vaadin Init function, create the layout and attach it to the main content.<\/p>\n<p><span style=\"text-decoration: underline\"><em>First Combobox<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tfinal VerticalLayout layout = new VerticalLayout();\n\t\tlayout.setMargin(true);\n\t\tsetContent(layout);\n\t\t\n\t\tComboBox cb1 = new ComboBox(\"cb1\");\n\t\tcb1.setItemCaptionMode(ItemCaptionMode.EXPLICIT);\n\t\tObject itemID1 = cb1.addItem();\n\t\tcb1.setItemCaption(itemID1, \"cb1-it1\");\n\t\tcb1.setItemIcon(itemID1, new ThemeResource(\"..\/runo\/icons\/16\/attention.png\"));\n\t\tObject itemID2 = cb1.addItem();\n\t\tcb1.setItemCaption(itemID2, \"cb1-it2\");\n\t\tcb1.setItemIcon(itemID2, new ThemeResource(\"..\/runo\/icons\/16\/cancel.png\"));\n\t\tObject itemID3 = cb1.addItem();\n\t\tcb1.setItemCaption(itemID3, \"cb1-it3\");\n\t\tcb1.setItemIcon(itemID3, new ThemeResource(\"..\/runo\/icons\/32\/folder.png\"));\n\t\tcb1.setValue(itemID1);\n\t\tlayout.addComponent(cb1);\n<\/pre>\n<p>Create the combobox and then change the caption mode to explicit, with that command you are ensuring that the id and the name that you see in the drop-down list of the combobox not are the same, for each item added to the combobox you have a caption that is showed on the list. Also here you can see how to set an icon in each item of the combobox, at last when all items are added you add the combobox to the container.<\/p>\n<h2>6. Second ComboBox<\/h2>\n<p><span style=\"text-decoration: underline\"><em>Second ComboBox<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tComboBox cb2 = new ComboBox(\"cb2\");\n\t\tcb2.addItem(\"cb2-it1\");\n\t\tcb2.addItem(\"cb2-it2\");\n\t\tcb2.addItem(\"cb2-it3\");\n\t\tcb2.setValue(\"cb2-it2\");\n\t\tlayout.addComponent(cb2);\n<\/pre>\n<p>The most simple combobox, the id is used as caption in the drop-down list, is the default caption mode, also the default value is set with <code>cb2.setValue(\"cb2-it2\");<\/code>, we create 3 items and add it to the drop-down list and the we add the combobox to the layout.<\/p>\n<h2>7. Third ComboBox<\/h2>\n<p><span style=\"text-decoration: underline\"><em>Third ComboBox<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tLabel cb3Label = new Label();\n\t\tcb3Label.setCaption(\"cb3Label\");\n\n\t\tComboBox cb3 = new ComboBox(\"cb3\");\n\t\tcb3.addItems(\"cb3-it1\", \"cb3-it2\", \"cb3-it3\");\n\t\t\n\t\tcb3.addValueChangeListener(new ValueChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void valueChange(ValueChangeEvent event) {\n\t\t\t\t\n\t\t\t\tcb3Label.setValue(\"Selected : \" + event.getProperty().getValue());\n\t\t\t}\n\t\t});\n\t\tcb3.setValue(\"cb3-it3\");\n\t\tcb3.setNullSelectionAllowed(false);\n\t\tcb3.setFilteringMode(FilteringMode.CONTAINS);\n\t\tlayout.addComponent(cb3Label);\n\t\tlayout.addComponent(cb3);\n<\/pre>\n<p>With this example we create a label, this label is used by the combobox to set the value of the current selected item, we define a listener for the change event to capture when the value of the combobox changed, <code>cb3.setValue(\"cb3-it3\");<\/code> shows the initial value of the combobox, <code>cb3.setNullSelectionAllowed(false);<\/code> force a value selected in the combobox, <code>cb3.setFilteringMode(FilteringMode.CONTAINS);<\/code> change the default filter mode to contain any sub-string typed on the textbox.[ulp id=&#8217;YBvYYzEYBUrADqmI&#8217;]<\/p>\n<h2>8. Complete source code<\/h2>\n<p><span style=\"text-decoration: underline\"><em>VaadinComboBox.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks;\n\nimport com.vaadin.annotations.Theme;\nimport com.vaadin.data.Property.ValueChangeEvent;\nimport com.vaadin.data.Property.ValueChangeListener;\nimport com.vaadin.server.ThemeResource;\nimport com.vaadin.server.VaadinRequest;\nimport com.vaadin.server.VaadinServlet;\nimport com.vaadin.shared.ui.combobox.FilteringMode;\nimport com.vaadin.ui.AbstractSelect.ItemCaptionMode;\nimport com.vaadin.ui.ComboBox;\nimport com.vaadin.ui.Label;\nimport com.vaadin.ui.UI;\nimport com.vaadin.ui.VerticalLayout;\n\n@SuppressWarnings(\"serial\")\n@Theme(\"vaadincombobox\")\npublic class VaadinComboBox extends UI {\n\n\tpublic static class Servlet extends VaadinServlet {\n\t}\n\n\t@Override\n\tprotected void init(VaadinRequest request) {\n\t\t\n\t\tfinal VerticalLayout layout = new VerticalLayout();\n\t\tlayout.setMargin(true);\n\t\tsetContent(layout);\n\t\t\n\t\tComboBox cb1 = new ComboBox(\"cb1\");\n\t\tcb1.setItemCaptionMode(ItemCaptionMode.EXPLICIT);\n\t\tObject itemID1 = cb1.addItem();\n\t\tcb1.setItemCaption(itemID1, \"cb1-it1\");\n\t\tcb1.setItemIcon(itemID1, new ThemeResource(\"..\/runo\/icons\/16\/attention.png\"));\n\t\tObject itemID2 = cb1.addItem();\n\t\tcb1.setItemCaption(itemID2, \"cb1-it2\");\n\t\tcb1.setItemIcon(itemID2, new ThemeResource(\"..\/runo\/icons\/16\/cancel.png\"));\n\t\tObject itemID3 = cb1.addItem();\n\t\tcb1.setItemCaption(itemID3, \"cb1-it3\");\n\t\tcb1.setItemIcon(itemID3, new ThemeResource(\"..\/runo\/icons\/32\/folder.png\"));\n\t\tcb1.setValue(itemID1);\n\t\tlayout.addComponent(cb1);\n\t\t\n\t\tComboBox cb2 = new ComboBox(\"cb2\");\n\t\tcb2.addItem(\"cb2-it1\");\n\t\tcb2.addItem(\"cb2-it2\");\n\t\tcb2.addItem(\"cb2-it3\");\n\t\tcb2.setValue(\"cb2-it2\");\n\t\tlayout.addComponent(cb2);\n\t\t\n\t\tLabel cb3Label = new Label();\n\t\tcb3Label.setCaption(\"cb3Label\");\n\n\t\tComboBox cb3 = new ComboBox(\"cb3\");\n\t\tcb3.addItems(\"cb3-it1\", \"cb3-it2\", \"cb3-it3\");\n\t\t\n\t\tcb3.addValueChangeListener(new ValueChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void valueChange(ValueChangeEvent event) {\n\t\t\t\t\n\t\t\t\tcb3Label.setValue(\"Selected : \" + event.getProperty().getValue());\n\t\t\t}\n\t\t});\n\t\tcb3.setValue(\"cb3-it3\");\n\t\tcb3.setNullSelectionAllowed(false);\n\t\tcb3.setFilteringMode(FilteringMode.CONTAINS);\n\t\tlayout.addComponent(cb3Label);\n\t\tlayout.addComponent(cb3);\n\t\t\n\t}\n\n}\n<\/pre>\n<h2>9. Web deployment descriptor<\/h2>\n<p><span style=\"text-decoration: underline\"><em>web.xml<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;web-app xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns=\"http:\/\/java.sun.com\/xml\/ns\/javaee\" xsi:schemaLocation=\"http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_3_0.xsd\" id=\"WebApp_ID\" version=\"3.0\"&gt;\n  &lt;display-name&gt;VaadinComboBox&lt;\/display-name&gt;\n  &lt;servlet&gt;\n    &lt;servlet-name&gt;myservlet&lt;\/servlet-name&gt;\n    &lt;servlet-class&gt;\n\t\tcom.vaadin.server.VaadinServlet\n\t&lt;\/servlet-class&gt;\n    &lt;init-param&gt;\n      &lt;param-name&gt;UI&lt;\/param-name&gt;\n      &lt;param-value&gt;com.javacodegeeks.VaadinComboBox&lt;\/param-value&gt;\n    &lt;\/init-param&gt;\n  &lt;\/servlet&gt;\n  &lt;servlet-mapping&gt;\n    &lt;servlet-name&gt;myservlet&lt;\/servlet-name&gt;\n    &lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;\n  &lt;\/servlet-mapping&gt;\n&lt;\/web-app&gt;\n<\/pre>\n<h2>10. Run The project<\/h2>\n<p>Righ click on the project folder and click on &#8220;Run as&#8221; -&gt; &#8220;Run on server&#8221; and you get something similar to this:<\/p>\n<p><figure id=\"attachment_33442\" aria-describedby=\"caption-attachment-33442\" style=\"width: 437px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/06-Run-project.png\" rel=\"attachment wp-att-33442\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/06-Run-project.png\" alt=\"06 Run project\" width=\"437\" height=\"491\" class=\"size-full wp-image-33442\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/06-Run-project.png 437w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/06-Run-project-267x300.png 267w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/a><figcaption id=\"caption-attachment-33442\" class=\"wp-caption-text\">06 Run project<\/figcaption><\/figure><\/p>\n<h2>11. Final worlds<\/h2>\n<p>As you can see the Vaadin combobox is an easy to use widget for your web applications, it&#8217;s very customizable and useful when you want to display fixed list of data.<\/p>\n<h2>12. Download the source code<\/h2>\n<p>This was an example about Vaadin Combobox.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the Eclipse project here: <strong><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/VaadinComboBox.zip\">Vaadin ComboBox<\/a><\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A combo box is a graphical user interface widget, a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to either type a value directly or select a value from the list. Vaadin offers a convenient Combobox out of the box for selecting a value in a list &hellip;<\/p>\n","protected":false},"author":77,"featured_media":33079,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1358],"tags":[1266],"class_list":["post-33410","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vaadin","tag-jee"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Vaadin Combobox Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"A combo box is a graphical user interface widget, a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vaadin Combobox Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"A combo box is a graphical user interface widget, a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-08T09:00:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-09T10:26:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jesus Boadas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@jboadas\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jesus Boadas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/\"},\"author\":{\"name\":\"Jesus Boadas\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7\"},\"headline\":\"Vaadin Combobox Example\",\"datePublished\":\"2016-02-08T09:00:40+00:00\",\"dateModified\":\"2019-04-09T10:26:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/\"},\"wordCount\":703,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"keywords\":[\"Jee\"],\"articleSection\":[\"Vaadin\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/\",\"name\":\"Vaadin Combobox Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"datePublished\":\"2016-02-08T09:00:40+00:00\",\"dateModified\":\"2019-04-09T10:26:14+00:00\",\"description\":\"A combo box is a graphical user interface widget, a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Vaadin\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/vaadin\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Vaadin Combobox Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7\",\"name\":\"Jesus Boadas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg\",\"caption\":\"Jesus Boadas\"},\"description\":\"I'm a self taught programmer, I began programming back in 1991 using an IBM A10 mainframe with Pascal an Assembler IBM 360\/70 emulator and Turbo C on a X86 PC, since that I work for the banking industry with emerging technologies like Fox Pro, Visual Fox Pro, Visual Basic, Visual C++, Borland C++, lately I moved out to the Airline industry, leading designing and programming in-house web applications with Flex, Actionscript, PHP, Python and Rails and in the last 7 years I focused all my work in Java, working on Linux servers using GlassFish, TomCat, Apache and MySql.\",\"sameAs\":[\"http:\/\/www.javacodegeeks.com\/\",\"https:\/\/ve.linkedin.com\/in\/jesus-boadas\",\"https:\/\/x.com\/jboadas\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/jesus-boadas\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vaadin Combobox Example - Java Code Geeks","description":"A combo box is a graphical user interface widget, a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/","og_locale":"en_US","og_type":"article","og_title":"Vaadin Combobox Example - Java Code Geeks","og_description":"A combo box is a graphical user interface widget, a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2016-02-08T09:00:40+00:00","article_modified_time":"2019-04-09T10:26:14+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","type":"image\/jpeg"}],"author":"Jesus Boadas","twitter_card":"summary_large_image","twitter_creator":"@jboadas","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Jesus Boadas","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/"},"author":{"name":"Jesus Boadas","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7"},"headline":"Vaadin Combobox Example","datePublished":"2016-02-08T09:00:40+00:00","dateModified":"2019-04-09T10:26:14+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/"},"wordCount":703,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","keywords":["Jee"],"articleSection":["Vaadin"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/","name":"Vaadin Combobox Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","datePublished":"2016-02-08T09:00:40+00:00","dateModified":"2019-04-09T10:26:14+00:00","description":"A combo box is a graphical user interface widget, a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-combobox-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/"},{"@type":"ListItem","position":4,"name":"Vaadin","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/vaadin\/"},{"@type":"ListItem","position":5,"name":"Vaadin Combobox Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7","name":"Jesus Boadas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg","caption":"Jesus Boadas"},"description":"I'm a self taught programmer, I began programming back in 1991 using an IBM A10 mainframe with Pascal an Assembler IBM 360\/70 emulator and Turbo C on a X86 PC, since that I work for the banking industry with emerging technologies like Fox Pro, Visual Fox Pro, Visual Basic, Visual C++, Borland C++, lately I moved out to the Airline industry, leading designing and programming in-house web applications with Flex, Actionscript, PHP, Python and Rails and in the last 7 years I focused all my work in Java, working on Linux servers using GlassFish, TomCat, Apache and MySql.","sameAs":["http:\/\/www.javacodegeeks.com\/","https:\/\/ve.linkedin.com\/in\/jesus-boadas","https:\/\/x.com\/jboadas"],"url":"https:\/\/examples.javacodegeeks.com\/author\/jesus-boadas\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/33410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=33410"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/33410\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/33079"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=33410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=33410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=33410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}