|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.NamingContainerSupport
NamingContainerSupport is a utility class that may be
utilized by UIComponents that implement NamingContainer to
delegate naming container management methods.
Typical usage in a UIComponent implementation
class would be:
public class MyComponent extends UIComponentBase
implements NamingContainer {
private NamingContainerSupport ncs = new NamingContainerSupport();
...
public void addComponentToNamespace(UIComponent component) {
ncs.addComponentToNamespace(component);
}
public void removeComponentFromNamespace(UIComponent component) {
ncs.removeComponentFromNamespace(component);
}
public UIComponent findComponentInNamespace(String name) {
return ncs.findComponentInNamespace(name);
}
public String generateClientId() {
return ncs.generateClientId();
}
}
| Constructor Summary | |
NamingContainerSupport()
|
|
| Method Summary | |
void |
addComponentToNamespace(UIComponent component)
Add the specified UIComponent to the namespace of this
naming container. |
UIComponent |
findComponentInNamespace(java.lang.String name)
Find and return a UIComponent in this namespace, if it
is present; otherwise return null. |
java.lang.String |
generateClientId()
Generate an identifier for a component, suitable for communication to a client. |
void |
removeComponentFromNamespace(UIComponent component)
Remove the specified UIComponent from the namespace of
this naming container, if it is present. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NamingContainerSupport()
| Method Detail |
public void addComponentToNamespace(UIComponent component)
NamingContainerAdd the specified UIComponent to the namespace of this
naming container.
addComponentToNamespace in interface NamingContainercomponent - The UIComponent to be addedpublic void removeComponentFromNamespace(UIComponent component)
NamingContainerRemove the specified UIComponent from the namespace of
this naming container, if it is present.
removeComponentFromNamespace in interface NamingContainercomponent - The UIComponent to be removedpublic UIComponent findComponentInNamespace(java.lang.String name)
NamingContainerFind and return a UIComponent in this namespace, if it
is present; otherwise return null.
If the argument name does not contain any UIComponent.SEPARATOR_CHAR characters, it is interpreted to be a
name in the namespace of this naming container.
If the argument name does contain UIComponent.SEPARATOR_CHAR characters, each segment between
UIComponent.SEPARATOR_CHAR is treated as a component
identifier in its own namespace, which are searched for in
child naming containers of this naming container, from left
to right.
findComponentInNamespace in interface NamingContainername - Identifier of the desired componentpublic java.lang.String generateClientId()
NamingContainerGenerate an identifier for a component, suitable for communication to a client. The identifier returned from this method must be unique within this namespace.
generateClientId in interface NamingContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||