You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ho...@apache.org on 2007/01/18 20:55:55 UTC

svn commit: r497551 [2/5] - in /geronimo/daytrader/branches/1.2: ./ modules/dojo-ui-ear/ modules/dojo-ui-ear/src/ modules/dojo-ui-ear/src/main/ modules/dojo-ui-ear/src/main/resources/ modules/dojo-ui-ear/src/main/resources/META-INF/ modules/dojo-ui-ear...

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/DaytraderProgressBar.js
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/DaytraderProgressBar.js?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/DaytraderProgressBar.js (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/DaytraderProgressBar.js Thu Jan 18 11:55:51 2007
@@ -0,0 +1,79 @@
+dojo.provide("dojotrader.widget.DaytraderProgressBar");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.lang.timing.Timer");
+
+dojo.widget.defineWidget(
+	"dojotrader.widget.DaytraderProgressBar", 
+	dojo.widget.HtmlWidget, 
+	{
+		templatePath: dojo.uri.dojoUri("/dojotrader/widget/templates/HtmlProgressBar.html"),
+		templateCssPath: dojo.uri.dojoUri("/dojotrader/widget/templates/HtmlProgressBar.css"),
+		widgetType: "ProgressBar",
+		period: "",
+		cycle: false,
+		_timer: null,
+		_tickInterval: 0,
+		_tickCount: 0,
+		
+		postCreate: function() {
+			//alert(this.interval);
+			this._tickInterval = (+(this.period) / 6).toFixed(0);	
+		},
+		
+		fillInTemplate: function(args, frag) {
+			//alert(this.interval);
+		},
+		
+		incrementBars: function() {
+			if (this._tickCount < 6) {
+				this.progressBarRow.cells[this._tickCount].firstChild.style.backgroundColor = "green";
+				this._tickCount++;
+			} else {
+				if (!this.cycle) {
+					this._timer.stop();
+					this._timer = null;
+				}
+				
+				this.reset();
+				this._tickCount = 0;
+				this.onComplete();
+			}
+		},
+		
+		onComplete: function() {},
+		
+		start: function () {
+			this.reset();
+			this._timer = new dojo.lang.timing.Timer(this._tickInterval);
+			//this._timer = new dojo.animation.Timer(this._tickInterval);
+			this._timer.onTick = dojo.lang.hitch(this,this.incrementBars);
+			this.progressBarUpdate.style.visibility = "visible";
+			this._timer.start();
+		},
+		
+		stop: function () {
+			if (this._timer != null) {
+				this._timer.stop();
+				this.progressBarUpdate.style.visibility = "hidden";
+				this._timer = null;
+				this._tickCount = 0;
+			}
+		},
+		
+		setPeriod: function (value) {
+			this.period = value;
+			this._tickInterval = (+(value) / 6).toFixed(0);
+		},
+		
+		setCycle: function (value) {
+			this.cycle = value;
+		},
+		
+		reset: function () {
+			for (idx=0; idx < this.progressBarRow.cells.length; idx++) {
+				this.progressBarRow.cells[idx].firstChild.style.backgroundColor = "#eeeeee";
+			}
+		}
+	}
+);

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/DaytraderProgressBar.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/DaytraderProgressBar.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/DaytraderProgressBar.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/LoginLogout.js
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/LoginLogout.js?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/LoginLogout.js (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/LoginLogout.js Thu Jan 18 11:55:51 2007
@@ -0,0 +1,296 @@
+dojo.provide("dojotrader.widget.LoginLogout");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.ValidationTextbox");
+dojo.require("dojo.storage.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.widget.PopupContainer");
+dojo.require("dojotrader.widget.BaseDaytraderPane");
+
+dojo.widget.defineWidget(
+	"dojotrader.widget.LoginLogout", 
+	[dojo.widget.HtmlWidget, dojotrader.widget.BaseDaytraderPane], 
+	{
+		templatePath: dojo.uri.dojoUri("/dojotrader/widget/templates/HtmlLoginLogout.html"),
+		//templateCssPath: dojo.uri.dojoUri("/dojotrader/widget/templates/HtmlLoginLogout.css"),
+		widgetType: "LoginLogout",
+
+		_register: false,
+		
+		_doLoginButton: "",
+		_doShowRegisterButton: "",
+		
+		_registerContainer: "",
+		
+		_useridTxtBox: "",
+		_passwordTxtBox: "",
+		_regUseridTxtBox: "",
+		_regPasswordTxtBox: "",
+		_regConfirmTxtBox: "",
+		_regFullnameTxtBox: "",
+		_regAddressTxtBox: "",
+		_regEmailTxtBox: "",
+		_regCreditcardTxtBox: "",
+		_regBalanceTxtBox: "",
+		
+		
+		postCreate: function() {
+			dojotrader.widget.LoginLogout.superclass.postCreate.call(this);
+			
+			//alert("in postCreate");
+		},
+		
+		fillInTemplate: function(args, frag) {
+			this._doLoginButton = dojo.widget.createWidget("Button", {caption: "Login"}, this.loginButtonNode);
+			dojo.event.connect(this._doLoginButton, "onClick", this, "onLoginClick");
+	
+			this._useridTxtBox = dojo.widget.createWidget("ValidationTextBox", {type: "text", validation: "false", size: "10", value: "uid:0"}, this.loginUseridTextBoxNode);
+			this._passwordTxtBox = dojo.widget.createWidget("ValidationTextBox", {type: "password", validation: "false", size: "10", value: "xxx"}, this.loginPasswordTextBoxNode);
+			
+			this._doShowRegisterButton = dojo.widget.createWidget("Button", {caption: "Register"}, this.showRegisterButtonNode);
+			dojo.event.connect(this._doShowRegisterButton, "onClick", this, "onShowRegisterClick");
+			
+			ref = dojo.widget.createWidget("Button", {}, this.logoutButtonNode);
+			dojo.event.connect(ref, "onClick", this, "onLogoutClick");
+			
+			this._registerContainer = dojo.widget.createWidget("PopupContainer", {toggle: "plain", toggleDuration: 150});
+			this.domNode.appendChild(this._registerContainer.domNode);
+			this._registerContainer.domNode.appendChild(this.registerNode);
+			// need the following to handle when the user clicks outside the registration box
+			// - either of the two will work
+			//dojo.event.connect(dojo.widget.PopupManager, "onClick", this, "onCancelRegisterClick");
+			dojo.event.connect(this._registerContainer, "close", this, "onCancelRegisterClick");
+			
+			var ref = dojo.widget.createWidget("Button", {}, this.registerButtonNode);
+			dojo.event.connect(ref, "onClick", this, "onRegisterClick");
+			ref = dojo.widget.createWidget("Button", {}, this.cancelRegisterButtonNode);
+			dojo.event.connect(ref, "onClick", this, "onCancelRegisterClick");
+			this._regUseridTxtBox = dojo.widget.createWidget("ValidationTextBox", {type: "text", required: "true", size: "30", missingMessage: "* Required", missingClass: "error"}, this.registerUseridTextBoxNode);
+			this._regPasswordTxtBox = dojo.widget.createWidget("ValidationTextBox", {type: "password", required: "true", size: "30", missingMessage: "* Required", missingClass: "error"}, this.registerPasswordTextBoxNode);
+			this._regConfirmTxtBox = dojo.widget.createWidget("ValidationTextBox", {type: "password", required: "true", size: "30", missingMessage: "* Required", missingClass: "error"}, this.registerConfirmTextBoxNode);
+			this._regFullnameTxtBox = dojo.widget.createWidget("ValidationTextBox", {type: "text", required: "true", size: "30", missingMessage: "* Required", missingClass: "error"}, this.registerFullnameTextBoxNode);
+			this._regAddressTxtBox = dojo.widget.createWidget("ValidationTextBox", {type: "text", required: "true", size: "30", missingMessage: "* Required", missingClass: "error"}, this.registerAddressTextBoxNode);
+			this._regEmailTxtBox = dojo.widget.createWidget("EmailTextBox", {type: "text", required: "true", size: "30", missingMessage: "* Required", invalidMessage: "* Not valid", missingClass: "error", invalidClass: "error"}, this.registerEmailTextBoxNode);
+			this._regCreditcardTxtBox = dojo.widget.createWidget("ValidationTextBox", {type: "text", required: "true", size: "30", missingMessage: "* Required", missingClass: "error"}, this.registerCreditcardTextBoxNode);
+			this._regBalanceTxtBox = dojo.widget.createWidget("RealNumberTextBox", {type: "text", required: "true", size: "30", missingMessage: "* Required", invalidMessage: "* Not valid", missingClass: "error", invalidClass: "error"}, this.registerBalanceTextBoxNode);
+		},
+		
+		onShowRegisterClick: function() {
+			if (!this._register) {
+				// clear register form values
+				this.clearRegisterValues();
+				// display the account registration form
+				this._registerContainer.open(this.domNode, null, this.domNode);	
+				
+				dojo.event.topic.publish("/daytrader", {event: "register"});
+	
+				// disble the login controls
+				this._doLoginButton.setDisabled(true);
+				this._doShowRegisterButton.setDisabled(true);
+				this._passwordTxtBox.textbox.disabled = true;
+				this._useridTxtBox.textbox.disabled = true;		
+				this._register=true;
+			}
+		},
+				
+		onCancelRegisterClick: function () {
+			if (this._register) {
+				// hide the account registration form
+				//alert(this._registerContainer.isShowingNow);
+				if (this._registerContainer.isShowingNow)
+					this._registerContainer.close();
+				
+				dojo.event.topic.publish("/daytrader", {event: "cancelRegister"});
+
+				// enable the login controls
+				this._doLoginButton.setDisabled(false);
+				this._doShowRegisterButton.setDisabled(false);
+				this._passwordTxtBox.textbox.disabled = false;
+				this._useridTxtBox.textbox.disabled = false;
+				this._register=false;
+			}
+		},
+		
+		onLoginClick: function() {
+			var password = this._passwordTxtBox.getValue();
+			var userid = this._useridTxtBox.getValue();
+			
+			this.doLogin(userid, password);
+		},
+		
+		doLogin: function(userid, passwd) {
+			if (userid != "" && passwd != "") {		
+				dojo.io.bind({
+    				method:  "GET",
+    				//url: "/proxy/SoapProxy/login?p1=" + userid + "&p2=" +  passwd + "&format=json",
+       				url: "/daytraderProxy/doProxy/login?p1=" + userid + "&p2=" +  passwd,
+       				mimetype: "text/json",
+    				load: dojo.lang.hitch(this, this.handleLogin),
+    				error: dojo.lang.hitch(this, this.handleError),
+    				useCache: false,
+                	preventCache: true
+  				});
+  			}
+		},
+		
+		handleLogin: function (type, data, evt) {	
+			var uid = data.loginReturn.profileID;
+			//dojo.storage.put("uid",uid,storageHandler);
+			dojo.storage.put("uid",uid);
+			
+			// hide the login controls and unhide the logout controls
+			this.loginNode.style.display = "none";
+			this.logoutNode.style.display = "";
+			
+			
+			// clear old messages from messages pane
+			dojo.event.topic.publish("/messages", {event: "clearMessages"});
+			// clear quotes from buy stocks pane
+			dojo.event.topic.publish("/messages", {event: "clearQuotes"});
+			
+			// publish message to the messages pane
+			var message = "User (" + uid + ") logged in";
+			dojo.event.topic.publish("/messages", {event: "addMessage", message: message});
+			// update account summary pane
+			dojo.event.topic.publish("/accountSummary", {event: "getAccountSummary"});
+			// update portfolio pane
+			dojo.event.topic.publish("/portfolio", {event: "getHoldings"});
+			
+			dojo.event.topic.publish("/daytrader", {event: "handleLogin"});
+			
+			message = "Welcome " + uid + "!";
+			// publish Welcome message to the top banner
+			dojo.event.topic.publish("/daytrader", {event: "msgWelcome", message: message});
+			
+			dojo.event.topic.publish("/marketSummary", {event: "toggleHistory"});
+		},
+		
+		onLogoutClick: function() {
+			var uid = dojo.storage.get("uid");
+	
+			// TODO: need to investigate logout service in proxy - encounters NPE during serializeBean method
+			/*dojo.io.bind({
+   	 			method:  "GET",
+    			url: "/proxy/SoapProxy/logout?p1=" + uid + "&format=json",
+       			mimetype: "text/json",
+    			load: handleLogout,
+    			error: handleError
+  			});*/
+	
+			// TODO: Fill in code for logout
+			this.handleLogout();
+		},
+		
+		handleLogout: function (type, data, evt) {	
+			var uid = dojo.storage.get("uid");
+	
+			if (dojo.storage.hasKey("uid")) {
+				//dojo.storage.remove("uid");
+				dojo.storage.put("uid",null);
+			}
+			
+			// hide the logout controls and unhide the login controls
+			this.logoutNode.style.display = "none";
+			this.loginNode.style.display = "";
+			
+			var message = "User (" + uid + ") logged out";
+			// publish message to the messages pane
+			dojo.event.topic.publish("/messages", {event: "addMessage", message: message});
+			
+			dojo.event.topic.publish("/daytrader", {event: "handleLogout"});
+			
+			message = "This is the top banner...";
+			// revert the Welcome message to the top banner
+			dojo.event.topic.publish("/daytrader", {event: "msgWelcome", message: message});
+			
+			dojo.event.topic.publish("/marketSummary", {event: "toggleHistory"});
+		},
+		
+		clearRegisterValues: function () {
+			this._regUseridTxtBox.setValue("");
+			this._regPasswordTxtBox.setValue("");
+			this._regConfirmTxtBox.setValue("");
+			this._regFullnameTxtBox.setValue("");
+			this._regAddressTxtBox.setValue("");
+			this._regEmailTxtBox.setValue("");
+			this._regCreditcardTxtBox.setValue("");
+			this._regBalanceTxtBox.setValue("");
+			this.showRegisterMessage("");
+		},
+			
+		showRegisterMessage: function(message) {
+			var node = this.registerMessageNode;
+			var mNode = document.createTextNode(message);
+	
+			if (node.hasChildNodes()) {
+				node.removeChild(node.childNodes[0]);
+			}
+	
+			node.appendChild(mNode);
+		},
+		
+		onRegisterClick: function () {
+			var userid = this._regUseridTxtBox.getValue();
+			var password = this._regPasswordTxtBox.getValue();
+			var confirm = this._regConfirmTxtBox.getValue();
+			var fullname = this._regFullnameTxtBox.getValue();
+			var address = this._regAddressTxtBox.getValue();
+			var email = this._regEmailTxtBox.getValue();	
+			var creditcard = this._regCreditcardTxtBox.getValue();
+			var balance = this._regBalanceTxtBox.getValue();
+		
+			if (password == "" || confirm == "" || userid == "" || fullname == "" ||
+				!this._regEmailTxtBox.isValid() || address == "" || creditcard == "" || !this._regBalanceTxtBox.isValid())
+				return; 
+	
+			if (password != confirm) {
+				//displayStatusMessage("Passwords do not match!");
+				this.showRegisterMessage("Passwords do not match!");
+				return;
+			}
+			
+			var queryStr = "p1=" + userid + "&p2=" + password + "&p3=" + fullname + "&p4=" + address + "&p5=" + email + "&p6=" + creditcard + "&p7=" + balance; 
+		
+			dojo.io.bind({
+   			 	method:  "GET",
+   		 		//url: "/proxy/SoapProxy/register?" + queryStr + "&format=json",
+   		   		url: "/daytraderProxy/doProxy/register?" + queryStr,
+   		   		mimetype: "text/json",
+	   	 		load: dojo.lang.hitch(this, this.handleRegisterAccount),
+	   	 		error: dojo.lang.hitch(this, this.handleError),
+	   	 		useCache: false,
+                preventCache: true
+  			});
+		},
+
+		handleRegisterAccount: function (type, data, evt) {		
+			var message = "";
+			var password = this._regPasswordTxtBox.getValue();
+			var userid = this._regUseridTxtBox.getValue();
+		
+			if (data != null) {
+				var accountid = data.registerReturn.accountID;
+				var balance = data.registerReturn.balance;
+	
+				message = "Successfully created account " + accountid + " with a balance of $" + balance;
+				// display message on the registration form
+				this.showRegisterMessage(message);
+				// publish message to the messages pane
+				dojo.event.topic.publish("/messages", {event: "addMessage", message: message});
+				
+				// hide the register form after 1.5 seconds
+				// setTimeout(this.onCancelRegisterClick, 1500);
+				this.onCancelRegisterClick();
+				
+				// perform the login after 1.6 seconds
+				//var login = dojo.lang.hitch(this, this.doLogin);
+				//setTimeout(login, 1600, userid, password);
+				this.doLogin(userid, password);
+			} else {
+				message = "Error registering user";
+				
+				this.showRegisterMessage(message); 
+			}
+		}
+	}
+);

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/LoginLogout.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/LoginLogout.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/LoginLogout.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/MarketSummary.js
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/MarketSummary.js?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/MarketSummary.js (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/MarketSummary.js Thu Jan 18 11:55:51 2007
@@ -0,0 +1,213 @@
+dojo.provide("dojotrader.widget.MarketSummary");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.lang.timing.Timer");
+dojo.require("dojotrader.widget.DaytraderProgressBar");
+dojo.require("dojo.widget.Chart");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojotrader.widget.BaseDaytraderPane");
+
+dojo.widget.defineWidget(
+	"dojotrader.widget.MarketSummary", 
+	[dojo.widget.HtmlWidget, dojotrader.widget.BaseDaytraderPane], 
+	{
+		templatePath: dojo.uri.dojoUri("/dojotrader/widget/templates/HtmlMarketSummary.html"),
+		widgetType: "MarketSummary",
+
+		label: "Market Summary",
+		chartEnabled: false,
+		
+		_refreshButton: null,
+		_changeRefreshComboBox: null,
+		_timer: null,
+		_progressBar: null,
+		_chart: null,
+		_series: null,
+		_chartIdx: 0,
+		_previousMS: null,
+		
+		postCreate: function() {
+			dojotrader.widget.MarketSummary.superclass.postCreate.call(this);
+			
+			this.refreshMarketSummary();
+		},
+		
+		fillInTemplate: function(args, frag) {
+			//dojotrader.widget.MarketSummary.superclass.fillInTemplate.call(this, args, frag);
+		
+			this._refreshButton = dojo.widget.createWidget("Button", {caption: "Refresh Now"}, this.buttonNode);
+			dojo.event.connect(this._refreshButton, "onClick", this, "refreshMarketSummary");
+			
+			this._progressBar = dojo.widget.createWidget("dojotrader:DaytraderProgressBar", {cycle: true}, this.progressBar);
+			this._progressBar.onComplete = dojo.lang.hitch(this, this.refreshMarketSummary);
+			
+			// create the chart and hide it (note: chart does not work on ie)
+			// connsequently, only creating chart under mozilla
+			if (dojo.render.html.moz && this.chartEnabled) {
+				this._chart = dojo.widget.createWidget("dojo:Chart", {}, this.chart);
+				this._series = new dojo.widget.Chart.DataSeries("SeriesA", "First series", "area");
+				this._chart.series.push(this._series);
+				this._chart.properties.height=120;
+				this._chart.properties.width=220;
+				this._chart.properties.padding={top:5, bottom: 20, left:30, right: 5};
+				
+				this._chart.properties.axes.x.range={min:0, max:100};
+				this._chart.properties.axes.y.range={min:60, max:120};
+				//this._chart.fillInTemplate(args, frag);
+			}
+			this.msHistory.style.display = "none";
+			
+			// setup subscription channel for external event listener
+			dojo.event.topic.subscribe("/marketSummary", this, "handleExternalEvents");
+		},
+		
+		handleExternalEvents: function (args) {
+			if (args.event == "toggleHistory") {
+				if (this.msHistory.style.display == "none" && this._chart != null)
+					this.msHistory.style.display = "";
+				else
+					this.msHistory.style.display = "none";
+			}
+		},
+		
+		changeTimerSettings: function() {
+			//var value = this._changeRefreshComboBox.getValue();
+			var value = this.refreshSelectBox.value;
+			this._progressBar.stop();
+
+			if (value == "manual") {
+				this._progressBar.reset();	
+			} else {
+				this._progressBar.setPeriod(+(value) * 1000);
+				this._progressBar.start();
+			}
+		},
+
+		startTimer: function () {
+			var ms_timer = new dojo.animation.Timer(20000);
+			ms_timer.onTick = dojo.lang.hitch(this,this.refreshMarketSummary);
+			ms_timer.start();
+		},
+	
+		refreshMarketSummary: function () {
+			this.replaceTextNode(this.msLastUpdated, this.createShortTimeStampStr());
+			
+			// attempt async request to service
+			dojo.io.bind({
+			   	method:  "GET",
+			   	//url: "/proxy/SoapProxy/getMarketSummary?format=json",
+			   	url: "/daytraderProxy/doProxy/getMarketSummary",
+   		    	mimetype: "text/json",
+			   	load: dojo.lang.hitch(this,this.handleMarketSummary),
+			   	error: dojo.lang.hitch(this, this.handleError),
+			   	useCache: false,
+                preventCache: true
+			});
+			
+			//addMessage("Performing refresh of Market Summary");
+			//dojo.event.topic.publish("/messages", {content: "Performing refresh of Market Summary"});
+		},	
+		
+		toggleChart: function() {
+			if (this.chart.style.display == "none")
+				this.chart.style.display = "";
+			else	
+				this.chart.style.display = "none";
+		},
+	
+		handleMarketSummary: function (type, data, evt) {
+
+			var tsia = +data.getMarketSummaryReturn.TSIA;
+			var open_tsia = +data.getMarketSummaryReturn.openTSIA;
+			var volume = +data.getMarketSummaryReturn.volume;
+			var change = eval((tsia - open_tsia)/open_tsia * 100);
+			
+			// update the chart if it exists
+			if (this._chart != null) {
+				//this._chart.series[0].add({x: this._chartIdx++, value: +(tsia.toFixed(0))});
+				this._series.add({x: this._chartIdx++, value: +(tsia.toFixed(0))});
+				this._chart.render();
+			}
+			
+			if (this.previousMS && this.previousMS.TSIA != tsia) {
+				dojo.lfx.html.highlight([this.msTSIA, this.msVolume, this.msChange],"red",2000,5).play();
+			}
+			
+			this.replaceTextNode(this.msTSIA, tsia.toFixed(3));
+			this.replaceTextNode(this.msVolume, volume);
+				
+			// in order to use CSS and div tags to control the images have
+			// to encapsulate in a table to keep the image and value on the
+			// same line
+  		
+  			// first, remove child nodes of attachpoint
+				
+			if (this.msChange.childNodes[0] != null) {
+	  			this.msChange.removeChild(this.msChange.childNodes[0]);
+	  		}
+	  		this.addValueWithArrow(this.msChange, change, change.toFixed(2));
+			
+  			// handle the top gainers
+  			
+  			table = this.msGainerTable;
+  			// delete old rows
+  			while (table.rows.length > 2)
+  				table.deleteRow(table.rows.length - 1);
+  			
+  			for (i = 0; i < data.getMarketSummaryReturn.topGainers.QuoteDataBean.length; i++) {
+  				var row = table.insertRow(table.rows.length);
+  				if (table.rows.length % 2 == 0)
+  					dojo.html.addClass(row, "row-even");
+  				else 	
+					dojo.html.addClass(row, "row-odd");
+  			
+  				var cell = row.insertCell(0);
+  				dojo.html.addClass(cell, "data-indent");
+	  			var text = document.createTextNode(data.getMarketSummaryReturn.topGainers.QuoteDataBean[i].symbol);
+				cell.appendChild(text);
+			
+				cell = row.insertCell(1);
+				dojo.html.addClass(cell, "data-indent");
+  				text = document.createTextNode(this.addCommas("$" + data.getMarketSummaryReturn.topGainers.QuoteDataBean[i].price));
+				cell.appendChild(text);
+			
+				cell = row.insertCell(2);
+				dojo.html.addClass(cell, "data-indent");
+				
+				this.addValueWithArrow(cell, data.getMarketSummaryReturn.topGainers.QuoteDataBean[i].change, data.getMarketSummaryReturn.topGainers.QuoteDataBean[i].change);
+  			}
+			
+			// handle the top losers
+			
+			table = this.msLoserTable;
+  			// delete old rows
+  			while (table.rows.length > 2)
+  				table.deleteRow(table.rows.length - 1);
+			
+			for (i = 0; i < data.getMarketSummaryReturn.topLosers.QuoteDataBean.length; i++) {
+  				var row = table.insertRow(table.rows.length);
+  				if (table.rows.length % 2 == 0)
+  					dojo.html.addClass(row, "row-even");
+  				else 	
+					dojo.html.addClass(row, "row-odd");
+					
+				cell = row.insertCell(0);
+				dojo.html.addClass(cell, "data-indent");
+  				text = document.createTextNode(data.getMarketSummaryReturn.topLosers.QuoteDataBean[i].symbol);
+				cell.appendChild(text);
+				
+				cell = row.insertCell(1);
+				dojo.html.addClass(cell, "data-indent");
+  				text = document.createTextNode(this.addCommas("$" + data.getMarketSummaryReturn.topLosers.QuoteDataBean[i].price));
+				cell.appendChild(text);
+			
+				cell = row.insertCell(2);
+				dojo.html.addClass(cell, "data-indent");
+				
+				this.addValueWithArrow(cell, data.getMarketSummaryReturn.topLosers.QuoteDataBean[i].change, data.getMarketSummaryReturn.topLosers.QuoteDataBean[i].change);
+  			}
+  			
+  			this.previousMS = data.getMarketSummaryReturn;
+		}
+	}
+);

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/MarketSummary.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/MarketSummary.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/MarketSummary.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Messages.js
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Messages.js?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Messages.js (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Messages.js Thu Jan 18 11:55:51 2007
@@ -0,0 +1,68 @@
+dojo.provide("dojotrader.widget.Messages");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojotrader.widget.BaseDaytraderPane");
+
+dojo.widget.defineWidget(
+	"dojotrader.widget.Messages", 
+	[dojo.widget.HtmlWidget, dojotrader.widget.BaseDaytraderPane], {
+		templatePath: dojo.uri.dojoUri("/dojotrader/widget/templates/HtmlMessages.html"),
+		widgetType: "Messages",
+
+		label: "Messages",
+		historySize: 6,
+			
+		postCreate: function() {
+			dojotrader.widget.Messages.superclass.postCreate.call(this);		
+			
+			dojo.event.topic.subscribe("/messages", this, "handleExternalEvents");
+		},
+		
+		fillInTemplate: function(args, frag) {
+			this._doClearMsgButton = dojo.widget.createWidget("Button", {}, this.clearMsgButtonNode);
+			dojo.event.connect(this._doClearMsgButton, "onClick", this, "clearMessages");
+		},
+		
+		handleExternalEvents: function (args) {
+			if (args.event == "addMessage")
+				this.addMessage(args.message);
+			else if (args.event == "clearMessages")
+				this.clearMessages();
+		},
+		
+		addMessage: function(txtMessage) {		
+			// add the new content
+			var row = this.msgMessageTable.insertRow(1);
+			cell = row.insertCell(0);
+			cell.width = 100;
+			this.appendTextNode(cell, this.createShortTimeStampStr());
+			
+			cell = row.insertCell(1);
+			this.appendTextNode(cell, txtMessage);
+
+			// handle the table style and history
+			if (this.msgMessageTable.rows.length == 2) {
+				row.className = "row-even";
+			} else {
+				var prev = this.msgMessageTable.rows[2];
+				if (prev.className == "row-even")
+					row.className = "row-odd";
+				else
+					row.className = "row-even";
+			}
+
+			if (this.msgMessageTable.rows.length > this.historySize + 1) {
+				this.msgMessageTable.deleteRow(this.msgMessageTable.rows.length - 1);
+			}			
+		},
+
+		clearMessages: function() {
+			// this method is used to cleanup the messages pane when a user logs out
+			numMsg = this.msgMessageTable.rows.length - 1;
+			for (idx=0; idx < numMsg; idx++) {
+				this.msgMessageTable.deleteRow(1);
+			}
+		}
+	}
+);

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Messages.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Messages.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Messages.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Portfolio.js
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Portfolio.js?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Portfolio.js (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Portfolio.js Thu Jan 18 11:55:51 2007
@@ -0,0 +1,436 @@
+dojo.provide("dojotrader.widget.Portfolio");
+
+dojo.require("dojo.widget.*");
+//TODO - can this be removed
+dojo.require("dojo.widget.Tooltip");
+dojo.require("dojo.storage.*");
+dojo.require("dojo.collections.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojotrader.widget.DaytraderProgressBar");
+dojo.require("dojotrader.widget.BaseDaytraderPane");
+
+dojo.widget.defineWidget(
+	"dojotrader.widget.Portfolio", 
+	[dojo.widget.HtmlWidget, dojotrader.widget.BaseDaytraderPane], 
+	{
+		templatePath: dojo.uri.dojoUri("/dojotrader/widget/templates/HtmlPortfolio.html"),
+		widgetType: "Portfolio",
+
+		label: "Portfolio",
+		
+		// backing cache for quote/holding data
+		_holdingCache: null,
+		_numUpdates: 0,
+		_numSells: 0,
+		_quoteCache: null,
+		_toolTips: null,
+		
+		_updateType: "full",
+		
+		_refreshButton: null,
+		_changeRefreshComboBox: null,
+		_numQuotes: 0,
+		_timer: null,
+		_progressBar: null,
+		
+	
+		postCreate: function() {
+			dojotrader.widget.Portfolio.superclass.postCreate.call(this);
+			
+			dojo.event.topic.subscribe("/portfolio", this, "handleExternalEvents");
+			
+			this._holdingCache = new dojo.collections.Dictionary();
+			this._quoteCache = new dojo.collections.Dictionary();
+			this._toolTips = new dojo.collections.Dictionary();
+		},
+		
+		handleExternalEvents: function(args) {
+			if (args.event == "updateHoldings") {
+				this._updateType = "partial";
+				this.getHoldings();
+			} else if (args.event == "getHoldings") {
+				//alert("getHoldings");
+				this._updateType = "full";
+				this.resetCaches();
+				this.getHoldings();
+			}
+		},
+		
+		fillInTemplate: function(args, frag) {
+			this._refreshButton = dojo.widget.createWidget("Button", {caption: "Refresh Now"}, this.buttonNode);
+			dojo.event.connect(this._refreshButton, "onClick", this, "refreshQuotes");
+			
+			this._progressBar = dojo.widget.createWidget("dojotrader:DaytraderProgressBar", {cycle: true}, this.progressBar);
+			this._progressBar.onComplete = dojo.lang.hitch(this, this.refreshQuotes);
+		
+			if (this.debug) {
+				var ref = dojo.widget.createWidget("Button", {caption: "Get Holdings"}, this.holdingsButtonNode);
+				dojo.event.connect(ref, "onClick", this, "getHoldings");
+				this.pfDebug.style.display = "";
+			}
+			
+			ref = dojo.widget.createWidget("Button", {caption: "Sell Holdings"}, this.sellButtonNode);
+			dojo.event.connect(ref, "onClick", this, "sellSelectedHoldings");
+		},
+		
+		changeTimerSettings: function() {
+			var value = this.refreshSelectBox.value;
+			this._progressBar.stop();
+
+			if (value == "manual") {
+				this._progressBar.reset();	
+			} else {
+				this._progressBar.setPeriod(+(value) * 1000);
+				this._progressBar.start();
+			}
+		},
+		
+		// ------------------------------------------------
+		// Population (initial and adding) to holdings cache and table
+		// ------------------------------------------------
+		
+		getHoldings: function() {
+			var uid = dojo.storage.get("uid");
+			if (uid == null || uid == "") {
+				alert("Unable to find uid in storage, using uid:0");
+				uid = "uid:0";
+			}
+			
+			dojo.io.bind({
+   			 	method:  "GET",
+    			//url: "/proxy/SoapProxy/getHoldings?p1=" + uid + "&format=json",
+      			url: "/daytraderProxy/doProxy/getHoldings?p1=" + uid,
+      			mimetype: "text/json",
+    			load: dojo.lang.hitch(this,this.handleGetHoldings),
+    			error: dojo.lang.hitch(this,this.handleError),
+    			useCache: false,
+                preventCache: true
+  			});
+		},
+		
+		handleGetHoldings: function(type, data, evt) {
+			this.populateHoldingsCache(data);
+		},
+		
+		populateHoldingsCache: function(data) {
+			if (data.getHoldingsReturn.HoldingDataBean) {
+				for (idx=0; idx < data.getHoldingsReturn.HoldingDataBean.length; idx++) {
+					// add holding to the holding cache if it does not exist
+					var holding = data.getHoldingsReturn.HoldingDataBean[idx];
+					
+					if (!this._holdingCache.contains(holding.holdingID)) {
+						this._numUpdates++;
+						this._holdingCache.add(holding.holdingID, holding);
+						this.getQuote(holding.quoteID);
+					}					
+				}
+			}		
+		},
+		
+		getQuote: function (quoteID) {		
+			dojo.io.bind({
+    			method:  "GET",
+    			//url: "/proxy/SoapProxy/getQuote?p1=" + quote + "&format=json",
+       			url: "/daytraderProxy/doProxy/getQuote?p1=" + quoteID,
+       			mimetype: "text/json",
+    			load: dojo.lang.hitch(this, this.handleQuote),
+    			error: dojo.lang.hitch(this, this.handleError),
+    			useCache: false,
+                preventCache: true
+  			});
+		},
+		
+		handleQuote: function (type, data, event) {
+			// add quote to the cache (does it really matter if i protect the data??)
+			if (!this._quoteCache.contains(data.getQuoteReturn.symbol)) {
+				this._quoteCache.add(data.getQuoteReturn.symbol, data.getQuoteReturn);
+ 			}
+ 			this._numUpdates--;
+ 			
+ 			if (this._numUpdates == 0) {
+ 				// holding/quote retrieval has completed
+ 				// now go off and build the DOM
+ 					
+				if (this.pfHoldingsDisplay.style.display == "none") 
+					this.pfHoldingsDisplay.style.display = "";
+					
+				this.addToHoldingsTable();
+				this.replaceTextNode(this.msLastUpdated, this.createShortTimeStampStr());
+
+ 				//alert("Done: " + this._holdingCache.count + " - " + this._quoteCache.count);
+ 			}
+		},
+		
+		addToHoldingsTable: function() {
+			var list = this._holdingCache.getKeyList();
+			for (idx=0; idx < list.length; idx++) {
+				var holding = this._holdingCache.entry(list[idx]).value;
+			
+				// only add holding if it isn't in the table already
+				if (this.pfHoldingsTable.innerHTML.indexOf(holding.holdingID + "-row") < 0) {
+					//row = this.pfHoldingsTable.insertRow(this.pfHoldingsTable.rows.length);
+					row = this.pfHoldingsTable.insertRow(1); 				
+  					this.addHoldingToTable(holding, row);
+				}
+			}
+			
+			//this.redoTableColorScheme(this.pfHoldingsTable, 1, 1);
+			this.addHoldingStatsToTable();
+		},
+		
+		addHoldingStatsToTable: function() {
+			var stats = this.calculateHoldingStats();
+			
+			if (this._holdingCache.count + 2 == this.pfHoldingsTable.rows.length) {
+				// replace the stats with updated information
+				//alert("table already exists - updating stats");
+				
+				row = this.pfHoldingsTable.rows[this.pfHoldingsTable.rows.length - 1];
+  				this.replaceTextNode(row.cells[2], this.addCommas("$" + stats.purchase.toFixed(2)));
+				this.replaceTextNode(row.cells[3], this.addCommas("$" + stats.current.toFixed(2)));
+				if (row.cells[4].firstChild)
+					row.cells[4].removeChild(row.cells[4].firstChild);
+	  			this.addValueWithArrow(row.cells[4], stats.gain, this.addCommas("$" + stats.gain.toFixed(2)));
+			} else {
+				alert("i messed up!");
+			}	
+			
+			// finally update the account summary with the holdings value
+  			dojo.event.topic.publish("/accountSummary", {event: "updateHoldingsValue", value: stats.current});
+		},
+		
+		calculateGain: function(holding, quote){
+			purchase = +(holding.purchasePrice);
+			current = +(quote.price);
+			quantity = +(holding.quantity);
+			
+			return quantity * (current - purchase);
+		},
+		
+		calculateHoldingStats: function() {
+			var totalPurchase = 0;
+			var totalCurrent = 0;
+			var totalGain = 0;
+			
+			var list = this._holdingCache.getKeyList();
+			for (idx=0; idx < list.length; idx++) {
+				var holding = this._holdingCache.entry(list[idx]).value;
+				quote = this._quoteCache.entry(holding.quoteID).value;
+		
+				totalPurchase += +(holding.quantity) * +(holding.purchasePrice);
+  				totalCurrent += +(holding.quantity) * +(quote.price);
+  			}
+  			totalGain = totalCurrent - totalPurchase;
+		
+			return {purchase: totalPurchase, current: totalCurrent, gain: totalGain};
+		},
+		
+		addHoldingToTable: function(holding, row) {
+			row.id = holding.holdingID + "-row";
+			
+			if (this.pfHoldingsTable.rows.length % 2 == 0)
+				row.className = "row-even";
+			else
+				row.className = "row-odd";
+				
+			cell = row.insertCell(0);			
+			//TODO - Stan this is the attempt to add Tooltip
+			tooltipText = "HoldingID: " + holding.holdingID + " PurchaseDate: " + holding.purchaseDate;
+			cell.innerHTML = "<input type=\"checkbox\" name=\"holdings-chkbox\" id=\"" + holding.holdingID + "\" dojoType=\"Checkbox\" />" 
+									+ "<span></span>";
+			span = cell.childNodes[1];
+			tooltip = dojo.widget.createWidget("ToolTip", {id: "tip-"+holding.holdingID, connectId: holding.holdingID + "-row", toggle: "explode", caption: tooltipText}, span);
+			this._toolTips.add(holding.holdingID, tooltip);
+		
+			cell = row.insertCell(1);
+			this.appendTextNode(cell, holding.quoteID);
+				
+			cell = row.insertCell(2);
+			this.appendTextNode(cell, holding.quantity);
+	
+			cell = row.insertCell(3);
+			this.appendTextNode(cell, this.addCommas("$" + holding.purchasePrice));
+				
+			// handle the current quote price and calculate gain/loss
+			quote = this._quoteCache.entry(holding.quoteID).value;
+	
+			cell = row.insertCell(4);
+			this.appendTextNode(cell, this.addCommas("$" + quote.price));
+
+			cell = row.insertCell(5);
+	  		gain = this.calculateGain(holding, quote);
+	  		this.addValueWithArrow(cell, gain, this.addCommas("$" + gain.toFixed(2)));
+		},
+		
+ 		
+ 		// ------------------------------------------------
+		// Sell holdings
+		// ------------------------------------------------
+
+		sellSelectedHoldings: function() {
+			// figure out which holdings were selected
+			var checkboxes = document.getElementsByName("holdings-chkbox");
+			var uid = dojo.storage.get("uid");
+			if (uid == null || uid == "") {
+				alert("Unable to find uid in storage, using uid:0");
+				uid = "uid:0";
+			}
+	
+			for (idx=0; idx < checkboxes.length; idx++) {
+				if (checkboxes[idx].checked) {
+					// use numSells variable to "batch" requests 
+					this._numSells++;
+				
+					dojo.io.bind({
+    					method:  "GET",
+    					//url: "/proxy/SoapProxy/sell?p1=" + uid + "&p2=" + checkboxes[idx].id + "&p3=0&format=json",
+      					url: "/daytraderProxy/doProxy/sell?p1=" + uid + "&p2=" + checkboxes[idx].id + "&p3=0",
+      					mimetype: "text/json",
+    					load: dojo.lang.hitch(this, this.handleSellHolding),
+    					error: dojo.lang.hitch(this, this.handleError),
+    					useCache: false,
+                		preventCache: true,
+                		holdingid: checkboxes[idx].id
+  					});
+				}
+			}
+		},
+
+		handleSellHolding: function(type, data, event, xhr) {
+			var order = data.sellReturn;
+			var message = "Sell order completed (OrderId: " + order.orderID + " - $" + order.price + ")"
+			//alert("HoldingID: " + xhr.holdingid);
+	
+			//addMessage(message);
+			//displayStatusMessage(message);
+			dojo.event.topic.publish("/messages", {event: "addMessage", message: message});
+			
+			// remove holding from cache
+			this._holdingCache.remove(xhr.holdingid);
+			
+			// remove the tooltip
+			tooltip = this._toolTips.entry(xhr.holdingid).value;
+			tooltip.destroy();
+			
+			// remove row from table
+			rows = this.pfHoldingsTable.rows;
+			for (idx = 1; idx < rows.length - 1; idx++) {
+				row = rows[idx];
+				holdingID = row.id.substring(0,row.id.indexOf("-"));
+				if (holdingID == xhr.holdingid)
+					this.pfHoldingsTable.deleteRow(idx);
+			}
+			
+			this._numSells--;
+			
+			// don't refresh holdings table until all sells are completed
+			if (this._numSells == 0) {
+				//this.resetCaches();
+				//this.getHoldings();
+				this.addHoldingStatsToTable();
+				this.redoTableColorScheme(this.pfHoldingsTable, 1, 1);
+				this.replaceTextNode(this.msLastUpdated, this.createShortTimeStampStr());
+			}
+		},
+		
+		// ------------------------------------------------
+		// Update current quote prices
+		// ------------------------------------------------
+		
+		refreshQuotes: function () {
+			this._numQuotes = 0;
+			
+			keys = this._quoteCache.getKeyList();
+			//alert("Refresh Quotes: " + keys);
+			for (idx = 0; idx < keys.length; idx++) {
+				//alert(keys[idx]);
+				this.updateQuote(keys[idx]);
+			}
+			
+			this.replaceTextNode(this.msLastUpdated, this.createShortTimeStampStr());
+		},
+		
+		updateQuote: function (symbol) {	
+				dojo.io.bind({
+    				method:  "GET",
+    				//url: "/proxy/SoapProxy/getQuote?p1=" + symbol.value + "&format=json",
+       				url: "/daytraderProxy/doProxy/getQuote?p1=" + symbol,
+       				mimetype: "text/json",
+    				load: dojo.lang.hitch(this, this.handleUpdateQuote),
+    				error: dojo.lang.hitch(this, this.handleError),
+    				useCache: false,
+                	preventCache: true
+  				});
+		},
+		
+		handleUpdateQuote: function (type, data, evt) {	
+			//alert("handleQuoteUpate");			
+			newQuote = data.getQuoteReturn;
+			oldQuote = this._quoteCache.entry(newQuote.symbol).value;
+			
+			// replace quote in the quote cache
+			if (oldQuote.price != newQuote.price || oldQuote.change != newQuote.change) {
+				//alert("replaced item in cache");
+				this._quoteCache.add(newQuote.symbol, newQuote);
+				this.updateQuoteRow(newQuote);
+ 			}
+ 			
+ 			this._numQuotes++;
+ 			
+ 			if (this._quoteCache.count == this._numQuotes) {
+ 				//alert("Refresh Complete: " + this._quoteCache.count + " - " + this._numQuotes);
+ 				//this.addHoldingStatsToTable();
+ 			}
+ 		},
+ 		
+ 		updateQuoteRow: function (quote) {
+ 			//alert("updateQuoteRow");
+ 			rows = this.pfHoldingsTable.rows;
+		
+			for (idx=1; idx < rows.length; idx++) {
+				//alert(rows[idx].cells[1].innerHTML);
+				row = rows[idx];
+				if (row.cells[1].innerHTML == quote.symbol) {
+					dojo.lfx.html.highlight(row,"red",2000,5).play();	
+					this.replaceTextNode(row.cells[4], this.addCommas("$" + quote.price));
+					
+					holdingID = row.id.substring(0,row.id.indexOf("-"));
+					holding = this._holdingCache.entry(holdingID).value;
+					gain = this.calculateGain(holding, quote);
+					row.cells[5].removeChild(row.cells[5].firstChild);
+	  				this.addValueWithArrow(row.cells[5], gain, this.addCommas("$" + gain.toFixed(2)));				
+				}
+			}
+			this.addHoldingStatsToTable();
+ 		},
+		
+		resetCaches: function () {
+			//alert("resetCaches");
+			this._holdingCache.clear();
+			//this._quoteCache.clear();
+			//this._numUpdates = 0;
+			
+			var list = this._toolTips.getKeyList();
+			for (idx=0; idx < list.length; idx++) {
+				tooltip = this._toolTips.entry(list[idx]).value;
+				tooltip.destroy();
+			}
+			this._toolTips.clear();
+			
+			var count = this.pfHoldingsTable.rows.length - 1;
+			for (idx=1; idx < count; idx++) {
+				this.pfHoldingsTable.deleteRow(1);
+			}
+			
+			this.addHoldingStatsToTable();
+			this.resetHoldingsPane();
+		},
+
+		resetHoldingsPane: function () {
+			// this method is used to cleanup the holdings pane when a user logs out
+			var display = this.pfHoldingsDisplay;
+			if (display.style.display == "")
+				display.style.display = "none";
+		}
+	}
+);

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Portfolio.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Portfolio.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/Portfolio.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/QuickQuote.js
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/QuickQuote.js?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/QuickQuote.js (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/QuickQuote.js Thu Jan 18 11:55:51 2007
@@ -0,0 +1,87 @@
+dojo.provide("dojotrader.widget.QuickQuote");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.ValidationTextbox");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojotrader.widget.BaseDaytraderPane");
+
+
+dojo.widget.defineWidget(
+	"dojotrader.widget.QuickQuote",
+	[dojo.widget.HtmlWidget, dojotrader.widget.BaseDaytraderPane], {
+		templatePath: dojo.uri.dojoUri("/dojotrader/widget/templates/HtmlQuickQuote.html"),
+		widgetType: "QuickQuote",
+
+		label: "Quick Quote",
+		historySize: 6,
+		
+		_symbolTextBox: null,
+		
+		fillInTemplate: function(args, frag) {
+			var ref = dojo.widget.createWidget("Button", {caption: "Get Quote"}, this.buttonNode);
+			dojo.event.connect(ref, "onClick", this, "getQuickQuote");
+			
+			this._symbolTextBox = dojo.widget.createWidget("ValidationTextBox", {type: "text", validation: "false", size: "5"}, this.textBoxNode);
+		},
+		
+		postCreate: function(){
+			dojotrader.widget.QuickQuote.superclass.postCreate.call(this);
+		},
+		
+		getQuickQuote: function() {
+			var symbol = this._symbolTextBox.getValue(); 
+	
+			// determine if the symbol is already in the list
+			var table = this.qqQuotesTable;
+			var inTable = table.innerHTML.indexOf(">" + symbol + "<"); 
+	
+			if (symbol != "" && inTable == -1) {		
+				dojo.io.bind({
+    				method:  "GET",
+    				//url: "/proxy/SoapProxy/getQuote?p1=" + symbol.value + "&format=json",
+       				url: "/daytraderProxy/doProxy/getQuote?p1=" + symbol,
+       				mimetype: "text/json",
+    				load: dojo.lang.hitch(this,this.handleQuickQuote),
+    				error: dojo.lang.hitch(this,this.handleError),
+    				useCache: false,
+                	preventCache: true
+  				});
+			}
+  		},
+	
+		handleQuickQuote: function(type, data, evt) {		
+			// unhide the table
+			if (this.qqQuotesDisplay.style.display == "none")
+				this.qqQuotesDisplay.style.display = "";
+	
+			// add the information to the table
+			var row = this.qqQuotesTable.insertRow(1);
+			cell = row.insertCell(0);
+			this.appendTextNode(cell, data.getQuoteReturn.symbol);
+
+			cell = row.insertCell(1);
+			this.appendTextNode(cell, "$" + data.getQuoteReturn.price);
+			
+			cell = row.insertCell(2);
+			this.appendTextNode(cell, data.getQuoteReturn.change);
+			
+			cell = row.insertCell(3);
+			this.appendTextNode(cell, data.getQuoteReturn.volume);
+	
+			// handle the table style and history
+			if (this.qqQuotesTable.rows.length == 2) {
+				row.className = "row-even";
+			} else {
+				var prev = this.qqQuotesTable.rows[2];
+				if (prev.className == "row-even")
+					row.className = "row-odd";
+				else
+					row.className = "row-even";
+			}
+
+			if (this.qqQuotesTable.rows.length > this.historySize + 1) {
+				this.qqQuotesTable.deleteRow(this.qqQuotesTable.rows.length - 1);
+			}
+		}
+	}
+);

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/QuickQuote.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/QuickQuote.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/QuickQuote.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/maximize-full.gif
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/maximize-full.gif?view=auto&rev=497551
==============================================================================
Binary file - no diff available.

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/maximize-full.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/maximize.gif
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/maximize.gif?view=auto&rev=497551
==============================================================================
Binary file - no diff available.

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/maximize.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/minimize.gif
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/minimize.gif?view=auto&rev=497551
==============================================================================
Binary file - no diff available.

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/minimize.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/minimize_white.gif
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/minimize_white.gif?view=auto&rev=497551
==============================================================================
Binary file - no diff available.

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/images/minimize_white.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlAccountSummary.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlAccountSummary.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlAccountSummary.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlAccountSummary.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,48 @@
+<div dojoAttachPoint="accountSummaryNode" class="daytrader-pane">
+	<div dojoAttachPoint="labelNode" class="daytrader-pane-header">
+		<table align="center" width="98%">
+			<tr>
+				<td class="title">${this.label}</td>
+				<td align="right">
+					<div dojoAttachPoint="paneControl" dojoAttachEvent="onclick: onLabelClick" class="daytrader-minimize-image"></div>
+				</td>
+			</tr>
+		</table>
+	</div>
+	<div dojoAttachPoint="containerNode" class="daytrader-pane-content">
+		<div style="height: 4px"></div>
+		<table align="center" width="96%">
+			<tr>
+				<th align="right" width="50%"><span>Open Balance: </span></th>
+				<td dojoAttachPoint="openBalance" align="left"  width="50%"></td>
+			</tr>
+			<tr>
+				<th align="right"><span>Cash Balance: </span></th>
+				<td dojoAttachPoint="balance" align="left"></td>
+			</tr>
+			<tr>
+				<th align="right"><span>Holdings Value: </span></th>
+				<td dojoAttachPoint="holdingsValue" align="left"></td>
+			</tr>
+			<tr>
+				<th align="right"><span>Sum Total: </span></th>
+				<td dojoAttachPoint="total" align="left"></td>
+			</tr>
+			<tr>
+				<th align="right"><span>Precent Change: </span></th>
+				<td dojoAttachPoint="change" align="left"></td>
+			</tr>
+				
+		</table>
+		
+		<!-- This table holds debug buttons -->
+		<table dojoAttachPoint="asDebug" align="center" width="96%"style="display: none">
+			<tr>
+				<td align="right"><div dojoAttachPoint="buttonNode"></div></td>
+				<td align="left"></td>
+			</tr>
+		</table>
+		
+		<div style="height: 4px"></div>
+	</div>
+</div>

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlAccountSummary.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlAccountSummary.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlAccountSummary.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBase.css
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBase.css?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBase.css (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBase.css Thu Jan 18 11:55:51 2007
@@ -0,0 +1,110 @@
+@CHARSET "ISO-8859-1";
+
+/*--------------------------------------------------
+	Generic Daytrader pane rules
+--------------------------------------------------*/
+
+.daytrader-pane {
+	color:#000; 
+	font-family:verdana,arial,helvetica,sans-serif;
+	font-size: 11px;
+}
+
+.daytrader-pane-header {
+	background: #808080;
+	border-top: 1px solid black;
+	border-bottom: 1px solid black;
+}
+
+.daytrader-pane-header .title {
+	color: white; 
+	font-weight: bold; 
+	font-size: 1.4em;
+}
+
+.daytrader-pane-content {
+	background: #eeeeee;
+}
+
+.daytrader-maximize-image {
+	border: 1px solid #000; 
+	background : url(images/maximize-full.gif) no-repeat; 
+	width: 17px;
+	height: 17px;
+}
+
+.daytrader-minimize-image {
+	border: 1px solid #000;
+	background : url(images/minimize.gif) no-repeat;
+	width: 17px;
+	height: 17px;
+}
+
+/*--------------------------------------------------	
+	Generic Daytrader table rules
+--------------------------------------------------*/
+
+.dt-table table {
+	border: 0;
+}
+
+.dt-table th {
+	padding: 2px; 
+	background: #808080;
+	color: #fff;		
+}
+
+.dt-table td {
+	padding: 2px;
+}
+
+.dt-table-no-padding td, th {
+	padding: 0px;	
+}
+
+.dt-table .secondary-header {
+	font-weight: bold;
+	background: #69c;
+}
+
+.dt-table .data-indent {
+	padding: 0px 0px 0px 8px;
+}
+
+.dt-table .row-odd {
+	background: #fff;
+}
+
+.dt-table .row-even {
+	background: #ddd;
+}
+
+/*--------------------------------------------------	
+	General Daytrader image classes
+--------------------------------------------------*/
+
+.arrowdown {
+	background: url(images/arrowdown.gif) no-repeat;
+	width: 10px;
+	height: 10px;
+}
+
+.arrowup {
+	background: url(images/arrowup.gif) no-repeat;
+	width: 10px;
+	height: 10px;
+}
+
+/*--------------------------------------------------	
+	Some additions for the login pane
+--------------------------------------------------*/
+
+.login-pane {
+	background-color: #aaaaaa;
+	color: white;
+	font-weight: bold;
+}
+
+.error {
+	color: red;
+}
\ No newline at end of file

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBase.css
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBase.css
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBase.css
------------------------------------------------------------------------------
    svn:mime-type = text/css

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBaseTemplate.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBaseTemplate.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBaseTemplate.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBaseTemplate.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,17 @@
+<div dojoAttachPoint="quickQuoteNode" class="daytrader-pane">
+	<div dojoAttachPoint="labelNode" class="daytrader-pane-header">
+		<table align="center" width="98%">
+			<tr>
+				<td class="title">${this.label}</td>
+				<td align="right">
+					<div dojoAttachPoint="paneControl" dojoAttachEvent="onclick: onLabelClick" class="daytrader-minimize-image"></div>
+				</td>
+			</tr>
+		</table>
+	</div>
+	<div dojoAttachPoint="containerNode" class="daytrader-pane-content">
+		<div style="height: 4px"></div>
+		
+		Some content will go here...
+	</div>
+</div>

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBaseTemplate.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBaseTemplate.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBaseTemplate.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBuyQuote.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBuyQuote.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBuyQuote.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBuyQuote.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,72 @@
+<div dojoAttachPoint="buyQuoteNode" class="daytrader-pane">
+	<div dojoAttachPoint="labelNode" class="daytrader-pane-header">
+		<table align="center" width="98%">
+			<tr>
+				<td class="title">${this.label}</td>
+				<td align="right">
+					<div dojoAttachPoint="paneControl" dojoAttachEvent="onclick: onLabelClick" class="daytrader-minimize-image"></div>
+				</td>
+			</tr>
+		</table>
+	</div>
+	<div dojoAttachPoint="containerNode" class="daytrader-pane-content">
+		<div style="height: 4px"></div>
+		
+		<!-- Refresh information -->
+		<table align="center" width="96%">
+			<tr>
+				<td><div dojoAttachPoint="buttonNode"></div></td>
+				<td align="right">
+					Last Updated:
+					<span dojoAttachPoint="msLastUpdated" ></span>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<select dojoOnChange="changeTimerSettings;"
+						dojoAttachPoint="refreshSelectBox" unselectable="on">
+						<option value="manual" selected="selected">manual</option>
+						<option value="5">5 sec</option>
+						<option value="10">10 sec</option>
+						<option value="30">30 sec</option>
+						<option value="60">60 sec</option> 
+					</select>
+				</td>
+				<td align="right">
+					<div dojoAttachPoint="progressBar"></div>
+				</td>
+			</tr>
+		</table>
+		
+		<hr width="96%">
+	
+	
+		<!-- <div style="height: 4px"></div> -->
+		<table align="center" width="96%">
+			<tr>
+				<td align="right"><div dojoAttachPoint="textBoxNode"></div></td>
+				<td align="left"><div dojoAttachPoint="quoteButtonNode"></div></td>
+			</tr>
+		</table>
+		
+		
+		<!-- <div style="height: 4px"></div>  -->	
+		<div dojoAttachPoint="bqQuotesDisplay" style="display: none">
+			<hr width="96%">
+			<div dojoAttachPoint="bqMessage" style="color: red">
+			</div>
+			<table dojoAttachPoint="bqQuoteTable" align="center" width="96%" class="dt-table">
+				<tr>
+					<th><div dojoAttachPoint="buyButtonNode"></div></th>
+					<th>Symbol</th>
+					<th>Price</th>
+					<th>Change</th>
+					<th>Volume</th>
+				</tr>
+			</table>
+		</div>
+		<div style="height: 4px"></div>
+	</div>
+</div>
+
+

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBuyQuote.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBuyQuote.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlBuyQuote.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlLoginLogout.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlLoginLogout.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlLoginLogout.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlLoginLogout.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,81 @@
+<div dojoAttachPoint="loginLogoutNode" class="daytrader-pane login-pane">
+	<div dojoAttachPoint="loginNode" align="right">
+		<table>
+			<tbody>
+				<tr>
+					<td>UserId:</td>
+					<td>
+						<div dojoAttachPoint="loginUseridTextBoxNode"></div>
+					</td>
+					<td>Password:</td>
+					<td>
+						<div dojoAttachPoint="loginPasswordTextBoxNode"></div>
+					</td>
+					<td>
+						<div dojoAttachPoint="loginButtonNode"></div>
+					</td>
+					<td>OR</td>
+					<td>
+						<div dojoAttachPoint="showRegisterButtonNode"></div>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+	<div dojoAttachPoint="logoutNode" style="display: none;" align="right">
+		<table>
+			<tbody>
+				<tr>
+					<td>
+						<div dojoAttachPoint="logoutButtonNode">Log Out</div>
+					</td>	
+				</tr>
+			</tbody>
+		</table>
+	</div>
+	<div dojoAttachPoint="registerNode" style="background-color: #aaaaaa;" class="daytrader-pane login-pane">
+		<table>
+			<tbody>
+					<tr>
+						<td colspan="2" class="error" dojoAttachPoint="registerMessageNode"></td>
+					</tr>
+					<tr>
+						<td align="right">User ID:</td>
+						<td align="left"><div dojoAttachPoint="registerUseridTextBoxNode"></div></td>
+					</tr>
+					<tr>
+						<td align="right">Password:</td>
+						<td align="left"><div dojoAttachPoint="registerPasswordTextBoxNode"></div></td>
+					</tr>
+					<tr>
+						<td align="right">Confirm Password:</td>
+						<td align="left"><div dojoAttachPoint="registerConfirmTextBoxNode"></div></td>
+					</tr>
+					<tr>
+						<td align="right">Full Name:</td>
+						<td align="left"><div dojoAttachPoint="registerFullnameTextBoxNode"></div></td>
+					</tr>
+					<tr>
+						<td align="right">Postal Address:</td>
+						<td align="left"><div dojoAttachPoint="registerAddressTextBoxNode"></div></td>
+					</tr>
+					<tr>
+						<td align="right">Email Address:</td>
+						<td align="left"><div dojoAttachPoint="registerEmailTextBoxNode"></div></td>
+					</tr>
+					<tr>
+						<td align="right">Credit Card: </td>
+						<td align="left"><div dojoAttachPoint="registerCreditcardTextBoxNode"></div></td>
+					</tr>	
+					<tr>
+						<td align="right">Starting Balance:</td>
+						<td align="left"><div dojoAttachPoint="registerBalanceTextBoxNode"></div></td>
+					</tr>
+					<tr>
+						<td align="right"><div dojoAttachPoint="registerButtonNode">Register</div></td>
+						<td align="left"><div dojoAttachPoint="cancelRegisterButtonNode">Cancel</div></td>
+					</tr>
+				</tbody>	
+		</table>
+	</div>
+</div>

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlLoginLogout.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlLoginLogout.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlLoginLogout.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMarketSummary.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMarketSummary.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMarketSummary.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMarketSummary.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,93 @@
+<div dojoAttachPoint="marketSummaryNode" class="daytrader-pane">
+	<div dojoAttachPoint="labelNode" class="daytrader-pane-header">
+		<table align="center" width="98%">
+			<tr>
+				<td class="title">${this.label}</td>
+				<td align="right">
+					<div dojoAttachPoint="paneControl" dojoAttachEvent="onclick: onLabelClick" class="daytrader-minimize-image"></div>
+				</td>
+			</tr>
+		</table>
+	</div>
+	<div dojoAttachPoint="containerNode" class="daytrader-pane-content">
+		<div style="height: 4px"></div>
+		
+		<!-- Refresh information -->
+		<table align="center" width="96%">
+			<tr>
+				<td><div dojoAttachPoint="buttonNode"></div></td>
+				<td align="right">
+					Last Updated:
+					<span dojoAttachPoint="msLastUpdated" ></span>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<select dojoOnChange="changeTimerSettings;"
+						dojoAttachPoint="refreshSelectBox" unselectable="on">
+						<option value="manual" selected="selected">manual</option>
+						<option value="5">5 sec</option>
+						<option value="10">10 sec</option>
+						<option value="30">30 sec</option>
+						<option value="60">60 sec</option> 
+					</select>
+				</td>
+				<td align="right">
+					<div dojoAttachPoint="progressBar"></div>
+				</td>
+			</tr>
+		</table>
+		
+		<hr width="96%">
+		<!-- <div style="height: 4px"></div> -->
+		
+		<!-- Summary information -->
+		<table align="center" width="96%" dojoAttachPoint="msSummaryTable" class="dt-table">
+			<tr>
+				<th width="80px">TSIA</th><td class="data-indent" dojoAttachPoint="msTSIA"></td>
+			</tr>
+			<tr>
+				<th>% Change</th><td class="data-indent" dojoAttachPoint="msChange"></td>
+			</tr>
+			<tr>
+				<th>Volume</th><td class="data-indent" dojoAttachPoint="msVolume"></td>
+			</tr>
+		</table>
+		<div style="height: 4px"></div>
+		
+		
+		<table align="center" width="96%" dojoAttachPoint="msHistory" class="dt-table">
+			<tr class="secondary-header">
+				<td dojoAttachEvent="onClick:toggleChart">TSIA History</td>
+			</tr>
+			<tr>
+				<td align="center">
+					<div dojoAttachPoint="chart" align="center" style="border: 1px solid black;  background-color: rgb(237, 237, 222)">
+					</div>	
+				</td>
+			</tr>
+		</table>
+		<div style="height: 4px"></div>
+			
+		<!-- Top Gainers/Losers information -->
+		<table align="center" width="96%" dojoAttachPoint="msGainerTable" class="dt-table">
+			<tr>
+				<th colspan="3">Gainers</th>
+			</tr>
+			<tr class="secondary-header">
+				<td>Symbol</td><td>Price</td><td>Change</td>
+			</tr>
+		</table>
+		<!-- <div style="height: 4px"></div> -->
+			
+		<table align="center" width="96%" dojoAttachPoint="msLoserTable" class="dt-table">
+			<tr>
+				<th colspan="3">Losers</th>
+			</tr>
+			<tr class="secondary-header">
+				<td>Symbol</td><td>Price</td><td>Change</td>
+			</tr>
+		</table>
+		<div style="height: 4px"></div>	
+	</div>
+</div>
\ No newline at end of file

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMarketSummary.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMarketSummary.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMarketSummary.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMessages.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMessages.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMessages.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMessages.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,29 @@
+<div dojoAttachPoint="messagesNode" class="daytrader-pane">
+	<div dojoAttachPoint="labelNode" class="daytrader-pane-header">
+		<table align="center" width="98%">
+			<tr>
+				<td class="title">${this.label}</td>
+				<td align="right">
+					<div dojoAttachPoint="paneControl" dojoAttachEvent="onclick: onLabelClick" class="daytrader-minimize-image"></div>
+				</td>
+			</tr>
+		</table>
+	</div>
+	<div dojoAttachPoint="containerNode" class="daytrader-pane-content">
+		<div style="height: 4px"></div>
+		<table align="center" width="96%">
+			<tr>
+				<td align="center"><div dojoAttachPoint="clearMsgButtonNode">Clear Messages</div></td>
+			</tr>
+		</table>
+				
+		<!-- <div style="height: 4px"></div> -->
+		<table align="center" width="96%" id="msgMessageTable" class="dt-table">
+			<tr>
+				<th width="100px">TimeStamp</th>
+				<th>Message</th>
+			</tr>
+		</table>
+		<div style="height: 4px"></div>
+	</div>
+</div>

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMessages.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMessages.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlMessages.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlPortfolio.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlPortfolio.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlPortfolio.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlPortfolio.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,74 @@
+<div dojoAttachPoint="portfolioNode" class="daytrader-pane">
+	<div dojoAttachPoint="labelNode" class="daytrader-pane-header">
+		<table align="center" width="98%">
+			<tr>
+				<td class="title">${this.label}</td>
+				<td align="right">
+					<div dojoAttachPoint="paneControl" dojoAttachEvent="onclick: onLabelClick" class="daytrader-minimize-image"></div>
+				</td>
+			</tr>
+		</table>
+	</div>
+	<div dojoAttachPoint="containerNode" class="daytrader-pane-content">
+		<div style="height: 4px"></div>
+		
+		<!-- Refresh information -->
+		<table align="center" width="96%">
+			<tr>
+				<td><div dojoAttachPoint="buttonNode"></div></td>
+				<td align="right">
+					Last Updated:
+					<span dojoAttachPoint="msLastUpdated" ></span>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<select dojoOnChange="changeTimerSettings;"
+						dojoAttachPoint="refreshSelectBox" unselectable="on">
+						<option value="manual" selected="selected">manual</option>
+						<option value="5">5 sec</option>
+						<option value="10">10 sec</option>
+						<option value="30">30 sec</option>
+						<option value="60">60 sec</option> 
+					</select>
+				</td>
+				<td align="right">
+					<div dojoAttachPoint="progressBar"></div>
+				</td>
+			</tr>
+		</table>
+		
+		<hr width="96%">
+		
+		<!-- This table holds debug buttons -->
+		<table dojoAttachPoint="pfDebug" align="center" width="96%" style="display: none">
+			<tr>
+				<td align="left"><div dojoAttachPoint="holdingsButtonNode"></div></td>
+			</tr>
+		</table>
+			
+		<!-- <div style="height: 4px"></div> -->
+		<div dojoAttachPoint="pfHoldingsDisplay" style="display: none">
+			<div dojoAttachPoint="pfHoldingsMessage" style="color: red">
+			</div>
+			<table dojoAttachPoint="pfHoldingsTable" class="dt-table" align="center" width="96%">
+				<tr>
+					<th>Sell</th>
+					<th>Stock Symbol</th>
+					<th>Quantity</th>
+					<th>Purchase Price</th>
+					<th>Current Price</th>
+					<th>Gain / Loss</th>
+				</tr>
+				<tr>
+					<td colspan="2"><div dojoAttachPoint="sellButtonNode"></div></td>
+					<td class="secondary-header">Total: </td>
+					<td class="secondary-header"></td>
+					<td class="secondary-header"></td>
+					<td class="secondary-header"></td>
+				</tr>
+			</table>
+		</div>
+		<div style="height: 4px"></div>
+	</div>
+</div>

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlPortfolio.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlPortfolio.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlPortfolio.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.css
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.css?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.css (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.css Thu Jan 18 11:55:51 2007
@@ -0,0 +1,21 @@
+@CHARSET "ISO-8859-1";
+
+.progress-bar { 
+	font-family:verdana,arial,helvetica,sans-serif;
+	font-size: 12px;
+}
+
+.progress-bar td {
+	padding: 0px;	
+}
+
+.progress-bar .tickbox {
+	width: 6px;
+	height: 6px;
+}
+
+.progress-bar .update-text {
+	font-size: 0.8em; 
+	text-decoration: blink; 
+	visibility: hidden
+}
\ No newline at end of file

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.css
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.css
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.css
------------------------------------------------------------------------------
    svn:mime-type = text/css

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,25 @@
+<div dojoAttachPoint="progressBarNode" class="progress-bar">
+<table>
+	<tr>
+		<td>
+			<table>
+				<tr>
+					<td dojoAttachPoint="progressBarUpdate" class="update-text">Updating...</td>
+				</tr>
+			</table>
+		</td>
+		<td>
+			<table>
+				<tr dojoAttachPoint="progressBarRow">
+					<td><div class="tickbox"></div></td>
+					<td><div class="tickbox"></div></td>
+					<td><div class="tickbox"></div></td>
+					<td><div class="tickbox"></div></td>
+					<td><div class="tickbox"></div></td>
+					<td><div class="tickbox"></div></td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+</table>
+</div>
\ No newline at end of file

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlProgressBar.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlQuickQuote.html
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlQuickQuote.html?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlQuickQuote.html (added)
+++ geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlQuickQuote.html Thu Jan 18 11:55:51 2007
@@ -0,0 +1,34 @@
+<div dojoAttachPoint="quickQuoteNode" class="daytrader-pane">
+	<div dojoAttachPoint="labelNode" class="daytrader-pane-header">
+		<table align="center" width="98%">
+			<tr>
+				<td class="title">${this.label}</td>
+				<td align="right">
+					<div dojoAttachPoint="paneControl" dojoAttachEvent="onclick: onLabelClick" class="daytrader-minimize-image"></div>
+				</td>
+			</tr>
+		</table>
+	</div>
+	<div dojoAttachPoint="containerNode" class="daytrader-pane-content">
+		<div style="height: 4px"></div>
+		<table align="center" width="96%">
+			<tr>
+				<td align="right"><div dojoAttachPoint="textBoxNode"></div></td>
+				<td align="left"><div dojoAttachPoint="buttonNode"></div></td>
+			</tr>
+		</table>
+		
+		<div dojoAttachPoint="qqQuotesDisplay" style="display: none">
+			<hr width="96%">
+			<table align="center" width="96%" dojoAttachPoint="qqQuotesTable" class="dt-table">
+				<tr>
+					<th>Symbol</th>
+					<th>Price</th>
+					<th>Change</th>
+					<th>Volume</th>
+				</tr>
+			</table>
+		</div>
+		<div style="height: 4px"></div>
+	</div>
+</div>

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlQuickQuote.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlQuickQuote.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/dojo-ui-web/src/main/webapp/widget/templates/HtmlQuickQuote.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java?view=diff&rev=497551&r1=497550&r2=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java (original)
+++ geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java Thu Jan 18 11:55:51 2007
@@ -1498,7 +1498,7 @@
 		stmt.setDouble(3, newVolume);				
 		stmt.setString(4, symbol);
 
-		int count = stmt.executeUpdate();
+		stmt.executeUpdate();
 		stmt.close();	
 	}
 	private void publishQuotePriceChange(QuoteDataBean quoteData, BigDecimal oldPrice, BigDecimal changeFactor, double sharesTraded)

Added: geronimo/daytrader/branches/1.2/modules/json-proxy/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/json-proxy/pom.xml?view=auto&rev=497551
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/json-proxy/pom.xml (added)
+++ geronimo/daytrader/branches/1.2/modules/json-proxy/pom.xml Thu Jan 18 11:55:51 2007
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.geronimo.daytrader</groupId>
+        <artifactId>daytrader</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>json-proxy</artifactId>
+    <name>DayTrader :: JSON Proxy</name>
+    <packaging>war</packaging>
+    <description>DayTrader JSON Proxy</description>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/daytrader/trunk/modules/web</connection>
+        <developerConnection>
+            scm:svn:http://svn.apache.org/repos/asf/geronimo/daytrader/trunk/modules/web</developerConnection>
+        <url>http://svn.apache.org/viewcvs.cgi/geronimo/daytrader/trunk/modules/web</url>
+    </scm>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jaxrpc_1.1_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.4_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jsp_2.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>taglibs</groupId>
+            <artifactId>standard</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <filters>
+                        <filter>
+                            ${basedir}/src/main/webapp/WEB-INF/classes/build.properties
+                        </filter>
+                    </filters>
+                    <archive>
+                        <manifestEntries>
+                            <Class-Path/>
+                        </manifestEntries>
+                    </archive>
+
+                    <resources>
+                        <resource
+                                implementation="org.apache.maven.model.Resource">
+                            <filtering>true</filtering>
+                            <directory>
+                                ${basedir}/src/main/webapp/WEB-INF
+                            </directory>
+                            <includes>
+                                <include>web.xml</include>
+                            </includes>
+                        </resource>
+                    </resources>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: geronimo/daytrader/branches/1.2/modules/json-proxy/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/branches/1.2/modules/json-proxy/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/branches/1.2/modules/json-proxy/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml