struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Delgado Trujillo <jadt...@gmail.com>
Subject Re: validation checkboxlist
Date Fri, 05 Jan 2018 18:26:16 GMT
> “personBean.levels.isEmpty”


Yes, it’s empty an in the form the first time rendered all the options are unchecked.


> 
> You should use "name" instead of "key"

Why not key? i have the correspondan property files
personBean.levels=Cursos

I also see the label Cursos and the options

The problem is about the XML validation.
<field name=“personBean.levels”>
     <field-validator type=“fieldexpression>
          <param-name=“expression”>[!CDATA[#personBean.levels.length==0]]>></param>
          <message>You must select at least one option</message>
     </field-validator>
</field>

It is always trigger 

Un saludo,
José A.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message