Shahar Havivi has uploaded a new change for review. Change subject: UI: set focus in username field at user-portal ......................................................................
UI: set focus in username field at user-portal Change-Id: I40121d4e8cf3d4debf3336445925a0792ac4757e Signed-off-by: Shahar Havivi <[email protected]> --- M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/31/7131/1 diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java index 1466d3e..ba6574f 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java @@ -49,7 +49,7 @@ @Ignore Label headerLabel; - @UiField + @UiField(provided = true) @Path("userName.entity") @WithElementId("userName") EntityModelTextBoxEditor userNameEditor; @@ -88,6 +88,18 @@ ApplicationMessages messages) { super(eventBus, resources); + // We need this code because resetAndFocus is called when userNameEditor is Disabled + userNameEditor = new EntityModelTextBoxEditor() { + @Override + public void setEnabled(boolean enabled) { + super.setEnabled(enabled); + if (enabled) { + userNameEditor.asValueBox().selectAll(); + userNameEditor.setFocus(true); + } + } + }; + connectAutomatically = new EntityModelCheckBoxEditor(Align.RIGHT); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); asWidget().setGlassEnabled(false); -- To view, visit http://gerrit.ovirt.org/7131 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40121d4e8cf3d4debf3336445925a0792ac4757e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
