Modifier and Type | Class and Description |
---|---|
static class |
View.ViewContext |
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
ERROR_DETAILS, TITLE, TITLE_LINK, USER
Constructor and Description |
---|
View() |
View(View.ViewContext ctx) |
Modifier and Type | Method and Description |
---|---|
String |
$(String key)
Lookup a value from the current context
|
String |
$(String key,
String defaultValue)
Lookup a value from the current context.
|
View.ViewContext |
context() |
Map<String,javax.servlet.http.Cookie> |
cookies()
Get the cookies
|
Throwable |
error() |
<T> T |
getInstance(Class<T> cls) |
boolean |
inDevMode() |
ResponseInfo |
info(String about) |
com.google.inject.Injector |
injector() |
Map<String,String> |
moreParams() |
javax.servlet.ServletOutputStream |
outputStream() |
String |
prefix() |
abstract void |
render()
The API to render the view
|
void |
render(Class<? extends SubView> cls)
Render a sub-view
|
javax.servlet.http.HttpServletRequest |
request() |
javax.servlet.http.HttpServletResponse |
response() |
String |
root_url(String... parts)
Create an url from url components
|
String |
root() |
void |
set(String key,
String value)
Set a context value.
|
void |
setTitle(String title) |
void |
setTitle(String title,
String url) |
int |
status() |
String |
url(String... parts)
Create an url from url components
|
PrintWriter |
writer() |
public View()
public View(View.ViewContext ctx)
public abstract void render()
public View.ViewContext context()
public Throwable error()
public int status()
public boolean inDevMode()
public com.google.inject.Injector injector()
public <T> T getInstance(Class<T> cls)
public javax.servlet.http.HttpServletRequest request()
public javax.servlet.http.HttpServletResponse response()
public Map<String,javax.servlet.http.Cookie> cookies()
public javax.servlet.ServletOutputStream outputStream()
public PrintWriter writer()
public String $(String key, String defaultValue)
key
- to lookupdefaultValue
- if key is missingpublic String $(String key)
key
- to lookuppublic void set(String key, String value)
key
- to setvalue
- to setpublic String root()
public String prefix()
public void setTitle(String title)
public String root_url(String... parts)
parts
- components to joinpublic String url(String... parts)
parts
- components to joinpublic ResponseInfo info(String about)
Copyright © 2008–2019 Apache Software Foundation. All rights reserved.