From bea86157966ded10e43837111e45fc614d476354 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Sat, 29 Oct 2016 17:13:08 +0200 Subject: [PATCH] Add setDomId helper method in widgets --- lib/com/vaadin/polymer/PolymerWidget.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/com/vaadin/polymer/PolymerWidget.java b/lib/com/vaadin/polymer/PolymerWidget.java index 4f820f6..500d556 100644 --- a/lib/com/vaadin/polymer/PolymerWidget.java +++ b/lib/com/vaadin/polymer/PolymerWidget.java @@ -88,6 +88,15 @@ public void setStyle(String style) { getElement().setAttribute("style", style); } + /** + * UiBinder catches the `setId` call in order to use it as a legacy way to set the `ui:field`. + * Since some Polymer elements use other elements id to enhance it like `paper-tooltip` we + * maintain this method to directly declarative set custom ids. + */ + public void setDomId(String id) { + getElement().setId(id); + } + public void setId(String id) { getElement().setId(id); }