Menu

#168 User friendly way to add new stock

open
yccheok
gui (45)
9
2010-12-31
2010-12-31
yccheok
No

Recently, we received complaint from a user.

"
my stock symbols aren't in jstock's "stock database" - they have to be added manually before entering a transaction. otherwise, when you press enter (as described above), absolutely nothing happens!
"

It seems that, we should combine the functionality of AjaxAutoCompleteJComboBox and AutoCompleteJComboBox. This means,

1) The combo box will always search from offline database, whenever user key in a symbol/code.
2) When the key in symbol/code is not found from the offline database, we will start to issue an AJAX request to Yahoo server.
3) When user selects the stock from AJAX result, it will be added into offline database automatically.

http://jstock.hg.sourceforge.net/hgweb/jstock/jstock/annotate/ca39196d4b55/src/org/yccheok/jstock/gui/AjaxAutoCompleteJComboBox.java
http://jstock.hg.sourceforge.net/hgweb/jstock/jstock/annotate/ca39196d4b55/src/org/yccheok/jstock/gui/AutoCompleteJComboBox.java

Discussion