You need to sign in to do that
Don't have an account?
Michael Dsoza
how to make first letter of each as capital
How to make first letter of each word of sentence should be capital in visualforce ?
I have used apex:outputtext to show my text then how can i show it ?
I know LOWER is used for lowercase & UPPER is used for uppercase.
Hi ,
I think for this you need to play with your string. means you need to pull first character from the word usting substring method of string and then use the Uppercase and then concatinate the string.
Hi,
here is a small example of how you can do it.
string s1 = 'abc';
string s2 = s1.subString(0,1).toUpperCase();
system.debug(s2);
in my debug log, i will get "A".
with s1.subString(0,1) : here i am taking out the character beginning at position 0 and ending at 1, which is the first character a.
then with the help of toUpperCase, i am displaying it as A.
Hope this helps.
You can try using the below code in a class and use the value in VF.
"fxyz" should be your final value in the vf {!fxyz}
I hope this helps.
Regards,
Yaa every one is right in terms of my requirement but I already used the value on VFPage & how can i write the above code that u have mentioned.
I want direct way in visual force to change it so please tell me is their any function in visualforce that can i use directly...
like if you use LOWER(string) in visualforce then it will show value in visual force as small value.
Same I need for first letter as caps & rest of the small...
In this scenario you can achieve it through adding javascript event...example
http://www.mediacollege.com/internet/javascript/text/case-capitalize.html
Yes, write a javascript function in your VF page. Just below <apex:page> tag use <Script> javascript function(write your code here)</Script>. Call the function on render of your pageblock.