From 11c4c53fd8176f9b0eb5a8663e045906a6502ab8 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sat, 26 Jul 2008 00:13:11 +0000 Subject: [PATCH] Added @field to just like how works. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11024 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/scm/CVSSCM.java | 11 ++++----- .../resources/hudson/scm/CVSSCM/config.jelly | 5 +--- .../resources/lib/form/editableComboBox.jelly | 23 +++++++++++++------ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/core/src/main/java/hudson/scm/CVSSCM.java b/core/src/main/java/hudson/scm/CVSSCM.java index 1b30988ebc..8f6f6e9225 100644 --- a/core/src/main/java/hudson/scm/CVSSCM.java +++ b/core/src/main/java/hudson/scm/CVSSCM.java @@ -35,6 +35,7 @@ import org.apache.tools.zip.ZipEntry; import org.apache.tools.zip.ZipOutputStream; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; +import org.kohsuke.stapler.DataBoundConstructor; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; @@ -117,14 +118,12 @@ public class CVSSCM extends SCM implements Serializable { private boolean isTag; - /** - * @stapler-constructor - */ - public CVSSCM(String cvsroot, String module,String branch,String cvsRsh,boolean canUseUpdate, boolean legacy, boolean isTag) { + @DataBoundConstructor + public CVSSCM(String cvsRoot, String module,String branch,String cvsRsh,boolean canUseUpdate, boolean legacy, boolean isTag) { if(fixNull(branch).equals("HEAD")) branch = null; - this.cvsroot = cvsroot; + this.cvsroot = cvsRoot; this.module = module.trim(); this.branch = nullify(branch); this.cvsRsh = nullify(cvsRsh); @@ -1084,7 +1083,7 @@ public class CVSSCM extends SCM implements Serializable { *

* Also checks if .cvspass file contains the entry for this. */ - public void doCvsrootCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { + public void doCheckCvsRoot(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { new FormFieldValidator(req,rsp,false) { protected void check() throws IOException, ServletException { String v = fixEmpty(request.getParameter("value")); diff --git a/core/src/main/resources/hudson/scm/CVSSCM/config.jelly b/core/src/main/resources/hudson/scm/CVSSCM/config.jelly index 07501a8221..ee031c05b2 100644 --- a/core/src/main/resources/hudson/scm/CVSSCM/config.jelly +++ b/core/src/main/resources/hudson/scm/CVSSCM/config.jelly @@ -1,9 +1,6 @@ - + diff --git a/core/src/main/resources/lib/form/editableComboBox.jelly b/core/src/main/resources/lib/form/editableComboBox.jelly index 613ceb794b..1fe20844e9 100644 --- a/core/src/main/resources/lib/form/editableComboBox.jelly +++ b/core/src/main/resources/lib/form/editableComboBox.jelly @@ -1,21 +1,30 @@ - - +