Skip to main content
Fabian Paul (AlienBrainz.Pvt.Ltd) 님이 #Apex에 질문했습니다
Hello, I am just new to salesforce and cannot figure out why iam getting this error....and trying a lot and lots of searches....

So, this is my controller code...where i am declared List<> variable...

public class OnlineExamController 

    public static String selectedExam{get;set;}

    

    public List<OnlineExam__c> o{get;set;}

    

    public List<Integer> iter{get;set;}

    

    public OnlineExamController(ApexPages.StandardController stdController)

    {

        

    }

    

    public OnlineExamController(){}

    

    

    public  List<SelectOption> examName

    {

        get

        {

            examName=new List<SelectOption>();

            examName.add(new SelectOption('----None---','----None---'));

            examName.add(new SelectOption('DAV_401_EXAM','DAV_401_EXAM'));

            examName.add(new SelectOption('DAV_402_EXAM','DAV_402_EXAM'));

            examName.add(new SelectOption('DAV_403_EXAM','DAV_403_EXAM'));

            examName.add(new SelectOption('DAV_404_EXAM','DAV_404_EXAM'));

            

            return examName;

        }

        set;

    }

    

    public PageReference call()

    {

        system.debug(selectedExam);

        o=[Select Questions__c, A__c, B__c, C__c, D__c, E__c, Answer__c, Multiple__c, ExamName__c From OnlineExam__c];

        system.debug(o);

        iter=new List<Integer>{0,1};

        return null;

    }

}

Ad this one is my vf page code , just showing the part which is causing the error because the whole code is too big...to display...

<apex:page controller="OnlineExamController">

<apex:form>

   .

   .

   .

<div class="slds-form slds-form_stacked" style="display:block;">

            <div class="slds-form-element" style="width:100%; margin-top:5%;">

                <div style="float:left;">

                    <label class="slds-form-element__label" style="font-size:20px; margin-left:20px; text-align:left;">Question No.1</label> 

                </div>

                

                <div style="position:relative;float:left; width:70%; margin-left:10px">

                    <b style="font-size:20px;">

         (--PART--------<apex:repeat value="{!iter}" var="pos">

                            <apex:outputText  value="{!o.[pos].Questions__c}"/>

                        </apex:repeat>--------CAUSING ERROR---------)

                    </b>

                </div>

            .

            .

            .

            .

</apex:form>

<apex:page>

Thanks in advance.
답변 9개
  1. 2018년 4월 4일 오전 10:20

    <apex:actionSupport event="onchange" action="{!call}" reRender="tableOp">

    </apex:actionSupport>

    Hey I think no need of param inside actionsupport. Use like above 
0/9000