propercase - Proper Case
Converts the value bound to a control so that the first letter of each word is uppercase and the remaining letters are lowercase.
Category
formatSyntax
propercase="true|false"
Usage
In Design mode, click All Properties and look for propercase under format.This
property defaults to false
.
Examples
This example consists of aCombo
Box
box bound to a scoped variable, a button for submitting
the page, and a computed field that displays the value of the scoped
variable. The value is first converted to proper case.<xp:table>
<xp:tr>
<xp:td>Combo Box</xp:td>
<xp:td>
<xe:djComboBox id="djComboBox1"
value="#{sessionScope.djComboBox1}" propercase="true">
<xp:selectItem itemLabel="Maine"></xp:selectItem>
<xp:selectItem itemLabel="New Hampshire"></xp:selectItem>
<xp:selectItem itemLabel="Vermont"></xp:selectItem>
<xp:selectItem itemLabel="Massachusetts"></xp:selectItem>
<xp:selectItem itemLabel="Rhode Island"></xp:selectItem>
<xp:selectItem itemLabel="Connecticut"></xp:selectItem>
</xe:djComboBox></xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djComboBox1}"></xp:text></xp:td>
</xp:tr>
</xp:table>