Setting properties
Properties define XPages and controls.
Properties appear in a window under the editor. The properties that appear are for the control in focus in the editor, or for the XPage if focus is outside all controls.
Select All Properties under the Properties tab to access a categorized list of all properties for a control or XPage. Here properties are identified by their canonical tag names. Make other selections under the Properties and Events tabs to access subsets of the properties with a designed user interface. Here properties are accessed with descriptive names.
Assign values to properties as follows:
- Static values are selected from a list or typed in.
- Dynamic values are specified with scripts that return a value. A diamond next to the property opens the script editor.
- Events are specified with server-side and client-side scripts and simple actions. It is best to specify scripts and simple actions on the Events tab.
inputText
(Edit
Box) control with id
and value
properties
defined as attributes:<xp:inputText id="inputText1" value="#{document1.subject}"></xp:inputText>
Here the
value
property is defined as content
for the control definition:<xp:inputText id="inputText1">
<xp:this.value>
<![CDATA[#{javascript:return document1.getItemValueString("subject")}]]>
</xp:this.value>
</xp:inputText>
Dynamic properties are calculated as follows. Use the editing window
radio buttons to select one or the other.
- Compute Dynamically recalculates the formula
whenever the XPage refreshes. These formulas appear in the source
preceded by a pound sign, for example,
#{javascript:var dc = database.getAllDocuments(); "Count = " + dc.getDocumentCount();}
. - Compute on Page Load calculates the formula
once when the XPage is first loaded. These formulas appear in the
source preceded by a dollar sign, for example,
${javascript:var dc = database.getAllDocuments(); "Count = " + dc.getDocumentCount();}
.