Struts2: Is there a way that checkbox directly links to action class when checkbox is checked? -
for eg:
<s:checkbox name="checkme" fieldvalue="true" label="check me testing" action="someactionclass"/>
when checkbox selected, control not redirecting particular action class method.
you must use javascript problem , toggle action of form according change event of checkbox.
here's example using jquery:
$('#checkboxid').change(function() { if(this.checked) { // when checked, change action. } else { // else } });