Hello, I'm doing a project where in the interface shows a listBox that includes the names of some books, the thing is that you must choose one and you will look wether in pdf or txt. My problem is that when changing the listbox, itll show the just last book you chose, rather the current one.
heres the program so far. http://kido180020783.appspot.com/ Here's the part of the code that presents the problem. setCurrentBook(bookList.getItemText(bookList.getSelectedIndex())); if (pdfFlag) { if (!txtFlag) { pdfBook.setSize(booksPanelWidth, booksPanelHeight); } else { booksPanelWidth = String.valueOf(BOOKS_PANEL_WIDTH / 2); pdfBook.setSize(booksPanelWidth, booksPanelHeight); txtBook.setSize(booksPanelWidth, booksPanelHeight); } pdfBook.setUrl("pdf/" + currentBook.getUriPath() + ".pdf"); } else { ...... //This method is being called AFTER the line " pdfBook.setUrl("pdf/" + currentBook.getUriPath() + ".pdf");" wich is weird!!!!!!. public void setCurrentBook(String bookName) { AsyncCallback<Book> callback = new AsyncCallback<Book>() { public void onFailure(Throwable caught) { throw new UnsupportedOperationException("Not supported yet."); } public void onSuccess(Book result) { currentBook = result; } }; bookServicesHolder.loadBookByName(bookName, callback); } I dont want the method to be Asyncronous, please I really need some help. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.