|
WebObjects 5.4.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.appserver.WOAssociation
com.webobjects.appserver.WOVariableAssociation
public class WOVariableAssociation
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.webobjects.appserver.WOAssociation |
---|
WOAssociation.Event |
Field Summary |
---|
Fields inherited from class com.webobjects.appserver.WOAssociation |
---|
TakeValueForKeyPathEvent, ValueForKeyPathEvent |
Constructor Summary | |
---|---|
WOVariableAssociation(String variable)
|
Method Summary | |
---|---|
String |
bindingInComponent(WOComponent aComponent)
Returns the binding String as seen in WebObjects Builder. |
boolean |
isValueConstant()
Used to check if an association value is constant at runtime. |
boolean |
isValueSettable()
Used to check if an association can assign values at runtime. |
String |
keyPath()
Overridden to return " |
void |
setValue(Object aValue,
WOComponent aComponent)
Sets the value for this association in the component. |
Object |
valueInComponent(WOComponent aComponent)
Returns the association's value for this component. |
Methods inherited from class com.webobjects.appserver.WOAssociation |
---|
associationWithKeyPath, associationWithValue, booleanValueInComponent, isValueConstantInComponent, isValueSettableInComponent, setDebugEnabledForBinding, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WOVariableAssociation(String variable)
Method Detail |
---|
public Object valueInComponent(WOComponent aComponent)
WOAssociation
For example, invoking value
on a WOAssociation created from this declaration,
returns the value of the current component's
DOWNPAYMENT:WOString {value = downpayment};
downpayment
variable. Invoking value
on a WOAssociation created from this declaration,
returns the value "$5000.00" (independent of the current component).
DOWNPAYMENT:WOString {value = "$5000.00"};
This method raises an exception if it cannot resolve the WOAssociation's value with the current component.
This method is used to retrieve values throughout the WebObjects framework by all private subclasses of WODynamicElement.
Another way in which the WebObjects framework uses this method is to synchronize the values of nested components. When attributes in child and parent components are associated with one another and changes occur in one component, this method is invoked to migrate those changes to the other component.
valueInComponent
in class WOAssociation
aComponent
- component which should resolve the association
WOAssociation.setValue(Object aValue, WOComponent aComponent)
public void setValue(Object aValue, WOComponent aComponent)
WOAssociation
aComponent
pointed to by the association binding name. It then sets the variable's value to aValue
, or invokes the setter method
with aValue
as a parameter. This method throws an exception if the receiver's value is not settable. For example, invoking setValue
on a WOAssociation created from this declaration,
sets the current component's
USER:WOTextField {value = userName};
userName
variable to the value typed into the WOTextField.
This method is used to set values throughout the WebObjects framework by all private subclasses of WODynamicElement.
Another way in which the WebObjects framework uses this method is to synchronize the values of nested components. When attributes in child and parent components are associated with one another and changes occur in one component, this method is invoked to migrate those changes to the other component.
setValue
in class WOAssociation
aValue
- the input valueaComponent
- component which should resolve the associationWOAssociation.valueInComponent(WOComponent aComponent)
,
WOAssociation.isValueSettable()
public boolean isValueSettable()
WOAssociation
isValueSettable
in class WOAssociation
false
if the association's value is constant, true
otherwiseWOAssociation.associationWithKeyPath(String aKeyPath)
,
WOAssociation.isValueConstant()
,
WOAssociation.isValueSettableInComponent(WOComponent aComponent)
public boolean isValueConstant()
WOAssociation
isValueConstant
in class WOAssociation
true
if the WOAssociation's value is a constant, false
otherwiseWOAssociation.associationWithValue(Object aValue)
,
WOAssociation.isValueSettable()
,
WOAssociation.isValueConstantInComponent(WOComponent aComponent)
public String bindingInComponent(WOComponent aComponent)
WOAssociation
bindingInComponent
in class WOAssociation
aComponent
-
WOAssociation.bindingInComponent(com.webobjects.appserver.WOComponent)
public String keyPath()
keyPath
in class WOAssociation
WOAssociation.keyPath()
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |