onSuccess() return value other than void?
At present, an AsyncCallback contains a 'public void onSuccess()' method. This is posing significant problems for me at the moment. I have a method myMethod() being called which has a return value type of ArrayList. MyMethod contains this AsynCallback which is used to query a database on the server side of the code. I need to, either somehow make the method WAIT for the AsyncCallback's onSuccess() method to return which is the thing that is giving me the ArrayList to return to the code which called myMethod, or change the return type of the AsyncCallback to ArrayList and let this be the 'return' of myMethod. Is this possible? Am I very confused? Could someone please advise? -- 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.
Re: onSuccess() return value other than void?
Welcome to the async world! ;-) I had the same problem. Since the code of an async callback is not executed in the order of the statements in your myMethod() you can not directly return the results from onSuccess() in myMethod(). And myMethod() is not able to "wait" for onSuccess(). You could for example do the things you want to do with ArrayList in onSuccess() instead of where you call myMethod() of if you want to keep the processing logic for ArrayList where myMethod() is called use a method to pass ArrayList from onSuccess(). You can think of it as separating the logic in two methods: 1) first one does initial stuff and then requests something via RPC (in your example via myMethod() but with return type void) 2) second one is called by onSuccess() passing the results of the RPC and continues with the requested data where first method "ends" Hope it helps, Andreas On 2 Jul., 14:50, day_trader wrote: > At present, an AsyncCallback contains a 'public void onSuccess()' > method. This is posing significant problems for me at the moment. > > I have a method myMethod() being called which has a return value type > of ArrayList. MyMethod contains this AsynCallback which is > used to query a database on the server side of the code. I need to, > either somehow make the method WAIT for the AsyncCallback's > onSuccess() method to return which is the thing that is giving me the > ArrayList to return to the code which called myMethod, or > change the return type of the AsyncCallback to ArrayList and > let this be the 'return' of myMethod. > > Is this possible? Am I very confused? Could someone please advise? -- 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.
Re: onSuccess() return value other than void?
Yeah, it takes a while to start thinking Asynchronously. But Andreas has the right of it. You no longer think of it as call myMethod() to return the ArrayList; you have to think of it is: 1) What do I want my user to do to request the data. (Or my program, like on start up you want the data). Here is where you will call your service with the callback object. then 2) When I get this data, what do I want to do with it? That is what you put in your onSuccess method. Once you get the mentality down, it's extremely powerful and your web pages will show it. On Jul 2, 9:45 am, andreas wrote: > Welcome to the async world! ;-) > > I had the same problem. Since the code of an async callback is not > executed in the order of the statements in your myMethod() you can not > directly return the results from onSuccess() in myMethod(). And > myMethod() is not able to "wait" for onSuccess(). > > You could for example do the things you want to do with > ArrayList in onSuccess() instead of where you call myMethod() > of if you want to keep the processing logic for ArrayList > where myMethod() is called use a method to pass ArrayList from > onSuccess(). > > You can think of it as separating the logic in two methods: > 1) first one does initial stuff and then requests something via RPC > (in your example via myMethod() but with return type void) > 2) second one is called by onSuccess() passing the results of the RPC > and continues with the requested data where first method "ends" > > Hope it helps, > > Andreas > > On 2 Jul., 14:50, day_trader wrote: > > > At present, an AsyncCallback contains a 'public void onSuccess()' > > method. This is posing significant problems for me at the moment. > > > I have a method myMethod() being called which has a return value type > > of ArrayList. MyMethod contains this AsynCallback which is > > used to query a database on the server side of the code. I need to, > > either somehow make the method WAIT for the AsyncCallback's > > onSuccess() method to return which is the thing that is giving me the > > ArrayList to return to the code which called myMethod, or > > change the return type of the AsyncCallback to ArrayList and > > let this be the 'return' of myMethod. > > > Is this possible? Am I very confused? Could someone please advise? -- 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.
Re: onSuccess() return value other than void?
Thanks for the replies thus far. That all makes sense. I did have strong doubts about the likelihood of what I wanted but as I am not an expert in the field I thought it was better to make sure. Actually, my problems would be solved quite quickly if I got around my initial problem that led to this posting. Basically, there is a class in my client side, under myApp.client.models.SomeModel that I need to pass to the server. The problem is that the server cannot see this class as I get an error when I try to compile it. My question is: How do I check if the class is on my SERVER classpath? 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 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.
Re: onSuccess() return value other than void?
Hi day_trader As far as i can think is that you are trying to pass an object with the data of the class.. now to make your class go to the server side all you need to do is to move it to a package that is in the package that is *not* mentioned in your .gwt.xml file as the classes in these packages,which are mentioned in the gwt.xml file, get "ajaxified" and sent on to the client. Hope this helps. Sunny. On Jul 6, 5:04 pm, day_trader wrote: > Thanks for the replies thus far. > > That all makes sense. I did have strong doubts about the likelihood of > what I wanted but as I am not an expert in the field I thought it was > better to make sure. > > Actually, my problems would be solved quite quickly if I got around my > initial problem that led to this posting. Basically, there is a class > in my client side, under myApp.client.models.SomeModel that I need to > pass to the server. The problem is that the server cannot see this > class as I get an error when I try to compile it. My question is: How > do I check if the class is on my SERVER classpath? > > 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 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.
Re: onSuccess() return value other than void?
This is where I am rather confused. As when i move it to a package which isn't named in the .gwt.xml file I receive an error of "cannot be resolved to a type". Which is fair enough, as I assumed everything in the .gwt.xml was putting the classes in 'view' of everything in the application? Or perhaps I'm very muddled up! Sorry for the continued annoyance! I very much apologise. Malcolm On Jul 7, 5:11 am, Sunny wrote: > Hi day_trader > > As far as i can think is that you are trying to pass an object with > the data of the class.. > > now to make your class go to the server side all you need to do is to > move it to a package that is in the package that is *not* mentioned in > your .gwt.xml file as the classes in these > packages,which are mentioned in the gwt.xml file, get "ajaxified" and > sent on to the client. > > Hope this helps. > > Sunny. > > On Jul 6, 5:04 pm, day_trader wrote: > > > > > Thanks for the replies thus far. > > > That all makes sense. I did have strong doubts about the likelihood of > > what I wanted but as I am not an expert in the field I thought it was > > better to make sure. > > > Actually, my problems would be solved quite quickly if I got around my > > initial problem that led to this posting. Basically, there is a class > > in my client side, under myApp.client.models.SomeModel that I need to > > pass to the server. The problem is that the server cannot see this > > class as I get an error when I try to compile it. My question is: How > > do I check if the class is on my SERVER classpath? > > > 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 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.
Re: onSuccess() return value other than void?
You do not have to move something out of 'client' packages to have it on your server. This is definitely wrong! You do have to move classes you want to have on the client or both client and server into the client packages (or declare those packages in your *.gwt.xml files). Since you want your class to be passed from the client to the server this class definitely needs to be in your 'client' package. I don't know why you get an error on compiling, maybe you can give more informations on this one. GWT compiles all Java files (also those in 'client') to .class files in your war/WEB-INF/src/ folder so all classes will be accessible on the server. Andreas On 7 Jul., 10:02, day_trader wrote: > This is where I am rather confused. As when i move it to > a package which isn't named in the .gwt.xml file I receive > an error of "cannot be resolved to a type". Which is fair enough, > as I assumed everything in the .gwt.xml was putting the classes > in 'view' of everything in the application? Or perhaps I'm very > muddled up! > > Sorry for the continued annoyance! I very much apologise. > > Malcolm > > On Jul 7, 5:11 am, Sunny wrote: > > > > > Hi day_trader > > > As far as i can think is that you are trying to pass an object with > > the data of the class.. > > > now to make your class go to the server side all you need to do is to > > move it to a package that is in the package that is *not* mentioned in > > your .gwt.xml file as the classes in these > > packages,which are mentioned in the gwt.xml file, get "ajaxified" and > > sent on to the client. > > > Hope this helps. > > > Sunny. > > > On Jul 6, 5:04 pm, day_trader wrote: > > > > Thanks for the replies thus far. > > > > That all makes sense. I did have strong doubts about the likelihood of > > > what I wanted but as I am not an expert in the field I thought it was > > > better to make sure. > > > > Actually, my problems would be solved quite quickly if I got around my > > > initial problem that led to this posting. Basically, there is a class > > > in my client side, under myApp.client.models.SomeModel that I need to > > > pass to the server. The problem is that the server cannot see this > > > class as I get an error when I try to compile it. My question is: How > > > do I check if the class is on my SERVER classpath? > > > > 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 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.
Re: onSuccess() return value other than void?
Sorry, it's war/WEB-INF/classes/. On 7 Jul., 10:26, andreas wrote: > You do not have to move something out of 'client' packages to have it > on your server. This is definitely wrong! > > You do have to move classes you want to have on the client or both > client and server into the client packages (or declare those packages > in your *.gwt.xml files). > > Since you want your class to be passed from the client to the server > this class definitely needs to be in your 'client' package. I don't > know why you get an error on compiling, maybe you can give more > informations on this one. GWT compiles all Java files (also those in > 'client') to .class files in your war/WEB-INF/src/ folder so all > classes will be accessible on the server. > > Andreas > > On 7 Jul., 10:02, day_trader wrote: > > > > > This is where I am rather confused. As when i move it to > > a package which isn't named in the .gwt.xml file I receive > > an error of "cannot be resolved to a type". Which is fair enough, > > as I assumed everything in the .gwt.xml was putting the classes > > in 'view' of everything in the application? Or perhaps I'm very > > muddled up! > > > Sorry for the continued annoyance! I very much apologise. > > > Malcolm > > > On Jul 7, 5:11 am, Sunny wrote: > > > > Hi day_trader > > > > As far as i can think is that you are trying to pass an object with > > > the data of the class.. > > > > now to make your class go to the server side all you need to do is to > > > move it to a package that is in the package that is *not* mentioned in > > > your .gwt.xml file as the classes in these > > > packages,which are mentioned in the gwt.xml file, get "ajaxified" and > > > sent on to the client. > > > > Hope this helps. > > > > Sunny. > > > > On Jul 6, 5:04 pm, day_trader wrote: > > > > > Thanks for the replies thus far. > > > > > That all makes sense. I did have strong doubts about the likelihood of > > > > what I wanted but as I am not an expert in the field I thought it was > > > > better to make sure. > > > > > Actually, my problems would be solved quite quickly if I got around my > > > > initial problem that led to this posting. Basically, there is a class > > > > in my client side, under myApp.client.models.SomeModel that I need to > > > > pass to the server. The problem is that the server cannot see this > > > > class as I get an error when I try to compile it. My question is: How > > > > do I check if the class is on my SERVER classpath? > > > > > 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 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.
Re: onSuccess() return value other than void?
It could possibly be because I am using Enunciate to develop my application with. Here is my complete error: [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Problem assembling the enunciate app. Embedded error: Class not found: TreeModel I've just tried putting TreeModel into my gwt.xml file : however this doesn't appear to work either. I have posted this to the Enunciate Mailing List as well, so hopefully one of those guys can enlighten me if it's a probably with Enunciate and not GWT/GXT. Malcolm On Jul 7, 9:28 am, andreas wrote: > Sorry, it's war/WEB-INF/classes/. > > On 7 Jul., 10:26, andreas wrote: > > > > > You do not have to move something out of 'client' packages to have it > > on your server. This is definitely wrong! > > > You do have to move classes you want to have on the client or both > > client and server into the client packages (or declare those packages > > in your *.gwt.xml files). > > > Since you want your class to be passed from the client to the server > > this class definitely needs to be in your 'client' package. I don't > > know why you get an error on compiling, maybe you can give more > > informations on this one. GWT compiles all Java files (also those in > > 'client') to .class files in your war/WEB-INF/src/ folder so all > > classes will be accessible on the server. > > > Andreas > > > On 7 Jul., 10:02, day_trader wrote: > > > > This is where I am rather confused. As when i move it to > > > a package which isn't named in the .gwt.xml file I receive > > > an error of "cannot be resolved to a type". Which is fair enough, > > > as I assumed everything in the .gwt.xml was putting the classes > > > in 'view' of everything in the application? Or perhaps I'm very > > > muddled up! > > > > Sorry for the continued annoyance! I very much apologise. > > > > Malcolm > > > > On Jul 7, 5:11 am, Sunny wrote: > > > > > Hi day_trader > > > > > As far as i can think is that you are trying to pass an object with > > > > the data of the class.. > > > > > now to make your class go to the server side all you need to do is to > > > > move it to a package that is in the package that is *not* mentioned in > > > > your .gwt.xml file as the classes in these > > > > packages,which are mentioned in the gwt.xml file, get "ajaxified" and > > > > sent on to the client. > > > > > Hope this helps. > > > > > Sunny. > > > > > On Jul 6, 5:04 pm, day_trader wrote: > > > > > > Thanks for the replies thus far. > > > > > > That all makes sense. I did have strong doubts about the likelihood of > > > > > what I wanted but as I am not an expert in the field I thought it was > > > > > better to make sure. > > > > > > Actually, my problems would be solved quite quickly if I got around my > > > > > initial problem that led to this posting. Basically, there is a class > > > > > in my client side, under myApp.client.models.SomeModel that I need to > > > > > pass to the server. The problem is that the server cannot see this > > > > > class as I get an error when I try to compile it. My question is: How > > > > > do I check if the class is on my SERVER classpath? > > > > > > 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 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.
Re: onSuccess() return value other than void?
Oops. That was supposed to say: a 'PROBLEM' with... On Jul 7, 9:44 am, day_trader wrote: > It could possibly be because I am using Enunciate to develop my > application with. Here is my complete error: > > [INFO] > > [ERROR] BUILD ERROR > [INFO] > > [INFO] Problem assembling the enunciate app. > > Embedded error: Class not found: TreeModel > > I've just tried putting TreeModel into my gwt.xml file : name='com.myApp.client.models.TreeModel'/> however this doesn't appear > to work either. I have posted this to the Enunciate Mailing List as > well, so hopefully one of those guys can enlighten me if it's a > probably with Enunciate and not GWT/GXT. > > Malcolm > > On Jul 7, 9:28 am, andreas wrote: > > > > > Sorry, it's war/WEB-INF/classes/. > > > On 7 Jul., 10:26, andreas wrote: > > > > You do not have to move something out of 'client' packages to have it > > > on your server. This is definitely wrong! > > > > You do have to move classes you want to have on the client or both > > > client and server into the client packages (or declare those packages > > > in your *.gwt.xml files). > > > > Since you want your class to be passed from the client to the server > > > this class definitely needs to be in your 'client' package. I don't > > > know why you get an error on compiling, maybe you can give more > > > informations on this one. GWT compiles all Java files (also those in > > > 'client') to .class files in your war/WEB-INF/src/ folder so all > > > classes will be accessible on the server. > > > > Andreas > > > > On 7 Jul., 10:02, day_trader wrote: > > > > > This is where I am rather confused. As when i move it to > > > > a package which isn't named in the .gwt.xml file I receive > > > > an error of "cannot be resolved to a type". Which is fair enough, > > > > as I assumed everything in the .gwt.xml was putting the classes > > > > in 'view' of everything in the application? Or perhaps I'm very > > > > muddled up! > > > > > Sorry for the continued annoyance! I very much apologise. > > > > > Malcolm > > > > > On Jul 7, 5:11 am, Sunny wrote: > > > > > > Hi day_trader > > > > > > As far as i can think is that you are trying to pass an object with > > > > > the data of the class.. > > > > > > now to make your class go to the server side all you need to do is to > > > > > move it to a package that is in the package that is *not* mentioned in > > > > > your .gwt.xml file as the classes in these > > > > > packages,which are mentioned in the gwt.xml file, get "ajaxified" and > > > > > sent on to the client. > > > > > > Hope this helps. > > > > > > Sunny. > > > > > > On Jul 6, 5:04 pm, day_trader wrote: > > > > > > > Thanks for the replies thus far. > > > > > > > That all makes sense. I did have strong doubts about the likelihood > > > > > > of > > > > > > what I wanted but as I am not an expert in the field I thought it > > > > > > was > > > > > > better to make sure. > > > > > > > Actually, my problems would be solved quite quickly if I got around > > > > > > my > > > > > > initial problem that led to this posting. Basically, there is a > > > > > > class > > > > > > in my client side, under myApp.client.models.SomeModel that I need > > > > > > to > > > > > > pass to the server. The problem is that the server cannot see this > > > > > > class as I get an error when I try to compile it. My question is: > > > > > > How > > > > > > do I check if the class is on my SERVER classpath? > > > > > > > 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 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.
Re: onSuccess() return value other than void?
The inherits tag is for inheriting GWT modules not for inheriting Java files or similar (afaik). You add packages to the GWT translatable sources via source tag: This should be enough assuming your GWT module is in 'com.myApp'. Andreas On 7 Jul., 10:44, day_trader wrote: > It could possibly be because I am using Enunciate to develop my > application with. Here is my complete error: > > [INFO] > > [ERROR] BUILD ERROR > [INFO] > > [INFO] Problem assembling the enunciate app. > > Embedded error: Class not found: TreeModel > > I've just tried putting TreeModel into my gwt.xml file : name='com.myApp.client.models.TreeModel'/> however this doesn't appear > to work either. I have posted this to the Enunciate Mailing List as > well, so hopefully one of those guys can enlighten me if it's a > probably with Enunciate and not GWT/GXT. > > Malcolm > > On Jul 7, 9:28 am, andreas wrote: > > > > > Sorry, it's war/WEB-INF/classes/. > > > On 7 Jul., 10:26, andreas wrote: > > > > You do not have to move something out of 'client' packages to have it > > > on your server. This is definitely wrong! > > > > You do have to move classes you want to have on the client or both > > > client and server into the client packages (or declare those packages > > > in your *.gwt.xml files). > > > > Since you want your class to be passed from the client to the server > > > this class definitely needs to be in your 'client' package. I don't > > > know why you get an error on compiling, maybe you can give more > > > informations on this one. GWT compiles all Java files (also those in > > > 'client') to .class files in your war/WEB-INF/src/ folder so all > > > classes will be accessible on the server. > > > > Andreas > > > > On 7 Jul., 10:02, day_trader wrote: > > > > > This is where I am rather confused. As when i move it to > > > > a package which isn't named in the .gwt.xml file I receive > > > > an error of "cannot be resolved to a type". Which is fair enough, > > > > as I assumed everything in the .gwt.xml was putting the classes > > > > in 'view' of everything in the application? Or perhaps I'm very > > > > muddled up! > > > > > Sorry for the continued annoyance! I very much apologise. > > > > > Malcolm > > > > > On Jul 7, 5:11 am, Sunny wrote: > > > > > > Hi day_trader > > > > > > As far as i can think is that you are trying to pass an object with > > > > > the data of the class.. > > > > > > now to make your class go to the server side all you need to do is to > > > > > move it to a package that is in the package that is *not* mentioned in > > > > > your .gwt.xml file as the classes in these > > > > > packages,which are mentioned in the gwt.xml file, get "ajaxified" and > > > > > sent on to the client. > > > > > > Hope this helps. > > > > > > Sunny. > > > > > > On Jul 6, 5:04 pm, day_trader wrote: > > > > > > > Thanks for the replies thus far. > > > > > > > That all makes sense. I did have strong doubts about the likelihood > > > > > > of > > > > > > what I wanted but as I am not an expert in the field I thought it > > > > > > was > > > > > > better to make sure. > > > > > > > Actually, my problems would be solved quite quickly if I got around > > > > > > my > > > > > > initial problem that led to this posting. Basically, there is a > > > > > > class > > > > > > in my client side, under myApp.client.models.SomeModel that I need > > > > > > to > > > > > > pass to the server. The problem is that the server cannot see this > > > > > > class as I get an error when I try to compile it. My question is: > > > > > > How > > > > > > do I check if the class is on my SERVER classpath? > > > > > > > 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 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.
Re: onSuccess() return value other than void?
Does not appear to be working even with the , assuming I'm giving the correct path. Is the path of the form of a directory or package? On Jul 7, 9:51 am, andreas wrote: > The inherits tag is for inheriting GWT modules not for inheriting Java > files or similar (afaik). > > You add packages to the GWT translatable sources via source tag: > > > > This should be enough assuming your GWT module is in 'com.myApp'. > > Andreas > > On 7 Jul., 10:44, day_trader wrote: > > > > > It could possibly be because I am using Enunciate to develop my > > application with. Here is my complete error: > > > [INFO] > > > > [ERROR] BUILD ERROR > > [INFO] > > > > [INFO] Problem assembling the enunciate app. > > > Embedded error: Class not found: TreeModel > > > I've just tried putting TreeModel into my gwt.xml file : > name='com.myApp.client.models.TreeModel'/> however this doesn't appear > > to work either. I have posted this to the Enunciate Mailing List as > > well, so hopefully one of those guys can enlighten me if it's a > > probably with Enunciate and not GWT/GXT. > > > Malcolm > > > On Jul 7, 9:28 am, andreas wrote: > > > > Sorry, it's war/WEB-INF/classes/. > > > > On 7 Jul., 10:26, andreas wrote: > > > > > You do not have to move something out of 'client' packages to have it > > > > on your server. This is definitely wrong! > > > > > You do have to move classes you want to have on the client or both > > > > client and server into the client packages (or declare those packages > > > > in your *.gwt.xml files). > > > > > Since you want your class to be passed from the client to the server > > > > this class definitely needs to be in your 'client' package. I don't > > > > know why you get an error on compiling, maybe you can give more > > > > informations on this one. GWT compiles all Java files (also those in > > > > 'client') to .class files in your war/WEB-INF/src/ folder so all > > > > classes will be accessible on the server. > > > > > Andreas > > > > > On 7 Jul., 10:02, day_trader wrote: > > > > > > This is where I am rather confused. As when i move it to > > > > > a package which isn't named in the .gwt.xml file I receive > > > > > an error of "cannot be resolved to a type". Which is fair enough, > > > > > as I assumed everything in the .gwt.xml was putting the classes > > > > > in 'view' of everything in the application? Or perhaps I'm very > > > > > muddled up! > > > > > > Sorry for the continued annoyance! I very much apologise. > > > > > > Malcolm > > > > > > On Jul 7, 5:11 am, Sunny wrote: > > > > > > > Hi day_trader > > > > > > > As far as i can think is that you are trying to pass an object with > > > > > > the data of the class.. > > > > > > > now to make your class go to the server side all you need to do is > > > > > > to > > > > > > move it to a package that is in the package that is *not* mentioned > > > > > > in > > > > > > your .gwt.xml file as the classes in these > > > > > > packages,which are mentioned in the gwt.xml file, get "ajaxified" > > > > > > and > > > > > > sent on to the client. > > > > > > > Hope this helps. > > > > > > > Sunny. > > > > > > > On Jul 6, 5:04 pm, day_trader wrote: > > > > > > > > Thanks for the replies thus far. > > > > > > > > That all makes sense. I did have strong doubts about the > > > > > > > likelihood of > > > > > > > what I wanted but as I am not an expert in the field I thought it > > > > > > > was > > > > > > > better to make sure. > > > > > > > > Actually, my problems would be solved quite quickly if I got > > > > > > > around my > > > > > > > initial problem that led to this posting. Basically, there is a > > > > > > > class > > > > > > > in my client side, under myApp.client.models.SomeModel that I > > > > > > > need to > > > > > > > pass to the server. The problem is that the server cannot see this > > > > > > > class as I get an error when I try to compile it. My question is: > > > > > > > How > > > > > > > do I check if the class is on my SERVER classpath? > > > > > > > > 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 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.
Re: onSuccess() return value other than void?
http://lmgtfy.com/?q=gwt+module+xml+source http://www.gwtapps.com/doc/html/com.google.gwt.doc.DeveloperGuide.Fundamentals.Modules.ModuleXml.html http://www.gwtapps.com/doc/html/com.google.gwt.doc.DeveloperGuide.Fundamentals.Modules.html It's a subpackage of the package your module is located in (your *.gwt.xml). Andreas On 7 Jul., 11:44, day_trader wrote: > Does not appear to be working even with the , > assuming I'm giving the correct path. Is the path of the form of a > directory or package? > > On Jul 7, 9:51 am, andreas wrote: > > > > > The inherits tag is for inheriting GWT modules not for inheriting Java > > files or similar (afaik). > > > You add packages to the GWT translatable sources via source tag: > > > > > > This should be enough assuming your GWT module is in 'com.myApp'. > > > Andreas > > > On 7 Jul., 10:44, day_trader wrote: > > > > It could possibly be because I am using Enunciate to develop my > > > application with. Here is my complete error: > > > > [INFO] > > > > > > [ERROR] BUILD ERROR > > > [INFO] > > > > > > [INFO] Problem assembling the enunciate app. > > > > Embedded error: Class not found: TreeModel > > > > I've just tried putting TreeModel into my gwt.xml file : > > name='com.myApp.client.models.TreeModel'/> however this doesn't appear > > > to work either. I have posted this to the Enunciate Mailing List as > > > well, so hopefully one of those guys can enlighten me if it's a > > > probably with Enunciate and not GWT/GXT. > > > > Malcolm > > > > On Jul 7, 9:28 am, andreas wrote: > > > > > Sorry, it's war/WEB-INF/classes/. > > > > > On 7 Jul., 10:26, andreas wrote: > > > > > > You do not have to move something out of 'client' packages to have it > > > > > on your server. This is definitely wrong! > > > > > > You do have to move classes you want to have on the client or both > > > > > client and server into the client packages (or declare those packages > > > > > in your *.gwt.xml files). > > > > > > Since you want your class to be passed from the client to the server > > > > > this class definitely needs to be in your 'client' package. I don't > > > > > know why you get an error on compiling, maybe you can give more > > > > > informations on this one. GWT compiles all Java files (also those in > > > > > 'client') to .class files in your war/WEB-INF/src/ folder so all > > > > > classes will be accessible on the server. > > > > > > Andreas > > > > > > On 7 Jul., 10:02, day_trader wrote: > > > > > > > This is where I am rather confused. As when i move it to > > > > > > a package which isn't named in the .gwt.xml file I receive > > > > > > an error of "cannot be resolved to a type". Which is fair enough, > > > > > > as I assumed everything in the .gwt.xml was putting the classes > > > > > > in 'view' of everything in the application? Or perhaps I'm very > > > > > > muddled up! > > > > > > > Sorry for the continued annoyance! I very much apologise. > > > > > > > Malcolm > > > > > > > On Jul 7, 5:11 am, Sunny wrote: > > > > > > > > Hi day_trader > > > > > > > > As far as i can think is that you are trying to pass an object > > > > > > > with > > > > > > > the data of the class.. > > > > > > > > now to make your class go to the server side all you need to do > > > > > > > is to > > > > > > > move it to a package that is in the package that is *not* > > > > > > > mentioned in > > > > > > > your .gwt.xml file as the classes in these > > > > > > > packages,which are mentioned in the gwt.xml file, get "ajaxified" > > > > > > > and > > > > > > > sent on to the client. > > > > > > > > Hope this helps. > > > > > > > > Sunny. > > > > > > > > On Jul 6, 5:04 pm, day_trader wrote: > > > > > > > > > Thanks for the replies thus far. > > > > > > > > > That all makes sense. I did have strong doubts about the > > > > > > > > likelihood of > > > > > > > > what I wanted but as I am not an expert in the field I thought > > > > > > > > it was > > > > > > > > better to make sure. > > > > > > > > > Actually, my problems would be solved quite quickly if I got > > > > > > > > around my > > > > > > > > initial problem that led to this posting. Basically, there is a > > > > > > > > class > > > > > > > > in my client side, under myApp.client.models.SomeModel that I > > > > > > > > need to > > > > > > > > pass to the server. The problem is that the server cannot see > > > > > > > > this > > > > > > > > class as I get an error when I try to compile it. My question > > > > > > > > is: How > > > > > > > > do I check if the class is on my SERVER classpath? > > > > > > > > > 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 google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegrou
Re: onSuccess() return value other than void?
I managed to find that after my last post. Whilst they were good links it still does not seem to work. Something fundamental is wrong but I can't work out what. I appreciate the help thus far but it appears I'm in some eternal loop! -- 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.