public class PLightComponentHelper extends Object implements PLightComponent, PControllerBean, PCollectDataListener
PLightComponentHelper
is a helper class for PLightComponent
.Modifier and Type | Method and Description |
---|---|
void |
addRemoteListener(Object remoteListenerHandle)
If the controller can send events to other controllers,
this method is called to pass a handle to the remote listener
class.
|
void |
collectData(PCollectDataEvent event)
Overrides
PCollectDataListener . |
int[] |
getArrayRange(PModelHandle mh,
String spec)
Given a model and a specification for an array in that model, get the
range of actual elements in the array.
|
String |
getDataDescriptor()
Returns a string guaranteed to be unique among the lightweight components
that can be used to describe the data, and acts as a key for it.
|
String |
getDisplayFieldDescription()
Returns the output data description property of the component.
|
Object |
getLightData()
Gets the lightweight data object itself.
|
PModelHandle |
getModel()
Accesses the data model.
|
String |
getModelFieldDescription()
Returns the input data description property of the component.
|
Remote |
getRemoteComponent()
Gets a reference to the remote component (controller) for this object.
|
Object |
getRemoteListenerHandle(String type)
If the component's controller can listen for events
from other controllers, this method posts a listener and returns
a handle to identify it.
|
Object |
getSelectionDataFor(String dataItem,
int index)
Given the name of a display data item and an optional index,
returns the information needed (usually, model data) for a selection
event to be useful.
|
boolean |
isLight()
Determines whether this is a lightweight component.
|
void |
register(PControllerBean stub)
Allows the lightweight component to register the controller stub it received
when the controller was created.
|
void |
releaseRemoteListener(Object remoteListenerHandle)
Removes all listener resources being used by the controller.
|
void |
removeRemoteListener(Object remoteListenerHandle)
If the controller can send events to other controllers,
this method is called to pass a handle to the remote listener
class.
|
void |
setDisplayFieldDescription(String desc)
Sets the output data description property of the component.
|
void |
setLightData(Object field)
Sets the lightweight data object.
|
void |
setModel(PModelHandle model)
Passes the model to the controller.
|
void |
setModelFieldDescription(String desc)
Sets the input data description property of the component.
|
void |
unregister()
Allows garbage collection - disassociates the component from
its controller.
|
public void unregister() throws RemoteException
RemoteException
public String getDataDescriptor()
getDataDescriptor
in interface PLightComponent
String
data description.public Object getLightData()
getLightData
in interface PLightComponent
Object
that represents a component's display data.public void setLightData(Object field)
setLightData
in interface PLightComponent
field
- the lightweight component's display datapublic void collectData(PCollectDataEvent event)
PCollectDataListener
. Causes the control
to save changes back to the data model. Done prior to commiting changes to
Portal.collectData
in interface PCollectDataListener
event
- the data collection eventpublic void setModel(PModelHandle model) throws RemoteException
setModel
in interface PControllerBean
model
- the new data modelRemoteException
- thrown for errorspublic PModelHandle getModel() throws RemoteException
getModel
in interface PControllerBean
RemoteException
- thrown for errorspublic boolean isLight() throws RemoteException
getModelHandle
method will always
return null, the setModelHandle
method is
ignored, and no property change events are generated. The value returned
must be the same in both component and controller.isLight
in interface PControllerBean
RemoteException
- thrown for errorspublic Object getSelectionDataFor(String dataItem, int index) throws RemoteException
getSelectionDataFor
in interface PControllerBean
dataItem
- the name of a data item. Must match the name of
an item changed by sending a
PViewDataChangeEvent
.index
- an optional index into an array data itemRemoteException
- thrown for errorspublic int[] getArrayRange(PModelHandle mh, String spec) throws RemoteException
getArrayRange
in interface PControllerBean
mh
- a model handlespec
- a field descriptionRemoteException
- thrown for all problemspublic Object getRemoteListenerHandle(String type) throws RemoteException
getRemoteListenerHandle
in interface PControllerBean
type
- the type of listener to getRemoteException
- thrown for all problemspublic void releaseRemoteListener(Object remoteListenerHandle) throws RemoteException
releaseRemoteListener
in interface PControllerBean
remoteListenerHandle
- an object handle as returned by
getRemoteListenerHandle()
from another objectRemoteException
- thrown for all problemspublic void addRemoteListener(Object remoteListenerHandle) throws RemoteException
addRemoteListener
in interface PControllerBean
remoteListenerHandle
- an object handle as returned by
getRemoteListenerHandle()
from another
objectRemoteException
- thrown for all problemspublic void removeRemoteListener(Object remoteListenerHandle) throws RemoteException
removeRemoteListener
in interface PControllerBean
remoteListenerHandle
- an object handle as returned by
getRemoteListenerHandle()
from another objectRemoteException
- thrown for all problemspublic void register(PControllerBean stub) throws RemoteException
register
in interface PControllerBean
stub
- the controller stub owned by the client viewRemoteException
- thrown in case of errorPInfranetAppController.registerController( PControllerBean, PControllerImpl )
public Remote getRemoteComponent()
Remote
object.public void setModelFieldDescription(String desc) throws RemoteException
desc
- the description or name of the data field passed
as an input parameter to PortalRemoteException
- thrown for errorspublic String getModelFieldDescription() throws RemoteException
RemoteException
- thrown for errorspublic void setDisplayFieldDescription(String desc) throws RemoteException
desc
- the description or name of the data field
returned by Portal that is associated with
the componentRemoteException
- thrown for errorspublic String getDisplayFieldDescription() throws RemoteException
RemoteException
- thrown for errorsCopyright © 2003, 2023, Oracle and/or its affiliates.