The right side of a declaration resolves to a literal
that is determined at run time by a Property
Editor. However, if the literal is prefixed by @,
the remainder of the string is interpreted as a model attribute name.
The declaration takes the value from the model object, as shown in
the following code example.
node { label : "@caption" ; title : "CSS rocks" ;}
The label
property will be
set to the value of the attribute called caption
in
the model. If the specified attribute does not exist for the object,
it is searched for recursively in the model ascendancy. The title
property
will be set to the literal CSS rocks
.
Such indirection is also used in the opposite direction,
that is, to retrieve the name of the model attribute that controls
a graphic property. This allows user interactions to modify the data
model correctly. Two special names,
@_ID
and
@_TAG
,
represent values returned by the model method calls
getID and
getTag getTag
respectively.
In a palette symbol CSS, the indirection cannot directly
access the properties of the SDM object that is rendered by the palette
symbol. In this case, the indirection can only access the symbol parameters.
If you want a property of a graphic element of the symbol to be mapped
to a property of the corresponding SDM object, you have to define
a parameter and use it as an intermediate property. The ID of this
parameter can then be accessed in the symbol CSS as an object property.
In the outer CSS, you can use this parameter ID as a bean property.