Skip to main content
Fixing code formatting
Source Link
Derek F
  • 64.1k
  • 15
  • 55
  • 104

Controller: public Boolean showConfirmationPopup { get; set; } // Initialize popup properties this.showConfirmationPopup = false;

<apex:component id="cComponent" layout="none" allowDML="true"><!-- <apex:attribute name="cCtrl" type="EUIController" required="true" /> <apex:attribute name="opp" type="Opportunity" required="true" description="Opportunity" /> <apex:attribute name="readOnlyMode" type="Boolean" required="true" description="make the component read only" /> <apex:attribute type="boolean" name="renderInUI" default="false" />

public Boolean showConfirmationPopup { get; set; }
// Initialize popup properties
this.showConfirmationPopup = false;

<apex:outputPanel id="popupPanel" styleClass="popup" layout="block" rendered="{!showConfirmationPopup}"> <apex:outputText value="{!confirmationMessage}" />

<apex:commandButton value="Yes" action="{!handleYes}" reRender="popupPanel, someOtherComponent" /> <apex:commandButton value="No" action="{!handleNo}" reRender="popupPanel" /> </apex:outputPanel>

<apex:component id="cComponent" layout="none" allowDML="true"><!-- 
<apex:attribute name="cCtrl" type="EUIController" required="true" />
<apex:attribute name="opp" type="Opportunity" required="true" description="Opportunity" />
<apex:attribute name="readOnlyMode" type="Boolean" required="true" description="make the component read only" />
<apex:attribute type="boolean" name="renderInUI" default="false"  />

<apex:outputPanel id="popupPanel" styleClass="popup" layout="block" rendered="{!showConfirmationPopup}">
    <div class="popupBackground">
        <div class="popupContent">
            <apex:outputText value="{!confirmationMessage}" />
            <br/><br/>
            <!-- Yes button -->
            <apex:commandButton value="Yes" action="{!handleYes}" reRender="popupPanel, someOtherComponent" />
            <!-- No button -->
            <apex:commandButton value="No" action="{!handleNo}" reRender="popupPanel" />
        </div>
    </div>
</apex:outputPanel>

I would appreciate your help. How can I resolve this problem?

Controller: public Boolean showConfirmationPopup { get; set; } // Initialize popup properties this.showConfirmationPopup = false;

<apex:component id="cComponent" layout="none" allowDML="true"><!-- <apex:attribute name="cCtrl" type="EUIController" required="true" /> <apex:attribute name="opp" type="Opportunity" required="true" description="Opportunity" /> <apex:attribute name="readOnlyMode" type="Boolean" required="true" description="make the component read only" /> <apex:attribute type="boolean" name="renderInUI" default="false" />

<apex:outputPanel id="popupPanel" styleClass="popup" layout="block" rendered="{!showConfirmationPopup}"> <apex:outputText value="{!confirmationMessage}" />

<apex:commandButton value="Yes" action="{!handleYes}" reRender="popupPanel, someOtherComponent" /> <apex:commandButton value="No" action="{!handleNo}" reRender="popupPanel" /> </apex:outputPanel>

I would appreciate your help. How can I resolve this problem?

Controller:

public Boolean showConfirmationPopup { get; set; }
// Initialize popup properties
this.showConfirmationPopup = false;
<apex:component id="cComponent" layout="none" allowDML="true"><!-- 
<apex:attribute name="cCtrl" type="EUIController" required="true" />
<apex:attribute name="opp" type="Opportunity" required="true" description="Opportunity" />
<apex:attribute name="readOnlyMode" type="Boolean" required="true" description="make the component read only" />
<apex:attribute type="boolean" name="renderInUI" default="false"  />

<apex:outputPanel id="popupPanel" styleClass="popup" layout="block" rendered="{!showConfirmationPopup}">
    <div class="popupBackground">
        <div class="popupContent">
            <apex:outputText value="{!confirmationMessage}" />
            <br/><br/>
            <!-- Yes button -->
            <apex:commandButton value="Yes" action="{!handleYes}" reRender="popupPanel, someOtherComponent" />
            <!-- No button -->
            <apex:commandButton value="No" action="{!handleNo}" reRender="popupPanel" />
        </div>
    </div>
</apex:outputPanel>

I would appreciate your help. How can I resolve this problem?

Source Link

Error: Unknown property 'showConfirmationPopup'in visualforce component

Controller: public Boolean showConfirmationPopup { get; set; } // Initialize popup properties this.showConfirmationPopup = false;

<apex:component id="cComponent" layout="none" allowDML="true"><!-- <apex:attribute name="cCtrl" type="EUIController" required="true" /> <apex:attribute name="opp" type="Opportunity" required="true" description="Opportunity" /> <apex:attribute name="readOnlyMode" type="Boolean" required="true" description="make the component read only" /> <apex:attribute type="boolean" name="renderInUI" default="false" />

<apex:outputPanel id="popupPanel" styleClass="popup" layout="block" rendered="{!showConfirmationPopup}"> <apex:outputText value="{!confirmationMessage}" />

<apex:commandButton value="Yes" action="{!handleYes}" reRender="popupPanel, someOtherComponent" /> <apex:commandButton value="No" action="{!handleNo}" reRender="popupPanel" /> </apex:outputPanel>

I would appreciate your help. How can I resolve this problem?