Boolean button in Java Struts

Published on Author bloggerfive

By default, there is no boolean button  available in Struts tag library .But we can do simple trick to create boolean button easily using struts2 tag library.

Struts Code :

   <s:radio list=”#{true:’ ‘}” name=”control_name” />

While submitting,If the user clicked on the radio button, then it would pass “true” value as parameter to back-end. If not ,it would just pass null  value that we can consider as “false“.

Comments

comments