public class Viewable extends Object
ViewableContext which can override the
default resolving behaviour.
Template,
ViewableContext,
ResolvingViewableContext| Constructor and Description |
|---|
Viewable(String templateName)
Construct a new viewable type with a template name.
|
Viewable(String templateName,
Object model)
Construct a new viewable type with a template name and a model.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getModel()
Get the model.
|
String |
getTemplateName()
Get the template name.
|
boolean |
isTemplateNameAbsolute()
Determines whether the template name is represented by an absolute path.
|
public Viewable(String templateName) throws IllegalArgumentException
null.templateName - the template name, shall not be null.IllegalArgumentException - if the template name is null.public Viewable(String templateName, Object model) throws IllegalArgumentException
templateName - the template name, shall not be null.model - the model, may be null.IllegalArgumentException - if the template name is null.public String getTemplateName()
public Object getModel()
public boolean isTemplateNameAbsolute()
true if the template name is absolute, and starts with a
'/' character, false otherwise.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.