|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Containable is partially 'marker interface' much like
java.lang.Serialiable. If a class implements Containable then
the Expresso Runtime wraps it with a ComponentContainer interface.
This way the Container implementation is fully pluggable without any of the
components knowing about the implementation of their containers.
You use get/setContainerImplementation to get the container implementation that then allows you to navigate the heirarchy of components and component containers.
| Method Summary | |
ComponentContainer |
getContainerImplementation()
Retrieves the actual container implementation |
ExpressoComponent |
locateComponent(String componentName)
Convenience method for Container clients. |
void |
setContainerImplementation(ComponentContainer newContainer)
Sets the marker to the ComponentContainer (which has a 1:1 instance mapping with Containable). |
| Methods inherited from interface com.jcorporate.expresso.kernel.ExpressoComponent |
getMetaData, getParent, setParent |
| Method Detail |
public void setContainerImplementation(ComponentContainer newContainer)
newContainer - a ComponentCopublic ComponentContainer getContainerImplementation()
public ExpressoComponent locateComponent(String componentName)
Convenience method for Container clients. Recommended Implementation:
ExpressoComponent getComponent(String componentName) {
return this.getContainerImplementation().getComponent(componentName);
}
This example gets the default Data Context for a component within the context
DataContext default = (DataContext)this.getParent().locateComponent("default");
componentName - The name of the component to retrieve
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||