function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
admintrmpadmintrmp 

outputField label - Is this supposed to work?

I noticed that outputFields now have a label attribute (as of 23.0). I had a little go at using it and found no results.

 

I presume that the result should be that I wouldn't have to use outputLabel anymore. Is this feature not working or am I thinking incorrectly?

 

<apex:outputField value="{!var}" label="My Variable" />

 

Navatar_DbSupNavatar_DbSup

Hi,

 

You must have to change version setting for your visualforce page to ver 23.0 .

 

To change your version setting you can look into below steps:

 

 setup->develop->pages->Click on your page->Edit->Version Settings

 

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

admintrmpadmintrmp

If I wasn't on API 23.0, I wouldn't be able to save the page.

 

Is this working for you?

Navatar_DbSupNavatar_DbSup

Hi,

 

 

Yes you are correct. You were not on API 23.0, that the reason you could not able to save the page.

Yes it is working for me.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

admintrmpadmintrmp

You are not listening to me - I was on v23.0.

Navatar_DbSupNavatar_DbSup

Hi,

 

It’s working fine at my end please share the screen shot of the error so that we can resolve the issue properly.

Starz26Starz26

<apex:selectList value="{!selectedTestType}" multiselect="false" size="1" id="selTT" label="Test Type"  >

 

Does not work. There is no label that gets displayed. I am on API 24. never have been able to get this to work so I must be missing something

cloudJoncloudJon

I'm a little late on this, but make sure you are within a 'pageBlockSection' if you want the label to show.

 

Cheers,

Jon

Paritosh BhatiaParitosh Bhatia
Thanks @cloudJon. Also need not use the label attribute, it will automatically display the label, unless you want to override that.