Attribute "description" does not work in any action #1174

This commit is contained in:
Gleb Gorelov 2018-09-07 14:06:14 +04:00
parent 19192750d2
commit 6f09985724

View File

@ -33,8 +33,19 @@ public class WebButton extends WebAbstractComponent<CubaButton> implements Butto
protected PropertyChangeListener actionPropertyChangeListener;
public WebButton() {
component = new CubaButton();
component = createComponent();
initComponent(component);
}
protected CubaButton createComponent() {
return new CubaButton();
}
protected void initComponent(CubaButton component) {
component.setClickHandler(this::buttonClicked);
// The default description value is empty string,
// that prevents obtaining a description value from an action
component.setDescription(null);
}
// override in descendants if needed