API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.web.ajax. JOTAjaxProvider View Javadoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

/*
 * JavaOnTrack/Jotwiki
 * Thibaut Colar.
 * tcolar-jot AT colar  DOT net
 */

package net.jot.web.ajax;

import javax.servlet.http.HttpServletResponse;
import net.jot.web.JOTFlowRequest;

/**
 *
 * @author thibautc
 */
public interface JOTAjaxProvider {

    /**
     * Execute the ajax call and write to the response / flush it
     * ie: send the updated data that will be used by the javascript callback method
     * Params are in the request (getParameter)
     * @param request
     * @param response
     * @return
     */
    public void executeAjaxCall(JOTFlowRequest request, HttpServletResponse response) throws Exception;
    
    /**
     * return the path of the action(implementing JOTAjaxProvider) to be called when an ajax call is made:
     * Ex: "myAjax.do"
     * @return
     */
    public String getAjaxAction();

    /**
     * returns a name for the javascript function that will be created for this action
     * THIS SHOULD NOT CONTAIN ANY SPECIAL CHARS LIKE SPACES ETC....
     * (preferably unique ex: class.getSimpleName()
     * Ex: "ajax_exampleWidget"
     * @return
     */
    public String getJscriptFuncName();
    
    /**
     * returns the name of the javascript function you wrote, which will be called once data is returned from the ajax call
     * ie: updateData
     * @return
     */
    public String getJscriptCallbackFunctionName();


}

Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar