Merge pull request #28 from bsinno/Custom_target_filter_bug_fixes
Custom target filter bug fixes
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.ui.filtermanagement;
|
package org.eclipse.hawkbit.ui.filtermanagement;
|
||||||
|
|
||||||
|
|
||||||
|
import java.awt.event.FocusListener;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
@@ -54,6 +56,7 @@ import com.vaadin.ui.HorizontalLayout;
|
|||||||
import com.vaadin.ui.Label;
|
import com.vaadin.ui.Label;
|
||||||
import com.vaadin.ui.Link;
|
import com.vaadin.ui.Link;
|
||||||
import com.vaadin.ui.TextField;
|
import com.vaadin.ui.TextField;
|
||||||
|
import com.vaadin.ui.UI;
|
||||||
import com.vaadin.ui.VerticalLayout;
|
import com.vaadin.ui.VerticalLayout;
|
||||||
import com.vaadin.ui.themes.ValoTheme;
|
import com.vaadin.ui.themes.ValoTheme;
|
||||||
|
|
||||||
@@ -119,8 +122,8 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
|
|
||||||
private LayoutClickListener nameLayoutClickListner;
|
private LayoutClickListener nameLayoutClickListner;
|
||||||
|
|
||||||
boolean validationFailed = false;
|
private boolean validationFailed = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the Campaign Status History Header.
|
* Initialize the Campaign Status History Header.
|
||||||
*/
|
*/
|
||||||
@@ -146,19 +149,20 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||||
void onEvent(final CustomFilterUIEvent custFUIEvent) {
|
void onEvent(final CustomFilterUIEvent custFUIEvent) {
|
||||||
if (custFUIEvent == CustomFilterUIEvent.TARGET_FILTER_DETAIL_VIEW) {
|
if (custFUIEvent == CustomFilterUIEvent.TARGET_FILTER_DETAIL_VIEW) {
|
||||||
populateComponents();
|
populateComponents();
|
||||||
eventBus.publish(this, CustomFilterUIEvent.TARGET_DETAILS_VIEW);
|
eventBus.publish(this, CustomFilterUIEvent.TARGET_DETAILS_VIEW);
|
||||||
} else if (custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK) {
|
} else if (custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK) {
|
||||||
setUpCaptionLayout(true);
|
setUpCaptionLayout(true);
|
||||||
resetComponents();
|
resetComponents();
|
||||||
} else if (custFUIEvent == CustomFilterUIEvent.TARGET_FILTER_STATUS_HIDE) {
|
} else if (custFUIEvent == CustomFilterUIEvent.TARGET_FILTER_STATUS_HIDE) {
|
||||||
this.getUI().access(() -> showValidationSuccesIcon());
|
this.getUI().access(() -> updateStatusIconAfterTablePopulated());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void populateComponents() {
|
private void populateComponents() {
|
||||||
if (filterManagementUIState.getTfQuery().isPresent()) {
|
if (filterManagementUIState.getTfQuery().isPresent()) {
|
||||||
queryTextField.setValue(filterManagementUIState.getTfQuery().get().getQuery());
|
queryTextField.setValue(filterManagementUIState.getTfQuery().get().getQuery());
|
||||||
@@ -184,16 +188,16 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
|
|
||||||
private Label createStatusIcon() {
|
private Label createStatusIcon() {
|
||||||
final Label statusIcon = new Label();
|
final Label statusIcon = new Label();
|
||||||
|
statusIcon.setImmediate(true);
|
||||||
|
statusIcon.setContentMode(ContentMode.HTML);
|
||||||
|
statusIcon.setSizeFull();
|
||||||
setInitialStatusIconStyle(statusIcon);
|
setInitialStatusIconStyle(statusIcon);
|
||||||
return statusIcon;
|
return statusIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setInitialStatusIconStyle(final Label statusIcon) {
|
private void setInitialStatusIconStyle(final Label statusIcon) {
|
||||||
statusIcon.setContentMode(ContentMode.HTML);
|
|
||||||
statusIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
|
statusIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
|
||||||
statusIcon.setImmediate(true);
|
|
||||||
statusIcon.setStyleName("hide-status-label");
|
statusIcon.setStyleName("hide-status-label");
|
||||||
statusIcon.setSizeFull();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createComponents() {
|
private void createComponents() {
|
||||||
@@ -216,10 +220,8 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
|
|
||||||
closeIcon = createSearchResetIcon();
|
closeIcon = createSearchResetIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private TextField createNameTextField() {
|
private TextField createNameTextField() {
|
||||||
final TextField nameField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, false, null,
|
final TextField nameField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, false, null,
|
||||||
i18n.get("textfield.customfiltername"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
|
i18n.get("textfield.customfiltername"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
|
||||||
@@ -255,10 +257,6 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param event
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private void onFiterNameChange(final TextChangeEvent event) {
|
private void onFiterNameChange(final TextChangeEvent event) {
|
||||||
if (isNameAndQueryEmpty(event.getText(), queryTextField.getValue())
|
if (isNameAndQueryEmpty(event.getText(), queryTextField.getValue())
|
||||||
|| (event.getText().equals(oldFilterName) && queryTextField.getValue().equals(oldFilterQuery))) {
|
|| (event.getText().equals(oldFilterName) && queryTextField.getValue().equals(oldFilterQuery))) {
|
||||||
@@ -363,7 +361,7 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
}
|
}
|
||||||
enableDisableSaveButton(validationFailed, input);
|
enableDisableSaveButton(validationFailed, input);
|
||||||
} else {
|
} else {
|
||||||
removeStatusIcon();
|
setInitialStatusIconStyle(validationIcon);
|
||||||
filterManagementUIState.setFilterQueryValue(null);
|
filterManagementUIState.setFilterQueryValue(null);
|
||||||
filterManagementUIState.setIsFilterByInvalidFilterQuery(Boolean.TRUE);
|
filterManagementUIState.setIsFilterByInvalidFilterQuery(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
@@ -389,17 +387,10 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeStatusIcon() {
|
|
||||||
if (searchLayout.getComponentIndex(validationIcon) != -1) {
|
|
||||||
searchLayout.removeComponent(validationIcon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showValidationSuccesIcon() {
|
private void showValidationSuccesIcon() {
|
||||||
if (!validationFailed) {
|
|
||||||
validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
|
validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
|
||||||
validationIcon.setStyleName(SPUIStyleDefinitions.SUCCESS_ICON);
|
validationIcon.setStyleName(SPUIStyleDefinitions.SUCCESS_ICON);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showValidationFailureIcon() {
|
private void showValidationFailureIcon() {
|
||||||
@@ -506,9 +497,6 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private boolean doesAlreadyExists() {
|
private boolean doesAlreadyExists() {
|
||||||
if (targetFilterQueryManagement.findTargetFilterQueryByName(nameTextField.getValue()) != null) {
|
if (targetFilterQueryManagement.findTargetFilterQueryByName(nameTextField.getValue()) != null) {
|
||||||
notification.displayValidationError(i18n.get("message.target.filter.duplicate", nameTextField.getValue()));
|
notification.displayValidationError(i18n.get("message.target.filter.duplicate", nameTextField.getValue()));
|
||||||
@@ -517,9 +505,6 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private boolean manadatoryFieldsPresent() {
|
private boolean manadatoryFieldsPresent() {
|
||||||
if (Strings.isNullOrEmpty(nameTextField.getValue())
|
if (Strings.isNullOrEmpty(nameTextField.getValue())
|
||||||
|| Strings.isNullOrEmpty(filterManagementUIState.getFilterQueryValue())) {
|
|| Strings.isNullOrEmpty(filterManagementUIState.getFilterQueryValue())) {
|
||||||
@@ -528,5 +513,12 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateStatusIconAfterTablePopulated() {
|
||||||
|
queryTextField.focus();
|
||||||
|
if (!validationFailed && !Strings.isNullOrEmpty(queryTextField.getValue())) {
|
||||||
|
showValidationSuccesIcon();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
|||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import com.vaadin.data.Item;
|
import com.vaadin.data.Item;
|
||||||
import com.vaadin.server.FontAwesome;
|
import com.vaadin.server.FontAwesome;
|
||||||
|
import com.vaadin.server.Sizeable.Unit;
|
||||||
import com.vaadin.shared.ui.label.ContentMode;
|
import com.vaadin.shared.ui.label.ContentMode;
|
||||||
import com.vaadin.spring.annotation.SpringComponent;
|
import com.vaadin.spring.annotation.SpringComponent;
|
||||||
import com.vaadin.spring.annotation.ViewScope;
|
import com.vaadin.spring.annotation.ViewScope;
|
||||||
@@ -44,6 +45,7 @@ import com.vaadin.ui.Component;
|
|||||||
import com.vaadin.ui.Label;
|
import com.vaadin.ui.Label;
|
||||||
import com.vaadin.ui.Table;
|
import com.vaadin.ui.Table;
|
||||||
import com.vaadin.ui.UI;
|
import com.vaadin.ui.UI;
|
||||||
|
import com.vaadin.ui.themes.ValoTheme;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -73,12 +75,16 @@ public class CreateOrUpdateFilterTable extends Table {
|
|||||||
*/
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
|
setStyleName("sp-table");
|
||||||
setSizeFull();
|
setSizeFull();
|
||||||
|
setImmediate(true);
|
||||||
|
setHeight(100.0f, Unit.PERCENTAGE);
|
||||||
|
addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
|
||||||
|
addStyleName(ValoTheme.TABLE_SMALL);
|
||||||
setColumnCollapsingAllowed(true);
|
setColumnCollapsingAllowed(true);
|
||||||
addCustomGeneratedColumns();
|
addCustomGeneratedColumns();
|
||||||
restoreOnLoad();
|
restoreOnLoad();
|
||||||
populateTableData();
|
populateTableData();
|
||||||
setStyleName("sp-table");
|
|
||||||
setId(SPUIComponetIdProvider.CUSTOM_FILTER_TARGET_TABLE_ID);
|
setId(SPUIComponetIdProvider.CUSTOM_FILTER_TARGET_TABLE_ID);
|
||||||
setSelectable(false);
|
setSelectable(false);
|
||||||
eventBus.subscribe(this);
|
eventBus.subscribe(this);
|
||||||
@@ -95,12 +101,13 @@ public class CreateOrUpdateFilterTable extends Table {
|
|||||||
|| custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK) {
|
|| custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK) {
|
||||||
UI.getCurrent().access(() -> populateTableData());
|
UI.getCurrent().access(() -> populateTableData());
|
||||||
} else if (custFUIEvent == CustomFilterUIEvent.FILTER_TARGET_BY_QUERY) {
|
} else if (custFUIEvent == CustomFilterUIEvent.FILTER_TARGET_BY_QUERY) {
|
||||||
this.getUI().access(() -> populateTableData());
|
this.getUI().access(() -> onQuery());
|
||||||
eventBus.publish(this, CustomFilterUIEvent.TARGET_FILTER_STATUS_HIDE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void restoreOnLoad() {
|
|
||||||
|
|
||||||
|
private void restoreOnLoad() {
|
||||||
if (filterManagementUIState.isCreateFilterViewDisplayed()) {
|
if (filterManagementUIState.isCreateFilterViewDisplayed()) {
|
||||||
filterManagementUIState.setFilterQueryValue(null);
|
filterManagementUIState.setFilterQueryValue(null);
|
||||||
} else {
|
} else {
|
||||||
@@ -152,9 +159,6 @@ public class CreateOrUpdateFilterTable extends Table {
|
|||||||
setCollapsibleColumns();
|
setCollapsibleColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private void setCollapsibleColumns() {
|
private void setCollapsibleColumns() {
|
||||||
setColumnCollapsed(SPUILabelDefinitions.VAR_LAST_MODIFIED_BY, true);
|
setColumnCollapsed(SPUILabelDefinitions.VAR_LAST_MODIFIED_BY, true);
|
||||||
setColumnCollapsed(SPUILabelDefinitions.VAR_LAST_MODIFIED_DATE, true);
|
setColumnCollapsed(SPUILabelDefinitions.VAR_LAST_MODIFIED_DATE, true);
|
||||||
@@ -178,8 +182,8 @@ public class CreateOrUpdateFilterTable extends Table {
|
|||||||
|
|
||||||
private List<TableColumn> getVisbleColumns() {
|
private List<TableColumn> getVisbleColumns() {
|
||||||
final List<TableColumn> columnList = new ArrayList<>();
|
final List<TableColumn> columnList = new ArrayList<>();
|
||||||
columnList.add(new TableColumn(SPUILabelDefinitions.NAME, i18n.get("header.name"), 0.15F));
|
columnList.add(new TableColumn(SPUILabelDefinitions.NAME, i18n.get("header.name"),0.15f));
|
||||||
columnList.add(new TableColumn(SPUILabelDefinitions.VAR_CREATED_BY, i18n.get("header.createdBy"), 0.1F));
|
columnList.add(new TableColumn(SPUILabelDefinitions.VAR_CREATED_BY, i18n.get("header.createdBy"), 0.1f));
|
||||||
columnList.add(new TableColumn(SPUILabelDefinitions.VAR_CREATED_DATE, i18n.get("header.createdDate"), 0.1F));
|
columnList.add(new TableColumn(SPUILabelDefinitions.VAR_CREATED_DATE, i18n.get("header.createdDate"), 0.1F));
|
||||||
columnList.add(new TableColumn(SPUILabelDefinitions.VAR_LAST_MODIFIED_BY, i18n.get("header.modifiedBy"), 0.1F));
|
columnList.add(new TableColumn(SPUILabelDefinitions.VAR_LAST_MODIFIED_BY, i18n.get("header.modifiedBy"), 0.1F));
|
||||||
columnList.add(new TableColumn(SPUILabelDefinitions.VAR_LAST_MODIFIED_DATE, i18n.get("header.modifiedDate"),
|
columnList.add(new TableColumn(SPUILabelDefinitions.VAR_LAST_MODIFIED_DATE, i18n.get("header.modifiedDate"),
|
||||||
@@ -237,5 +241,9 @@ public class CreateOrUpdateFilterTable extends Table {
|
|||||||
protected void addCustomGeneratedColumns() {
|
protected void addCustomGeneratedColumns() {
|
||||||
addGeneratedColumn(SPUILabelDefinitions.STATUS_ICON, (source, itemId, columnId) -> getStatusIcon(itemId));
|
addGeneratedColumn(SPUILabelDefinitions.STATUS_ICON, (source, itemId, columnId) -> getStatusIcon(itemId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onQuery() {
|
||||||
|
populateTableData();
|
||||||
|
eventBus.publish(this, CustomFilterUIEvent.TARGET_FILTER_STATUS_HIDE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ public class FilterManagementView extends VerticalLayout implements View {
|
|||||||
final HorizontalLayout messageLabelLayout = new HorizontalLayout();
|
final HorizontalLayout messageLabelLayout = new HorizontalLayout();
|
||||||
messageLabelLayout.addComponent(targetFilterCountMessageLabel);
|
messageLabelLayout.addComponent(targetFilterCountMessageLabel);
|
||||||
messageLabelLayout.addStyleName("footer-layout");
|
messageLabelLayout.addStyleName("footer-layout");
|
||||||
messageLabelLayout.setWidth("100%");
|
|
||||||
return messageLabelLayout;
|
return messageLabelLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
|||||||
import com.vaadin.data.Container;
|
import com.vaadin.data.Container;
|
||||||
import com.vaadin.data.Item;
|
import com.vaadin.data.Item;
|
||||||
import com.vaadin.server.FontAwesome;
|
import com.vaadin.server.FontAwesome;
|
||||||
|
import com.vaadin.server.Sizeable.Unit;
|
||||||
import com.vaadin.spring.annotation.SpringComponent;
|
import com.vaadin.spring.annotation.SpringComponent;
|
||||||
import com.vaadin.spring.annotation.ViewScope;
|
import com.vaadin.spring.annotation.ViewScope;
|
||||||
import com.vaadin.ui.Button;
|
import com.vaadin.ui.Button;
|
||||||
@@ -83,18 +84,20 @@ public class TargetFilterTable extends Table {
|
|||||||
* Initialize the Action History Table.
|
* Initialize the Action History Table.
|
||||||
*/
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
addCustomGeneratedColumns();
|
setStyleName("sp-table");
|
||||||
populateTableData();
|
setSizeFull();
|
||||||
setStyleName("sp-table");
|
setImmediate(true);
|
||||||
addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
|
setHeight(100.0f, Unit.PERCENTAGE);
|
||||||
addStyleName(ValoTheme.TABLE_SMALL);
|
addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
|
||||||
setColumnCollapsingAllowed(true);
|
addStyleName(ValoTheme.TABLE_SMALL);
|
||||||
setColumnProperties();
|
addCustomGeneratedColumns();
|
||||||
setId(SPUIComponetIdProvider.TAEGET_FILTER_TABLE_ID);
|
populateTableData();
|
||||||
eventBus.subscribe(this);
|
setColumnCollapsingAllowed(true);
|
||||||
setSizeFull();
|
setColumnProperties();
|
||||||
}
|
setId(SPUIComponetIdProvider.TAEGET_FILTER_TABLE_ID);
|
||||||
|
eventBus.subscribe(this);
|
||||||
|
}
|
||||||
|
|
||||||
@PreDestroy
|
@PreDestroy
|
||||||
void destroy() {
|
void destroy() {
|
||||||
|
|||||||
@@ -197,33 +197,36 @@ public class RolloutGroupTargetsListTable extends AbstractSimpleTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setRolloutStatusIcon(final Status targetUpdateStatus, final Label statusLabel) {
|
private void setRolloutStatusIcon(final Status targetUpdateStatus, final Label statusLabel) {
|
||||||
switch (targetUpdateStatus) {
|
switch (targetUpdateStatus) {
|
||||||
case ERROR:
|
case ERROR:
|
||||||
statusLabel.setValue(FontAwesome.EXCLAMATION_CIRCLE.getHtml());
|
statusLabel.setValue(FontAwesome.EXCLAMATION_CIRCLE.getHtml());
|
||||||
statusLabel.addStyleName("statusIconRed");
|
statusLabel.addStyleName("statusIconRed");
|
||||||
break;
|
break;
|
||||||
case SCHEDULED:
|
case SCHEDULED:
|
||||||
statusLabel.setValue(FontAwesome.BULLSEYE.getHtml());
|
statusLabel.setValue(FontAwesome.BULLSEYE.getHtml());
|
||||||
statusLabel.addStyleName("statusIconBlue");
|
statusLabel.addStyleName("statusIconBlue");
|
||||||
break;
|
break;
|
||||||
case FINISHED:
|
case FINISHED:
|
||||||
statusLabel.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
|
statusLabel.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
|
||||||
statusLabel.addStyleName("statusIconGreen");
|
statusLabel.addStyleName("statusIconGreen");
|
||||||
break;
|
break;
|
||||||
case RUNNING:
|
case RUNNING:
|
||||||
case RETRIEVED:
|
case RETRIEVED:
|
||||||
case WARNING:
|
case WARNING:
|
||||||
case DOWNLOAD:
|
case DOWNLOAD:
|
||||||
statusLabel.setValue(FontAwesome.ADJUST.getHtml());
|
statusLabel.setValue(FontAwesome.ADJUST.getHtml());
|
||||||
statusLabel.addStyleName("statusIconYellow");
|
statusLabel.addStyleName("statusIconYellow");
|
||||||
break;
|
break;
|
||||||
case CANCELED:
|
case CANCELED:
|
||||||
case CANCELING:
|
statusLabel.setValue(FontAwesome.TIMES_CIRCLE.getHtml());
|
||||||
statusLabel.setValue(FontAwesome.TIMES_CIRCLE.getHtml());
|
statusLabel.addStyleName("statusIconGreen");
|
||||||
statusLabel.addStyleName("statusIconPending");
|
break;
|
||||||
break;
|
case CANCELING:
|
||||||
default:
|
statusLabel.setValue(FontAwesome.TIMES_CIRCLE.getHtml());
|
||||||
break;
|
statusLabel.addStyleName("statusIconPending");
|
||||||
}
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user