1 | <!-- |
---|
2 | (c) 2007 TIBCO Software Inc. Use, modification, and distribution subject to terms of license. |
---|
3 | --> |
---|
4 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
---|
5 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
6 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > |
---|
7 | <head> |
---|
8 | <title>TIBCO(R) PageBus Sample</title> |
---|
9 | <script type="text/javascript" src="../../js/pagebus.js"></script> |
---|
10 | <link rel="stylesheet" type="text/css" href ="../demo.css"/> |
---|
11 | </head> |
---|
12 | |
---|
13 | <body id="body-area"> |
---|
14 | |
---|
15 | <table class="banner-area"> |
---|
16 | <tr> |
---|
17 | <th></th> |
---|
18 | <td></td> |
---|
19 | </tr> |
---|
20 | </table> |
---|
21 | |
---|
22 | <div id="panes"> |
---|
23 | <div id="pane1"> |
---|
24 | |
---|
25 | <!-- Begin Publisher Component --> |
---|
26 | |
---|
27 | <div class="component"> |
---|
28 | <div class="component-title">Contact List</div> |
---|
29 | <div class="component-body"> |
---|
30 | |
---|
31 | <form style="padding: 2px; text-align: center; "> |
---|
32 | <input value="TIBCO"/> |
---|
33 | <img onClick="contacts.simulateContactSearch();return false;" src="./search.png" style="vertical-align: top; "/> |
---|
34 | </form> |
---|
35 | <table id="contact-list"> |
---|
36 | <thead > |
---|
37 | <tr > |
---|
38 | <th style="text-align: left; width: 9em; " >Name</th> |
---|
39 | <th style="text-align: left; width: 5em; " >Company</th> |
---|
40 | <th style="text-align: left; width: 12em; " >Phone</th> |
---|
41 | <th style="text-align: left; width: 9em; " >Email</th> |
---|
42 | </tr> |
---|
43 | </thead> |
---|
44 | <tbody > |
---|
45 | <tr> |
---|
46 | <td></td> |
---|
47 | <td></td> |
---|
48 | <td id="contactPhone0"></td> |
---|
49 | <td></td> |
---|
50 | </tr> |
---|
51 | <tr> |
---|
52 | <td></td> |
---|
53 | <td></td> |
---|
54 | <td id="contactPhone1"></td> |
---|
55 | <td></td> |
---|
56 | </tr> |
---|
57 | <tr> |
---|
58 | <td></td> |
---|
59 | <td></td> |
---|
60 | <td id="contactPhone2"></td> |
---|
61 | <td>/td> |
---|
62 | </tr> |
---|
63 | <tr> |
---|
64 | <td></td> |
---|
65 | <td></td> |
---|
66 | <td id="contactPhone3"></td> |
---|
67 | <td></td> |
---|
68 | </tr> |
---|
69 | <tr> |
---|
70 | <td></td> |
---|
71 | <td></td> |
---|
72 | <td id="contactPhone4"></td> |
---|
73 | <td></td> |
---|
74 | </tr> |
---|
75 | <tr> |
---|
76 | <td></td> |
---|
77 | <td></td> |
---|
78 | <td id="contactPhone5"></td> |
---|
79 | <td></td> |
---|
80 | </tr> |
---|
81 | </tbody > |
---|
82 | </table> |
---|
83 | <hr/><div id="contact-list-info"></div> |
---|
84 | |
---|
85 | <script type="text/javascript" src="ContactList.js"></script> |
---|
86 | <script type="text/javascript"> |
---|
87 | var contacts = new ContactList('contacts'); |
---|
88 | </script> |
---|
89 | |
---|
90 | </div> |
---|
91 | </div> |
---|
92 | |
---|
93 | </script> |
---|
94 | |
---|
95 | <!-- End Publisher Component --> |
---|
96 | |
---|
97 | |
---|
98 | <!-- Begin Info Component --> |
---|
99 | |
---|
100 | <div class="component"> |
---|
101 | <div class="component-title">About this Example</div> |
---|
102 | <div class="component-body"> |
---|
103 | <font color="red">Click the "Deactivate Dialer" link. The Phone Dialer deactivates and the Contact List removes the "Dial Phone Number" buttons. Reactivate the Dialer. The buttons reappear. Note: the other buttons and links also work.</font> |
---|
104 | </p> |
---|
105 | <p> |
---|
106 | This example shows one way to use PageBus.store and PageBus.query. The Phone Dialer and SMS components on this page use PageBus.store to advertise subscribers that consume phone numbers. |
---|
107 | </p> |
---|
108 | <p>The Contact List component uses PageBus.query to discover these subscribers and to obtain information about them (icons, descriptions, PageBus subjects to which they are subscribed, etc.). Even though the Contact List knows nothing about what these features do, it dynamically generates buttons allowing the user to invoke them. |
---|
109 | </p> |
---|
110 | <p> |
---|
111 | The Phone Dialer stores information about itself under the subject "com.tibco.pagebus.ex.feature.phonesub.dialer". The SMS Sender stores the same pieces of information under the subject "com.tibco.pagebus.ex.feature.phonesub.sms". |
---|
112 | </p> |
---|
113 | <p> |
---|
114 | The Contact List discovers these features by querying "com.tibco.pagebus.ex.feature.phonesub.*" and detects subsequent [de-]activations by subscribing to the same subject. When the Contact List discovers phone-number consumers, it automatically adds buttons that allow the user to invoke them, using icons and text advertised by the discovered features. |
---|
115 | </p> |
---|
116 | </div> |
---|
117 | </div> |
---|
118 | |
---|
119 | <!-- End Component --> |
---|
120 | |
---|
121 | </div> |
---|
122 | |
---|
123 | <div id="pane2"> |
---|
124 | |
---|
125 | |
---|
126 | <!-- Begin Subscriber Component --> |
---|
127 | |
---|
128 | <div class="component"> |
---|
129 | <div class="component-title">Phone Dialer</div> |
---|
130 | <div class="component-body"> |
---|
131 | <span >This component simulates a web-phone dialer.</span> |
---|
132 | <hr/> |
---|
133 | <div id="PhoneDialerStatus"></div> |
---|
134 | </div> |
---|
135 | </div> |
---|
136 | |
---|
137 | <script type="text/javascript" src="PhoneDialer.js"></script> |
---|
138 | <script type="text/javascript"> |
---|
139 | var dialer = new PhoneDialer('dialer', 'PhoneDialerStatus'); |
---|
140 | </script> |
---|
141 | |
---|
142 | <!-- End Component --> |
---|
143 | |
---|
144 | <!-- Begin Subscriber Component --> |
---|
145 | |
---|
146 | <div class="component"> |
---|
147 | <div class="component-title">SMS Sender</div> |
---|
148 | <div class="component-body"> |
---|
149 | <span >This component simulates a SMS sender.</span> |
---|
150 | <hr/> |
---|
151 | <div id="SmsSenderStatus"></div> |
---|
152 | </div> |
---|
153 | </div> |
---|
154 | |
---|
155 | <script type="text/javascript" src="SmsSender.js"></script> |
---|
156 | <script type="text/javascript"> |
---|
157 | var sms = new SmsSender('sms', 'SmsSenderStatus'); |
---|
158 | </script> |
---|
159 | |
---|
160 | <!-- End Component --> |
---|
161 | |
---|
162 | |
---|
163 | <!-- Begin Subscriber Component --> |
---|
164 | |
---|
165 | <div class="component"> |
---|
166 | <div class="component-title">Monitor Messages</div> |
---|
167 | <div class="component-body"> |
---|
168 | <span >This component subscribes to the subject '**'.</span> |
---|
169 | <hr/> |
---|
170 | <div id="MessageMonitorDiv"></div> |
---|
171 | </div> |
---|
172 | </div> |
---|
173 | |
---|
174 | <script type="text/javascript" src="../MessageMonitor.js"></script> |
---|
175 | <script type="text/javascript"> |
---|
176 | var messageMonitor = new MessageMonitor('MessageMonitorDiv'); |
---|
177 | </script> |
---|
178 | |
---|
179 | <!-- End Component --> |
---|
180 | |
---|
181 | |
---|
182 | </div> |
---|
183 | </div> |
---|
184 | |
---|
185 | <div id="footer-area"> |
---|
186 | <div>(c) 1999-2007 TIBCO Software Inc. Use, modification, and distribution subject to terms of license.</div> |
---|
187 | </div> |
---|
188 | |
---|
189 | </body> |
---|
190 | </html> |
---|