| Constructor and Description |
|---|
ModelGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static ModelBean |
createModel(Class<?> clazz)
Instrospects the provided class and creates a
ModelBean instance. |
static String |
generateJavascript(Class<?> clazz,
OutputFormat format,
boolean debug)
Instrospects the provided class, creates a model object (JS code) and
returns it.
|
static String |
generateJavascript(ModelBean model,
OutputFormat format,
boolean debug)
Creates JS code based on the provided
ModelBean in the specified
OutputFormat. |
static void |
writeModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Class<?> clazz,
OutputFormat format)
Instrospects the provided class, creates a model object (JS code) and
writes it into the response.
|
static void |
writeModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Class<?> clazz,
OutputFormat format,
boolean debug)
Instrospects the provided class, creates a model object (JS code) and
writes it into the response.
|
static void |
writeModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ModelBean model,
OutputFormat format)
Creates a model object (JS code) based on the provided
ModelBean
and writes it into the response. |
static void |
writeModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ModelBean model,
OutputFormat format,
boolean debug)
Creates a model object (JS code) based on the provided ModelBean and
writes it into the response.
|
public static void writeModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Class<?> clazz,
OutputFormat format)
throws IOException
request - the http servlet requestresponse - the http servlet responseclazz - class that the generator should introspectformat - specifies which code (ExtJS or Touch) the generator should
create.IOExceptionwriteModel(HttpServletRequest, HttpServletResponse, Class,
OutputFormat, boolean)public static void writeModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Class<?> clazz,
OutputFormat format,
boolean debug)
throws IOException
request - the http servlet requestresponse - the http servlet responseclazz - class that the generator should introspectformat - specifies which code (ExtJS or Touch) the generator should
createdebug - if true the generator creates the output in pretty format,
false the output is compressedIOExceptionpublic static void writeModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ModelBean model,
OutputFormat format)
throws IOException
ModelBean
and writes it into the response. Creates compressed JS code.request - the http servlet requestresponse - the http servlet responsemodel - ModelBean describing the model to be generatedformat - specifies which code (ExtJS or Touch) the generator should
create.IOExceptionpublic static void writeModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ModelBean model,
OutputFormat format,
boolean debug)
throws IOException
request - the http servlet requestresponse - the http servlet responsemodel - ModelBean describing the model to be generatedformat - specifies which code (ExtJS or Touch) the generator should
create.debug - if true the generator creates the output in pretty format,
false the output is compressedIOExceptionpublic static ModelBean createModel(Class<?> clazz)
ModelBean instance.
A program could customize this and call
generateJavascript(ModelBean, OutputFormat, boolean) or
writeModel(HttpServletRequest, HttpServletResponse, ModelBean, OutputFormat)
to create JS code.clazz - the model will be created based on this class.ModelBean that describes the provided class
and can be used for Javascript generation.public static String generateJavascript(Class<?> clazz, OutputFormat format, boolean debug)
clazz - class that the generator should introspectformat - specifies which code (ExtJS or Touch) the generator should
createdebug - if true the generator creates the output in pretty format,
false the output is compressedpublic static String generateJavascript(ModelBean model, OutputFormat format, boolean debug)
ModelBean in the specified
OutputFormat. Code can be generated in pretty or compressed
format.model - generate code based on this ModelBeanformat - specifies which code (ExtJS or Touch) the generator should
createdebug - if true the generator creates the output in pretty format,
false the output is compressedCopyright © 2010-2012. All Rights Reserved.