• Kishore Ravi 2
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi Experts,

Am trying to call a method into VF, but am getting the below error
User-added image


here is my class

Public class RBGeneratorController{
List<account> selectacct;


Public List<account> getAllAccounts()
{
    List<account> allaccts = [Select ID,Name, Industry, Type, Billingstreet from Account limit 5];
   return allaccts;
}    


Public void selectacct()
{
    String selaccountid = System.currentPagereference().getParameters().get('accid');
    Account acc = [Select ID,Name, Industry, Type, Billingstreet from Account where Id=:selaccountid];
    selectacct =  new List<account>();
    selectacct.add(acc);
}
//Public List<account> getselectedAccount()
//{
 //   return selectacct;
//}
}


here is VF page


<apex:page>
<apex:form>
<apex:pageblock id="PB" title="Available Generators">
               <apex:pageblocktable id="PBT" value="{!AllAccounts}" var="allaccts">
                    <apex:column headervalue="Generatos">                    
                       <apex:actionsupport action="{!selectacct}" event="onclick" rerender="allcons">  
                        <input type="radio" />                    
                            <apex:param name="accid" value="{!allcon.Id}">
                        </apex:param></apex:actionsupport>                            
                    </apex:column>    
                    <apex:column headervalue="Name">
                        <apex:outputfield value="{!allcon.Name}">
                    </apex:outputfield></apex:column> 
                    <apex:column headervalue="Industry">
                        <apex:outputfield value="{!allcon.Industry}">
                    </apex:outputfield></apex:column>  
                    <apex:column headervalue="Type">
                        <apex:outputfield value="{!allcon.Type}">
                    </apex:outputfield></apex:column>  
                    <apex:column headervalue="BillingStreet">
                        <apex:outputfield value="{!allcon.Billingstreet}">
                    </apex:outputfield></apex:column>  
                </apex:pageblocktable>
</apex:pageblock>

</apex:form>

</apex:page>

please help me through this

Thank you