source: Dev/trunk/src/client/dojox/rpc/demos/demo_jabsorb.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.7 KB
Line 
1<!--
2This file is a demo of the Dojo + jabsorb
3
4You must have jabsorb installed in order for this to run.
5This assumes that jabsorb is at /jabsorb-1.3/, but you
6can change the target if it as a different location.
7
8This uses the Hello example from the jabsorb framework (Hello.java and hello.jsp)
9-->
10<html>
11<head>
12        <title>Demo of Dojo + jabsorb</title>
13        <style type="text/css">
14
15                @import "../../../dijit/themes/tundra/tundra.css";
16                @import "../../../dojo/resources/dojo.css";
17        </style>
18
19        <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true"></script>
20        <script type="text/javascript">
21                dojo.require("dojox.rpc.Service");
22                dojo.require("dojox.rpc.JsonRPC");
23                var services = new dojox.rpc.Service({
24                        target:"/jabsorb-1.3/JSON-RPC",
25                        transport:"POST",
26                        envelope:"JSON-RPC-1.0",
27                        contentType:"application/json",
28                        services:{
29                                "hello.sayHello":{
30                                        returns:{"type":"string"},
31                                        parameters:[{"type":"string"}]
32                                }
33                        }
34                });
35                function clickHello() {
36                        var whoInput = document.getElementById("who");
37                        var deferred = services["hello.sayHello"](whoInput.value);
38                        deferred.addCallback(function(result) {
39                                alert(result);
40                                return result;
41                        })
42                }
43
44        </script>
45</head>
46
47<body class="tundra">
48        <h1>
49                DEMO:  jabsorb
50        </h1>
51        <hr>
52        <h3>
53                Description:
54        </h3>
55        <p>
56                This simple demo shows how to connect to a <a href="http://jabsorb.org/">jabsorb server</a>
57        </p>
58<p>The jabsorb <em>Hello World</em> application.</p>
59
60<p>
61  <strong>Who:</strong>
62  <input type="text" id="who" size="30" value="Michael"/>
63  &nbsp;
64
65  <input type="button" value="Say Hello" onclick="clickHello()"/>
66</p>
67<body>
68        <hr/>
69</body>
70</html>
Note: See TracBrowser for help on using the repository browser.