public class View extends Object implements Renderable
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_MODEL_NAME
If left unspecified, the default name of the model in the request
attributes
|
protected Map<String,Object> |
model |
protected String |
path |
Constructor and Description |
---|
View(String path)
Creates a view without a model.
|
View(String path,
Object model) |
View(String path,
Object model,
String modelName) |
Modifier and Type | Method and Description |
---|---|
Object |
getModel() |
Map<String,Object> |
getModelMap() |
String |
getModelName() |
String |
getPath() |
void |
render(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets up the model in the request attributes, creates a dispatcher, and
forwards the request.
|
public static final String DEFAULT_MODEL_NAME
protected String path
public View(String path)
path
- will be dispatched to using the servlet container; it should
have a leading /.public String getPath()
public String getModelName()
public Object getModel()
public void render(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException, javax.ws.rs.WebApplicationException
render
in interface Renderable
request
- http requestresponse
- http responseIOException
- if I/O error occurredjavax.servlet.ServletException
- if servlet error occurredjavax.ws.rs.WebApplicationException
- if application error occurredCopyright © 2020 JBoss by Red Hat. All rights reserved.