Class PBEAttribute
Object
|
+--PBEUnit
|
+--PBEAttribute
- Direct Known Subclasses:
- PBEField, PBEGroupField, PBEMemberField, PBEMethod, PBEPathAttribute, PBEReadOnlyAttribute, PBESelectedField
- public class PBEAttribute
- extends PBEUnit
Description:
PBEAttribute provides functionality for input and output of its value,
setting and reading a "status". It also provides before/after input and
output event triggering.
Examples:
PBE:declareObject(
"PBEObject",
"globals");
PBE:declareAttribute(
"PBEAttribute",
"mainpage");
In this example an attribute called "mainpage" is declared for the object
"globals".
This example can be found in the file "initdemo.pbt" of the "PBE Demo"
module (approx. line 152).
name
public objname name
object
public PBEObject object
enabled
public varchar enabled
visible
public varchar visible
iValue
protected generic iValue
iStatus
protected varchar iStatus
iBefore
protected varchar iBefore
iAfter
protected varchar iAfter
iOn
protected varchar iOn
PBEAttribute
public PBEAttribute(PBEObject my_object,
varchar name)
- Parameters:
my_object - the object this object should be attached to.name - the name used to access this object.
globalReference
public varchar globalReference()
- Overrides:
- globalReference in class PBEUnit
prepareAction
public void prepareAction(varchar when,
varchar what,
varchar action)
- Overrides:
- prepareAction in class PBEUnit
getValue
public final generic getValue()
- Get the current value of the attribute.
getValue
public generic getValue(boolean is_edit,
generic default_value)
- Get the value of the attribute.
- Parameters:
is_edit - if this is $true then the value
returned is the value in the edit
buffer of the attribute, if available.
Note: edit buffering is not
supported by PBEAttribute.default_value - this value is returned if the
current value of the attribute
is $null, or otherwise not
available.
setValue
public final void setValue(generic v)
setValue
public void setValue(generic v,
boolean is_first)
- Set the value of the attribute.
- Parameters:
v - the new value of the attribute.is_first - $true of this is the first component
in a list of values for the attribute.
$false if the value is a subsequent
component of a list.
getStatus
public varchar getStatus()
setStatus
public void setStatus(generic result)
enable
public void enable()
disable
public void disable(varchar page)
enabled
public varchar enabled()
show
public void show()
hide
public void hide(varchar page)
inputValue
public void inputValue(generic v,
boolean is_first)
doBeforeInput
public void doBeforeInput(varchar string)
beforeInput
protected generic beforeInput(varchar string,
generic v)
doAfterInput
public void doAfterInput(varchar string)
afterInput
protected void afterInput(varchar string)
outputValue
public generic outputValue(boolean is_edit,
generic default_value)
doOnOutput
public void doOnOutput(varchar string)
onOutput
protected generic onOutput(varchar string,
generic v)