Skip to content

Commit

Permalink
Add setDomId helper method in widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo committed Oct 31, 2016
1 parent 5f2258d commit bea8615
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/com/vaadin/polymer/PolymerWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit bea8615

Please sign in to comment.