struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Delgado Trujillo <>
Subject validation checkboxlist
Date Wed, 03 Jan 2018 09:30:12 GMT
I have a form with a checkboxlist linked to a bean with an array of string properties. I want
the user must select at least one option.

Looking for the documentation, i think this is possible with field expression, but it requires
ONGL expression.

I did it so:


<s:form action=“register”>
   <s:checkboxlist key=levels/>

public class Person{

    private String[] levels;

   <field name=person.levels>
	<field-validator type=fieldexpression>
            <param name=“expression”><![CDATA[person.levels.length==0]]></param>
            <message>Selecciona al menos un curso</message>

After that the first submit without selection i see the error field message. But if i select
one options and submit i still see the error. Why??

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message