提交 61e2a289 编写于 作者: K kohsuke

added a new convenience method

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14878 71c3de6d-444a-0410-be80-ed276b4c234a
上级 848cda75
......@@ -7,8 +7,6 @@ import hudson.Util;
import hudson.model.AbstractProject;
import hudson.model.Hudson;
import hudson.model.Item;
import hudson.model.Item;
import hudson.model.Job;
import hudson.security.Permission;
import hudson.security.AccessControlled;
......@@ -26,7 +24,6 @@ import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.acegisecurity.AccessDeniedException;
import org.kohsuke.stapler.Stapler;
import org.acegisecurity.AccessDeniedException;
/**
* Base class that provides the framework for doing on-the-fly form field validation.
......@@ -128,8 +125,15 @@ public abstract class FormFieldValidator {
* Sends out an HTML fragment that indicates a success.
*/
public void ok() throws IOException, ServletException {
respond("<div/>");
}
/**
* Sends out an arbitrary HTML fragment.
*/
public void respond(String html) throws IOException, ServletException {
response.setContentType("text/html");
response.getWriter().print("<div/>");
response.getWriter().print(html);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册