0

I'am using JSF2.0/primefaces,

I have an error that I can not understand it's cause, I have 2 components selectOneMenu and selectManyListbox ,when I choose an option from the first the second is filled ,the problem is when I choose an option from the second the following error appear:

 f1:env1 : erreur de validation. La valeur est incorrecte

JSF :

      <h:outputLabel value="Platform:" /> 
          <h:selectOneMenu value="#{FMTools.platform}" id="platforms">
           <f:selectItem itemLabel="-- Select Plateform-- " itemValue="0"/> 
           <f:selectItems value="#{FMTools.getMyListPaltform()}" />
           <f:ajax listener="#{FMTools.UpdateChangeEnvironment()}" render="env1" />
       </h:selectOneMenu>


     <h:selectManyListbox   value="#{FMTools.selectedEnvironment}"  id="env1" size="3">
         <f:selectItem itemLabel="-- Select Environment -- " itemValue="0"/> 
         <f:selectItems value="#{FMTools.getMyListEnvironment()}" />
     </h:selectManyListbox>   //when I choose an environment the error appear

My BEAN:

private List<SelectItem> MyListEnv;
private ArrayList<String> selectedEnvironment;


public List<SelectItem> getMyListEnvironment()
 {
   if (MyListEnv == null) {
    MyListEnv = new ArrayList<SelectItem>();
    for (String val : this.getMyListEnvironmentByPlatform()) {
    MyListEnv.add(new SelectItem(val));
    }
  }
     return MyListEnv;
 }
rym
  • 545
  • 6
  • 12
  • 36
  • Please change your environment to use English instead of French. English error messages are so much easier Googleable and much better supported by the online communities. You've "just" a *Validation Error: Value not valid*. Duplicate questions: http://stackoverflow.com/q/4566587, http://stackoverflow.com/q/6324070, http://stackoverflow.com/q/5406700, http://stackoverflow.com/q/6647316, http://stackoverflow.com/q/3762070, http://stackoverflow.com/q/3773611, http://stackoverflow.com/q/2500663, etc..etc.. And see also http://www.google.com/search?q=JSF+%22Validation+Error%3A+Value+is+not+valid%22 – BalusC Jul 29 '11 at 14:35
  • @BalusC ,Hello,I have tried to chnage the scope of my bean to session and viewScope but no solution I can't see the problem in my case!! – rym Aug 01 '11 at 08:35

0 Answers0