• Dilan Srilal 3
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 0
I have a visualforce component, in which I bind several attributes of an object.
In the component controller I have a method to upsert the modified record.
But my controller does not get the changed values, it always upsert my record with the old values. ( I dont get any exceptions)
Please kindly advise what I'm missing. Thanks.

My Component
<apex:component controller="RevenueComponent_Controller" allowDML="true">
   <apex:attribute name="revenueRecord" description="Revenue Record."
                    type="Revenue__c" required="true" assignTo="{!revenue}"/>
   <apex:form >
        <apex:pageBlock mode="mainDetail" title="" id="revenueDetail">           
            <apex:pageBlockButtons location="Top" >
                <apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
                <apex:commandButton action="{!saveRevenue}" id="saveButton" value="Save Revenue" reRender="recordDetails"/>
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
            <apex:pageBlockSection id="recordDetails" title="" columns="2">       
                <apex:inputField value="{!revenue.Year__c}"/>
                <apex:inputField value="{!revenue.Month__c}"/>         
                <apex:inputField value="{!revenue.Forecast_Amount__c}"/>
                <apex:inputField value="{!revenue.Actual_Amount__c}"/>

Component Controller
public class RevenueComponent_Controller {
    public Revenue__c revenue;    
    public Revenue__c getRevenue(){
        return revenue;
    public void setRevenue(Revenue__c r){
        revenue = r;        
    public void saveRevenue(){
        System.debug('Revenue ::: ' + revenue);        
        upsert revenue;
    public void edit(){

My VF page in which the component is located.
        <apex:pageBlockSection title="Revenue List For FY 2016" columns="1">
            <apex:repeat value="{!projectRevenues}" var="revenue">
            <c:Revenue revenueRecord="{!revenue}" />


By using Analytics REST API, I want to distinguish Non-Grouped Line Charts from Grouped Line charts. Is there any attribute which indicate whether a particular dashboard component is grouped ?

dashboardMetadata.components[i].properties.visualizationType values is "Line" for both types of components(charts) in my retrieved REST response.