Viewing/exporting data from Zocalo Database
Status: Beta
Brought to you by:
hibbert
Have set up and tried Zocalo PM successfully using localhost. I would now like to start using it on a website for several users and have the ability to produce some "league tables" of current user's cash amount/holdings etc, to post on a separate webpage. Could you point me in the right direction, taking into account I am a complete novice in the use of any sql database!
Kind Regards
Mark
PS Thanks for all the good work you so obviously put into the Zocalo project.
account.jsp calls AccountDisplay.descriptionHtml(), which uses user.displayAccounts() to display the holdings as you see on the account page. (So you don't have to figure out the sql to do that, you just have to gather the accounts and ask them to each provide info about their holdings.) Just above the call on displayAccounts, is a call to user.cashOnHand(), which provides the current account balance, so that's straightforward, too.
The way I would go about building a new page is to copy one of the existing pages. History is probably the simplest. You need copies of history.jsp and TradeHistory.java. Then if you look for references to those pages throughout the code, you'll find the places where such pages have to be registered in order to be accessible as webpages and to show up in the nav-buttons. In order to build a publicly accessible page, you probably want to put a button on the login page, as well as adding it to the nav-buttons so other players can access it.
This sounds like an interesting and useful addition. Please let me know if you run into obstacles, or if you want more detailed suggestions. If you don't have the appropriate tools to build it yourself, let me know and I may work on it myself. It might only take a couple of days to do this. (I'd also want to add controls so people could choose to configure this in or out, and it might also spur me to add account configurations so individual users can control various aspects of their individual configuration.)
Thanks for that. Any help you can give would be appreciated as I have no skills in your field! Am a capable user but thats about it!
Did you manage to implement this? I haven't been able to find the history.jsp to create a new webpage. I am kind of new on JSP, but I know more than the basics on Java classical applications. It would be extremely useful to have this "league table" as you mentioned, as also I want to reward my students for their portfolio and not cash-holdings, otherwise some might play Nash not trading at all, or betting too much in only one asset.