I want to execute a method in Struts 2 from a checkbox but in ajax without refreshing the page any idea how to do that ? I'm using the struts 2 checkbox
<s:checkbox name="sie_cocherDecocher" fieldValue="true" />
I tried also the struts 2 dojo tags :
<sx:a executeScripts="true" value="Enregistrer" targets="divajax"
onchange="document.getElementById('loading_4').style.display='block';" indicator="indicator"
href="%{sie_cocherDecocher}" cssClass="sect">
<s:checkbox name="sie_cocherDecocher" fieldValue="true" />
</sx:a>
And I already mapped the action like that :
<action name="sie_cocherDecocher"
class="com.controleur.Central"
method="sie_cocherDecocher">
<interceptor-ref name="createSession" />
<interceptor-ref name="defaultStack" />
<interceptor-ref name="allowAccessIntercept" />
<result name="allowAccess">/WEB-INF/jsp/AllowAccess/connectAllowAccess.jsp
</result>
<param name="contentType">text/html;charset=ISO-8859-1</param>
<result name="success">/WEB-INF/jsp/bord.jsp
</result>
</action>