Skip to content

Commit

Permalink
CurrencyField does not implement the Focusable interface #2353
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleb Durygin committed Aug 27, 2019
1 parent 3706ad8 commit 9c0de13
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Expand Up @@ -23,7 +23,8 @@
/**
* The CurrencyField component is intended for displaying currency values.
*/
public interface CurrencyField<V extends Number> extends Field<V>, HasDatatype<V>, HasConversionErrorMessage, Buffered {
public interface CurrencyField<V extends Number> extends Field<V>, HasDatatype<V>, HasConversionErrorMessage, Buffered,
Component.Focusable {

String NAME = "currencyField";

Expand Down
Expand Up @@ -177,6 +177,11 @@ public void setTabIndex(int tabIndex) {
textField.setTabIndex(tabIndex);
}

@Override
public int getTabIndex() {
return textField.getTabIndex();
}

@Override
public void setReadOnly(boolean readOnly) {
super.setReadOnly(readOnly);
Expand Down
Expand Up @@ -281,6 +281,21 @@ public boolean isModified() {
return super.isModified();
}

@Override
public void focus() {
component.focus();
}

@Override
public int getTabIndex() {
return component.getTabIndex();
}

@Override
public void setTabIndex(int tabIndex) {
component.setTabIndex(tabIndex);
}

protected com.haulmont.cuba.web.widgets.CurrencyLabelPosition toWidgetLabelPosition(CurrencyLabelPosition labelPosition) {
return com.haulmont.cuba.web.widgets.CurrencyLabelPosition.valueOf(labelPosition.name());
}
Expand Down

0 comments on commit 9c0de13

Please sign in to comment.