I've found several problems with the tutorial at
http://code.google.com/webtoolkit/tutorials/1.6/appengine.html
I have posted solutions for them at
http://code.google.com/p/google-web-toolkit/issues/detail?id=3626
and my blog at
http://itstuff.jasonsmart.id.au/2009/05/gwt-plus-appengine-tutorial.html
to summarise here...
Define this instance variable in StockWatcher.java
private StockServiceAsync stockService;
In StockWatcher addStock(String) method change the following line
stockService.addStock(symbol, new AsyncCallback() {
to
stockService.addStock(symbol, new AsyncCallback <Void> () {
In src/META-INF/jdoconfig.xml in the Eclipse project downloaded from
http://code.google.com/webtoolkit/tutorials/1.6/projects/GettingStartedAppEngine.zip
you need to change
transactionals-optional
to
transactions-optional
In the section describing datastore-indexes.xml there is no mention of
the autogenerate
property. I had to add autogenerate = true (or you could put false) in
the following line to
prevent errors.
{{{<datastore-indexes
xmlns="http://appengine.google.com/ns/datastore-indexes/1.0"
autoGenerate="true">}}}
On Apr 16, 1:34 pm, Kevin <[email protected]> wrote:
> Had to make two changes to get it to work:
>
> StockServiceAsync ss = GWT.create(StockService.class);
> ss.addStock(symbol, new AsyncCallback() {
>
> Works fine now.
>
> On Apr 15, 8:23 pm, Kevin <[email protected]> wrote:
>
> > Same here...
>
> > On Apr 13, 9:44 am, "@lex" <[email protected]> wrote:
>
> > > Hi, I would like some help to resolve this problem at the example of
> > > GWT using Gdatastore:
> > > http://code.google.com/webtoolkit/tutorials/1.6/appengine.html#data
>
> > > All application run well following the getting starttutorial, so when
> > > I try to improve using data store at this implementation an erro
> > > occurs because stockService is not declare yet.
> > > I tryed to force the declaration using "StockService stockService =
> > > GWT.create(StockService.class);" but another erro is get with the
> > > method getStocks.
>
> > > private void loadStocks() {
> > > stockService = GWT.create(StockService.class);
> > > stockService.getStocks(new AsyncCallback<String[]>() {
> > > public void onFailure(Throwable error) {
> > > }
> > > public void onSuccess(String[] symbols) {
> > > displayStocks(symbols);
> > > }
> > > });
> > > }
>
> > > private void displayStocks(String[] symbols) {
> > > for (String symbol : symbols) {
> > > displayStock(symbol);
> > > }
> > > }
>
> > > If there is no mistake I would like to know where I can download the
> > > caomplete example with datastore workings.
>
> > > Ty.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---