I am quite confused about this statement in Documentation:

label || String || The label that is used to reference the page in Salesforce setup tools.

I tried with following code:

<apex:page controller="DummyPOC" label="Superr">

        function testMethod(){
            console.log('$Page:  ' + $Page.DummyPOC);
            alert('Test Method called.'); 

        <apex:commandButton value="click me"  onclick="testMethod();return false;"/>

My assumption is, I should get this page in "S" list of pages. However it is not showing there(since it has name, DummyPoc. It will be showing in "D" list).

Could you pls let me know, what that statement means in documentation?

  • what do you mean by "S" list of pages and "D" list? – Santanu Boral Apr 19 '18 at 4:26
  • @SantanuBoral I was referring to list. Setup->Pages->alphabetical lists of pages – Ysr Shk Apr 19 '18 at 4:28
  • If you create a visualforce page from UI then it will take whatever it is defined as label and name in UI. It will not consider whatever is defined in apex:page as attribute – Santanu Boral Apr 19 '18 at 4:40
  • Thanks for the clarification! But, I guess, this shall not referred as Attribute then. It is of no use, since we are giving label while creating a page. – Ysr Shk Apr 19 '18 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.