Skip to content

Commit

Permalink
Add missing OSGi import to make designs work (#17377)
Browse files Browse the repository at this point in the history
Change-Id: I28bbbc7a9079fc81e90d1d3f35f675234e560404
  • Loading branch information
Artur- authored and Vaadin Code Review committed May 19, 2015
1 parent ba07f4f commit 8513067
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/build.xml
Expand Up @@ -26,7 +26,7 @@

<target name="jar">
<property name="server.osgi.import"
value="javax.servlet;version=&quot;2.4.0&quot;,javax.servlet.http;version=&quot;2.4.0&quot;,javax.validation;version=&quot;1.0.0.GA&quot;;resolution:=optional,org.jsoup;version=&quot;1.6.3&quot;,org.jsoup.parser;version=&quot;1.6.3&quot;,org.jsoup.nodes;version=&quot;1.6.3&quot;,org.jsoup.helper;version=&quot;1.6.3&quot;,org.jsoup.safety;version=&quot;1.6.3&quot;" />
value="javax.servlet;version=&quot;2.4.0&quot;,javax.servlet.http;version=&quot;2.4.0&quot;,javax.validation;version=&quot;1.0.0.GA&quot;;resolution:=optional,org.jsoup;version=&quot;1.6.3&quot;,org.jsoup.parser;version=&quot;1.6.3&quot;,org.jsoup.nodes;version=&quot;1.6.3&quot;,org.jsoup.helper;version=&quot;1.6.3&quot;,org.jsoup.safety;version=&quot;1.6.3&quot;,org.jsoup.select;version=&quot;1.6.3&quot;" />
<property name="server.osgi.require"
value="com.google.gwt.thirdparty.guava;bundle-version=&quot;16.0.1.vaadin1&quot;,com.vaadin.shared;bundle-version=&quot;${vaadin.version}&quot;,com.vaadin.push;bundle-version=&quot;${vaadin.version}&quot;;resolution:=optional,com.vaadin.sass-compiler;bundle-version=&quot;${vaadin.sass.version}&quot;;resolution:=optional" />
<antcall target="common.jar">
Expand Down
@@ -0,0 +1 @@
<v-label />
@@ -1,5 +1,6 @@
package com.vaadin.tests.integration;

import com.vaadin.annotations.DesignRoot;
import com.vaadin.data.Item;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
Expand All @@ -10,6 +11,7 @@
import com.vaadin.ui.Table;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;

public class ServletIntegrationUI extends UI {

Expand All @@ -36,7 +38,7 @@ protected void init(VaadinRequest request) {
item.getItemProperty("icon").setValue(new FlagSeResource());
item.getItemProperty("country").setValue("Sweden");

final Label selectedLabel = new Label();
final Label selectedLabel = new LabelFromDesign();
table.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
Expand All @@ -45,4 +47,11 @@ public void valueChange(ValueChangeEvent event) {
});
layout.addComponent(selectedLabel);
}

@DesignRoot
public static class LabelFromDesign extends Label {
public LabelFromDesign() {
Design.read(this);
}
}
}

0 comments on commit 8513067

Please sign in to comment.