New answers tagged

2

The code you have given is working for me (I'm getting a debug). Perhaps the mistake is elsewhere? Working code: <apex:page controller="sotestcontroller"> <apex:form> <apex:selectList value="{!year}" title="Yıl" id="yearFilter" multiSelect="false" size="1" > <apex:selectOptions value="{!years}"/> <...


0

Your method needs to not have any parameters to be a valid getter: public string categorySelected { get; set; } public List<selectOption> getAccountNames(){ List<selectOption> accByCategory = new List<selectOption>(); for(Account acc :[SELECT Id,Name FROM Account WHERE Category_Name__c = :categorySelected]){ accByCategory.add(new ...


0

public class MyController { public Id envId {get; set;} public MyController(){} public List<Case> incidents { get { if (incidents == null) { incidents = new List<Case> (); if (this.envId != null) { Object2[] matchedObj2 = [SELECT Case__c FROM Object2 where Environment__c = ...


0

Your problem is using a getter to load the data, plus a lazy load pattern. Because getters can be called several times in a transaction, you should avoid this design. Instead, use a setter: public void setEnvId(Id value) { loadIncidenceList(value); } public case[] incidents { get; set; } void loadIncidenceList(Id envId) { // your original logic here // ...


1

I have a constructor and display() method which retrieves the record between two dates, i want to apply pagination on both but i don't know how can i achieve it. Your current pagination implementation is probably throwing an exception because total_size is null. i have mentioned two JS method in visualforce for downloading the invoice but it is not ...


0

This is what is happening: The VF page is instantiating two controller objects ExtOne, ExtTwo The custom VF component is instantiating a third controller object ExtTwo The JS line const values = '{!value}'; is invoking the getter on the page's ExtTwo object. But that object's setter public String extraInfoTitleFieldKeys {get; set;} is never invoked; it is ...


0

You need to assign the Lead record from the ApexPages.StandardController parameter/ to the variable: Public redirectPg(ApexPages.StandardController controller){ lead = (Lead)controller.getRecord(); } Otherwise, this variable is null, thus causing the NullPointerException you're getting.


Top 50 recent answers are included