Disable first name and last name in settings window if user is bound

FEA: ItEr76S27ResourceBinding
This commit is contained in:
Manuel Rego Casasnovas 2012-05-14 13:13:10 +02:00
parent 7377461d24
commit 90bccb3030
4 changed files with 20 additions and 3 deletions

View file

@ -65,4 +65,6 @@ public interface ISettingsModel {
String getLoginName();
boolean isBound();
}

View file

@ -171,4 +171,9 @@ public class SettingsController extends GenericForwardComposer {
public String getEmail() {
return settingsModel.getEmail();
}
public boolean isBound() {
return settingsModel.isBound();
}
}

View file

@ -194,4 +194,12 @@ public class SettingsModel implements ISettingsModel {
return user.getEmail();
}
@Override
public boolean isBound() {
if (user != null) {
return user.isBound();
}
return false;
}
}

View file

@ -49,7 +49,7 @@
</columns>
<rows>
<row>
<label value="${i18n:_('Login')}" />
<label value="${i18n:_('Username')}" />
<textbox id="loginName"
value="@{settingsController.loginName}"
disabled="true"
@ -58,12 +58,14 @@
<row>
<label value="${i18n:_('First name')}" />
<textbox id="firstName"
value="@{settingsController.firstName}" width="300px"/>
value="@{settingsController.firstName}" width="300px"
disabled="@{settingsController.bound}" />
</row>
<row>
<label value="${i18n:_('Last name')}" />
<textbox id="lastName"
value="@{settingsController.lastName}" width="300px"/>
value="@{settingsController.lastName}" width="300px"
disabled="@{settingsController.bound}" />
</row>
<row>
<label value="${i18n:_('E-mail')}" />