mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-12-22 15:31:08 +00:00
[CLIENT] #17 : Le champs "nom utilisateur" est désormais bloqué lors d'une modification de compte
This commit is contained in:
parent
3b27d5852b
commit
85972092f8
@ -19,6 +19,7 @@ class AccountManagerScreenController {
|
||||
|
||||
void setView(AccountManagerScreenView view) {
|
||||
this.view = view;
|
||||
this.view.lockUserNameField(model.hasInitialValue());
|
||||
}
|
||||
|
||||
void updateView() {
|
||||
|
@ -28,6 +28,10 @@ class AccountManagerScreenModel {
|
||||
return initialValue;
|
||||
}
|
||||
|
||||
boolean hasInitialValue(){
|
||||
return initialValue!=null;
|
||||
}
|
||||
|
||||
boolean isCurrentValueValid() {
|
||||
return !currentValue.equals(initialValue)
|
||||
&& currentValue.getUsername()!=null
|
||||
|
@ -104,4 +104,8 @@ class AccountManagerScreenView implements IFXComponent{
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void lockUserNameField(boolean lock) {
|
||||
nameTextField.setDisable(lock);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user