diff --git a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java index 398c9c6c9b..9ea480732e 100644 --- a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java +++ b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java @@ -361,15 +361,11 @@ public TabWirelessUi(GwtSession currentSession, TabIp4Ui tcp4, TabIp6Ui tcp6, setPasswordValidation(); this.tcp4Tab.status.addChangeHandler(event -> { - evalActiveConfig(); - - update(); + evalActiveConfig(); }); this.tcp6Tab.status.addChangeHandler(event -> { - evalActiveConfig(); - - update(); + evalActiveConfig(); }); logger.info("Constructor done."); @@ -384,8 +380,8 @@ private void evalActiveConfig() { || !tcpIp6Status.equals(TabWirelessUi.this.tcp6Status); if (isStatusChanged) { - if (tcpIp4Status.equals(MessageUtils.get(GwtNetIfStatus.netIPv4StatusEnabledWAN.name())) - || tcpIp6Status.equals(MessageUtils.get(GwtNetIfStatus.netIPv4StatusEnabledWAN.name()))) { + if (tcpIp4Status.equals(GwtNetIfStatus.netIPv4StatusEnabledWAN.name()) + || tcpIp6Status.equals(GwtNetIfStatus.netIPv6StatusEnabledWAN.name())) { TabWirelessUi.this.activeConfig = TabWirelessUi.this.selectedNetIfConfig.getStationWifiConfig(); } else { TabWirelessUi.this.activeConfig = TabWirelessUi.this.selectedNetIfConfig.getActiveWifiConfig(); @@ -394,6 +390,8 @@ private void evalActiveConfig() { TabWirelessUi.this.tcp4Status = tcpIp4Status; TabWirelessUi.this.tcp6Status = tcpIp6Status; TabWirelessUi.this.netTabs.updateTabs(); + + update(); } } } @@ -458,12 +456,6 @@ public void setNetInterface(GwtNetInterfaceConfig config) { this.selectedNetIfConfig = (GwtWifiNetInterfaceConfig) config; this.activeConfig = this.selectedNetIfConfig.getActiveWifiConfig(); - - if (!(this.tcp4Status.equals(GwtNetIfStatus.netIPv4StatusDisabled.getValue()) - && this.tcp6Status.equals(GwtNetIfStatus.netIPv4StatusDisabled.getValue()))) { - - loadCountryCode(); - } } } @@ -628,7 +620,7 @@ private void refreshForm() { // Tcp/IP disabled if (tcpip4Status.equals(GwtNetIfStatus.netIPv4StatusDisabled.getValue()) - && tcpip6Status.equals(GwtNetIfStatus.netIPv4StatusDisabled.getValue())) { + && tcpip6Status.equals(GwtNetIfStatus.netIPv6StatusDisabled.getValue())) { setForm(false); } else { setForm(true); @@ -740,6 +732,8 @@ private void refreshForm() { if (this.security.getSelectedItemText().equals(WIFI_SECURITY_WPA2_WPA3_ENTERPRISE_MESSAGE)) { this.password.setEnabled(false); } + + loadCountryCode(); } this.netTabs.updateTabs();