Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

JSF currencySymbol

Hi,

I am trying to understand following code but could not understand.



<h:inputText id="sal" value="#{ManagedBean.sal}">
<f:convertNumber currencySymbol="$" type="currency"/>
</h:inputText><br>
<h:message for="sal" style="color:BLUE"/>
<h:outputText value="#{ManagedBean.sal}">
<f:convertNumber currencySymbol="$" type="currency"/>
</h:outputText>


Especially what currencySymbol is doing.

Please advise. Any links, ideas, suggestions, sample code, resources highly appreciated. Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of a_b
a_b

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

why we need to use 'currencySymbol' in inputText. It made sense in outputText. Does that mean we can conver from say Rp to Dollar etc if i give like

<h:inputText id="sal" value="#{ManagedBean.sal}">
<f:convertNumber currencySymbol="Rp" type="currency"/>
</h:inputText><br>
<h:message for="sal" style="color:BLUE"/>
<h:outputText value="#{ManagedBean.sal}">
<f:convertNumber currencySymbol="$" type="currency"/>
</h:outputText>
So input text accept currency as Rp and output tect converts that to $ and displays?

Please advise