Class HtmlResponse

  • All Implemented Interfaces:
    PostResponse

    public class HtmlResponse
    extends AbstractPostResponse
    The HtmlResponse is an AbstractPostResponse preparing the response in HTML (actually XHTML) such that it can be interpreted as a plain response in a browser or as XML response in an Ajax request.
    • Constructor Detail

      • HtmlResponse

        public HtmlResponse()
    • Method Detail

      • onChange

        public void onChange​(String type,
                             String... arguments)
        Records a generic change of the given type.

        The change is added to the internal list of changes with the syntax of a method call, where the type is the method name and the arguments are the string arguments to the method enclosed in double quotes. For example, the the call

         onChange("sameple", "arg1", "arg2");
         
        is aded as
         sample("arg1", "arg2")
         
        to the internal list of changes.
        Parameters:
        type - The type of the modification
        arguments - The arguments to the modifications
      • doSend

        protected void doSend​(javax.servlet.http.HttpServletResponse response)
                       throws IOException
        Writes the response to the given writer and replaces all ${var} patterns by the value of the respective property. if the property is not defined the pattern is not modified.
        Specified by:
        doSend in class AbstractPostResponse
        Parameters:
        response - to send to
        Throws:
        IOException - if an i/o exception occurs