dojoxpagesdijit.formdijit.layout

How to force djCurrencyTextBox to show currency symbol in read mode?


It is shown when the document is in edit mode. Setting constraints symbol="$" doesn't help.

<xe:djCurrencyTextBox id="budget" value="#{document1.budget}" defaultValue="0">
    <xe:this.constraints>
        <xe:djNumberConstraints
            currency="USD" type="currency" fractional="false">
        </xe:djNumberConstraints>
    </xe:this.constraints>
    <xp:this.converter>
        <xp:convertNumber></xp:convertNumber>
    </xp:this.converter>
</xe:djCurrencyTextBox> 

enter image description here


Solution

  • Add parameter showReadonlyAsDisabled="true" to your djCurrencyTextBox control:

    <xe:djCurrencyTextBox
        id="budget"
        value="#{document1.budget}"
        defaultValue="0"
        showReadonlyAsDisabled="true">
    

    enter image description here

    It will show your currency value with "$" symbol in read mode.