i am new with GWT. i successfully try compile and upload stockwatcher
application to the google app engine. i alsoa can save and query all
data save in the data store. recently i add 1 more field at stock app
engine data store. i add symbol2. user can save 2 symbol. the problem
is. i dont know how can i extract symbol2 field. Tutorial provided by
google only show extract 1 field only. how can i extract/query more
than 1 field. please help.
Attached code from stockwatcher at server side (StockServiceImpl): -
public String[] getStocks() throws NotLoggedInException {
checkLoggedIn();
PersistenceManager pm = getPersistenceManager();
List<String> symbols = new ArrayList<String>();
try {
Query q = pm.newQuery(Stock.class, "user == u");
q.declareParameters("com.google.appengine.api.users.User u");
q.setOrdering("createDate");
List<Stock> stocks = (List<Stock>) q.execute(getUser());
for (Stock stock : stocks) {
symbols.add(stock.getSymbol());
}
} finally {
pm.close();
}
return (String[]) symbols.toArray(new String[0]);
}
its clearly the code only extract 1 field. how to extract another
field.. Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---