public class ComponentAddress extends java.lang.Object implements java.io.Serializable
IRequestCycle
.
This class needs to be used mostly when working with components accessed via the
IRender
interface. It allows those components to serialize and pass
as a service parameter information about what component they have to talk to if control returns
back to them.
This situation often occurs when the component used via IRender contains Direct or Action links.
Constructor and Description |
---|
ComponentAddress(IComponent component)
Creates a new ComponentAddress object that carries the identification information of the
given component (the page name and the ID path).
|
ComponentAddress(INamespace namespace,
java.lang.String pageName,
java.lang.String idPath)
Creates a new ComponentAddress using the given Page Name and ID Path relative on the provided
Namespace
|
ComponentAddress(java.lang.String pageName,
java.lang.String idPath)
Creates a new ComponentAddress using the given Page Name and ID Path
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
IComponent |
findComponent(IRequestCycle cycle)
Finds a component with the current address using the given RequestCycle.
|
java.lang.String |
getIdPath()
Returns the idPath of the component.
|
java.lang.String |
getPageName()
Returns the Page Name of the component.
|
int |
hashCode() |
public ComponentAddress(IComponent component)
component
- the component to get the address ofpublic ComponentAddress(java.lang.String pageName, java.lang.String idPath)
pageName
- the name of the page that contains the componentidPath
- the ID Path of the component (which may be null)public ComponentAddress(INamespace namespace, java.lang.String pageName, java.lang.String idPath)
namespace
- the namespace of the page that contains the componentpageName
- the name of the page that contains the componentidPath
- the ID Path of the componentpublic IComponent findComponent(IRequestCycle cycle)
cycle
- the RequestCycle to use to locate the componentpublic java.lang.String getIdPath()
public java.lang.String getPageName()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)