struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Delgado Trujillo <>
Subject Re: validation checkboxlist
Date Thu, 04 Jan 2018 17:53:16 GMT
Thanks for your explanation, i see clearer to use modeldriven or not.
My problem is not about the populate the options of the checkboxlist but the exception rule
you must select at least one.

In the XML file i have

<field name=“personBean.levels”>
     <field-validator type=“fieldexpression>
          <message>You must select at least one option</message>

With that configuration i always obtain an error validation (showing the message in the checkboxñixt

In Person class
private String[] levels
private String[] levelsAvalaible={“1ESO”, “2ESO”, 3ESO”, “4ESO” }

with setters and getters

In the register-input.jsp
<form action=“register”>
  <s:checkboxlist key=“personBean.levels” list=“levelsAvalaible”/>

I can see the options of the checkboxlist, but even selecting one option and submit the form
i get error validation.

So i think It is a problem with the expression in the XML configuration.

Un saludo,
José A.

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