My code is in visualforce page :-
Something {!r.plancount} {!rep.name} for something
Getting error :-
Error: Unknown property 'String.plancount'
for !rep.name I ma not getting any error..
I am using class myclassname ...
public without sharing class myclassname {
public integer plancount {get;set;}
public integer savedplancount;
public rep_profile__c therep{get;set;}
public list<websiteUtilities.ratingwrapper> thelist{get;set;}
public list<websiteUtilities.ratingwrapper> getratings(){
thelist=websiteUtilities.getRatingWrapperForREP(ApexPages.currentPage().getParameters().get('Id'));
if (ApexPages.currentPage().getParameters().get('Id')==null) thelist=websiteUtilities.getRatingWrapperForREP();
return thelist;
}
public rep_profile__c getrep(){
therep=[select id, createdby.firstname, name, about_us__c, star_rating_avg__c, total_reviews__c, logo_url__c, snapshot_id__c
from rep_profile__c where id =: ApexPages.currentPage().getParameters().get('Id') limit 1];
return therep;
}
public list<rate__c> getRates(){
list<rate__C> theRates = [select id, plan__r.name from rate__c
where plan__r.rep_profile__r.id =: ApexPages.currentPage().getParameters().get('Id')
and active__c = true AND plan__r.active__c = true AND suspended__c = false
AND plan__r.suspended__c = false AND plan__r.plan_start_date__c <= today AND plan__r.plan_end_date__c >today ];
return theRates;
}
public void getactivePlans(){//generates the plan list (really a list of rates)
/*old version for single tdsp.
planlist=websiteCalc.getactivePlans(); */
//new version that considers usage, premise type, and TDSP
planlist = websiteCalc.getACtivePlans(premise, theAPA, tdspid);
for (rate__c item:planlist){
for(REP r:GetCompanyPicklist() ){ //gets the REP ids for the left-side picklist
if (r.company.id == item.plan__r.REP_Profile__r.id){ r.plancount++ ;}
}
if (item.plan__r.contract_length__c>12) {moreThan12Count ++;} //populate the contract lenght plan count numbers
else if (item.plan__r.contract_length__c==12){exactly12count ++;}
else if ((item.plan__r.contract_length__c>5)&&(item.plan__r.contract_length__c<11)){from6to11Count ++;}
else if (item.plan__r.contract_length__c<6){lessThan6Count ++;}
}
}
public integer GetSavedPlanCount(){
if (theAPA!=null){
return websiteUtilities.fetchSavedPlans(theAPA).size();
} else return 0;
}
public class REP{
public REP_Profile__c company {get;set;}
public boolean OK {get;set;}
public integer plancount {get;set;}
public REP(){
plancount=0;
}
}
}
My visualforce page :-
<apex:page sidebar="false" controller="myclass" showHeader="false">
<apex:outputpanel styleClass="sub-title" layout="block">
<div id="logo-wrap">
<div class="logo-bg">
<div align="center" style="width:77px; margin:0 auto;">
</div>
</div>
</div>
<h2>Compare {!r.plancount} {!rep.name} <br/>
<span>To discover you</span></h2>
<a href="#" class="compare">Compare {!rep.name} now</a>
<a href="#" class="register">Now</a>
</apex:outputpanel>
</apex:page>
I have checked in google for this apex error but not able to find it..
Help me !!