|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
AWIncludeComponent enables dynamic selection of a component (or element) to be switched in dynamically. This is a key enabler for extensible / meta-data-driven UIs.
Example:
<!-- Use the right kind of form for the selected object -->
<a:IncludeComponent name="$componentNameForSelectedObject" inspect="$selectedObject"/>
In this example, the containing component may implement as follows:
public String componentNameForSelectedObject() {
return (selectedObject instanceof Project)
? "ProjectInspector"
: "GenericInspector";
}
(Of course, a more extensible app would consult a registry or set of delegates to determine the appropriate component to return).
Note that IncludeComponent passes along any bindings that it doesn't recognize to the included component (like "inspect" in the example above) so the app can use component-specific bindings just as if the included component were being bound statically.
Bindings | |||
---|---|---|---|
name
|
The name of the component to include. (Can use awcomponentName if name is needed to be passed as binding to the included component). |
String (get) |
|
awcomponentName
|
Alternate for "name" |
String (get) |
|
awcomponentReference
|
Advanced. Used by elements like TabSet to switch in embeded component references (mined from the parent tags body). Should be used with awcomponent binding. |
AWComponentReference (get) |
|
awcomponent
|
Advanced. Used in concert with awcomponentReference to provide the context component for bindings of the componentReference. |
AWComponentReference (get) |
java.lang.Objectariba.ui.aribaweb.util.AWBaseObject
ariba.ui.aribaweb.core.AWBaseElement
ariba.ui.aribaweb.core.AWBindableElement
ariba.ui.aribaweb.core.AWContainerElement
ariba.ui.aribaweb.core.AWIncludeComponent
public class AWIncludeComponent
Constructor Summary | |
---|---|
AWIncludeComponent()
|
Method Summary | |
---|---|
AWBindable |
_currentComponentReference(AWApplication application,
AWComponent component)
|
AWBinding[] |
allBindings()
|
void |
applyValues(AWRequestContext requestContext,
AWComponent component)
The receiver should take any form values (or query string parameters) that it owns from the AWRequestContext.request() . |
void |
init(java.lang.String tagName,
java.util.Map bindingsHashtable)
|
AWResponseGenerating |
invokeAction(AWRequestContext requestContext,
AWComponent component)
The receiver should determine if it is the intended recipient of the current action (by checking the AWRequestContext.request() AWRequest.senderId() ) and,
if so, handle the action and return the result. |
boolean |
isKindOfClass(java.lang.Class targetClass)
|
void |
renderResponse(AWRequestContext requestContext,
AWComponent component)
The receiver should render its content to the AWRequestContext.response() |
Methods inherited from class ariba.ui.aribaweb.core.AWContainerElement |
---|
add, appendTo, contentElement, continueVisit, setContentElement, validate |
Methods inherited from class ariba.ui.aribaweb.core.AWBindableElement |
---|
determineInstance, tagName |
Methods inherited from class ariba.ui.aribaweb.core.AWBaseElement |
---|
bareStringContent, clone, determineInstance, lineNumber, setLineNumber, setTemplateName, startVisit, templateName, toString |
Methods inherited from class ariba.ui.aribaweb.util.AWBaseObject |
---|
debugString, ensureFieldValuesClear, getFieldValue, init, localizedJavaString, logString, logWarning, setFieldValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ariba.ui.aribaweb.core.AWElement |
---|
clone |
Methods inherited from interface ariba.ui.aribaweb.core.AWCycleableReference |
---|
determineInstance |
Methods inherited from interface ariba.ui.aribaweb.util.AWObject |
---|
getFieldValue, init, setFieldValue |
Methods inherited from interface ariba.ui.aribaweb.core.AWVisitable |
---|
startVisit |
Constructor Detail |
---|
public AWIncludeComponent()
Method Detail |
---|
public void init(java.lang.String tagName, java.util.Map bindingsHashtable)
init
in interface AWBindable
init
in class AWBindableElement
public AWBinding[] allBindings()
allBindings
in interface AWBindable
allBindings
in class AWBindableElement
public boolean isKindOfClass(java.lang.Class targetClass)
isKindOfClass
in interface AWObject
isKindOfClass
in class AWBaseObject
public AWBindable _currentComponentReference(AWApplication application, AWComponent component)
public void applyValues(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.request()
.
applyValues
in interface AWCycleable
applyValues
in class AWContainerElement
requestContext
- the context for the current request.component
- the current parent componentpublic AWResponseGenerating invokeAction(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.request()
AWRequest.senderId()
) and,
if so, handle the action and return the result.
invokeAction
in interface AWCycleable
invokeAction
in class AWContainerElement
requestContext
- the context for the current request.component
- the current parent component
public void renderResponse(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.response()
renderResponse
in interface AWCycleable
renderResponse
in class AWContainerElement
requestContext
- the context for the current request.component
- the current parent component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |