You need to sign in to do that
Don't have an account?
sunfishette
Content of variable
I am trying to get the content of a variable and display it on a visualforce page in an effort to track where I am going wrong. Something similar to Visual Basics MessageBox.Show(variable) or a javascripts alert(variable); function.
I need to make sure that what I "think" is inside my variable is actually there. I am sure this is a simple thing, but I cant find the answer!
Thanks!
For the rest of us that suck at Visualforce and Apex, the FULL answer was ( -- it took me an extra HOUR to figure out the syntax!):
All Answers
To show a variable on a visualforce page, use {!variable} on the page.
To show a variable from within Apex code, use System.debug(variable). Then open the Developer Console, run the code, and check the log that is generated.
For the rest of us that suck at Visualforce and Apex, the FULL answer was ( -- it took me an extra HOUR to figure out the syntax!):
It's actually not necessary to use outputText. Just using the merge syntax works fine:
But, you may need to use outputText if you want to disable automatic HTML escaping.