Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
IdeaStandardController Class
Namespace
ApexPages
Usage
A method in the IdeaStandardController object is called by and operated on a particular instance of an IdeaStandardController.
In addition to the methods listed in this class, the IdeaStandardController class inherits all the methods associated with the StandardController class.
Instantiation
An IdeaStandardController object cannot be instantiated. An instance can be obtained through a constructor of a custom extension controller when using the standard ideas controller.
Example
1public class MyIdeaExtension {
2
3 private final ApexPages.IdeaStandardController ideaController;
4
5 public MyIdeaExtension(ApexPages.IdeaStandardController controller) {
6 ideaController = (ApexPages.IdeaStandardController)controller;
7 }
8
9 public List<IdeaComment> getModifiedComments() {
10 IdeaComment[] comments = ideaController.getCommentList();
11 // modify comments here
12 return comments;
13 }
14
15}1<!-- page named detailPage -->
2<apex:page standardController="Idea" extensions="MyIdeaExtension">
3 <apex:pageBlock title="Idea Section">
4 <ideas:detailOutputLink page="detailPage" ideaId="{!idea.id}">{!idea.title}
5 </ideas:detailOutputLink>
6 <br/><br/>
7 <apex:outputText >{!idea.body}</apex:outputText>
8 </apex:pageBlock>
9 <apex:pageBlock title="Comments Section">
10 <apex:dataList var="a" value="{!modifiedComments}" id="list">
11 {!a.commentBody}
12 </apex:dataList>
13 <ideas:detailOutputLink page="detailPage" ideaId="{!idea.id}"
14 pageOffset="-1">Prev</ideas:detailOutputLink>
15 |
16 <ideas:detailOutputLink page="detailPage" ideaId="{!idea.id}"
17 pageOffset="1">Next</ideas:detailOutputLink>
18 </apex:pageBlock>
19</apex:page>