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
0answers
16 views

Rerender Not Working With Search Function

So everything works. The search works, the results are correct, the page is just not diplaying results correctly. I thought maybe it was SF limitations on apex:repeat but it's not working for either ...
1
vote
3answers
59 views

Can't seem to pass param from VF page into my Controller

I want to pass a parameter from my VF page into a method in controller. VF <div id="output_table"> <apex:form > <div ...
0
votes
1answer
21 views

Passing Javascript Value to Controller is Nulling

I am trying to pass from my JS to my controller and in the console log, All the values appear correctly. When I check the controller they are all null. I have looked it over 1000 Times. It could be a ...
1
vote
2answers
30 views

How to display Opportunity amounts in a VF page inline for account over time period?

I am tasked with creating an inline view from the accounts view page that shows opportunity amounts (won-closed) for the 12 months of the year, a total amount field, and prior year amounts, associated ...
1
vote
2answers
30 views

Problem populating pageBlockTable with data from custom object through custom controller

In a controller I'm populating a list of objects: public with sharing class SubmittalDashboard { public list<Show__c> missingShow {get; set;} public void SubmittalDashboard() { ...
3
votes
1answer
39 views

how to use a Map in a controller?

I am trying to do a shopping cart functionality. I was able to do it using a list. But the problem is the cart are getting duplicates if the user adds or modifies the cart. I tried converting the ...
1
vote
1answer
22 views

CommentCase's CommentBody always blank when set via Apex

I have a small problem that I'm hoping someone can help me with. I have a simple VisualForce page and controller to list and insert case comments. It displays comments fine but when I try to insert ...
1
vote
1answer
27 views

Combining EmailTemplates - no way to automatically merge fields of templates?

another newbie VS question. This is how far i got (pls cf picture) get a list from available templates from a certain directory add each selected template into editable textarea use the edited ...
0
votes
0answers
61 views

Custom Settings into an Existing Multi Select Picklist in Visualforce

How to add list custom settings into an existing multi select picklist in visualforce? VF Page <apex:selectList value="{!selectedValue}" size="1" multiselect="false"> ...
2
votes
1answer
40 views

By pass lookup filter with apex code

I have to deploy some classes in production, but in test class, in which i am creating dummy records, i am getting error with lookup filters Account has two lookup from contact i.e. "account MAnager" ...
0
votes
1answer
27 views

Calling a class and its method on a custom button click on a standard page

I have class from which is used to send email. Currently i have a VF page and the class as controller. And a button on the standard layout of the custom object. When i click on the custom button send ...
2
votes
1answer
32 views

Where can I get the list of standard Site labels

I am developing a multilingual site and want to use when possible the standard site labels. Where can I find the available labels to use with description and translation? I will call them from a ...
3
votes
1answer
51 views

Does CreatedById give record access?

I have a controller that currently does not specify 'with sharing'. I would like to be able to add these keywords but I don't want it to break on existing users. It's basically an aggregate report. ...
0
votes
1answer
51 views

VF charts rerender issue..Need urgent support..?

I have showing chart on VF page..in an Apex output-panel pop up..It is working first time..when page is loaded..first time also i am doing re-rendering ....but when i change the data based on ...
0
votes
1answer
83 views

Regarding VF page to custom settings

Req: I have a command button on VF page. When i click on it then a popup window needs to open (That can be achievable). When we add to some values those need to get saved into custom settings and ...
2
votes
1answer
37 views

unable to create Search filter fields in Salesforce

How can i get this kind of layout
0
votes
2answers
82 views

Mass Edit Sortable VF Page

We are trying to implement a mass edit type VF page that displays a few fields in a list and allows the user to edit one of those fields. We have a requirement that the list be sortable by column. ...
0
votes
0answers
23 views

How to compare select option in Controller

I have static lists in two methods in my controller. Now i want change those two lists based another field value. Exp: If user selects Account selectoption from 1st field drop downlost, In second ...
3
votes
1answer
84 views

Controller variables are not retrieving data from bound inputfields

I'm working on an interface that allows users to create activities directly form a list of records of a custom object, so I created a wrapper class that contains said object and a task, in order to ...
2
votes
1answer
46 views

Display SOQL info on VF page

I have a custom VFpage that I am trying to display the current users SmallPhotoUrl. I have the SOQL working correctly but the issue is when I go to display the image. I am not sure how to craft the ...
6
votes
4answers
197 views

Executing Apex code in controller only for specific profile

How to execute Apex code in controller only for specific profile, like System Administrator? So that when other users visit Visualforce page, the code block would not be skipped?
0
votes
1answer
102 views

how to bind string to date in soql query?

visualforce page: <apex:inputText value="{!inputText6}" size="20" id="teja2" onfocus="DatePicker.pickDate(false, 'page1:form1:teja2', false);" /> <apex:inputText ...
0
votes
1answer
103 views

Testing Wrapper Class: Constructor not defined: [ClassName].<Constructor>()

I am trying to test this (uploaded to pastebin due length) wrapper class. I was trying to follow two previous SFSE's, however I am getting errors. See code below (errors in comments): @isTest public ...
2
votes
2answers
123 views

What is Interface method in salesforce

I have a very simple doubt regarding this Interfaces in sales force, Actually what it says is "This class will have a method but the body will be empty. And body for this method will be provided in ...
0
votes
2answers
82 views

Unable to save the record

Competitor object has been designed using Visualforce. Facing Problem:when i click on save button,the record was not saved ,it is remaining on the same page.Here is my work. Visualforce Page: ...
0
votes
3answers
34 views

When should I make new object in constructor and What is the value of new object

I want to know when should I create new object in the constructor, And the same thing with List .. And What is the value of Object x, before the new statement and after new statement. when I write ...
0
votes
0answers
27 views

Report the number of people who have viewed a visualforce page on the page [duplicate]

Can someone explain (with example code) how I can display - on the visualforce page - the number of users who have viewed it?
0
votes
2answers
111 views

Regarding Visualforce Page Drop Down

I have a search Page ..When I do some search i will get some search results.In those results for one column needs to have a drop down (LOVs) and when i select a value from that drop down need to get ...
2
votes
2answers
89 views

How can I override the Record Type selector and still use the standard “new” page

I would like to use a custom VF page for the record type selection page for new Opportunities but after that, I want the standard new/edit page to be displayed. I have the custom VF page set to ...
2
votes
1answer
81 views

Error: The method is referenced by Visualforce Page in salesforce.com. Remove the usage and try again

When a controller has a method or a variable that is referenced in the VF page, and you remove or rename that element in both - page and controller, then when you click save, you get an error saying ...
0
votes
1answer
177 views

getting Person Account's “Last Name” , “salutation” and “First Name” field to Visualforce Page

In my org i have enabled Person Account, and i have a visualforce page where i need to get Salutation,FirstName and LastName field from person account, But when i call it using <apex:inputField ...
1
vote
1answer
128 views

System.QueryException: error when button click second time?

vf page: <apex:page showHeader="false" sidebar="False" controller="textInputsCon" applyHtmlTag="true" > <apex:form > Input Text1 <apex:inputText ...
1
vote
1answer
115 views

Override standard page with VF page and save which has dynamic picklist in it

I have VF page to override standard contact "new" button page, In that VF page i have Project field which will get the picklist value(project name) dynamically when i insert one project(custom object) ...
1
vote
2answers
41 views

Auto completion correction

I am using auto completion for one of my field <script> var tags1 = {!jsonDescriptionData1}; $( "#autocomplete1" ).autocomplete({ source: function( request, response ) { var ...
7
votes
1answer
59 views

In Apex Controllers what is the correct short form way of overriding set; on a variable?

I know the long hand way of doing this is as follows: private String var1; public String getvar1() { return var1; } public void setvar1(String str) { var1 = 'Prefix '+str; } The shorthand way is ...
0
votes
3answers
187 views

Show Related list without using standard controller?

Visualforce Page: <apex:page showHeader="false" sidebar="False" controller="textInputsCon"> <apex:form > Input Text1 <apex:inputText value="{!inputText1}"/><br/> ...
1
vote
1answer
471 views

Mapping Dynamic picklist value from VF Page to Custom Field

This is my VF page which has one Picklist Field and it is dynamic, I mean when a record is created in another object for ex:two__c, it's record name will get added to this picklist values. Now the ...
-2
votes
8answers
113 views

System.Queryexceptionerror [closed]

Controller: public with sharing class textInputsCon { public String inputText1{get;set;} // input text1 value from vf public String inputText2{get;set;} // input text2 value from vf ...
2
votes
1answer
67 views

<apex:page> action order of execution

I'm working on a VF Page + Apex Controller where I leverage the action attribute on <apex:page> to handle some logic. What I've noticed is that when my user is set to Japanese, the VF Page tries to ...
3
votes
2answers
216 views

Visualforce: Adding CSS class from Controller

Is it possible to add a CSS class to one of the Visualforce page objects from controller? What I want to achieve is to handle one exception in controller. From catch block I want to be able to hide a ...
1
vote
2answers
125 views

i want to create the custom filter in list controller

vf page : <apex:page showHeader="false" sidebar="False" controller="textInputsCon"> <apex:form > Input Text1 <apex:inputText value="{!inputText1}"/> Input Text2 ...
1
vote
1answer
54 views

how to show the record list querying the user input?

controller: public with sharing class textInputsCon { public String inputText1{get;set;} // input text1 value from vf public String inputText2{get;set;} // input text2 value from vf Public ...
2
votes
1answer
277 views

How can I display a list of leads in a Visualforce pageBlockTable?

Following the Visualforce example here, I can display the list of account names in a pageblocktable but changing the controller to Lead does not display the list of lead names. Why not? It works ...
3
votes
1answer
32 views

How can I submit a Detail-tag based page?

I have a very simple VF page that displays the Detail-tag Opportunity page. Within it, I have a Custom Button that calls the finish() JS method. From there, I would like to submit the Opportunity ...
2
votes
2answers
126 views

How to download records and save in Excel Format through Visualforce page

My Scenario is I have a search page.when I click on search then I got 500 records in 50 pages( Here Pagination is using…Means 10 records per each page). what I am doing here is when click on Download ...
3
votes
2answers
51 views

Can I return a 500 error from an Apex Controller?

Can I return a 500 error from an Apex Controller? PageReference success = new PageReference('http://www.google.com'); if(stuffWorked) return success; else{ return 500 error }
0
votes
1answer
22 views

can any body figure this error?

In case data is not there it has to empty CEO .in case the data is there it has to show that data Controller: public with sharing class silogletter { public Contact contact {get;set;} public ...
1
vote
1answer
51 views

how to write custom controller for this scenario?

<apex:page standardController="account" extension="letter"> <apex:panelgroup rendered="{!account.contact.title=='CEO'}"> <b>- CEO: CEO</b> ...
2
votes
1answer
122 views

Partial visualforce apex:form render/submission based on checkbox

I have two pageBlocks on the page, one of which I want to validate/submit only when a checkbox is checked. The problem I run into is that validation It has the following javascript: <script> ...
0
votes
0answers
66 views

How to set custom order of a series

I have to create a very specific chart. The details are as follows: The chart should show trailing 9 months of Revenue and future 3 months of goals. i.e. considering current month (Jan, 2014), the ...