[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[rap-dev] a custom widget that make ajax call to communicate with the rap server
|
Hi,
RIght now I am making a widget that is able to make ajax call to Github API (http://develop.github.com/) getting the content, and then send the content back to the rap server. The followings are the steps that I wanna achieve:
1. rap server asks the rap client to make a ajax call to GitHub
2. rap client makes an ajax call to GitHub and gets the content
3. rap client sends this content back to the rap server for further processing
4. rap server update the rap client
Here is the flow:
rap server (1)-> rap client (2)-> GitHub Server (2)-> rap client (3)-> rap server (4)-> rap client
Step 1 and 2 are easy to implement with QooXDoo and there are examples for that already, e.g., http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.rap.help/help/html/advanced/custom-widget.html. But I am having trouble building the custom event mechanism the makes an ajax call back between the rap client and the rap server (3 in this example). Is there any API I can use? Or is there an example I can take a look at?
Many thanks,
Owen