function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SaravanaBharathi-SBSaravanaBharathi-SB 

Reg:Validation error:value is not valid

Hi,

 

I have a requirement capture response for the questions under section.

 

Number of questions to be displayed depends on the records stored in an object.

 

Possible answer should be picklist.

 

I have a map<sectionname,List<QuestionandItsResponseInnerclass>mapOfQuestionandSection

 

In QuestionandItsResponseInnerclass innerclass, List<selectOption> , Response as(selected value) and Questions are there

 

 

In visualforce page:

 

<apex:repeat value="{!setOfSections}" var="section">

 

<apex:pageblocksection title="section'>

 

<apex:variable value="{!mapOfQuestionandSection[section]}" var="questions"/>

 

<apex:repeat value="{!questions}" var="question">

 

<apex:selectList value="{!question.response}" multiselect="true" size="1">

<apex:selectOption value="{!question.listOfAnswer}"/>

</apex:selectList>

 

 

----continued at the last have to button to submit and rerender the form

 

<apex:commandbutton value="refresh' action="{manipulate}" rerender="form"/>

\

 

 

 

in controller

 

 

 

Innerclass :

 

public class QuestionandItsResponseInnerclass{

public List<selectOption> listOfAnswer{get;set;}

public String response{get;set;}

}

 

 

 

Formed map<SectionName,List<QuestionandItsResponseInnerclass>> inside constructor.

 

 

Its loading fine, when i click the button and rerender the form, its showing, Value is not valid.

 

 

Could you suggest the solution, to solve this.

 

Thanks

 

 

 

 

 

 

 

 

 

 

</apex:repeat>

 

 

 

</apex:pageblocksection>

 

 

 

</apex:repeat>