A controller is one piece in the Model-View-Controller (MVC) architecture of Visualforce. A controller can be a standard or custom controller and extensions to controllers can written.

learn more… | top users | synonyms

0
votes
2answers
33 views

How to pass an array of a class from a helper to an apex controller

I have created a class with several fields like this: public class Tier{ @AuraEnabled public String Name {get; set;} @AuraEnabled public integer Min {get; set;} ...
1
vote
1answer
30 views

Get the specified child relationship Name from Parent

I have a VF component where I am trying to get related list(child) of any record( say Account, depends on the value I give in my VF Page). I have two attributes in my VF component , objectvar- which ...
1
vote
1answer
20 views

calculate EndDate based on only weekdays

I have a function which takes input as startDate and return the endDate where endDate is Date after 100 days excluding weekends. That is only weekdays are counted and not the weekends in the 100 days ...
0
votes
0answers
12 views

Bypass error rule in controller

I have a error manager rule in controller at quote line item level. Scenario is whenever a particular product 'X' is added by the sales manager ... dates field should be filled in. But if the same ...
0
votes
1answer
23 views

How to clear the values of textbox on button click

VF Page: <apex:page controller="petwizardcontroller" sidebar="false" id="page"> <apex:form id="frm" title=""> <apex:actionFunction name="sayHello" action="{!doSearch}" ...
1
vote
0answers
14 views

How to get Updeteable field value and uneditable field value from VF page.

Actually here i am now trying to get the "value" input field's string but the problem is i am switching the text box of value according to the case Field value since few fields don't allow us to edit ...
2
votes
0answers
27 views

Uncaught TypeError: a.getAttribute is not a function

Scenario: I have a component that has an <aura:renderIf> within an <aura:iteration>. The <aura:iteration> references a component attribute called "selectedItems" to display a list ...
1
vote
1answer
25 views

querying related child object from parent in VF componenet

I am trying to build a reusable VF component which can return all the child of an parent object. I just assign the parent object in my VF page and rest is taken care by the VF component to display the ...
3
votes
2answers
76 views

AssignTo variable in attribute

I have a visualforce component as below: <apex:component controller="RecordDisplayController"> <apex:attribute name="objectName" description="An Sobject" type="Sobject" required="false" ...
0
votes
2answers
25 views

Invalid selectOptions found. Use SelectOption type in Apex error

I am getting the error stated in the question. I have used a <selectOption> list in my controller and in my VF page, I have used <apex: selectOptions>. What is the issue? I have attached ...
0
votes
1answer
17 views

get Object name in custom help page?

I've edited a custom object to include a reference to a custom help page. That page is a VF page with a controller class. For "Context-Sensitive Help Setting" I have "content Name" = "myCustomPage". ...
0
votes
1answer
22 views

Place input tag inline with a specific selectRadio option

I have a select options tag inside a select radio Tag. I am trying to achieve something in which I will have radio button with its label and then an input box in line. below is my apex code` ...
2
votes
0answers
26 views

get data from another class to vf page [on hold]

I have a class which is using object of another class and I want to use it in my vf page .`This is my Vf page and I want to access my CalculatorView class data in my vf page. `` public with sharing ...
1
vote
0answers
23 views

how to bind map<String,map<String,String>> to vf page using javascript remoting

i have 1 @RemoteAction method which is returning map<String,map<String,String>> and i need to bind this with vf page. and this is the code i did till now : <div id="data" ...
-1
votes
2answers
47 views

how to call a VF page from another VF page using button?

This is VF page: Here I need to save 1 account record as well call another VF page <apex:page standardController="Account" extensions="displayRecordsInSF1Extension1" showHeader="false"> ...
1
vote
1answer
32 views

I have no errors but my pagination is not working

I wrote a code which includes several functionalities and in which pagination also includes, my other functionalities are working good but the pagination is not working. Can anyone please look at it. ...
1
vote
1answer
16 views

Handle Extra Coma in CSV from code level

in Certification column there are 3 certificate which are mention as 1x,2x,3x when i parse csv it shown an error An error has occured reading the CSV fileList index out of bounds: 2 how to handle ...
2
votes
3answers
36 views

How to get all fields in VF page using custom controller?

This is my Controller: public class exportContactRecords { public List <Contact> contactList { get; set; } String query; String allFields = ''; public ...
0
votes
2answers
42 views

how to call another visualforce page from an apex command button

I have an Apex command button in my Visual Force page. Using that button I want to call another visual force page, which in turn should call action function written in the controller. Please advise.
0
votes
1answer
27 views

Pass Visualforce input fields to Controller - get Unknown property 'AccountStandardController.CallCycle__c'

I am struggling to get my simple VF page to work as I keep getting an 'Unknown property 'AccountStandardController.CallCycle__c' error. Below is my VF form, and below that my Controller. I first tried ...
-6
votes
2answers
68 views

Controller in MVC Architecture [closed]

Please help me to choose 2 options from below which represents controller in MVC architecture? Custom Apex and Javascript code that is used to manipulate data StandardController system methods that ...
0
votes
0answers
19 views

How to delete selected profiles from the pageblocktable?

I am displaying the selected profiles on another pageblocktable but my requirement is I want to display the selected profiles on another pageblocktable and at the same time I want to remove those ...
-1
votes
1answer
23 views

how can I save a record by inserting values from a new window?

This is my visual force page: <apex:page Controller="saveRecordFromWindow" id="page"> <script> function openWindow() { var myWindow = window.open( "myWindow", ...
4
votes
2answers
49 views

controller extension not found

I created a controller extension for the Contact object. I don't know if it will work or not, because I can not test it. Salesforce is acting like my controller extension does not exist. Error: ...
1
vote
1answer
18 views

Visualforce Page Will Not Accept Values Given Via Url

I created a controller that stores several values and then redirects the user to a Visualforce Page with those values. My goal is to have the Visualforce input fields populate. The url values populate ...
0
votes
1answer
19 views

Controller Using ApexPages - Failing Test Class

I cannot get this controller's test class to pass at all. Please help me understand why I cannot write a test for ApexPages.currentPage().getParameters().get(). I assume the SOQL string should pass ...
2
votes
1answer
34 views

Two Visualforce pages, one controller?

Is it possible to have two Visualforce pages that use the same controller? I have a VF page that need to be reorganized. It needs to show a slightly different set of fields and show them in a ...
0
votes
1answer
37 views

Display elements of List in Visual force page

I have a skill_Review__c object which has two lookup fields in them - Skills__c and Level__c. Below is my VF and controller. I am trying to get the user input on level field by clicking the edit ...
2
votes
2answers
55 views

User input to update a object in a record

My data model: I have a object called skill review which has skill__c,level__c as a lookup fields. I have a interview object which has skill review in a related list. I have a visualforce page where ...
1
vote
1answer
45 views

How to access the fields of a List

I have a below query in my controller class: List<Skill_Review__c> results = [SELECT Id,Name,Skill__c,Level__c FROM Skill_Review__c where Interview__c ...
1
vote
1answer
25 views

Access Custom Object from Managed Package

I have a question . Let's say that i have a controller and a visualforce page in a Managed package . Can I make the controller so that it accesses the Custom object in the Org ( in which the package ...
0
votes
1answer
48 views

Copy a list to another list

I have a custom object called skill_Review and I am creating a list in my controller using: List<Skill_Review__c> skillRev = new List<Skill_Review__c> List<Skill_Review__c> ...
0
votes
0answers
33 views

Data disappear when page is refreshed

I have a VF page where I have a input text and output text. I have the VF page in a page layout of an object called interview. I also have a separate edit/save button on the VF page. When I use edit ...
-3
votes
1answer
52 views

how to call an Attachment in a test class

Can any one help me out.I have a controller and their is a test class written ,but the code coverage is low.How to call an Attachment in a test class.Any help very much appreciated. Controller : ...
2
votes
0answers
30 views

Custom Controller that mimics standard controller

I want to use a visualforce page as a Global Action but according to documentation I need to create a custom controller. I am not doing anything outside of the standard controller so I am wondering if ...
2
votes
1answer
27 views

Updates from nested apex repeat in Visualforce not being posted to server correctly

I am having a custom object where there is a list within a list within a list. On the Visualforce page I am presenting it using an apex:repeat and apex:inputText fields. When I try to change and ...
1
vote
1answer
23 views

AJAX - Can I reference a method from the controller by url?

I am wondering if I can use the standard $.ajax, $.post or $.get with visual force. If so what do I put in the url? Can I get the url of the method I want to make a call to?
4
votes
3answers
469 views

Which of these error handling patterns is more efficient?

I'm working on a cleanup of some older apex code, and I've noticed two distinct patterns being used to handle errors when saving records. One uses a try-catch block to try to update the records, and ...
1
vote
1answer
30 views

Can you catch a thrown error down the line?

I'm trying to setup a method to make sure all the data I need is available before proceeding to the next part of my component. So I have something like this: public Boolean getIsDataLoaded(){ /* ...
0
votes
2answers
15 views

Unknown Property Error on custom VisualForce page

Page: <apex:page showHeader="true" sidebar="true" controller="ComposeEmailController"> <apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'sf-bootstrap/css/bootstrap.min.css')}"/> ...
0
votes
1answer
29 views

Test Class Error :System.QueryException: List has no rows for assignment to SObject

When i run the test class in Apex Test Execution,i get error for the controller as Error Message System.QueryException: List has no rows for assignment to SObject Stack Trace ...
0
votes
1answer
23 views

Access standard controller in test class

Below is my controller and test class, i am getting an error while compiling test class, how can i use controller object in test class? Controller public class ERFormController { public ...
1
vote
1answer
38 views

Check if an error occur during batch process

Good day everyone, I create a batch process class. The problem I have at the moment, is that how will I check if there is an error encountered during the batch iteration. In my case, I've tried to ...
0
votes
1answer
63 views

unable to convert parameter to apex type got arraylist [duplicate]

Is there a way to pass a sObject with RemoteAction from JavaScript to Apex? I want to create a bunch of sObjects. What is the right way to pass their information from JS to Apex with RemoteAction? ...
1
vote
2answers
57 views

Reference a child field in grid or create grid from standard controller

Is it possible to reference a child field in a grid when using a standard controller from an object? Or do I have to create a custom controller? If I do have to create a custom controller then do I ...
2
votes
3answers
38 views

Calling actionFunction from JS

I'm working on a vf page/controller. All of the code at this point is about 800 lines so I wont post it all but I have posted the items that are relevant. Basically, there are 4 forms on the VF page. ...
1
vote
1answer
57 views

Visualforce Components: When your controller extends an abstract class, can you override the parent instance?

At the time I still have not received any feedback about my previous question so I went ahead with a different approach to my problem. Bare with me part of my problem might be because of how I changed ...
2
votes
1answer
126 views

Why Don't Visualforce Wrapper Class Getter/Setter Methods Not Exist?

I have a wrapper/inner class like so: public class parameter{ public String source { get; set; } public Integer year { get; set; } public String field { get; set; } public ...
0
votes
0answers
50 views

Base URL in VF Component

I am creating a vf component and was stuck to add a base url to href. <apex:component controller="OpportunityReminder_cls" access="global" rendered="{!NOT(Isnull(FLstWrapperString))}"> ...
0
votes
0answers
51 views

check if current user is the Delegated Approver, or the record owner

in my VF page I would like to show a button Open in SalesForce if the current user is the approver of the record creator. how could I check that in my VF Formula? currently I am checking if the user ...