Help text for apex:inputField
Sample Code: Visualforce Page: <apex:page controller="Sample"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > ....
Sample Code: Visualforce Page: <apex:page controller="Sample"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > ....
Sample Code: <apex:outputText style="font-size:10px; font-weight:bold; color:red;" value="Testing Style in outputtext tag."/> In the below code, style won't be applied. <apex:outputText style="font-size:10px; font-weight:bold; color:red;">Testing</apex:outputText> Cheers!!!
A message for a specific component, such as a warning or error. If an <apex:message> or <apex:messages> component is not included in a page, most warning and error messages are ....
ApexPages.currentPage().getUrl() is used to give the information after the HOST URL. Sample Code: Visualforce page: <apex:page controller="Sample"> <apex:form > <apex:pageBlock > ....
Sample Code: Visualforce page: <apex:page controller="Sample"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > ....
{!$Site.BaseUrl} is used to get base url in Visualforce. Sample Code: Visualforce Page: <apex:page controller="SampleVisualforcePageController" sidebar="false"> <apex:repeat value="{!listAccounts}" var="acc"> <a href="{!$Site.BaseUrl}/{!acc.Id}" target="_blank"> {!acc.Name} </a> <br/> </apex:repeat> </apex:page> Apex Controller: public class ....
Add the below CSS in the Visualforce page to fix it. <style > @media print { body {-webkit-print-color-adjust: exact;} ....
getSobjectType() can be used to get Object Name from the Id value using Salesforce Apex. So, we can get the object name using record id. Check the following code for ....
Below sample code helps to avoid double clicking of apex:commandButton. Sample Code: <apex:pageBlockButtons location="bottom"> <apex:actionStatus id="saveStatus"> <apex:facet name="stop"> <apex:commandButton value="Next Step" action="{!newCase}" status="saveStatus" reRender="thefrm"/> </apex:facet> <apex:facet name="start"> <apex:commandButton value="Saving" disabled="true"/> </apex:facet> ....
Below sample code helps to disable apex:commandButton and enable after the action. Sample Code: <apex:commandButton value="Next Step" action="{!newCase}" onclick="this.disabled=true;this.value='Saving';this.form.submit();" oncomplete="this.disabled=false;this.value='Next Step';" /> Cheers!!!