Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE
The content type of the output.
|
Constructor and Description |
---|
AuWriters() |
Modifier and Type | Method and Description |
---|---|
static Class |
getImplementationClass()
Returns the implementation class of
AuWriter that
will be used to generate the output to the client. |
static org.zkoss.json.JSONObject |
getJSONOutput(org.zkoss.json.JSONArray rs)
Returns a JSON object representing the output that will be sent
to the client.
|
static AuWriter |
newInstance()
Creates an instance of
AuWriter . |
static void |
setImplementationClass(Class cls)
Sets the implementation class of
AuWriter that
will be used to generate the output to the client. |
static org.zkoss.json.JSONArray |
toJSON(AuResponse response)
Converts a response to a JSON object.
|
public static final String CONTENT_TYPE
public static Class getImplementationClass()
AuWriter
that
will be used to generate the output to the client.
Default: HttpAuWriter
.
public static void setImplementationClass(Class cls)
AuWriter
that
will be used to generate the output to the client.public static AuWriter newInstance() throws UiException
AuWriter
.UiException
public static org.zkoss.json.JSONObject getJSONOutput(org.zkoss.json.JSONArray rs)
You could add the responses to the given array by invoking
toJSON(org.zkoss.zk.au.AuResponse)
.
rs
- the array to hold the responses.
To output a response, invoke toJSON(org.zkoss.zk.au.AuResponse)
as follows:
rs.add(AuWriters.toJSON(response))
.public static org.zkoss.json.JSONArray toJSON(AuResponse response)
Copyright © 2017. All rights reserved.