Package org.zkoss.zk.au
Class AuWriters
java.lang.Object
org.zkoss.zk.au.AuWriters
Utilities to instantiate an implementation of
AuWriter.- Since:
- 3.0.1
- Author:
- tomyeh
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassReturns the implementation class ofAuWriterthat will be used to generate the output to the client.static org.zkoss.json.JSONObjectgetJSONOutput(org.zkoss.json.JSONArray rs) Returns a JSON object representing the output that will be sent to the client.static AuWriterCreates an instance ofAuWriter.static voidSets the implementation class ofAuWriterthat will be used to generate the output to the client.static org.zkoss.json.JSONArraytoJSON(AuResponse response) Converts a response to a JSON object.
-
Field Details
-
CONTENT_TYPE
The content type of the output.- Since:
- 3.5.0
-
-
Constructor Details
-
AuWriters
public AuWriters()
-
-
Method Details
-
getImplementationClass
Returns the implementation class ofAuWriterthat will be used to generate the output to the client.Default:
HttpAuWriter. -
setImplementationClass
Sets the implementation class ofAuWriterthat will be used to generate the output to the client. -
newInstance
Creates an instance ofAuWriter.- Throws:
UiException
-
getJSONOutput
public 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.You could add the responses to the given array by invoking
toJSON(org.zkoss.zk.au.AuResponse).- Parameters:
rs- the array to hold the responses. To output a response, invoketoJSON(org.zkoss.zk.au.AuResponse)as follows:rs.add(AuWriters.toJSON(response)).- Since:
- 5.0.5
-
toJSON
Converts a response to a JSON object.- Since:
- 5.0.5
-