Package hudson.util

Class FormApply


  • public class FormApply
    extends Object
    Server-side code related to the <f:apply> button.
    Since:
    1.453
    Author:
    Kohsuke Kawaguchi
    • Constructor Summary

      Constructors 
      Constructor Description
      FormApply()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.kohsuke.stapler.HttpResponses.HttpResponseException applyResponse​(String script)
      Generates the response for the asynchronous background form submission (AKA the Apply button.)
      static boolean isApply​(org.kohsuke.stapler.StaplerRequest req)
      Is this submission from the "apply" button?
      static org.kohsuke.stapler.HttpResponses.HttpResponseException success​(String destination)
      Generates the response for the form submission in such a way that it handles the "apply" button correctly.
    • Constructor Detail

      • FormApply

        public FormApply()
    • Method Detail

      • success

        public static org.kohsuke.stapler.HttpResponses.HttpResponseException success​(String destination)
        Generates the response for the form submission in such a way that it handles the "apply" button correctly.
        Parameters:
        destination - The page that the user will be taken to upon a successful submission (in case this is not via the "apply" button.)
      • isApply

        public static boolean isApply​(org.kohsuke.stapler.StaplerRequest req)
        Is this submission from the "apply" button?
      • applyResponse

        public static org.kohsuke.stapler.HttpResponses.HttpResponseException applyResponse​(String script)
        Generates the response for the asynchronous background form submission (AKA the Apply button.)

        When the response HTML includes a JavaScript function in a pre-determined name, that function gets executed. This method generates such a response from JavaScript text.