On my exchange rate XPage, I want to be able to confirm the value the user has entered using a simple action. Using getComponent, I'm able to get a handle to the localCurrency (combobox) and effectiveDate (inputText that's a date). Those values are then easily displayed in the confirmation dialog. However, the exchangeRate always returns null.
Here's the exchangeRate inputText:
<xp:inputText style="width:75.0px;text-align:right;" id="exchangeRate"
value="#{exchangeRateDoc.exchangeRate}"
readonly="#{javascript:!exchangeRateDoc.isEditable();}"
disabled="#{javascript:!@IsNewDoc();}">
<xp:this.converter>
<xp:convertNumber type="number"></xp:convertNumber>
</xp:this.converter>
</xp:inputText>
...and here's the confirm, which brings in the localCurrency and effectiveDate values without a problem, but always reports exchangeRate as null.
<xp:confirm>
<xp:this.message><![CDATA[#{javascript:var baseText = "Are you sure that you want to set the exchange rate for ";
var effectiveDate = getComponent("effectiveDate").getValue().toString();
var localCurrency = getComponent("localCurrency").getValue();
var exchangeRate = getComponent("exchangeRate").getValue();
return baseText + localCurrency + " to " + exchangeRate + " as of " + effectiveDate + "?"; }]]></xp:this.message>
</xp:confirm>
Where did I go wrong in my code that it cannot get the value of that inputText?