Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [controller]

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.

0
votes
2answers
30 views

Form In Arabic Language With Picklist Values In Arabic As well

Hope all of you are doing good. I want to create a visualforce page (form) which will take input and submit in database but this should be in Arabic. Everything inside form should be in Arabic ...
0
votes
1answer
54 views

How do I use Blob to create a PDF in my apex controller and use it in my Lightning Component without using VisualForce Pages?

This is the apex controller: public class pdfGenerate { public static final Integer limitRecords = 10; @AuraEnabled public static Blob generatePdf(){ List&...
0
votes
0answers
38 views

Error when saving Lightning Component

When saving my lightning component I am getting the error"FIELD_INTEGRITY_EXCEPTION" "Failed to save LaunchpadList.cmp: Invalid definition for null:LaunchpadListController: null: Source" I've tried ...
0
votes
1answer
16 views

how to retrive /fire a link from a cutom object field

I am storing the public url of a pdf file in a field of a custom object. I am able to successfully retrieve the url. how can I fire the url when a user click a button? Is it possible through JS ...
1
vote
1answer
34 views

Can't access related record in test

I have a visualforce page which is displaying a list of opportunities. The page is working as expected - no problems. The problem is that when testing I can't access the account which is ...
1
vote
2answers
39 views

Get type of record from standard controller without accessing record?

I've got a component which is used on multiple object types in their visualforce pages. I have a controller which provides some data, and another to add some relevant fields. The controller which ...
0
votes
0answers
16 views

How do I disable a selected row in the datatable lightning? [duplicate]

I have a lightning component with a datatable with static actions: select and deselect. I would like that when I click on "select" this action is disabled. How and where should I intervene in my ...
2
votes
1answer
24 views

Visualforce Re rendering issue

I have the following VF Page and Controller. The VF Page will have a dropdown of territories, and when that dropdown has a value selected, then I would like to render the PageBlockSections to show ...
0
votes
1answer
19 views

How to make internal click to apex:commandbutton with setTimeOut and onLoad Or Document Ready?

Well, I've been struggling the whole day to make this happen. I have a custom button, that calls a custom VFP, this VFP has an apex:commandbutton, that sents an email (method from the controller) and ...
0
votes
1answer
17 views

Test Class for Visualforce Controller Test Class Coverage

I have a simple Visualforce page with a simple controller as follows public class EDU_CustomController_Getter { private String sortOrder = 'LastName'; //This is the getter method used to parse ...
1
vote
1answer
16 views

How to save list of text from visualforce to controller?

I am trying to populate a list of answers. I have a list of questions and an empty array of answers that I pass to a visualforce page. The code in my visualforce page is: <apex:variable var="index"...
0
votes
1answer
29 views

Salesforce test class for controller extension

I think I made the test in the right way, but coverage still 31% public class ContractMilestoneInfoApex { public List<Milestoneinfo> MSIList {set; get;} public Milestoneinfo MSI {set; get;} ...
0
votes
1answer
24 views

How show selected RecordType in custom Visualforce Page?

I had to override the New button to use a clone of the record page of a Custom Object, so far so good, now I need to be able to catch the record type selected like in the original page. Original: ...
0
votes
1answer
27 views

Adding custom components to dynamically created table row tr

I have a custom component which by the means of a button add a row to my table. Now my needs are to add a component to each entry (tr) of the table. This is my controller: var tBody = ...
4
votes
2answers
134 views

How can I make a lightning component change as the underlying data changes without refreshing?

I'm writing a lightning page that allows two players to remotely play chess through the same lightning page. The page uses the aura framework. For what I've already implemented, the Game__c object ...
0
votes
1answer
46 views

Pass method from controller to javascript

Could you please to help this? I'm very new with javascript.I have tried many way but it doesn't work. I have problem with javascript function I have tried to call method from controller but it doesn'...
5
votes
2answers
83 views

Maintain state in Visualforce Page without using View State

I would know if there is some way to maintain state across different transactions without using View State. For example, if in my Custom Controller, for every action method, I need 100 Account's ...
5
votes
1answer
50 views

Recursive Call in controller Lightning

I want to make recursive call in js controller on my lightning component.. Following is my js controller but I am getting an error as 'callback' must be a valid Function check : function(...
0
votes
1answer
25 views

How to fix wrong test controller's filter by status?

public void byStatus(){ //Temporary multipicklist, because my main picklist isn't multiselected: String temporary = jobAdvertisement.Temporary__c; List<String> temporaryList = new ...
0
votes
1answer
19 views

Need to get the error message from the Controller to Display reply OK and there is an error

this is now working fine but the problem in this it not recognizing the errorMessage attribute from the controller. I need the confirmation page - working now if the user press OK and there is a ...
-4
votes
2answers
30 views

Running apex batch from controller with parameter [closed]

This is my controller. public class vfcontroller { public Date startdate{get;set;} public Date enddate{get;set;} public PageReference submit() { System.debug('@@@1'+startdate); ...
0
votes
0answers
22 views

How to fix the button with rendered? No actions there. Why?

I don't know why I get a blank status when use delete button with rendered? And it can't delete the record too. I need to hide delete button, if status!='Posted'. With post button all is ok, but with ...
0
votes
1answer
36 views

rerender output panel to display the update list

I have a page that iterates a list object to display the records. Once clicked on save, I updated the same list with new values and debug logs shows the update list but output panel is not rerender'ed ...
0
votes
1answer
35 views

I'm new to VF and apex. Trying to create a custom clone functionality.

Unable to pass contact from VF to the controller. I have to check if the contact is inactive on VF page if it inactive, allow user to change the contact and pass the changes to the controller. If ...
0
votes
0answers
25 views

Run flow in APEX class

I've created a list button for cases, and I´ve included it in accounts related lists. The button has a visualforce page as its content resource, where I run my flow for creating a new Case. The idea ...
0
votes
1answer
24 views

Apex read from multiselect SelectList in Controller and multiple for loops

I trying to post something to a Facebook page using my own API.The Visualforce Page gets the Facebook Page info and displays a checkbox. The user then selects the Pages and clicks Submit. Here is my ...
0
votes
1answer
20 views

Assigning Case Owner on opening a Case

We have Email-to-case implemented which is assigning new cases to a Queue. Now whenever a user opens a new case, it should be assigned automatically to that user. For this I have written a VF page ...
0
votes
1answer
38 views

'Last Viewed By' Account field test - System.QueryException: unexpected token: 'null'

Trying to create a Last Viewed By field on Account. I'm newbish at Apex and not seeing what I'm missing here... I'm sure it's a rookie mistake. Adapting code from http://www.sfdcpanther.com/setting-up-...
0
votes
0answers
27 views

how to do multiple coloumn sorting dynamically?

I want to do sorting in multiple coumns like. i am able to do sorting on one column click in complete table but not able to do sorting different columns in different sections. like this is my data ...
0
votes
0answers
18 views

how to sort different different wrapper list dynamically?

i want to sort the wrapper class where i have different different list of wrapper class. i want to do the sorting that different different wrapper list hold different different value, i am able to do ...
0
votes
1answer
20 views

Based on Recordytype-selection i need to show or hide some values in standardcontroller and extension

When i change the record type value(technical or no technical) , i need to hide/show email__c, isClassTeacher__c and i need to show filtered picklist values based on record type selection for the ...
1
vote
0answers
36 views

Controller & Page data architecture [closed]

Does Salesforce Visualforce page have the ability to show table like this: For example, the data is Map, where key is Employee and Value is List of reports. Table should show which employees didn't ...
1
vote
1answer
31 views

What kind of test can I write to check the file?

I have a controller for VF Page. This code upload a profile's image (we can see it after that) and delete it. What kind of test can help me to check this file? I need to know, is it uploaded or not. ...
1
vote
2answers
42 views

Visualforce getters are called before setter when selecting a select option

I've noticed that when I have an <apex:selectList/> with a value attribute that calls a setter method to set a value in the controller all my getters get called before the initial set call ...
0
votes
1answer
29 views

get value from iFrame to visualforce script to controller

I am showing different domain website on iFrame window in my visualforce page. There is a button on that website "SAVE" (let's say). Once cx clicks on save button, I should notify too. How do I get ...
1
vote
1answer
64 views

Visualforce Input Fields not being passed to Controller

We're running into an issue where values being entered into a Visualforce page are not being passed at all to the controller for the save actions that take place. I'm sure this is something simple ...
0
votes
0answers
29 views

Save uploaded image even after page refresh

I need to make an VF component with image. All is great, but this image (preview) disappears after page refresh. How can I fix it? Controller: public class uplClass2 { public string recId{get;set;} ...
0
votes
2answers
65 views

Visualforce Render condition not working when true

I have a custom visualforce page that has page blocks. When the render condition is false, I receive the expected results when previewing. The issue is when I change the render criteria to true and ...
1
vote
1answer
33 views

Passing an object parameter, containing employee enroll form on a Helper to Apex method in lightning

Currently, sending a Employee enroll input form on a object H_HRBasic__c to the apex class method CMP <aura:attribute name="HRB_S" type="H_HRBasic__c" default="{'sobjectType':'H_HRBasic__c', ...
0
votes
1answer
40 views

Pass Controller List Variable to VF Page

This may be a dumb question. I have a custom controller and VF page. I'm trying to set up the page to render sections based upon the value of a field on the OpportunityLineItem object. However, I'm ...
0
votes
2answers
15 views

Can't assign account to Contact

For a visualforce page, in my constructor i'm assigning a variable and retrieving an account from an associated opportunity - when I do a system.debug I get the details I want: myObject__c myObject = ...
-2
votes
2answers
43 views

Null pointer Exception in Apex controller

I am getting "FATAL_ERROR|System.NullPointerException: Attempt to de-reference a null object" in Apex controller when i click on update link pop up. Its showing in query with " ulstAsset ".I am newbie ...
1
vote
1answer
26 views

Only Start of Confirmed Built String Displays in Confirmation Popup Via Visualforce

With each inputCheckbox on my VF page checked, I'm adding to a string in my controller: public with sharing class ApplicationServerMonitorController { public String contactsAboutToEmail {get;set;...
1
vote
1answer
30 views

Getting multiple values from controller to visualforce page?

So I'm still very new to coding and Apex. I have a custom object called Invoice that is a part of a managed package that some users in my org do not have access to. So basically what I'm trying to do ...
0
votes
1answer
34 views

Test Class for a Custom Controller

How do you make a test class for custom controller? My search results involves this but trying to apply it in my test class only create too many error that I don't understand. public static ...
1
vote
0answers
58 views

It take some time for the method in Apex to become visible for the lightning component. What is a workaround here?

It take some time for the method in Apex to become visible for the lightning component. What is a workaround here? I mean literally: I create an Apex controller, create a method in it, then I create ...
0
votes
0answers
21 views

Pass the param to the controller and return a new value to VF page [duplicate]

Can you guys help me on how to pass the comment.CreatedDate to the Controller and return it's new value? This is the code. VF PAGE: <apex:pageBlockSection collapsible="true"> <apex:...
0
votes
1answer
38 views

Group products by family [duplicate]

Updated I've updated the question because it was not clear and some of you gave me hints.What i originally want to achieve is the following example on visualforce page I want them to be grouped and ...
0
votes
1answer
28 views

Is there any possibility to edit a VF page that is in a managed package?

we have a custom object in which we are saving customer surveys. Once the case is submitted, customer gets an email with survey link(Visual forge page) and the response will be captured in custom ...
0
votes
1answer
70 views

Unknown constructor

I have a page that creates a CSV of account and related data, i am trying to add a block that shows the users related to that account via a contact. I have followed a few tutorials on how to make a ...