openamf/src/web/examples client4.as,1.1,1.2

[email protected] Wed, 26 Nov 2003 21:38:24 -0800
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/web/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv21490/src/web/examples

Modified Files:
	client4.as 
Log Message:
updated servicePath


Index: client4.as
===================================================================
RCS file: /cvsroot/openamf/openamf/src/web/examples/client4.as,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** client4.as	22 Apr 2003 01:29:11 -0000	1.1
--- client4.as	27 Nov 2003 05:38:19 -0000	1.2
***************
*** 1,78 ****
! #include "NetServices.as"
! #include "NetDebug.as"
! 
! 
! //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! //::: Declare Person Class
! Rss = function () {
! 	this.init();
! };
! 
! 
! // Constructor
! Rss.prototype.init = function(){
! 	this.gatewayPath = "http://localhost:8080/openamf/gateway";
! 	this.servicePath = "org.openamf.test.RSS";
! 	this.rssURL = "";
! 	this.channel = new Object();
! }
! 
! 
! 
! // Methods
! Rss.prototype.setServiceObject = function() {
! 	NetServices.setDefaultGatewayURL(this.gatewayPath);
! 	this.serviceConnection = NetServices.createGatewayConnection();
! 	this.serviceObject = this.serviceConnection.getService(this.servicePath, this);
! }
! 
! Rss.prototype.getChannel = function(rssURL) {
! 	this.setServiceObject();
! 	this.serviceObject.getChannel(rssURL);
! }
! 
! Rss.prototype.getChannel_Result = function(result) {
! 	//there will only be one channel
! 	this.channel = result;
! 	
! 	title = this.channel["title"].toString();
! 	description = this.channel["description"].toString();
! 	link = this.channel["link"].toString();
! 
! 	_root.rssOutput.text += "\nTitle: "+ title;
! 	_root.rssOutput.text += "\nDescription: "+ description;
! 	_root.rssOutput.text += "\nLink: "+ link;
! 	_root.rssOutput.text += "\n";
! 	_root.rssOutput.text += "\nFeed: ";
! 
! 	var items = this.channel["items"];
! 	itemCount = items.length;
!     for (i=0; i<itemCount;i++) {
!             var item = items[i]
!             //TODO title, description, and link should be written somewhaere else
!             //the following code will just keep overwriting the same var's
!             _root.rssOutput.text += "\nTitle: "+item["Title"].toString();
!             _root.rssOutput.text += "\nDescription: "+item["Description"].toString();
!             _root.rssOutput.text += "\nLink: "+item["Link"].toString();			
!     }
! }
! 
! 
! //::: Create Rss Object
! myRss = new Rss();
! 
! 
! //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 
! 
! // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! // ::: Button Action Script
! GetRssButton.label = "Get Feed";
! GetRssButton.tabEnabled = false;
! GetRssButton.clickHandler = function() {
! 	myRss.getChannel(_root.rssURL.text);
! }
! 
! // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 
! 
--- 1,78 ----
! #include "NetServices.as"
! #include "NetDebug.as"
! 
! 
! //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! //::: Declare Person Class
! Rss = function () {
! 	this.init();
! };
! 
! 
! // Constructor
! Rss.prototype.init = function(){
! 	this.gatewayPath = "http://localhost:8080/openamf/gateway";
! 	this.servicePath = "org.openamf.examples.RSS";
! 	this.rssURL = "";
! 	this.channel = new Object();
! }
! 
! 
! 
! // Methods
! Rss.prototype.setServiceObject = function() {
! 	NetServices.setDefaultGatewayURL(this.gatewayPath);
! 	this.serviceConnection = NetServices.createGatewayConnection();
! 	this.serviceObject = this.serviceConnection.getService(this.servicePath, this);
! }
! 
! Rss.prototype.getChannel = function(rssURL) {
! 	this.setServiceObject();
! 	this.serviceObject.getChannel(rssURL);
! }
! 
! Rss.prototype.getChannel_Result = function(result) {
! 	//there will only be one channel
! 	this.channel = result;
! 	
! 	title = this.channel["title"].toString();
! 	description = this.channel["description"].toString();
! 	link = this.channel["link"].toString();
! 
! 	_root.rssOutput.text += "\nTitle: "+ title;
! 	_root.rssOutput.text += "\nDescription: "+ description;
! 	_root.rssOutput.text += "\nLink: "+ link;
! 	_root.rssOutput.text += "\n";
! 	_root.rssOutput.text += "\nFeed: ";
! 
! 	var items = this.channel["items"];
! 	itemCount = items.length;
!     for (i=0; i<itemCount;i++) {
!             var item = items[i]
!             //TODO title, description, and link should be written somewhaere else
!             //the following code will just keep overwriting the same var's
!             _root.rssOutput.text += "\nTitle: "+item["Title"].toString();
!             _root.rssOutput.text += "\nDescription: "+item["Description"].toString();
!             _root.rssOutput.text += "\nLink: "+item["Link"].toString();			
!     }
! }
! 
! 
! //::: Create Rss Object
! myRss = new Rss();
! 
! 
! //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 
! 
! // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! // ::: Button Action Script
! GetRssButton.label = "Get Feed";
! GetRssButton.tabEnabled = false;
! GetRssButton.clickHandler = function() {
! 	myRss.getChannel(_root.rssURL.text);
! }
! 
! // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 
! 




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/