Skip to content

Commit 6a7aa52

Browse files
committed
Follow up fixes for Helper Text based from previous PR #997
1 parent cc01cb0 commit 6a7aa52

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

gwt-material/src/main/java/gwt/material/design/client/base/mixin/StatusTextMixin.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -61,7 +61,7 @@ public StatusTextMixin(final T widget, final H textObject, UIObject target, UIOb
6161
@Override
6262
public void setErrorText(String errorText) {
6363
clearSuccessText();
64-
clearHelperText();
64+
hideHelperText();
6565
updateStatusDisplay(StatusDisplayMixin.StatusType.ERROR);
6666

6767
if (textObject != null) {
@@ -85,7 +85,7 @@ public void setErrorText(String errorText) {
8585
@Override
8686
public void setSuccessText(String successText) {
8787
clearErrorText();
88-
clearHelperText();
88+
hideHelperText();
8989
updateStatusDisplay(StatusDisplayMixin.StatusType.SUCCESS);
9090

9191
if (textObject != null) {
@@ -106,6 +106,7 @@ public void setSuccessText(String successText) {
106106
}
107107
}
108108

109+
109110
@Override
110111
public void setHelperText(String helperText) {
111112
this.helperText = helperText;
@@ -173,6 +174,11 @@ public void clearSuccessText() {
173174

174175
@Override
175176
public void clearHelperText() {
177+
helperText="";
178+
hideHelperText();
179+
}
180+
181+
protected void hideHelperText() {
176182
if (textObject != null) {
177183
textObject.setText("");
178184
textObject.setVisible(false);

0 commit comments

Comments
 (0)