You need to sign in to do that
Don't have an account?
BrettGus
Value format in apex:InputText
I have an Integer value that I'm assigning to a apex:InputText. However, it displays as a displays with a decimal point "4654.0" when I use a apex:InputText as opposed to apex:InputField. Is there any way to specify formatting for this number? If not, is there a workaround?
Edit:
By the way, the reason I want to use an apex:InputText is so that I can set the item to disabled.
It's not glamorous, but you could always use jQuery to disable it on the client side
All Answers
InputText doesn't appear to have any brains about formatting and will display an integer the same as a decimal.
To work around this instead you could do something like this
That's a good workaround! Unfortunately what I'm trying to do is editable data side by side with non-editable data. To make it look consistent I wanted to have a disabled and non-disabled input boxes side by side (rather than one be text and the other an input box) with both displaying data. Thanks for trying anyway!
It's not glamorous, but you could always use jQuery to disable it on the client side
Yeah it's not but I think jQuery best matches what I'm trying to do