From b831dd2b5b758343bf7ae5b91b57577675900c62 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Fri, 18 Mar 2016 09:41:19 +0000 Subject: [PATCH] Focus set on the email textbox on loading. Fixed descriptor.xml file in distro directory and added the assembly plugin to the pom as well git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/create-users@125705 82a268e6-3cf1-43bd-a215-b396298e98cf --- distro/descriptor.xml | 24 ++------- pom.xml | 49 +++++++++++++------ .../createusers/client/ui/AddUserForm.java | 16 +++++- 3 files changed, 53 insertions(+), 36 deletions(-) diff --git a/distro/descriptor.xml b/distro/descriptor.xml index 4efc827..5e80428 100644 --- a/distro/descriptor.xml +++ b/distro/descriptor.xml @@ -15,34 +15,18 @@ README LICENSE - INSTALL - MAINTAINERS changelog.xml + profile.xml 755 true - - target/apidocs - /${artifactId}/doc/api - true - 755 - - ${distroDirectory}/profile.xml - ./ - true - - - target/${build.finalName}.war + target/${build.finalName}.${project.packaging} /${artifactId} - - ${distroDirectory}/svnpath.txt - /${artifactId} - true - + - \ No newline at end of file + \ No newline at end of file diff --git a/pom.xml b/pom.xml index cd241d5..0ccef3a 100644 --- a/pom.xml +++ b/pom.xml @@ -123,25 +123,25 @@ provided - org.gcube.common - home-library-model - provided + org.gcube.common + home-library-model + provided - org.ow2.asm - asm-all - [5.0.0-SNAPSHOT, 6.0.0-SNAPSHOT) + org.ow2.asm + asm-all + [5.0.0-SNAPSHOT, 6.0.0-SNAPSHOT) - org.gcube.common - home-library - provided - - - asm-all - asm - - + org.gcube.common + home-library + provided + + + asm-all + asm + + org.gcube.common @@ -201,6 +201,25 @@ ${webappDirectory} + + org.apache.maven.plugins + maven-assembly-plugin + 2.2 + + + ${distroDirectory}/descriptor.xml + + + + + servicearchive + install + + single + + + + org.apache.maven.plugins maven-compiler-plugin diff --git a/src/main/java/org/gcube/portlets/admin/createusers/client/ui/AddUserForm.java b/src/main/java/org/gcube/portlets/admin/createusers/client/ui/AddUserForm.java index 0a82e64..3b38c5c 100644 --- a/src/main/java/org/gcube/portlets/admin/createusers/client/ui/AddUserForm.java +++ b/src/main/java/org/gcube/portlets/admin/createusers/client/ui/AddUserForm.java @@ -1,7 +1,7 @@ package org.gcube.portlets.admin.createusers.client.ui; -import org.gcube.portlets.admin.createusers.client.HandleUsersServiceAsync; import org.gcube.portlets.admin.createusers.client.CreateUsersPanel; +import org.gcube.portlets.admin.createusers.client.HandleUsersServiceAsync; import org.gcube.portlets.admin.createusers.client.event.AddUserEvent; import org.gcube.portlets.admin.createusers.shared.VreUserBean; @@ -11,6 +11,7 @@ import com.github.gwtbootstrap.client.ui.CheckBox; import com.github.gwtbootstrap.client.ui.Form; import com.github.gwtbootstrap.client.ui.TextBox; import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.Scheduler; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.KeyUpEvent; import com.google.gwt.event.shared.HandlerManager; @@ -85,6 +86,19 @@ public class AddUserForm extends Composite{ this.parent = parent; } + + @Override + protected void onAttach() { + super.onAttach(); + Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand () { + public void execute () { + GWT.log("Setting focus"); + emailTextbox.getElement().focus(); + } + }); + } + + @UiHandler("submit") void onClick(ClickEvent e) {