• hafizsohaibali
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Example if i have custom object with two numeric  fields name revenue and exapense i want to compare both fields in pie chart in report and dash board ?? how ??

Apex Page not Displayed the records in data Table please tell me what is error in my controller class or apex page please

 

This is my Apex Page Code

 

<apex:page id="helloWorld"  showHeader="false"  controller="TableClass" >
  <!-- Begin Default Content REMOVE THIS -->
   <apex:form id="HelloForm">
          Data Base Example
           <apex:outputLabel id="lblID" value="Enter ID"/>
           <apex:inputText required="true" id="txtID" value="{!ID}"/>
           <apex:outputLabel id="lblDescription" value="Enter Description"/>
           <apex:inputText required="true" id="txtdescription" value="{!Description}"/>
           <apex:outputLabel id="lblRecords" value="No of Records"/>
           <apex:outputLabel id="lblNoRecords" value="{!NoOfRecords}"/>
           <br/>
           <apex:outputLabel value="Records"/>
           <br/>
   <apex:dataTable value="{!accounts}" var="c" >
        <apex:column >
            <apex:facet name="header">ID</apex:facet>
            <apex:outputText value="{!c.ID__c}" />
        </apex:column>
    </apex:dataTable>
   </apex:form>
  <!-- End Default Content REMOVE THIS -->
</apex:page>

This my controller Class

 

public class TableClass
{

      private final List<AppHelloO__c> accounts;



    public List<AppHelloO__c> getAccounts() {
        if(accounts == null)
        {
      
        }
        return accounts;

    }
    public Integer ID
    {
        get;
        set;
    }
    public String Description
    {
        get;
        set;
    }
    public String NoOfRecords
    {
        get;
        set;
    }
    private AppHelloObject__c[] atRecords;
  
    public TableClass()
    {
      accounts=new List<AppHelloO__c>();
       
      /*  for(AppHello__c s:atRecords)
        {
           accounts.add(s);
   //        this.NoOfRecords=s.Description__c;
         }*/
         for(Integer i=0; i<7 ;i++)
         {
             AppHelloO__c c=new AppHelloO__c(ID__c=i);
             accounts.add(c);
          
                    this.NoOfRecords=String.valueOf(c.ID__c+10);
           this.ID=1;
   
         }  
        this.Description='Sohaib Ali';
       //   this.atRecords=[SELECT ID__c,Description__c FROM AppHello__c];
       
     //   AppHelloObject__c aaa=new   AppHelloObject__c();
       // aaa.AppHello__c=atRecords[0].id;
                    //atRecords=c;
      //  AppHello__c t=new AppHello__c();
       // t.id=aaa.AppHello__c;           
        this.NoOfRecords=String.valueOf(333);
    }
   
}

<apex:page id="helloWorld"  showHeader="false" tabStyle="AppHelloO__c" controller="TableClass" >
  <!-- Begin Default Content REMOVE THIS -->
   <apex:form id="HelloForm">
          Data Base Example
           <apex:outputLabel id="lblID" value="Enter ID"/>
           <apex:inputText required="true" id="txtID" value="{!ID}"/>
           <apex:outputLabel id="lblDescription" value="Enter Description"/>
           <apex:inputText required="true" id="txtdescription" value="{!Description}"/>
           <apex:outputLabel id="lblRecords" value="No of Records"/>
           <apex:outputLabel id="lblNoRecords" value="{!NoOfRecords}"/>
           <br/>
           <apex:outputLabel value="Records"/>
           <br/>
   <apex:dataTable value="{!accounts}" var="c" >
        <apex:column >
            <apex:facet name="header">ID</apex:facet>
            <apex:outputText value="{!c.ID__c}" />
        </apex:column>
    </apex:dataTable>
   </apex:form>
  <!-- End Default Content REMOVE THIS -->
</apex:page>

Example if i have custom object with two numeric  fields name revenue and exapense i want to compare both fields in pie chart in report and dash board ?? how ??

Apex Page not Displayed the records in data Table please tell me what is error in my controller class or apex page please

 

This is my Apex Page Code

 

<apex:page id="helloWorld"  showHeader="false"  controller="TableClass" >
  <!-- Begin Default Content REMOVE THIS -->
   <apex:form id="HelloForm">
          Data Base Example
           <apex:outputLabel id="lblID" value="Enter ID"/>
           <apex:inputText required="true" id="txtID" value="{!ID}"/>
           <apex:outputLabel id="lblDescription" value="Enter Description"/>
           <apex:inputText required="true" id="txtdescription" value="{!Description}"/>
           <apex:outputLabel id="lblRecords" value="No of Records"/>
           <apex:outputLabel id="lblNoRecords" value="{!NoOfRecords}"/>
           <br/>
           <apex:outputLabel value="Records"/>
           <br/>
   <apex:dataTable value="{!accounts}" var="c" >
        <apex:column >
            <apex:facet name="header">ID</apex:facet>
            <apex:outputText value="{!c.ID__c}" />
        </apex:column>
    </apex:dataTable>
   </apex:form>
  <!-- End Default Content REMOVE THIS -->
</apex:page>

This my controller Class

 

public class TableClass
{

      private final List<AppHelloO__c> accounts;



    public List<AppHelloO__c> getAccounts() {
        if(accounts == null)
        {
      
        }
        return accounts;

    }
    public Integer ID
    {
        get;
        set;
    }
    public String Description
    {
        get;
        set;
    }
    public String NoOfRecords
    {
        get;
        set;
    }
    private AppHelloObject__c[] atRecords;
  
    public TableClass()
    {
      accounts=new List<AppHelloO__c>();
       
      /*  for(AppHello__c s:atRecords)
        {
           accounts.add(s);
   //        this.NoOfRecords=s.Description__c;
         }*/
         for(Integer i=0; i<7 ;i++)
         {
             AppHelloO__c c=new AppHelloO__c(ID__c=i);
             accounts.add(c);
          
                    this.NoOfRecords=String.valueOf(c.ID__c+10);
           this.ID=1;
   
         }  
        this.Description='Sohaib Ali';
       //   this.atRecords=[SELECT ID__c,Description__c FROM AppHello__c];
       
     //   AppHelloObject__c aaa=new   AppHelloObject__c();
       // aaa.AppHello__c=atRecords[0].id;
                    //atRecords=c;
      //  AppHello__c t=new AppHello__c();
       // t.id=aaa.AppHello__c;           
        this.NoOfRecords=String.valueOf(333);
    }
   
}

<apex:page id="helloWorld"  showHeader="false" tabStyle="AppHelloO__c" controller="TableClass" >
  <!-- Begin Default Content REMOVE THIS -->
   <apex:form id="HelloForm">
          Data Base Example
           <apex:outputLabel id="lblID" value="Enter ID"/>
           <apex:inputText required="true" id="txtID" value="{!ID}"/>
           <apex:outputLabel id="lblDescription" value="Enter Description"/>
           <apex:inputText required="true" id="txtdescription" value="{!Description}"/>
           <apex:outputLabel id="lblRecords" value="No of Records"/>
           <apex:outputLabel id="lblNoRecords" value="{!NoOfRecords}"/>
           <br/>
           <apex:outputLabel value="Records"/>
           <br/>
   <apex:dataTable value="{!accounts}" var="c" >
        <apex:column >
            <apex:facet name="header">ID</apex:facet>
            <apex:outputText value="{!c.ID__c}" />
        </apex:column>
    </apex:dataTable>
   </apex:form>
  <!-- End Default Content REMOVE THIS -->
</apex:page>

Hi,

 

As I posted in this thread: http://boards.developerforce.com/t5/Security/Using-Partner-WSDL-API-with-OAuth/td-p/302435, Simon mentioned I just need to replace sessionId with access token in the SessionHeader. When i set property to binding in binding._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY, service_url);, what url should I use here? Before I use "https://www.salesforce.com/services/Soap/u/21.0". With OAuth, I have instance_url as "https://na3.salesforce.com" for one user. Should I use this instance_url instead of previous soap url?

 

Thanks,

Michael