|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo.app.Component
echopoint.TemplatePanel
public class TemplatePanel
TemplatePanel is a container that uses a
TemplateLayoutData to render a template of content.
This layout data can itself contained "named" Components and "named" Text Substitutions.
A singleton TemplateDataSource can be used for more than one
TemplatePanel and hence the memory footprint is reduced if
used in this way.
The supplied template implementation reads XHTML template data from a number of different sources including Files, Strings, Resources and JSP pages.
The markup :
<component name="xxx" />
is used to indicate where in the template a named component will be placed.
In EchopointNG it was possible to set style and css properties. This feature is not implemented yet.
| Field Summary | |
|---|---|
static String |
PROPERTY_COMPONENT_MAPPING
|
static String |
PROPERTY_TEMPLATE_DATA_SOURCE
|
| Constructor Summary | |
|---|---|
TemplatePanel()
Constructs a TemplatePanel with no template data as yet. |
|
TemplatePanel(TemplateDataSource tds)
Constructs a TemplatePanel with the specified
TemplateDataSource. |
|
| Method Summary | |
|---|---|
void |
addNamedComponent(Component component,
String componentName)
Adds a component to the TemplatePanel with the associated
name which can the be references from the template data. |
String |
getComponentName(Component component)
Returns the name associated with the component or null if it cant be found. |
Component |
getNamedComponent(String componentName)
Returns a component associated with the name or null if it cant be found. |
String[] |
getNamedComponents()
|
TemplateDataSource |
getTemplateDataSource()
Returns the TemplateDataSource which contains the template data. |
void |
remove(Component c)
|
void |
removeNamedComponent(String componentName)
Removes a named component from the TemplatePanel that was
previously added via the addNamedComponent() method. |
void |
setTemplateDataSource(TemplateDataSource templateDataSource)
Sets the TemplateDataSource to be used |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_TEMPLATE_DATA_SOURCE
public static final String PROPERTY_COMPONENT_MAPPING
| Constructor Detail |
|---|
public TemplatePanel()
TemplatePanel with no template data as yet.
public TemplatePanel(TemplateDataSource tds)
TemplatePanel with the specified
TemplateDataSource.
tds - -
the source for the template data.| Method Detail |
|---|
public void setTemplateDataSource(TemplateDataSource templateDataSource)
templateDataSource - the TemplateDataSource to be usedpublic TemplateDataSource getTemplateDataSource()
public void addNamedComponent(Component component,
String componentName)
TemplatePanel with the associated
name which can the be references from the template data.
component - the component to addcomponentName - -
the name to use when referencing this component in the
template data.public String getComponentName(Component component)
component - -
the component associated with the name
public Component getNamedComponent(String componentName)
componentName - -
the name associated with the component
public String[] getNamedComponents()
TemplatePanel.public void remove(Component c)
remove in class ComponentComponent.remove(nextapp.echo.app.Component)public void removeNamedComponent(String componentName)
TemplatePanel that was
previously added via the addNamedComponent() method.
componentName - -
the name of the component
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||