struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From M Huzaifah <mhuzaifah.i...@gmail.com>
Subject [ask] How to pass multiple radio button in struts2
Date Fri, 21 Dec 2018 08:14:21 GMT
Hi Members,

i would like to ask something about radio button in strtus2.

i have radio button in jsp like this:


<fieldset id="fieldSetView0">
   <input type="radio" name="viewAccess[0]" value="all"> All<br>
   <input type="radio" name="viewAccess[0]" value="self"> Self<br>
   <input type="radio" name="viewAccess[0]" value="custom"> Custom
</fieldset>

<fieldset id="fieldSetView1">
   <input type="radio" name="viewAccess[1]" value="all"> All<br>
   <input type="radio" name="viewAccess[1]" value="self"> Self<br>
   <input type="radio" name="viewAccess[1]" value="custom"> Custom
</fieldset>

and in my JavaAction class i add property " private String viewAccess[]; “ also with setter
and getter.

the problem is, i am not able to get value of radio button in Java Action. i use struts 2.3.35

someone could help?

Thank you


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