Hi,

I have a select list in my form, and when I submit the form, the 
javascript client validation passes, but the server validation failed. It 
comes back to my JSP with the "required field" error message.

The weird thing is that in my action the field is well filled (I put a 
breakpoint in an empty validate() method), and when it comes back to the 
JSP the selected option of my select is what I submitted. So why the 
server validation doesn't see that the select is filled ?

<s:form action="familleProduitGerer_save" validate="true" theme="xhtml">
        <s:select name="familleProduit.gamme.idGamme"
                id="familleProduit.gamme.idGamme"
                list="gammes"
                listKey="idGamme"
                listValue="libelle"
                emptyOption="true"
                required="true"
                onchange="javascript: Change();"/>
</s:form>

public class FamilleProduitVO extends CRUDVO {
        private long idFamille;
        private String nomFamille = "";
        private Double chargeTravail;
        private String urlFamille = "";
        private GammeVO gamme;

        ...
}
public class GammeVO extends CRUDVO {
        private long idGamme;
        private String libelle;
        private String urlGamme;

        ...
}
public class FamilleProduitGererAction extends CRMAction {
        private FamilleProduitVO familleProduit;
        private List<GammeVO> gammes;

        ...
}

Thanks for your help.

Reply via email to