Skip to main content
Tiago Torres a posé une question dans #Salesforce Developer

  You have uncommitted changes to this VisualForce page. This preview will show the most recently committed version of this page, not your current changes. 

  <apex:page ><apex:page sidebar="false">  <!--Flight Systems Checklist Visualforce Page-->     <h1>Checklist</h1>     <apex:form id="engineReadinessChecklist">        <apex:pageBlock title="Flight Systems Checklist">           <!--First Section-->           <apex:pageBlockSection title="Engines">              <!--Adding Checkboxes-->              <apex:inputCheckbox immediate="true"/>Engine 1              <apex:inputCheckbox immediate="true"/>Engine 2              <apex:inputCheckbox immediate="true"/>Engine 3              <apex:inputCheckbox immediate="true"/>Engine 4              <apex:inputCheckbox immediate="true"/>Engine 5              <apex:inputCheckbox immediate="true"/>Engine 6           </apex:pageBlockSection>           <!--Second Section-->           <apex:pageBlockSection title="Fuel Tanks">              <apex:inputCheckbox immediate="true"/>Tank 1              <apex:inputCheckbox immediate="true"/>Tank 2              <apex:inputCheckbox immediate="true"/>Tank 3              <apex:inputCheckbox immediate="true"/>Tank 4              <apex:inputCheckbox immediate="true"/>Tank 5              <apex:inputCheckbox immediate="true"/>Tank 6           </apex:pageBlockSection>           <apex:pageBlockButtons>              <!--Adding Save Button-->              <apex:commandButton value="Save" action="{!save}"/>           </apex:pageBlockButtons>        </apex:pageBlock>     </apex:form>  </apex:page>  </apex:page>    Cyclic page or component references '/apex/FlightSystemsChecklist' are not allowed

 

@* Salesforce Developers * 

 

2 réponses
  1. 24 juin, 16:47

    To start, a VisualForce Page can only have ONE root <apex:page></apex:page> element.  Your code has two.  Right at the beginning you have 

     

    <apex:page >

    <apex:page sidebar="false">

    ........

    </apex:page>

    </apex:page>

     

    Remove the outer tags and that should correct this issue.   

     

    You also have the code 

     

    <apex:commandButton value="Save" action="{!save}"/>

     

    but there is no standard controller or custom Apex controller in your code. 

     

    If this is for a Trailhead module.  Remove the outer tags and resubmit.  You may get more specific guidance as to how to correct this. 

     

    If this is not for Trailhead and you need a standard controller, your first line should look something like: 

     

    <apex:page standardController="Account" sidebar="false">

     

    (You can replace "Account" with whatever object you are using) 

     

    Also, your checkboxes aren't bound to fields or variables.  Not sure whether this is intentional.  I would expect them to look more like:

     <apex:inputCheckbox value="{!Account.My_Field_Name__c}" />

     

    If you need something more custom, please explain more about what you are trying to accomplish.

0/9000