Package org.apache.sling.servlets.post
Class HtmlResponse
java.lang.Object
org.apache.sling.servlets.post.AbstractPostResponse
org.apache.sling.servlets.post.HtmlResponse
- All Implemented Interfaces:
PostResponse
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.-
Field Summary
Fields inherited from class org.apache.sling.servlets.post.AbstractPostResponse
PN_ERROR, PN_IS_CREATED, PN_LOCATION, PN_PARENT_LOCATION, PN_PATH, PN_REFERER, PN_STATUS_CODE, PN_STATUS_MESSAGE, PN_TITLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doSend
(javax.servlet.http.HttpServletResponse response) 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.void
Records a generic change of the giventype
.Methods inherited from class org.apache.sling.servlets.post.AbstractPostResponse
getError, getLocation, getParentLocation, getPath, getProperty, getProperty, getReferer, getStatusCode, getStatusMessage, isCreateRequest, isSafeReferer, isSuccessful, onCopied, onCreated, onDeleted, onModified, onMoved, send, setCreateRequest, setError, setLocation, setParentLocation, setPath, setProperty, setReferer, setStatus, setTitle
-
Constructor Details
-
HtmlResponse
public HtmlResponse()
-
-
Method Details
-
onChange
Records a generic change of the giventype
.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 thearguments
are the string arguments to the method enclosed in double quotes. For example, the the callonChange("sameple", "arg1", "arg2");
is aded assample("arg1", "arg2")
to the internal list of changes.- Parameters:
type
- The type of the modificationarguments
- The arguments to the modifications
-
doSend
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 classAbstractPostResponse
- Parameters:
response
- to send to- Throws:
IOException
- if an i/o exception occurs
-