The Character class
How do I know which functions are implemented in GWT's client side classes ? For instance, I was using the Character class, and realized that some functions were missing, and the GWT compiler complained about it... If I had know that before I started coding, I might have designed my classes different. In this case it was easy to change the implementation to something that worked, but still.. Is there a list of the classes and their functions that works client side somewhere ? Cheers, :-) Kasper -- 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: GWT and concurrency
I appreciate that with JavaScript interpreters executing in one thread there will never be any *true* concurrency. However it seems perfectly possible for concurrency issues to arise with the way that asynchronous callbacks are used A simple example is if I am continuously checking the value of a variable x, and then incrementing it: while(!stop) { int i = x; x = i+1; } Once the event occurs, the handler prints the variable and sets a flag that causes the incrementing to stop: print(x); stop = true; The intended behavior might be that the final value of the counter is printed. However if the event handler is invoked right after the assignment 'int i = x', the value will be incremented one more time after it is printed, which is a concurrency bug. In such cases the synchronized keyword could have been used to define pieces of code which must not be interrupted by other pieces of code in such way. In plain Java the synchronized keyword provides an easy way of dealing with such issues. The problem I described in my first post is very similar to this in nature and I am lost as to what to do. I hope this makes what I mean a bit clearer. Of course I am not excluding the possibility that I just misunderstood somthing about how the GWT/JavaScript eventing mechanism works. Thanks, Johannes On Sep 17, 5:40 pm, Thomas Broyer t.bro...@gmail.com wrote: On Sep 17, 4:13 pm, Johannes Lehmann johannes.lehma...@googlemail.com wrote: OK, that is basically what I assumed. This however seems to create concurrency issues, which the synchronized keyword was designed to address. Without any language support such as semaphores or mutexes and without any guarantees regarding preemption, how could I solve a problem such as the above? Excuse my ignorance about semaphores/mutexes/preemption details, but how can there be concurrency issues if things never execute concurrently? (and *your* code will never execute concurrently with *your* code) If you really want the gory details:http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapi... -- 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: HTTP query string when tested in development mode
Hi rjcarr The query string is still null after I set to ...Dummy.html?debug=2param=2 gwt.codesvr=127.0.0.1:9997http://127.0.0.1:/Property123.html?gwt.codesvr=127.0.0.1:9997 . The same problem occurs with the default development mode URL like http://127.0.0.1:/Dummy.html?gwt.codesvr=127.0.0.1:9997, I'm just thinking could this because of the browser plugin that causes this problem? On Sun, Sep 19, 2010 at 10:10 AM, rjcarr rjc...@gmail.com wrote: From what you've posted it doesn't look like a valid URL. A query string, as far as I know, is a series of key=value pairs separated by . You posted this: http://127.0.0.1:/Dummy.html?debugparam2gwt.codesvr=127.0.0.1:9997 Which doesn't look correctly formed. Try this: http://127.0.0.1:/Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997 -- 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Hez -- 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: Return permutation directly from the server without selection script.
Can you please demonstrate how this technique should be used to save that extra request from host page? (i.e. what other components needs to be added to implement solution from google wave guys) On Sep 18, 12:46 am, Etienne Lacazedieu etienne.lacazed...@gmail.com wrote: I wrote such a Linker : /** * This GWT linker creates a properties file which can be used to resolve Permutation Strong name given UserAgent and locale. * * @author Etienne Lacazedieu * */ @LinkerOrder(Order.PRE) public class StrongNameOracleLinker extends AbstractLinker { public static final String STRONGNAME_FILE = permutation.properties; @Override public String getDescription() { return PermutationStrongName Oracle linker; } @Override public ArtifactSet link(TreeLogger logger, LinkerContext context, ArtifactSet artifacts) throws UnableToCompleteException { artifacts = new ArtifactSet(artifacts); ByteArrayOutputStream out = new ByteArrayOutputStream(); String permutation = null; String locale = null; String userAgent = null; SelectionProperty selectionProperty = null; Properties props = new Properties(); for (CompilationResult result : artifacts.find(CompilationResult.class)) { permutation = result.getStrongName(); SortedSetSortedMapSelectionProperty, String propertiesMap = result.getPropertyMap(); for (SortedMapSelectionProperty, String sm : propertiesMap) { for (Map.EntrySelectionProperty, String e : sm.entrySet()) { selectionProperty = e.getKey(); if (locale.equals(selectionProperty.getName())) { locale = e.getValue(); } if (user.agent.equals(selectionProperty.getName())) { userAgent = e.getValue(); } } } props.setProperty(userAgent + . + locale, permutation); } try { props.store(out, StrongNameOracle properties file); } catch (IOException e) { // Should generally not happen logger.log(TreeLogger.ERROR, Unable to store deRPC data, e); throw new UnableToCompleteException(); } SyntheticArtifact a = emitBytes(logger, out.toByteArray(), STRONGNAME_FILE); artifacts.add(a); return artifacts; } } 2010/9/17 Helder Suzuki heldersuz...@gmail.com: +1 On Aug 4, 9:17 am, André Moraes andr...@gmail.com wrote: Hi, I saw the presentation of the GWT team and they talked about sending the permutation without sending first the selection script. I can read the HTTP headers and find-out what is the browser which is making the request, this is the easy part. But how can I find-out which file was generated by which permutation in the GWT compiler pipeline? I belive that I will need to write a linker to get those files, but how? Thanks. -- André Moraes Analista de Desenvolvimento de Sistemas andr...@gmail.comhttp://andredevchannel.blogspot.com/ -- 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 athttp://groups.google.com/group/google-web-toolkit?hl=en. -- 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.
How to get the unexpected exception thrown by backend component on the client side
For example, when the FileNotFoundException was throw by the backend service, now I want to retrieve this exception via gwt rpc component and show its' stack trace on the client side. The problem is that the FileNotFoundException is not in the serialization whitelist, even I declare it on the service method signature(it report that no source code for java.io.FileNotFoundException). So, how can I do to solve this issue? 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: How to get the unexpected exception thrown by backend component onthe client side
This can be done with AOP. Are you using spring or anything like that? -Original Message- From: lin.liang birdandfis...@gmail.com Sender: google-web-toolkit@googlegroups.com Date: Sun, 19 Sep 2010 03:12:50 To: Google Web Toolkitgoogle-web-toolkit@googlegroups.com Reply-To: google-web-toolkit@googlegroups.com Cc: yj...@163.com Subject: How to get the unexpected exception thrown by backend component on the client side For example, when the FileNotFoundException was throw by the backend service, now I want to retrieve this exception via gwt rpc component and show its' stack trace on the client side. The problem is that the FileNotFoundException is not in the serialization whitelist, even I declare it on the service method signature(it report that no source code for java.io.FileNotFoundException). So, how can I do to solve this issue? 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. -- 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: GWT and concurrency
There is no preemption. The events are polled when the thread is idle and in your example the thread is not idle because is stuck in your endless and freezing cycle. On Sunday, September 19, 2010, Johannes Lehmann johannes.lehma...@googlemail.com wrote: I appreciate that with JavaScript interpreters executing in one thread there will never be any *true* concurrency. However it seems perfectly possible for concurrency issues to arise with the way that asynchronous callbacks are used A simple example is if I am continuously checking the value of a variable x, and then incrementing it: while(!stop) { int i = x; x = i+1; } Once the event occurs, the handler prints the variable and sets a flag that causes the incrementing to stop: print(x); stop = true; The intended behavior might be that the final value of the counter is printed. However if the event handler is invoked right after the assignment 'int i = x', the value will be incremented one more time after it is printed, which is a concurrency bug. In such cases the synchronized keyword could have been used to define pieces of code which must not be interrupted by other pieces of code in such way. In plain Java the synchronized keyword provides an easy way of dealing with such issues. The problem I described in my first post is very similar to this in nature and I am lost as to what to do. I hope this makes what I mean a bit clearer. Of course I am not excluding the possibility that I just misunderstood somthing about how the GWT/JavaScript eventing mechanism works. Thanks, Johannes On Sep 17, 5:40 pm, Thomas Broyer t.bro...@gmail.com wrote: On Sep 17, 4:13 pm, Johannes Lehmann johannes.lehma...@googlemail.com wrote: OK, that is basically what I assumed. This however seems to create concurrency issues, which the synchronized keyword was designed to address. Without any language support such as semaphores or mutexes and without any guarantees regarding preemption, how could I solve a problem such as the above? Excuse my ignorance about semaphores/mutexes/preemption details, but how can there be concurrency issues if things never execute concurrently? (and *your* code will never execute concurrently with *your* code) If you really want the gory details:http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapi... -- 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. -- *Stefano Ciccarelli* stef...@indacosoftware.it *Indaco srl* via Sabin, 22 - 40017 San Giovanni in Persiceto (BO) - Italy tel. +39.051.827762 - fax +39.051.6874570 i...@indacosoftware.it www.indacosoftware.it *- This e-mail is confidential and may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail. Please then delete the e-mail and do not disclose its contents to any other person. - Le informazioni contenute in questa comunicazione sono riservate e destinate esclusivamente alla/e persona/e o all'ente sopra indicati. E' vietato ai soggetti diversi dai destinatari qualsiasi uso, copia, diffusione di quanto in esso contenuto sia ai sensi dell'art. 616 c.p., sia ai sensi del DL n. 196/03. Se questa comunicazione Vi e' pervenuta per errore, Vi preghiamo di rispondere a questa e-mail e successivamente cancellarla dal Vostro sistema.* -- 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: Error compiling GWT source code from trunk
Anyone know the answer to this? On Sep 14, 12:34 am, hezjing hezj...@gmail.com wrote: H ... I think I have already checked-out the full source code from trunk now, but the same compilation error still exist :-( I must be missing something here, can someone please help? On Tue, Sep 14, 2010 at 10:54 AM, hezjing hezj...@gmail.com wrote: I'm sorry, please ignore this email and there are some missing folders in my svn folder :-( On Tue, Sep 14, 2010 at 10:20 AM, hezjing hezj...@gmail.com wrote: Hi I have checked out GWT source code from the trunk and encountered the following the error when compiled with Apache Ant 1.8.0: C:\gwt\trunkant Buildfile: C:\gwt\trunk\build.xml [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. build: [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. dev: [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. buildtools: [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. build: [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. ant-gwt: [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. compile: [gwt.javac] C:\gwt\trunk\build-tools\ant-gwt\build.xml:11: warning: 'includ eantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds build: customchecks: [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. compile: [gwt.javac] C:\gwt\trunk\build-tools\customchecks\build.xml:8: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [gwt.javac] Compiling 2 source files to C:\gwt\trunk\build\out\build-tools\customchecks\bin [gwt.javac] C:\gwt\trunk\build-tools\customchecks\src\com\google\gwt\checkstyle\FieldCh eck.java:19: package com.puppycrawl.tools.checkstyle.api does not exist [gwt.javac] import com.puppycrawl.tools.checkstyle.api.DetailAST; [gwt.javac] ^ [gwt.javac] C:\gwt\trunk\build-tools\customchecks\src\com\google\gwt\checkstyle\FieldCh eck.java:20: package com.puppycrawl.tools.checkstyle.api does not exist [gwt.javac] import com.puppycrawl.tools.checkstyle.api.TokenTypes; ... Do you have any idea of what could be the problem? -- Hez -- Hez -- Hez -- 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: GWT and concurrency
Hi, As Stefano wrote...ur loop will never end..:) and no other cycle can be executed. This is a concurrency topic and threading, try to create in java(or any other language) a thread with while(true) do something, and try to confine some other thread(some other work) to be done on this thread... ul see that this can never be done:) As a example: Make a java gui with a one button...and inside the EDT(swing thread) make a endless loop...ull se that ul never be able to catch a event fired from the button...(this is because the EDT thread will never go to idle and never get a new task(in case of java a new runnable or calable) out from the EDT- que. This is the famous Producer-Consumer pattern. so basically here is done the same(a program written in a programming language dose it for u, and its called browser, so the browser engine is the one responsible for this...and thats why I dont like web programming:) i dont have the overview of what is happening, and usually strange things happens:) ) regards On Sun, Sep 19, 2010 at 2:00 PM, Stefano Ciccarelli stef...@indacosoftware.it wrote: There is no preemption. The events are polled when the thread is idle and in your example the thread is not idle because is stuck in your endless and freezing cycle. On Sunday, September 19, 2010, Johannes Lehmann johannes.lehma...@googlemail.com wrote: I appreciate that with JavaScript interpreters executing in one thread there will never be any *true* concurrency. However it seems perfectly possible for concurrency issues to arise with the way that asynchronous callbacks are used A simple example is if I am continuously checking the value of a variable x, and then incrementing it: while(!stop) { int i = x; x = i+1; } Once the event occurs, the handler prints the variable and sets a flag that causes the incrementing to stop: print(x); stop = true; The intended behavior might be that the final value of the counter is printed. However if the event handler is invoked right after the assignment 'int i = x', the value will be incremented one more time after it is printed, which is a concurrency bug. In such cases the synchronized keyword could have been used to define pieces of code which must not be interrupted by other pieces of code in such way. In plain Java the synchronized keyword provides an easy way of dealing with such issues. The problem I described in my first post is very similar to this in nature and I am lost as to what to do. I hope this makes what I mean a bit clearer. Of course I am not excluding the possibility that I just misunderstood somthing about how the GWT/JavaScript eventing mechanism works. Thanks, Johannes On Sep 17, 5:40 pm, Thomas Broyer t.bro...@gmail.com wrote: On Sep 17, 4:13 pm, Johannes Lehmann johannes.lehma...@googlemail.com wrote: OK, that is basically what I assumed. This however seems to create concurrency issues, which the synchronized keyword was designed to address. Without any language support such as semaphores or mutexes and without any guarantees regarding preemption, how could I solve a problem such as the above? Excuse my ignorance about semaphores/mutexes/preemption details, but how can there be concurrency issues if things never execute concurrently? (and *your* code will never execute concurrently with *your* code) If you really want the gory details: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapi... -- 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-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- *Stefano Ciccarelli* stef...@indacosoftware.it *Indaco srl* via Sabin, 22 - 40017 San Giovanni in Persiceto (BO) - Italy tel. +39.051.827762 - fax +39.051.6874570 i...@indacosoftware.it www.indacosoftware.it *- This e-mail is confidential and may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail. Please then delete the e-mail and do not disclose its contents to any other person. - Le informazioni contenute in questa comunicazione sono riservate e destinate esclusivamente alla/e persona/e o all'ente sopra indicati. E' vietato ai soggetti diversi dai destinatari qualsiasi uso, copia, diffusione di quanto in esso contenuto sia ai sensi dell'art. 616 c.p., sia ai sensi del DL n. 196/03. Se questa comunicazione Vi e' pervenuta per errore, Vi preghiamo di rispondere a questa e-mail e successivamente cancellarla dal Vostro sistema.* -- You received this message because you are subscribed to
Re: Parameters in gwt.xml File?
Andy, thanks for the response. What I'm trying to accomplish is 100% independence between the generator in my first project and the implementing project. My plan is, that if I can get an externally defined string in to my project, to use reflection to get the class. Thanks! E On Sep 19, 1:04 am, andy stevko andy.ste...@gmail.com wrote: Not sure how to do the gwt.xml parameter stuff but I did come up with a way to vary constants. Check out my stackoverflow posting for a recipehttp://stackoverflow.com/questions/1682835/how-to-vary-constants-base... On Sat, Sep 18, 2010 at 9:09 PM, Evan Ruff evan.r...@gmail.com wrote: Hey guys, I have a generator that I'd like to configure with some parameters in the gwt.xml file. Is there any way I can do that? If so, how does one go about defining them in the gwt.xml and then looking up the parameter in the generator? If it isn't possible, is there a good way to do it otherwise? Thanks! Evan -- 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.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- 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.
GWT Mosaic 2.0 M2
Hi all, this is the first release for testing purposes of GWT Mosaic 2g: http://code.google.com/p/gwt-mosaic/wiki/GWTMosaic2g GWT Mosaic 2g will use a scene graph (not exactly a port of GRIN like in http://code.google.com/p/gwt-grin/ but more like JavaFx). With this version you can experiment with the scene graph, and the new binding framework: http://code.google.com/p/gwt-mosaic/wiki/BindingBasics Also new is the Data Binding library which provides classes to access a database similar to JBuilder's DBExpress or Delphi: http://code.google.com/p/gwt-mosaic/wiki/DataBinding A few very basic data-aware widgets are also ready for testing, like: DBLabel, DBTextBox, DBListBox and DBLookupListBox. See: http://code.google.com/p/gwt-mosaic/wiki/DataBinding2 Demo: http://mosaic.arkasoft.com/data-binding/ Scene graph demos: - dynamic layout (try resizing the browser window): http://cpu1.arkasoft.com:8080/mosaic2g-autosize/ - HBox layout manager scaling effect which does not destroy the layout: http://cpu1.arkasoft.com:8080/mosaic2g-hbox/ - and a simple presentation http://mosaic.arkasoft.com/gwt-mosaic-2g/ Kind Regards, George. -- 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: GWT designer mVp
Thank you for you comments. I will respond inline below... On Sep 17, 1:13 am, marius.andreiana marius.andrei...@gmail.com wrote: I'd like to add one more note to the comment below. GWT Designer seems now a tool for engineers, which don't want to learn all UiBinder tags or simply want to write code faster. IMHO, I see two possible paths for GWT Designer future: Yes. At the moment, it is very fair to say that GWT Designer is focussed primarily at engineers/developers writing GWT apps. A lot of its most powerful features (like having a powerful reverse-engineering Java parser, bi-direction code generation, refactoring-friendliness, custom composite creation etc), will appeal primarily to a developer (and primarily a GWT/Java developer at that). With our move to Google, we would like to improve the tool so that it appeals to a wider audience (while avoiding the all-things-to-all people problem). I'm sure there are lots of things that we could do to make the tool appeal more to designers and also make it easier for developers to use. While the first path you present is one we will continue to follow, exploring the second path is also very interesting and could actually end up having significant impact on the first path. 1. Continue to improve it and address usability issues such as ones below, making it easier/better for engineers use. Nice addition to GWT toolkit in this case. Clearly, we want to address any obvious shortcomings, so please continue to point those out. If you have specific ideas on how to improve what we are doing, we are very interested in those suggestions. Most of the features in the current tool are there as a result of listening closely to our current users (over a very ling period of time). If there are pain points in the tool, let's fix 'em! To that end, if you have specific suggestions (or are even willing to mock up some UI sketches), we'd be very interested in them. I will throw out some ideas below that we have been thinking about. 2. Work with UX UI designers folks to understand how do they build now mocks wireframes for their companies apps. How do they use Photoshop, Fireworks, Dreamweaver? What tools to they use for wireframes and mocks and how? How do engineers use materials provided by UX? (we are slicing Photoshop comps, we are rebuilding manually some mocks or wireframes from scratch as if they were printed) To find these guys, try going to web design shops or larger enterprise companies and understand how are they working now, and not only to GWT users. We are very interested in learning more about this. Set a goal so that UX UI designers can completely produce Views in GWT using GWT Designer. Change GWT Designer so it fits their needs, not engineers'. When receiving .ui.xml files from designer, an engineer will just have to add ui:field attribute to some elements. THAT'S IT. Try to consider any other change than this as a failure. Now this would be awesome. I agree that would be awesome ;-) Now we just need to find a way to get there that will also keep our traditional GWT developers happy. I suspect that making the tool much more appealing to designers will actually have a similar effect on GWT developers, so I don't think that these two paths are divergent or at cross purposes. It's really not that usable now, or at least I don't know how to use it. Would be great to have some video tutorials building real life Views with it. We actually had quite a few on-line flash demos for GWT Designer at Instantiations. We need to create new ones now that we are part of Google. Some quick issues I encountered: * cannot add widgets to HTMLPanel Interestingly enough, I don't know that we ever had anyone ask about that. We'll look into it. * cannot add new CSS classes, as the dialog says I'm not sure what you mean here. It should be possible to add new CSS rules using the Add button... http://code.google.com/webtoolkit/tools/gwtdesigner/features/gwt/css_support.html * CSS class editor has poor usability (I've got to a 3rd level of popup window on Edit font list), misses auto-completion, color picker isn't the standard one and not allowing to manually enter color hex triplet if desired Yes. the CSS editor could be greatly improved. As you might have guessed, this was not a major focus for the tool. We needed to be able to edit CSS, so we created both a standalone CSS editor (right-click on a CSS file itself) as well as added access from within GWT Designer. At the time, we were very much focused on the needs of the GWT developer, so we somewhat assumed that the CSS files/styles would be provided pretty much as-is from another source (either from UX/UI designers or preexisting corporate CSS templates). If you open a CSS file it is own editor and keep it side-by-side with the GWT Designer editor, you can make changes to the CSS file, hit save, and then see the changes apply to the various widgets in the GWT Designer design
Organizing GWT modules
Am starting a new GWT based project (and quite new to it) and currently looking for ways to organize multiple projects (aka modules) better (from js code size download perspective). If a module A depends on module B (of course, i have to inherit it) and if module A is gonna use only very limited client classes in module B, a. While compiling module A does *all* of module B classes will be compiled and stored in a js and hence resulting in unnecessary code being downloaded? I hope not :) b. If above is true, does it make sense to split module B into 2 or 3 logically (if possible) so that i depend on a module and depend on most of it. My concern is this is resulting in quite a lot of modules being required for my project and i want to make sure that am not doing something unneeded. Here is an e.g. Modules: 1. appln-model-core -Model contract interfaces 2. appln-model-impl -Model impl Say am inheriting above modules in login/registration page that require only user related stuff but above modules will have entire app model classes So is this needed: 1. appln-model-core 2. appln-model-user (i only need this!) 3. appln-model-other 4. .. When i extend this, my app seems to require lots and lots of modules. Please throw in your suggestions. Thanks much. -- 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: GWT designer mVp
On Sun, Sep 19, 2010 at 10:08 AM, Eric Clayberg clayb...@google.com wrote: We actually had quite a few on-line flash demos for GWT Designer at Instantiations. We need to create new ones now that we are part of Google. Eric, are those flash demos available anywhere (even if outdated)? John -- 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: The Character class
Here's the documentation for Java library classes emulated in the GWT client: http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html You can browse the source code here: http://www.google.com/codesearch/p?hl=en#A1edwVHBClQ/user/super/com/google/gwt/emul/java/lang/Character.java If you find something that you need, enter an issue report, or vote for an existing issue report, for example: http://code.google.com/p/google-web-toolkit/issues/detail?id=1983 On Sep 19, 12:03 am, Kasper Hansen kbhdk1...@gmail.com wrote: How do I know which functions are implemented in GWT's client side classes ? For instance, I was using the Character class, and realized that some functions were missing, and the GWT compiler complained about it... If I had know that before I started coding, I might have designed my classes different. In this case it was easy to change the implementation to something that worked, but still.. Is there a list of the classes and their functions that works client side somewhere ? Cheers, :-) Kasper -- 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: Parameters in gwt.xml File?
On Sep 19, 6:09 am, Evan Ruff evan.r...@gmail.com wrote: Hey guys, I have a generator that I'd like to configure with some parameters in the gwt.xml file. Is there any way I can do that? If so, how does one go about defining them in the gwt.xml and then looking up the parameter in the generator? If it isn't possible, is there a good way to do it otherwise? set-configuration-property (I can't remember if there's a define- configuration-property) and in your generator getConfigurationProperty(name) to retrieve the value. You'll find examples of use in GWT (from memory, ClientBundle uses some configuration properties) -- 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: Error compiling GWT source code from trunk
On Sep 19, 3:13 pm, Ashton Thomas ash...@acrinta.com wrote: Anyone know the answer to this? On Sep 14, 12:34 am, hezjing hezj...@gmail.com wrote: H ... I think I have already checked-out the full source code from trunk now, but the same compilation error still exist :-( I must be missing something here, can someone please help? Could it be a missing tools folder? http://code.google.com/webtoolkit/makinggwtbetter.html#workingoncode -- 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: How to get the unexpected exception thrown by backend component onthe client side
Yes, I use spring ioc container to manage the lifecycle of beans. Could you tell me in details, Paul? Thanks! 2010/9/19 Paul Grenyer paul.gren...@gmail.com This can be done with AOP. Are you using spring or anything like that? -Original Message- From: lin.liang birdandfis...@gmail.com Sender: google-web-toolkit@googlegroups.com Date: Sun, 19 Sep 2010 03:12:50 To: Google Web Toolkitgoogle-web-toolkit@googlegroups.com Reply-To: google-web-toolkit@googlegroups.com Cc: yj...@163.com Subject: How to get the unexpected exception thrown by backend component on the client side For example, when the FileNotFoundException was throw by the backend service, now I want to retrieve this exception via gwt rpc component and show its' stack trace on the client side. The problem is that the FileNotFoundException is not in the serialization whitelist, even I declare it on the service method signature(it report that no source code for java.io.FileNotFoundException). So, how can I do to solve this issue? 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- 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.
MVP pattern and dynamic widgets
My question is related to the MVP pattern. I have a VerticalPanel in which I add several CheckBox. The UI is build on the fly since it depends on the user settings. The user clicks some of the checkboxes and in my presenter I would like to know which one are selected. What should I put in my view interface of the presenter. My current approach is the following: The presenter: public interface MyView { HasWidgets getTagsContainer(); void showTagsContainer(); // Do a setVisible in the view HasValueBoolean getCheckBox(int i); // Return the ith checkbox } // Build the UI in the fly HasWidgets tagsContainer = getView().getTagsContainer(); tagsContainer.clear(); for (Tag tag : currentUser.getTags()) { tagsContainer.add(new CheckBox(tag.getTagName())); } getView().showTagsContainer(); The user clicks on some of the checkboxes // Find the one which are checked int i=0; for(Tag tag: currentUser.getTags()) { boolean checked = getView().getCheckBox(i).getValue(); i++; } What do you think of my approach? Is there a better way to achieve it? I am learning the MVP pattern, so I try to get the best practices. -- 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: Error compiling GWT source code from trunk
Hi Ashton I have successfully compiled the GWT source codes from the trunk. 1) Install a Windows standalone command line Subversion package http://www.sliksvn.com/en/download/ 2) Check out the GWT tools: cd C:\gwt svn checkout http://google-web-toolkit.googlecode.com/svn/tools/ tools 3) Check out the GWT source: cd C:\gwt svn checkout http://google-web-toolkit.googlecode.com/svn/trunk/ trunk 4) Set an environment variable that contains the full path to the tools directory set GWT_TOOLS=C:\gwt\tools 5) Compile the GWT source codes: cd C:\gwt\trunk ant Hopefully this is useful to you! On Mon, Sep 20, 2010 at 8:24 AM, Thomas Broyer t.bro...@gmail.com wrote: On Sep 19, 3:13 pm, Ashton Thomas ash...@acrinta.com wrote: Anyone know the answer to this? On Sep 14, 12:34 am, hezjing hezj...@gmail.com wrote: H ... I think I have already checked-out the full source code from trunk now, but the same compilation error still exist :-( I must be missing something here, can someone please help? Could it be a missing tools folder? http://code.google.com/webtoolkit/makinggwtbetter.html#workingoncode -- 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Hez -- 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: how do i do Gadget read/write file?
1) Let the user upload a file to your server and then parse it. 2) Create a file in your server and send it to the browser so the user can download it. On 14 sep, 22:50, Alex monsterno...@gmail.com wrote: 1)How do i read a file in client side, i want my gadget to read a file and parse it. 2)how do i have my gadget to create a file and let the user save it somewhere? -- 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.
change the style of the parent tag
Hi, I need to change the style of the parent tag for the mouseover events. In the below code i want to change the style oh h2 element. if i used the link1.getParent() it returns the style1 and not the style for h1. Any idea to resolve this issue Sample code : g:HTMLPanel styleName=style1 h2 g:Anchor ui:field=link1 GWT Home /g:Anchor h2 Thanks Siva -- 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: GWT and concurrency
I don't jnow if this is what you are searching but http://download.oracle.com/javase/1.5.0/docs/api/java/util/ConcurrentModificationException.html is in the jre emulation http://code.google.com/intl/es-CL/webtoolkit/doc/1.6/RefJreEmulation.html On 19 sep, 10:53, Blagoja Chavkoski baze...@gmail.com wrote: Hi, As Stefano wrote...ur loop will never end..:) and no other cycle can be executed. This is a concurrency topic and threading, try to create in java(or any other language) a thread with while(true) do something, and try to confine some other thread(some other work) to be done on this thread... ul see that this can never be done:) As a example: Make a java gui with a one button...and inside the EDT(swing thread) make a endless loop...ull se that ul never be able to catch a event fired from the button...(this is because the EDT thread will never go to idle and never get a new task(in case of java a new runnable or calable) out from the EDT- que. This is the famous Producer-Consumer pattern. so basically here is done the same(a program written in a programming language dose it for u, and its called browser, so the browser engine is the one responsible for this...and thats why I dont like web programming:) i dont have the overview of what is happening, and usually strange things happens:) ) regards On Sun, Sep 19, 2010 at 2:00 PM, Stefano Ciccarelli stef...@indacosoftware.it wrote: There is no preemption. The events are polled when the thread is idle and in your example the thread is not idle because is stuck in your endless and freezing cycle. On Sunday, September 19, 2010, Johannes Lehmann johannes.lehma...@googlemail.com wrote: I appreciate that with JavaScript interpreters executing in one thread there will never be any *true* concurrency. However it seems perfectly possible for concurrency issues to arise with the way that asynchronous callbacks are used A simple example is if I am continuously checking the value of a variable x, and then incrementing it: while(!stop) { int i = x; x = i+1; } Once the event occurs, the handler prints the variable and sets a flag that causes the incrementing to stop: print(x); stop = true; The intended behavior might be that the final value of the counter is printed. However if the event handler is invoked right after the assignment 'int i = x', the value will be incremented one more time after it is printed, which is a concurrency bug. In such cases the synchronized keyword could have been used to define pieces of code which must not be interrupted by other pieces of code in such way. In plain Java the synchronized keyword provides an easy way of dealing with such issues. The problem I described in my first post is very similar to this in nature and I am lost as to what to do. I hope this makes what I mean a bit clearer. Of course I am not excluding the possibility that I just misunderstood somthing about how the GWT/JavaScript eventing mechanism works. Thanks, Johannes On Sep 17, 5:40 pm, Thomas Broyer t.bro...@gmail.com wrote: On Sep 17, 4:13 pm, Johannes Lehmann johannes.lehma...@googlemail.com wrote: OK, that is basically what I assumed. This however seems to create concurrency issues, which the synchronized keyword was designed to address. Without any language support such as semaphores or mutexes and without any guarantees regarding preemption, how could I solve a problem such as the above? Excuse my ignorance about semaphores/mutexes/preemption details, but how can there be concurrency issues if things never execute concurrently? (and *your* code will never execute concurrently with *your* code) If you really want the gory details: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapi... -- 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-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- *Stefano Ciccarelli* stef...@indacosoftware.it *Indaco srl* via Sabin, 22 - 40017 San Giovanni in Persiceto (BO) - Italy tel. +39.051.827762 - fax +39.051.6874570 i...@indacosoftware.it www.indacosoftware.it *- This e-mail is confidential and may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail. Please then delete the e-mail and do not disclose its contents to any other person. - Le informazioni contenute in questa comunicazione sono riservate e destinate esclusivamente alla/e persona/e o all'ente sopra indicati.
[gwt-contrib] Re: Introduce RequestFactory#getEventBus, make RFEditorDriver use it, fix (issue896801)
http://gwt-code-reviews.appspot.com/896801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Introduce RequestFactory#getEventBus, make RFEditorDriver use it, fix (issue896801)
Submitting patch 1 per offline LGTM from Rodrigo. Will start a fresh issue limited to patch 2. On 2010/09/19 10:54:44, rjrjr wrote: http://gwt-code-reviews.appspot.com/896801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Introduce RequestFactory#getEventBus, make RFEditorDriver use it, fix (issue896801)
http://gwt-code-reviews.appspot.com/896801/diff/3001/2008 File user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java (right): http://gwt-code-reviews.appspot.com/896801/diff/3001/2008#newcode46 user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java:46: * @param P the type of Proxy being edited Too many @params. http://gwt-code-reviews.appspot.com/896801/diff/3001/2008#newcode51 user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java:51: private RequestObject? extends Object requestObject; Same as RequestObject? requestObject; http://gwt-code-reviews.appspot.com/896801/diff/3001/2010 File user/src/com/google/gwt/app/place/AbstractProxyListView.java (left): http://gwt-code-reviews.appspot.com/896801/diff/3001/2010#oldcode89 user/src/com/google/gwt/app/place/AbstractProxyListView.java:89: + init(Widget CellTableR ListPropertyColumnR, ? ) ); Did you want this to be initialize()? http://gwt-code-reviews.appspot.com/896801/diff/3001/2010 File user/src/com/google/gwt/app/place/AbstractProxyListView.java (right): http://gwt-code-reviews.appspot.com/896801/diff/3001/2010#newcode68 user/src/com/google/gwt/app/place/AbstractProxyListView.java:68: protected void init(Widget root, CellTableP table, Button newButton, Should this rather be initialize()? http://gwt-code-reviews.appspot.com/896801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Introduce RequestFactory#getEventBus, make RFEditorDriver use it, fix (issue896801)
Thanks, Rodrigo. Fixing the nits, but as I mentioned offline, I'm going to hold off on the remnant here until I fix the fundamental oops, creation places don't work now that we've moved entirely to EntityProxyId. http://gwt-code-reviews.appspot.com/896801/diff/3001/2008 File user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java (right): http://gwt-code-reviews.appspot.com/896801/diff/3001/2008#newcode46 user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java:46: * @param P the type of Proxy being edited On 2010/09/19 17:48:34, rchandia wrote: Too many @params. Done. http://gwt-code-reviews.appspot.com/896801/diff/3001/2008#newcode51 user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java:51: private RequestObject? extends Object requestObject; I would have sworn that was not true, but the compiler is clearly on your side. On 2010/09/19 17:48:34, rchandia wrote: Same as RequestObject? requestObject; http://gwt-code-reviews.appspot.com/896801/diff/3001/2010 File user/src/com/google/gwt/app/place/AbstractProxyListView.java (right): http://gwt-code-reviews.appspot.com/896801/diff/3001/2010#newcode68 user/src/com/google/gwt/app/place/AbstractProxyListView.java:68: protected void init(Widget root, CellTableP table, Button newButton, In this case I don't, because it's meant to replace Composite#init. So much for consistency. On 2010/09/19 17:48:34, rchandia wrote: Should this rather be initialize()? http://gwt-code-reviews.appspot.com/896801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Introduce RequestFactory#getEventBus, make RFEditorDriver use it, fix (issue896801)
http://gwt-code-reviews.appspot.com/896801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Migration from Long IDs to String IDs (issue898801)
LGTM On 2010/09/19 22:53:22, rchandia wrote: http://gwt-code-reviews.appspot.com/898801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] SimpleFoo now allows real creates and lookups. (issue900801)
Reviewers: pdr, Description: SimpleFoo now allows real creates and lookups. Please review this at http://gwt-code-reviews.appspot.com/900801/show Affected files: M user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java M user/test/com/google/gwt/requestfactory/server/SimpleBar.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: SimpleFoo now allows real creates and lookups. (issue900801)
LGTM http://gwt-code-reviews.appspot.com/900801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8821 committed - SimpleFoo now allows real creates and lookups....
Revision: 8821 Author: gwt.mirror...@gmail.com Date: Sun Sep 19 19:21:59 2010 Log: SimpleFoo now allows real creates and lookups. Review at http://gwt-code-reviews.appspot.com/900801 Review by: p...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8821 Modified: /trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java /trunk/user/test/com/google/gwt/requestfactory/server/SimpleBar.java === --- /trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java Sun Sep 19 16:42:30 2010 +++ /trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java Sun Sep 19 19:21:59 2010 @@ -250,38 +250,51 @@ public void testPersistExistingEntityNewRelation() { delayTestFinish(5000); -SimpleBarProxy newBar = req.create(SimpleBarProxy.class); - -final RequestObjectVoid barReq = req.simpleBarRequest().persist(newBar); -newBar = barReq.edit(newBar); -newBar.setUserName(Amit); - -final SimpleBarProxy finalNewBar = newBar; -req.simpleFooRequest().findSimpleFooById(999L).fire( -new ReceiverSimpleFooProxy() { - @Override - public void onSuccess(SimpleFooProxy response) { -RequestObjectVoid fooReq = req.simpleFooRequest().persist( -response); -response = fooReq.edit(response); -response.setBarField(finalNewBar); -fooReq.fire(new ReceiverVoid() { +// Make a new bar +SimpleBarProxy makeABar = req.create(SimpleBarProxy.class); +RequestObjectSimpleBarProxy persistRequest = req.simpleBarRequest().persistAndReturnSelf( +makeABar); +makeABar = persistRequest.edit(makeABar); +makeABar.setUserName(Amit); + +persistRequest.fire(new ReceiverSimpleBarProxy() { + @Override + public void onSuccess(final SimpleBarProxy persistedBar) { + +// It was made, now find a foo to assign it to +req.simpleFooRequest().findSimpleFooById(999L).fire( +new ReceiverSimpleFooProxy() { @Override - public void onSuccess(Void response) { -req.simpleFooRequest().findSimpleFooById(999L).with( -barField.userName).fire(new ReceiverSimpleFooProxy() { + public void onSuccess(SimpleFooProxy response) { + +// Found the foo, edit it +RequestObjectVoid fooReq = req.simpleFooRequest().persist( +response); +response = fooReq.edit(response); +response.setBarField(persistedBar); +fooReq.fire(new ReceiverVoid() { @Override - public void onSuccess(SimpleFooProxy finalFooProxy) { -// barReq hasn't been persisted, so old value -assertEquals(FOO, -finalFooProxy.getBarField().getUserName()); -finishTestAndReset(); + public void onSuccess(Void response) { + +// Foo was persisted, fetch it again check the goods +req.simpleFooRequest().findSimpleFooById(999L).with( +barField.userName).fire( +new ReceiverSimpleFooProxy() { + + // Here it is + @Override + public void onSuccess(SimpleFooProxy finalFooProxy) { +assertEquals(Amit, +finalFooProxy.getBarField().getUserName()); +finishTestAndReset(); + } +}); } }); } }); - } -}); + } +}); } /* === --- /trunk/user/test/com/google/gwt/requestfactory/server/SimpleBar.java Sun Sep 19 16:42:30 2010 +++ /trunk/user/test/com/google/gwt/requestfactory/server/SimpleBar.java Sun Sep 19 18:13:59 2010 @@ -17,8 +17,10 @@ import com.google.gwt.requestfactory.shared.Id; -import java.util.Collections; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletRequest; @@ -29,16 +31,16 @@ /** * DO NOT USE THIS UGLY HACK DIRECTLY! Call {...@link #get} instead. */ - private static SimpleBar jreTestSingleton = new SimpleBar(); - - private static Long nextId = 1L; + private static MapString, SimpleBar jreTestSingleton = new HashMapString, SimpleBar(); + + private static long nextId = 2L; public static Long countSimpleBar() { -return 1L; + return (long) get().size(); } public static ListSimpleBar findAll() { -return Collections.singletonList(get()); +return new ArrayListSimpleBar(get().values()); } public static SimpleBar findSimpleBar(String id) { @@ -46,11
[gwt-contrib] Re: Adds support for List collections. Request methods are now permitted to return (issue893801)
The patch did not apply cleanly. I went through and tried to provide some feedback anyway. http://gwt-code-reviews.appspot.com/893801/diff/16001/17001 File user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonProxyListRequest.java (right): http://gwt-code-reviews.appspot.com/893801/diff/16001/17001#newcode22 user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonProxyListRequest.java:22: import com.google.gwt.requestfactory.shared.SyncResult; SyncResult has been removed? http://gwt-code-reviews.appspot.com/893801/diff/16001/17001#newcode54 user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonProxyListRequest.java:54: public void handleResult(Object jsoResult, SetSyncResult syncResults) { 1.5-ism: @Override http://gwt-code-reviews.appspot.com/893801/diff/16001/17002 File user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonValueListRequest.java (right): http://gwt-code-reviews.appspot.com/893801/diff/16001/17002#newcode22 user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonValueListRequest.java:22: import com.google.gwt.requestfactory.shared.SyncResult; SyncResult was removed? http://gwt-code-reviews.appspot.com/893801/diff/16001/17003 File user/src/com/google/gwt/requestfactory/client/impl/AbstractRequest.java (right): http://gwt-code-reviews.appspot.com/893801/diff/16001/17003#newcode197 user/src/com/google/gwt/requestfactory/client/impl/AbstractRequest.java:197: th...@com.google.gwt.requestfactory.client.impl.abstractrequest::pushToValueStore(Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)(schemaAndId[2], jso); Was the change to '2' intentional here? http://gwt-code-reviews.appspot.com/893801/diff/16001/17006 File user/src/com/google/gwt/requestfactory/client/impl/JsoList.java (right): http://gwt-code-reviews.appspot.com/893801/diff/16001/17006#newcode217 user/src/com/google/gwt/requestfactory/client/impl/JsoList.java:217: return (T) rf.getValueStore().getRecordBySchemaAndId(rf.getSchema(key[2]), getRecordBySchemaAndId is not applicable for the arguments. Could it be because the patch did not apply cleanly? http://gwt-code-reviews.appspot.com/893801/diff/16001/17013 File user/src/com/google/gwt/requestfactory/shared/impl/CollectionProperty.java (right): http://gwt-code-reviews.appspot.com/893801/diff/16001/17013#newcode29 user/src/com/google/gwt/requestfactory/shared/impl/CollectionProperty.java:29: public class CollectionPropertyC extends Collection, E extends PropertyC { Maybe add a comment that this handles Lists and Sets or is that a given? http://gwt-code-reviews.appspot.com/893801/diff/16001/17014 File user/src/com/google/gwt/requestfactory/shared/impl/TypeLibrary.java (right): http://gwt-code-reviews.appspot.com/893801/diff/16001/17014#newcode60 user/src/com/google/gwt/requestfactory/shared/impl/TypeLibrary.java:60: public static boolean isProxyType(Class? type) { Should this check for EntityProxy as a super type? http://gwt-code-reviews.appspot.com/893801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors