vendredi 17 juin 2016

Execute method in Struts 2 with ajax from checkbox

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" />

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>




Aucun commentaire:

Enregistrer un commentaire