You're right. You could use spring or persist you data to a file or database between calls.
Sent from my BlackBerry® wireless device -----Original Message----- From: JohnofLong <[email protected]> Date: Fri, 8 May 2009 13:46:01 To: Google Web Toolkit<[email protected]> Subject: RPC Issues - Lifespan of Data from a RPC I tried to find this topic already on the discussions but could not find it. Currently using GWT 1.5.3 I am making a RPC to call to read XML and call a function that loads the data into an ArrayList of classes. I have made a class that implements RequestCallback(LoadData) and takes in my mainClass example: LoadData loadData = new LoadData(this); String url = xmlString; RequestBuilder requestBuilder = new RequestBuilder (RequestBuilder.GET, url); try { requestBuilder.sendRequest(null, loadData); } catch (RequestException ex) { //Window.alert("exception"); } Inside the RPC class: mainClass.addProducts(id, sku, name, catagory) ; inside my main class: public addProducts(int id, int sku, String name, String catagory) { productArrayList.add(new product(id, sku, name, catagory); } But when I call a method on my productArray it just says index out of bound (basically the arrayList is empty) but I know it is calling the addProduct method I am guessing the lifespan of the data is tied to the lifespan of the RPC call. What sort of things can I do to get around this(assuming my assumptions are correct)? I greatly appreciate the help and apologize if this topic is covered somewhere already. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
