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.
2
votes
3answers
47 views
Passing apex:inputField user entry as parameter into Command Link
I am getting the nickname from an inputField and updating a list of strings and displaying the list of strings on a table. The outputField displays the newly entered value, but the controller variable ...
2
votes
1answer
150 views
Removing rows separately from the Visualforce pageBlockTable list
I created a visualforce page (with controller) that allows adding multiple records to a custom object (master object is account). I can add new rows and save the new records, I'm also pulling ...
0
votes
0answers
25 views
Correct way to override save action in controller extensions [duplicate]
Is it ok to call
standardController.save();
in a controller extension or should one always just do the custom stuff and then do a DML like
upsert record;
I have the feeling that calling the ...
9
votes
3answers
222 views
Knowing if a future call is allowed
I'm having an issue where we have some code that can be called anywhere and then it makes an @future call to log a message to an external system.
The problem is if this method is called (either ...
10
votes
1answer
74 views
Difference between returning null and ApexPages.currentPage()
How is returning null different from returning ApexPages.currentPage() as a result of a controller action?
4
votes
1answer
55 views
DML not allowed in page action when nothing happens in constructor
This question may similar to DML not allowed in page action but I can't resolve it.
This is my page:
<apex:page Controller="MyController"
action="/{!MyAction}">
Page loading...
...
3
votes
2answers
49 views
How to ensure something only happens once in a request?
If I have a page which include multiple components which means that multiple back end controllers get invoked on page load. How do I ensure that a piece of business functionality only happens once?
...
5
votes
1answer
55 views
Lifecycle of Controllers
I am just wondering about the life cycle of page controllers? How often are than instantiated and is there any configurations which can change this?
Is there a method guaranteed to be invoked every ...
1
vote
1answer
34 views
Calling a dml statement in a constructor of a controller
I understand that we cannot have dml statement in controllers constructor. But in my case, i have a query string which is used to run our pages. So my code reads the querystring variable in the ...
2
votes
4answers
60 views
Ensuring a all controllers invoke a method
I want to apply this fix to an IE 10 problem. The thing is you could argue this fix should be applied to all controllers. I was thinking of having a base controller
putting it in that and then all ...
-1
votes
2answers
48 views
Value of variable set after the constructor completes its execution [duplicate]
Here is the situation:
I am passing a value from my component to its controller
<apex:component controller="MyController">
<apex:attribute name="someObj" assignTo="{!receivedObject}" ...
0
votes
1answer
32 views
Custom Controller Case Attachment
I'm new to SF and trying to write a custom case controller that adds
an attachment to a case.
I've simplified my apex code below. I'm guessing I need to do a.OwnerId = UserInfo.getUserId(); to get ...
1
vote
1answer
56 views
Subtotal vs Aggregate Function
I have created a custom object Commission_Rec__c with a master/detail relationship with a custom child object of Order_Entry__c. What I am trying to do is create a vfpage the will display information ...
0
votes
1answer
30 views
How to set a value at runtime in a visual component on a component controller?
I have an interesting problem. I have a visual force component where i am looping through a list of data objects say MenuItem data object for now. Now i populate this list on a property in the visual ...
0
votes
1answer
158 views
get set to apex:selectOption
I am trying to set a value from my controller to my apex:selectOption value. I have created a get set method and the value in the get set have been changed but no change at all in apex:selectOption.
...