| Modifier | Constructor and Description |
|---|---|
protected |
DuelView() |
protected |
DuelView(DuelPart... viewParts) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPart(DuelPart part)
Sets the partial view for a named area
|
protected boolean |
coerceEqual(Object a,
Object b)
Coerces objects before performing equality test
|
protected void |
dataEncode(DuelContext context,
Object data,
int depth)
Emits data object as a graph of JavaScript literals
|
protected double |
echo(double value,
double ignore)
A work-around for dynamic post-inc/dec operator semantics
|
protected boolean |
equal(Object a,
Object b)
Performs equality test
|
protected Object |
getExtra(DuelContext context,
String ident) |
protected Object |
getProperty(Object data,
Object property)
Retrieves the value of a property from the data object
|
protected boolean |
hasExtras(DuelContext context,
String... idents) |
protected void |
htmlEncode(DuelContext context,
Object value)
Ensures the value is properly encoded as HTML text
|
protected void |
init()
Initialization of parts and child-views
|
protected Object |
LogicalAND(Object left,
Object right) |
protected Object |
LogicalOR(Object left,
Object right) |
protected String |
nextID(DuelContext context) |
protected void |
putExtra(DuelContext context,
String ident,
Object value) |
void |
render(Appendable output)
Renders the view to the output
|
void |
render(Appendable output,
Object data)
Binds the view to the data and renders the view to the output
|
void |
render(DuelContext context)
Binds the view to any data and renders the view to the output
|
protected abstract void |
render(DuelContext context,
Object data,
int index,
int count,
String key)
The entry point into the view tree
|
protected void |
renderPart(DuelContext context,
String partName,
Object data,
int index,
int count,
String key)
Renders a named partial view
|
protected void |
renderView(DuelContext context,
DuelView view,
Object data,
int index,
int count,
String key)
Allows one view to render another
|
protected void |
setProperty(Object data,
Object property,
Object value)
Stores the value for a property of the data object
|
protected String |
transformURL(DuelContext context,
String url)
Allows view to intercept and transform URLs within element attributes
|
protected void |
write(DuelContext context,
char value)
Writes the value to the output
|
protected void |
write(DuelContext context,
Object value)
Writes the value to the output
|
protected void |
write(DuelContext context,
String value)
Writes the value to the output
|
protected void |
writeExtras(DuelContext context,
boolean needsTags) |
protected DuelView()
protected DuelView(DuelPart... viewParts)
protected void init()
public void render(Appendable output) throws IOException
output - IOExceptionpublic void render(Appendable output, Object data) throws IOException
output - data - IOExceptionpublic void render(DuelContext context) throws IOException
context - IOExceptionprotected abstract void render(DuelContext context, Object data, int index, int count, String key) throws IOException
context - data - index - count - key - IOExceptionprotected void addPart(DuelPart part)
part - protected void renderPart(DuelContext context, String partName, Object data, int index, int count, String key) throws IOException
partName - context - data - index - count - key - IOExceptionprotected void renderView(DuelContext context, DuelView view, Object data, int index, int count, String key) throws IOException
view - context - data - index - count - key - IOExceptionprotected void write(DuelContext context, Object value) throws IOException
context - value - IOExceptionprotected void write(DuelContext context, char value) throws IOException
context - value - IOExceptionprotected void write(DuelContext context, String value) throws IOException
context - value - IOExceptionprotected void htmlEncode(DuelContext context, Object value) throws IOException
context - value - IOExceptionprotected void dataEncode(DuelContext context, Object data, int depth) throws IOException
context - data - depth - IOExceptionprotected Object getExtra(DuelContext context, String ident)
protected void putExtra(DuelContext context, String ident, Object value)
protected boolean hasExtras(DuelContext context, String... idents)
protected void writeExtras(DuelContext context, boolean needsTags) throws IOException
IOExceptionprotected String nextID(DuelContext context)
protected String transformURL(DuelContext context, String url)
url - URLprotected Object getProperty(Object data, Object property)
data - protected void setProperty(Object data, Object property, Object value)
data - protected boolean equal(Object a, Object b)
a - b - protected boolean coerceEqual(Object a, Object b)
a - b - protected double echo(double value,
double ignore)
value - ignore - Copyright © 2014. All rights reserved.