public class MapAjaxRenderer extends Object implements AjaxRenderer
A AjaxRender that gets map from the action`s output and creates a XML structure with the contents of this map.
For example, a Map with this content:
| key | value | | akey | avalue | | yetAnotherKey | yetAnotherValue |
<map>
<entry key="akey">avalue</entry>
<entry key="yetAnotherKey">yetAnotherValue</entry>
</map>
The tag names ("map" & "entry") may be changed.
Then you can use your favorite JavaScript parser (or use your own) to parse the generated XML strucure and interact it in your code.
| Modifier and Type | Field and Description |
|---|---|
static String |
CHILD |
static String |
FATHER |
static String |
KEY |
APP_JS, APP_JSON, APP_URLENCODED, TEXT_HTML, TEXT_PLAIN, TEXT_XML| Constructor and Description |
|---|
MapAjaxRenderer() |
MapAjaxRenderer(String root,
String child,
String key) |
| Modifier and Type | Method and Description |
|---|---|
String |
encode(Object obj,
Locale loc,
boolean pretty) |
String |
getCharset() |
String |
getContentType() |
static void |
main(String[] args) |
public static final String FATHER
public static final String CHILD
public static final String KEY
public String encode(Object obj, Locale loc, boolean pretty) throws Exception
encode in interface AjaxRendererExceptionpublic String getContentType()
getContentType in interface AjaxRendererpublic String getCharset()
getCharset in interface AjaxRendererCopyright © 2015. All Rights Reserved.