GWT CELLTABLE : How to add empty row in celltable with different celltype
Hi, How to add empty row in celltable with different celltype ? 4 columns present in my celltable i.e DatePickerCell,EditTextCell,NumberCell,SelectionCell I can able to set record values in cell with different celltype. I want to add empty row with different cell type in celltable also want few of them editable and rest are non-editable. I want to do MassUpdate in Celltable.So I required 1st row as empty because whenever I will change value in particular cell which editable then all values in that column should be updated immediately Suppose I edited value in edittextcell of 1st empty row then all values in same column should be edited immediately. Any help or guidance in this matter would be appreciated -- Best Regards, Vaibhav Bhalke http://about.me/vaibhavbhalke -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: java.util.Date serialization on RPC...
Ok, i've resolved the mistery... And if anyone is wondering, here's how it works. The date is a simple Long value containing the milliseconds. It is encoded in something that looks like base64, but using this characters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_ Where: A = 0 B = 1 _ = 63 BA = 64 P__ = -1 P_$ = -2 So, my code to convert it back to a long ended up like this: const gwtLongChars = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_ func ToLong(v string) (int64, os.Error) { var t int64 = 0 for i := 0; i len(v); i++ { c := v[i:i+1] idx := strings.Index(gwtLongChars, c) if idx 0 { return 0, os.NewError(fmt.Sprintf(Not long GWT, found: %s, c)) } t = t * 64 + int64(idx) } return t, nil } Hope it's helpful for someone else. Thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/etV_oYxeMI0J. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Strange session/cookies problem
Hi all, I have an application that's been in use for the last 6 months or so and will be going into production 2 months. I've now see two instances of the problem described below and I'm fairly lost on how it could possibly happen. The client first needs to login. When the server authenticates the credentials sent by the client, the server returns a User object which has a subset of the user's properties (a 'light' user object), plus the session ID as retrieved on the server by calling getThreadLocalRequest().getSession().getId(). The server keeps a hashmap of session IDs against a fully populated user object (which includes their permissions properties amongst other things). Whenever a client accesses a GWT-RPC that should be protected, one of the parameters of the RPC is the light user object that the client has received from the server. The server authenticates this by: 1) Using HttpServletRequest.isRequestedSessionIdValid() 2) Comparing the session ID sent by the client (as stored in the light user object) and the one stored by the server's hashmap, and the one sent in the RPC's getThreadLocalRequest().getSession.getId(). Any inconsistency between the three raises an exception. Recently, the second occurrence of a weird error happened: The client has a timer which fires one of these RPCs every 5 seconds to refresh a table. This works really really well - we're using SmartGWT to have a grid that loads new data without the need to flicker or refresh (new rows simply appear, or existing rows update their data every 5 seconds). On this RPC's callback onFailure I just give a generic message with a caught.getMessage() appearing in a popup. I've had two instances reported by two different users on two different computers now (but both Chrome) this page has shown a popup showing my generic error, but the contents of the error is actually an error page from another website. Its almost as though GWT made the RPC call to the wrong server! (the user sent me a screenie, and surely in my popup there's a 403 error from the gov website) This completely blows my mind. Both instances the error was from a different website (one was a horse racing site, one a government site). I haven't been able to confirm yet whether the users were actually on those sites at any stage or whether there were cookies from those sites (also note I do not specifically use the Cookies class, and I can verify in Chrome that the JSESSIONID cookie is set with the correct domain and path). I haven't been able to replicate this either. I'm open to any suggestions on how this could be possible. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Strange session/cookies problem
Apologies, the most recent error was captured in FF4. On Aug 11, 6:02 pm, sunny...@gmail.com sunny...@gmail.com wrote: Hi all, I have an application that's been in use for the last 6 months or so and will be going into production 2 months. I've now see two instances of the problem described below and I'm fairly lost on how it could possibly happen. The client first needs to login. When the server authenticates the credentials sent by the client, the server returns a User object which has a subset of the user's properties (a 'light' user object), plus the session ID as retrieved on the server by calling getThreadLocalRequest().getSession().getId(). The server keeps a hashmap of session IDs against a fully populated user object (which includes their permissions properties amongst other things). Whenever a client accesses a GWT-RPC that should be protected, one of the parameters of the RPC is the light user object that the client has received from the server. The server authenticates this by: 1) Using HttpServletRequest.isRequestedSessionIdValid() 2) Comparing the session ID sent by the client (as stored in the light user object) and the one stored by the server's hashmap, and the one sent in the RPC's getThreadLocalRequest().getSession.getId(). Any inconsistency between the three raises an exception. Recently, the second occurrence of a weird error happened: The client has a timer which fires one of these RPCs every 5 seconds to refresh a table. This works really really well - we're using SmartGWT to have a grid that loads new data without the need to flicker or refresh (new rows simply appear, or existing rows update their data every 5 seconds). On this RPC's callback onFailure I just give a generic message with a caught.getMessage() appearing in a popup. I've had two instances reported by two different users on two different computers now (but both Chrome) this page has shown a popup showing my generic error, but the contents of the error is actually an error page from another website. Its almost as though GWT made the RPC call to the wrong server! (the user sent me a screenie, and surely in my popup there's a 403 error from the gov website) This completely blows my mind. Both instances the error was from a different website (one was a horse racing site, one a government site). I haven't been able to confirm yet whether the users were actually on those sites at any stage or whether there were cookies from those sites (also note I do not specifically use the Cookies class, and I can verify in Chrome that the JSESSIONID cookie is set with the correct domain and path). I haven't been able to replicate this either. I'm open to any suggestions on how this could be possible. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT with Oracle
I know what my problem that I have misconfigured the server. Now let's see how it is configured, thanks for the help. Un saludo - Gema Matesanz -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: onsubmit complete called in windows but problem in linux
Hi Aman I'm very surprised about your issue : FileUpload works under Window not Linux. It smells file READ/WRITE permission Have a reflection about this : 1) From point of view of client ( browser), an upload is no more than a HTTP form POST with input type=file ../. The browser let you choose a file from client local File System, with the standard OS OpenFile dialogbox according to RFC 1867. The client part is standard and don't depend upon your Operationg System and the browser you use e.g IE, Mozilla family, Opera, Apple SAFARI. GWT client part upload capability don't transgress this standard, just wrap it in a friendly way. Do you agree ? 2) The server part is the process receiving the POST HTTP, it can be a JAVA Servlet, a PHP script etc...THIS PROCESS HAVE AN OWNER FROM THE POINT OF VIEW OF OS READ/WRITE PERMISSION. - For this process you have to define the path where the file will be witten on the Server File System with a configuration directive. - If, let says, you define C:\WebUploadFile\users\bob it won't work under Linux, because Linux don't understand what is C:\WebUploadFile So, set the path according to your OS path syntax. - If you use Tomcat, on window, it works ! I agree. It could also works on window if you define the path like that /WebUploadFile/users/bob because JVM has an intelligent path syntax managment. So, prefer UNIX like path syntax. - Under Linux, the process generally has the same permission than the server itself. I mean TOMCAT/TOMCAT owner/group. If you upload a file, and try to writte it on, let says, /var/webupload/users/bob, you have to ensure that the TOMCAT/TOMCAT profil has permission to write in this directory !!! - On window, permissions are blurred, so as TOMCAT is installed as a service, may be it can write anywhere on Win filesystem. Try to check these points, may be it's the problem. The same issue can appear on other J2EE server ( JBOSS, WebSphere, GlassFish...). It's not related to GWT. I hope it helps. Regards. Karim Duran 2011/8/11 aman bhatia.ama...@gmail.com Thanks for your reply,though I am not using gwt-upload but I tried initially but it did not worked according to my expectations so now I am using the simple FileUpload control.It is working well in windows but not in linux can you suggest me some reason why this is happening because at the moment I am completely unable to figure out a reason why this is happening so. On Aug 10, 4:29 pm, Jeff Chimene jchim...@gmail.com wrote: On 08/10/2011 04:26 AM, aman wrote: Hi, I have created a file upload system which allows the user to upload .txt,.xls and .csv formats.When I executed in windows it is running fine but now when I deployed the application inlinux(Debian) using tomcat server I am facing this issue: The onsubmit method is called for all the file formats. onSubmitCompletemethod is called only when text files are uploaded.I want to useonSubmitCompleteevent as I am using progress bar and wanted to perform necessary action on this event. Have you considered gwt-upload? I think it works w/ Tomcat. I've had great luck with it cross-platform. -- 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.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-toolkit@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: onsubmit complete called in windows but problem in linux
What isn't working -- upload (you don't see the call), server processing, there isn't any response? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/y9045fW3MMEJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT 2.3.0 Upgrade
Hi, We have upgraded our project from GWT 1.6.4 to GWT 2.3.0, for this purpose I have changed the required gwt jars. gwt-log-3.1.3.jar (GWT 2.3 compatible) is one of them which is a replacement for gwt-log-2.6.2.jar. After this the server-side log messages (Log.debug, Log.error, etc) are not getting displayed on the IDE (eclipse 3.5) console as earlier. Anyone who is aware of the root cause for this issue, please help me out. gwt.xml configuration for the logging is as follows: inherits name=com.allen_sauer.gwt.log.gwt-log-DEBUG / set-property name=log_level value=DEBUG / -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Strange session/cookies problem
How manage authorization and authentication? 2011/8/11 sunny...@gmail.com sunny...@gmail.com Hi all, I have an application that's been in use for the last 6 months or so and will be going into production 2 months. I've now see two instances of the problem described below and I'm fairly lost on how it could possibly happen. The client first needs to login. When the server authenticates the credentials sent by the client, the server returns a User object which has a subset of the user's properties (a 'light' user object), plus the session ID as retrieved on the server by calling getThreadLocalRequest().getSession().getId(). The server keeps a hashmap of session IDs against a fully populated user object (which includes their permissions properties amongst other things). Whenever a client accesses a GWT-RPC that should be protected, one of the parameters of the RPC is the light user object that the client has received from the server. The server authenticates this by: 1) Using HttpServletRequest.isRequestedSessionIdValid() 2) Comparing the session ID sent by the client (as stored in the light user object) and the one stored by the server's hashmap, and the one sent in the RPC's getThreadLocalRequest().getSession.getId(). Any inconsistency between the three raises an exception. Recently, the second occurrence of a weird error happened: The client has a timer which fires one of these RPCs every 5 seconds to refresh a table. This works really really well - we're using SmartGWT to have a grid that loads new data without the need to flicker or refresh (new rows simply appear, or existing rows update their data every 5 seconds). On this RPC's callback onFailure I just give a generic message with a caught.getMessage() appearing in a popup. I've had two instances reported by two different users on two different computers now (but both Chrome) this page has shown a popup showing my generic error, but the contents of the error is actually an error page from another website. Its almost as though GWT made the RPC call to the wrong server! (the user sent me a screenie, and surely in my popup there's a 403 error from the gov website) This completely blows my mind. Both instances the error was from a different website (one was a horse racing site, one a government site). I haven't been able to confirm yet whether the users were actually on those sites at any stage or whether there were cookies from those sites (also note I do not specifically use the Cookies class, and I can verify in Chrome that the JSESSIONID cookie is set with the correct domain and path). I haven't been able to replicate this either. I'm open to any suggestions on how this could be possible. -- 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.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-toolkit@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: Cannot display Facebook Like or Send button in GWT
Probably you may find something in this https://groups.google.com/d/topic/google-web-toolkit/XK0L5uiKh1A/discussion http://code.google.com/p/gwtfb/ I noticed they were using anchors etc. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/x2DRtgSjI44J. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellTree and SelectionModel
Hi, thanks for the link, but I think the example is a different case. In the example tree, they apply the selectionModel only for the 'Song' layer, which never contains anything but leaf nodes. In my case, there's layers with both leaf- and subtree nodes. Like in a filesystem tree, where there's both files and subdirectories on the same level. When simply applying a SingleSelectionModel to any kind of node, I get weird behaviour upon selection (multiple tree nodes get selected, each on every expanded tree layer). On 11 Aug., 09:47, Peter Nøbbe akpe...@gmail.com wrote: Hi mate... Take a look on this.. http://www.google.com/codesearch/p?hl=en#A1edwVHBClQ/user/javadoc/com... This will help you get to the leafs en a mulit layed tree. Basicly what you need to do is just create a selection model and parse it into the node... -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Support for Tablets
We have an browser based application build using gwt 2.3 (IE9 compatible). We are going to try to test the application on some new tablets like the iPad2, xoom, and the BlackBerry Playbook. Is there any informaiton on the compatibility of the GWT 2.3 on these devices? 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-toolkit@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.
Resizable panel-like widget
I'm looking for a panel-like widget that can be resized (vertically) when the users clicks and moves its bottom/top end. Couldn't find anything suitable in GWT's Showcase app. -Alex -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/5YmF6b_ZqxYJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: scrolling in iPad
Thanks everyone who pointed out that it works in 2.3! I was not aware of that or I'd have moved... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/TI046TVRFBsJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT CELLTABLE : How to add empty row in celltable with different celltype
You need custom cell that overrides render method to choose proper cell to render. Something like this: MyCell extends AbstractCell . . ... @Override public void render(Cell.Context context, C value, com.google.gwt.safehtml.shared.SafeHtmlBuilder sb) { CellC cell = getCell(context, value); actual = cell; cell.render(context, value, sb); }; public abstract CellC getCell(Cell.Context context, C value); Actual cell should be stored to be receiver of browser events in onBrowserEvent @Override public void onBrowserEvent(Cell.Context context, Element parent, C value, NativeEvent event, ValueUpdaterC valueUpdater) { if (actual == null) { return; } else { actual.onBrowserEvent(context, parent, value, event, valueUpdater); } }; On Aug 11, 9:13 am, vaibhav bhalke bhalke.vaib...@gmail.com wrote: Hi, How to add empty row in celltable with different celltype ? 4 columns present in my celltable i.e DatePickerCell,EditTextCell,NumberCell,SelectionCell I can able to set record values in cell with different celltype. I want to add empty row with different cell type in celltable also want few of them editable and rest are non-editable. I want to do MassUpdate in Celltable.So I required 1st row as empty because whenever I will change value in particular cell which editable then all values in that column should be updated immediately Suppose I edited value in edittextcell of 1st empty row then all values in same column should be edited immediately. Any help or guidance in this matter would be appreciated -- Best Regards, Vaibhav Bhalke http://about.me/vaibhavbhalke -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
JavaScriptException: Cannot call method 'nullMethod' of null arguments: nullMethod
I'm having an issue with my GWT/GAE app. Whenever it returns one specific kind of serialized object from the backend via RPC, I get this exception and a failure. I know the code is working on the backend (it'll be included under the stack trace). (Exception) com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'nullMethod' of null arguments: nullMethod, type: non_object_property_call stack: TypeError: Cannot call method 'nullMethod' of null at Object.ClientPlayer_1 (http://rpstag.appspot.com/ com.MES.Tap2/A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:993:89) at Object.ClientPlayer_0 (http://rpstag.appspot.com/ com.MES.Tap2/A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:984:18) at Array.instantiate_1 [as 0] (http://rpstag.appspot.com/ com.MES.Tap2/A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:1031:10) at $instantiate_0 (http://rpstag.appspot.com/com.MES.Tap2/ A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:10660:34) at $instantiate (http://rpstag.appspot.com/com.MES.Tap2/ A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:1948:10) at $readObject (http://rpstag.appspot.com/com.MES.Tap2/ A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:10148:95) at Object.read_8 [as read] (http://rpstag.appspot.com/ com.MES.Tap2/A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:10608:10) at $onResponseReceived (http://rpstag.appspot.com/com.MES.Tap2/ A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:10352:247) at $fireOnResponseReceived (http://rpstag.appspot.com/ com.MES.Tap2/A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:5002:5) at Object.onReadyStateChange (http://rpstag.appspot.com/ com.MES.Tap2/A37A2E2E9A65DB1BAAE2BFA42572F7F8.cache.html:5222:5) (Code) @Override public ClientPlayer login(String uid) { PersistenceManager pm=PMF.get().getPersistenceManager(); log.warning(Player.class.getName()); log.warning(uid); Key k=KeyFactory.createKey(Player.class.getSimpleName(), uid); Player p; ListListInteger stats; try{ p=pm.getObjectById(Player.class, k); } catch (JDOObjectNotFoundException e){ p=new Player(uid); p.setKey(k); pm.makePersistent(p); } finally { pm.close(); } stats=p.getStats(); return new ClientPlayer(p.getUID(),p.getPerm(), p.getDecks(),stats.get(0), stats.get(1), stats.get(2)); } If you have anything else you want me to post, I'll be happy to provide it. Thanks! -Sam -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Can't get correct DOMImpl when chromeframe installed but turned off
Hi, I created below issue couple of days ago but no one replied http://code.google.com/p/google-web-toolkit/issues/detail?id=6665 this issue happened to me with chrome frame 12 + IE8, it always bind WebKit DOMImpl even when chromeframe is disabled. is there a way to fix this? Thanks, Rick -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Runtime issue with RTL support for CssResource
Hi all, I'm having a weird issue when I run a war I created using the Maven plugin (gwt.version is 2.3.0): plugin groupIdorg.codehaus.mojo/groupId artifactIdgwt-maven-plugin/artifactId version${gwt.version}/version dependencies dependency groupIdcom.google.gwt/groupId artifactIdgwt-user/artifactId version${gwt.version}/version /dependency dependency groupIdcom.google.gwt/groupId artifactIdgwt-dev/artifactId version${gwt.version}/version /dependency /dependencies configuration logLevelINFO/logLevel extraJvmArgs-Xmx512m -Xss1024k/extraJvmArgs module${gwt.module.name}/module runTargetfront.html/runTarget webappDirectory${gwt.output.directory}/webappDirectory style${gwt.style}/style /configuration executions execution goals goalcompile/goal /goals /execution /executions /plugin The browser cannot open the main page because it complains about LAST_STRONG_IS_RTL_RE is undefined. I've checked ant noticed LAST_STRONG_IS_RTL_RE is a regular expression declared in class com.google.gwt.i18n.shared.BidiUtils. And this class exists in the dependencies above. When I run the same code in embedded mode, everything runs fine. Also, I've noticed that this issue appeared after I introduced a class extending CssResource in my code to manage CSS styles. I cannot find any occurrence of this issue on the web, so I guess I'm just missing something obvious, but cannot find out what. Could anyone give me a hint? Thanks a lot for your feedback -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Designer: some panels showing up blank
GWT Designer version: 2.3.2r36 Google Plugin: 2.3.3r36 GWT version: 2.30r36 Eclipse version: Helios Service Release 1, build 20100917-0705 JDK version: 1.6u26 OS version: Windows 7, 32-bit When using CaptionPanel elements in GWT Designer, they tend to go blank in Design View. Sometimes on first creating them, their contents will show properly, but then any change to the template will cause everything to become invisible, forcing designers here to work with the XML. I've tried switching templates to use VerticalPanel's instead of CaptionPanel's, and it is better, but if there are a lot of widgets in a VerticalPanel, the last few widgets still show up blank. I'm appending a sample template which has that problem. The last ten labels are invisible. We depend a lot on GWT Designer here, so that is why I am posting. My two colleagues are having the same issues as me. I've been flipping between different versions of GWT Designer, and GWT, but can't shake the problem. I've also tried increasing the memory available to Eclipse and it makes no difference. I hope Mr Clayberg will be able to look at this. James !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui g:VerticalPanel g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ g:Label text=New Label/ /g:VerticalPanel /ui:UiBinder -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem with css and clientbundle and uibinder
i gor it working by referencing the Resources-class from my Composite class like this: @UiField(provided=true) final Resources resources; and in contructor i did: this.resources = GWT.create(Resources.class); this.resources.css().ensureInjected(); however isn't this supposed to work also with uibinder only (i mean without calling ensureInjected() from somewhere)? thank you! On Thu, Aug 11, 2011 at 1:01 PM, Daniel Guggi daniel.gu...@gmail.comwrote: hi, i'm trying to use a css-clientbundle and uibinder like this: *Resources.java* package gwtapp.client.resources; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.CssResource; public interface Resources extends ClientBundle { @Source(Style.css) Style css(); public interface Style extends CssResource { String header(); } } *Style.css* .header { background-color: red; color: green; } *in uiBinder-template i do:* !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:with field=resources type=gwtapp.client.resources.Resources / ... g:HTMLPanel styleName={resources.css.header} span class={resources.css.header}Multi-Display Hello MVP With Gin yay!/span /g:HTMLPanel ... The applications compiles (dev-mode) and runs. When I check the dom-tree of the page (with firebug) is can see that the class element ist generated like the docs say: div class=*GBMET5DDPF* style=position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;span class=*GBMET5DDPF*Multi-Displa However there is now style-sheet containing a class *GBMET5DDPF *available (according to firebug there are GwtApp.css and clean.css but not that contains a class *GBMET5DDPF*)?* *what am i doing wrong here? thank you! daniel -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Compiler Errors
Hello, I am getting compile errors. Looks like caching or synchronize problems. [java] Caused by: javax.imageio.IIOException: Can't create cache file! [java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:397) [java] at javax.imageio.ImageIO.write(ImageIO.java:1558) [java] ... 35 more [java] Caused by: java.io.FileNotFoundException: Z: \imageio2197704682044189508.tmp (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird) [java] at java.io.RandomAccessFile.open(Native Method) [java] at java.io.RandomAccessFile.init(RandomAccessFile.java: 212) [java] at javax.imageio.stream.FileCacheImageOutputStream.init(FileCacheImageOutputStream.java: 73) [java] at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(OutputStreamImageOutputStreamSpi.java: 50) [java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:393) [java] ... 36 more --- C:\...\build\build.xml:459: IOException in C:\...\build\tmp\web\WEB-INF \config\coreReportInvoiceConfig.xml - java.io.FileNotFoundException:C: \...build\tmp\web\WEB-INF\config\rep1473609419171320889.tmp (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird) in english: process cannot access file, another process uses this file --- same exception again... but different file [java] Caused by: javax.imageio.IIOException: Can't create cache file! [java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:397) [java] at javax.imageio.ImageIO.write(ImageIO.java:1558) [java] ... 35 more [java] Caused by: java.io.FileNotFoundException: Z: \imageio5137244568657246113.tmp (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird) [java] at java.io.RandomAccessFile.open(Native Method) [java] at java.io.RandomAccessFile.init(RandomAccessFile.java: 212) [java] at javax.imageio.stream.FileCacheImageOutputStream.init(FileCacheImageOutputStream.java: 73) [java] at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(OutputStreamImageOutputStreamSpi.java: 50) [java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:393) [java] ... 36 more --- If I compile again and again, I got different exceptions, like these: I already changed the extra and workDir to an RamDisk, deleted these directories before compiling, Deleted these directories before the build, but got same errors again. I also changed number of workers to 1. Any suggestions? Greetings, Matthias -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT UiBinder - Overload with added method when parameter is 'string'
Please help me! MyBaseTabPanel.java has a method: ... public void setTabPosition(TabPosition tabPosition) { this.tabPosition = tabPosition; updateStyles(); } ... MyTabPanel.java extends MyBaseTabPanel.java and overload method 'setTabPosition': public class MyTabPanel extends MyBaseTabPanel { ... public void setTabPosition(String tabPosition) { this.setTabPosition(TabPosition.valueOf(tabPosition.toUpperCase())); } ... } Form.ui.xml: ... my:MyTabPanel tabPosition=bottom ... /my:MyTabPanel /ui:UiBinder But this fails! [ERROR] Cannot parse value: bottom as type TabPosition [ERROR] Cannot parse attribute tabPosition Element sbgwt:GxtTabPanel tabPosition='bottom' (:14) But if move one of the overload method in MyBaseTabPanel or MyTabPanel then it works Why? -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT 2.4.0. rc1 Could not find static method with a single parameter of a key type
Hi all, I have one entity Device that is stored in database and Two proxies for that entity, one EntityProxy and one ValueProxy. class Device { @Id private Long id; public Long getId(); public Integer getVersion(); public String getMac(); public void setMac(String mac); } The entity proxy for Device entity is: @ProxyFor(value = Device.class, locator = DeviceLocator.class) interface DeviceProxy extends EntityProxy { String getMac(); void setMac(String mac); } The value proxy for Device entity is: @ProxyFor(Device.class) public interface DeviceInfoProxy extends ValueProxy { String getMac(); } I load devices from server with methods: RequestListDeviceProxy getAllDevices(); RequestDeviceInfoProxy getDeviceWithMac(String mac); with version GWT 2.2.0 this works just fine. I migrate to version GWT 2.4.0 rc1 and when I try to load devices I receive error: com.google.web.bindery.requestfactory.server.UnexpectedException: Could not find static method with a single parameter of a key type at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:216) at com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(ReflectiveServiceLayer.java:253) at com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(ReflectiveServiceLayer.java:271) at com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(ReflectiveServiceLayer.java:271) at com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.isLive(ReflectiveServiceLayer.java:200) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(ServiceLayerDecorator.java:116) at com.google.web.bindery.requestfactory.server.LocatorServiceLayer.doIsLive(LocatorServiceLayer.java:186) at com.google.web.bindery.requestfactory.server.LocatorServiceLayer.isLive(LocatorServiceLayer.java:85) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(ServiceLayerDecorator.java:116) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(ServiceLayerDecorator.java:116) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.createReturnOperations(SimpleRequestProcessor.java:270) ... and so on. So from the stack trace above I understand that for some reason, DeviceLocator for Device entity is not used and Request Factory tries to find static method findDevice in Device object, and when that method is not found throw exception. I debug and notice that in ServiceLayerCache in method getOrCache(), when methodMap is filled, for Device entity create Pair object with Device and BaseProxy, and in the map do not put any locator for Device entity. So I add DeviceLocator to DeviceInfoProxy (that is ValueProxy). This fixed the problem, but I do not understand what was the problem? why this fix the problem? and is this the right way to fix the problem? I do not have problem with another Entity objects or proxies in my project. I just have this problem only for Device entity and Device entity is the only one entity that have Two DTO (EntityProxy/ValueProxy) objects. Thanks, Lazo Apostolovski -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/m4yVVnGytC0J. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT RPC NOT working with Tomcat
My GWT rpc message works well in development mode, but has the following behaviour when deployed in Tomcat: - The call DOES go through to the server_ I can see from the log files and the database insert happens successfully. - But the callback methods in my JavaScript is never executed. It is as if the response message back got stuck or loss. There is NO error message in the Tomcat logs. See below. I've disabled the Windows firewall to make sure it is not that. Double checked the jars deployed. How do I debug this? I'm STUCK - please help. Remember this is working in eclipsenot in Tomcat. I'm using GWT 2.3 and Smart GWT 2.5 - this call is a GWT RPC call - here's the code: @RemoteServiceRelativePath(miscService) public interface MiscService extends RemoteService { UserSessionDto beginUserSession(String token) throws BookAServiceException; } public interface MiscServiceAsync { void beginUserSession(String token, AsyncCallbackUserSessionDto callback); } public class MiscServiceImpl extends RemoteServiceServlet implements MiscService { public UserDetailDto userLogin(String email, String password, String sessionId) throws BookAServiceException { UserDetailDto userDetailDto = null; try { . } catch (Throwable e) { throw new BookAServiceException(e); } return userDetailDto; } } Tomcat logs: Aug 11, 2011 3:25:52 PM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.20. Aug 11, 2011 3:25:52 PM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. Aug 11, 2011 3:25:52 PM org.apache.coyote.AbstractProtocolHandler init INFO: Initializing ProtocolHandler [http-apr-8080] Aug 11, 2011 3:25:52 PM org.apache.coyote.AbstractProtocolHandler init INFO: Initializing ProtocolHandler [ajp-apr-8009] Aug 11, 2011 3:25:52 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 789 ms Aug 11, 2011 3:25:52 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Aug 11, 2011 3:25:52 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.6 Aug 11, 2011 3:25:52 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive BookAService.war === 2011-08-11 15:25:59,241 [ad-2] INFO DispatcherServlet - FrameworkServlet 'bookaservice': initialization started === 2011-08-11 15:25:59,304 [ad-2] INFO XmlWebApplicationContext - Refreshing org.springframework.web.context.support.XmlWebApplicationContext@746a63d3: display name [WebApplicationContext for namespace 'bookaservice- servlet']; startup date [Thu Aug 11 15:25:59 CAT 2011]; root of context hierarchy === 2011-08-11 15:25:59,366 [ad-2] INFO XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/ bookaservice-servlet.xml] === 2011-08-11 15:25:59,444 [ad-2] INFO XmlWebApplicationContext - Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@746a63d3]: org.springframework.beans.factory.support.DefaultListableBeanFactory@538eb7b8 === 2011-08-11 15:25:59,475 [ad-2] INFO DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@538eb7b8: defining beans [urlMapping,hibernateOperationsController]; root of factory hierarchy === 2011-08-11 15:25:59,522 [ad-2] INFO DispatcherServlet - FrameworkServlet 'bookaservice': initialization completed in 234 ms ISC: Configuring log4j from: file:/C:/Dev/apache-tomcat-7.0.6/webapps/ BookAService/WEB-INF/classes/log4j.isc.config.xml === 2011-08-11 15:25:59,538 [ad-2] INFO ISCInit - Isomorphic SmartClient Framework - Initializing === 2011-08-11 15:25:59,553 [ad-2] INFO ConfigLoader - Attempting to load framework.properties from CLASSPATH === 2011-08-11 15:25:59,662 [ad-2] INFO ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/ Dev/apache-tomcat-7.0.6/webapps/BookAService/WEB-INF/lib/ isomorphic_core_rpc.jar!/framework.properties === 2011-08-11 15:25:59,662 [ad-2] INFO ConfigLoader - Attempting to load project.properties from CLASSPATH === 2011-08-11 15:25:59,662 [ad-2] INFO ConfigLoader - Unable to locate project.properties in CLASSPATH === 2011-08-11 15:25:59,678 [ad-2] INFO ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/ C:/Dev/apache-tomcat-7.0.6/webapps/BookAService/WEB-INF/lib/ isomorphic_core_rpc.jar!/isc_interfaces.properties === 2011-08-11 15:25:59,678 [ad-2] INFO ConfigLoader - Attempting to load server.properties from CLASSPATH === 2011-08-11 15:25:59,678 [ad-2] INFO ConfigLoader - Successfully loaded server.properties from
Re: Strange session/cookies problem
Authentication is done once at login. The user credentials are sent to the server using GWT-RPC, and the server authenticates using LDAP. Once authenticated, the user loads the full user object into the hashmap keyed by session IDs. Part of this user object contains a hashmap of permissions allowable by this user (loaded from a database). When a client calls a GWT-RPC, the checked session ID is used to retrieve the user object on the server side, and its hashmap of permissions is checked to see it contains the required permissions for using that GWT-RPC. How does my mechanism of authentication/authorisation affect the scenario I described? On Aug 11, 9:35 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: How manage authorization and authentication? 2011/8/11 sunny...@gmail.com sunny...@gmail.com Hi all, I have an application that's been in use for the last 6 months or so and will be going into production 2 months. I've now see two instances of the problem described below and I'm fairly lost on how it could possibly happen. The client first needs to login. When the server authenticates the credentials sent by the client, the server returns a User object which has a subset of the user's properties (a 'light' user object), plus the session ID as retrieved on the server by calling getThreadLocalRequest().getSession().getId(). The server keeps a hashmap of session IDs against a fully populated user object (which includes their permissions properties amongst other things). Whenever a client accesses a GWT-RPC that should be protected, one of the parameters of the RPC is the light user object that the client has received from the server. The server authenticates this by: 1) Using HttpServletRequest.isRequestedSessionIdValid() 2) Comparing the session ID sent by the client (as stored in the light user object) and the one stored by the server's hashmap, and the one sent in the RPC's getThreadLocalRequest().getSession.getId(). Any inconsistency between the three raises an exception. Recently, the second occurrence of a weird error happened: The client has a timer which fires one of these RPCs every 5 seconds to refresh a table. This works really really well - we're using SmartGWT to have a grid that loads new data without the need to flicker or refresh (new rows simply appear, or existing rows update their data every 5 seconds). On this RPC's callback onFailure I just give a generic message with a caught.getMessage() appearing in a popup. I've had two instances reported by two different users on two different computers now (but both Chrome) this page has shown a popup showing my generic error, but the contents of the error is actually an error page from another website. Its almost as though GWT made the RPC call to the wrong server! (the user sent me a screenie, and surely in my popup there's a 403 error from the gov website) This completely blows my mind. Both instances the error was from a different website (one was a horse racing site, one a government site). I haven't been able to confirm yet whether the users were actually on those sites at any stage or whether there were cookies from those sites (also note I do not specifically use the Cookies class, and I can verify in Chrome that the JSESSIONID cookie is set with the correct domain and path). I haven't been able to replicate this either. I'm open to any suggestions on how this could be possible. -- 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.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-toolkit@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: Strange session/cookies problem
I tell you because we have similar issue in the past (not with gwt) and is relate to authentication and authorization mechanism. We do the authentication with a servlet and don't put filters. Both authentication and authorization at now is made by filters. All operations is made by filters in same threads (or not is there are clusters). Sounds a concurrency problem. PD: Check if you can have session fixationhttp://en.wikipedia.org/wiki/Session_fixation when you use sessionId. 2011/8/11 sunny...@gmail.com sunny...@gmail.com Authentication is done once at login. The user credentials are sent to the server using GWT-RPC, and the server authenticates using LDAP. Once authenticated, the user loads the full user object into the hashmap keyed by session IDs. Part of this user object contains a hashmap of permissions allowable by this user (loaded from a database). When a client calls a GWT-RPC, the checked session ID is used to retrieve the user object on the server side, and its hashmap of permissions is checked to see it contains the required permissions for using that GWT-RPC. How does my mechanism of authentication/authorisation affect the scenario I described? On Aug 11, 9:35 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: How manage authorization and authentication? 2011/8/11 sunny...@gmail.com sunny...@gmail.com Hi all, I have an application that's been in use for the last 6 months or so and will be going into production 2 months. I've now see two instances of the problem described below and I'm fairly lost on how it could possibly happen. The client first needs to login. When the server authenticates the credentials sent by the client, the server returns a User object which has a subset of the user's properties (a 'light' user object), plus the session ID as retrieved on the server by calling getThreadLocalRequest().getSession().getId(). The server keeps a hashmap of session IDs against a fully populated user object (which includes their permissions properties amongst other things). Whenever a client accesses a GWT-RPC that should be protected, one of the parameters of the RPC is the light user object that the client has received from the server. The server authenticates this by: 1) Using HttpServletRequest.isRequestedSessionIdValid() 2) Comparing the session ID sent by the client (as stored in the light user object) and the one stored by the server's hashmap, and the one sent in the RPC's getThreadLocalRequest().getSession.getId(). Any inconsistency between the three raises an exception. Recently, the second occurrence of a weird error happened: The client has a timer which fires one of these RPCs every 5 seconds to refresh a table. This works really really well - we're using SmartGWT to have a grid that loads new data without the need to flicker or refresh (new rows simply appear, or existing rows update their data every 5 seconds). On this RPC's callback onFailure I just give a generic message with a caught.getMessage() appearing in a popup. I've had two instances reported by two different users on two different computers now (but both Chrome) this page has shown a popup showing my generic error, but the contents of the error is actually an error page from another website. Its almost as though GWT made the RPC call to the wrong server! (the user sent me a screenie, and surely in my popup there's a 403 error from the gov website) This completely blows my mind. Both instances the error was from a different website (one was a horse racing site, one a government site). I haven't been able to confirm yet whether the users were actually on those sites at any stage or whether there were cookies from those sites (also note I do not specifically use the Cookies class, and I can verify in Chrome that the JSESSIONID cookie is set with the correct domain and path). I haven't been able to replicate this either. I'm open to any suggestions on how this could be possible. -- 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.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-toolkit@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
Re: GWT Compiler Errors
At first, I think you can't use File classes in GWT (client side). 2011/8/11 Matthias Rauer rauer1...@googlemail.com Hello, I am getting compile errors. Looks like caching or synchronize problems. [java] Caused by: javax.imageio.IIOException: Can't create cache file! [java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:397) [java] at javax.imageio.ImageIO.write(ImageIO.java:1558) [java] ... 35 more [java] Caused by: java.io.FileNotFoundException: Z: \imageio2197704682044189508.tmp (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird) [java] at java.io.RandomAccessFile.open(Native Method) [java] at java.io.RandomAccessFile.init(RandomAccessFile.java: 212) [java] at javax.imageio.stream.FileCacheImageOutputStream.init(FileCacheImageOutputStream.java: 73) [java] at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(OutputStreamImageOutputStreamSpi.java: 50) [java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:393) [java] ... 36 more --- C:\...\build\build.xml:459: IOException in C:\...\build\tmp\web\WEB-INF \config\coreReportInvoiceConfig.xml - java.io.FileNotFoundException:C: \...build\tmp\web\WEB-INF\config\rep1473609419171320889.tmp (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird) in english: process cannot access file, another process uses this file --- same exception again... but different file [java] Caused by: javax.imageio.IIOException: Can't create cache file! [java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:397) [java] at javax.imageio.ImageIO.write(ImageIO.java:1558) [java] ... 35 more [java] Caused by: java.io.FileNotFoundException: Z: \imageio5137244568657246113.tmp (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird) [java] at java.io.RandomAccessFile.open(Native Method) [java] at java.io.RandomAccessFile.init(RandomAccessFile.java: 212) [java] at javax.imageio.stream.FileCacheImageOutputStream.init(FileCacheImageOutputStream.java: 73) [java] at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(OutputStreamImageOutputStreamSpi.java: 50) [java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:393) [java] ... 36 more --- If I compile again and again, I got different exceptions, like these: I already changed the extra and workDir to an RamDisk, deleted these directories before compiling, Deleted these directories before the build, but got same errors again. I also changed number of workers to 1. Any suggestions? Greetings, Matthias -- 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.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-toolkit@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 RPC NOT working with Tomcat
Are you working with tomcat inside eclipse? 2011/8/11 Henkie iits.hen...@gmail.com My GWT rpc message works well in development mode, but has the following behaviour when deployed in Tomcat: - The call DOES go through to the server_ I can see from the log files and the database insert happens successfully. - But the callback methods in my JavaScript is never executed. It is as if the response message back got stuck or loss. There is NO error message in the Tomcat logs. See below. I've disabled the Windows firewall to make sure it is not that. Double checked the jars deployed. How do I debug this? I'm STUCK - please help. Remember this is working in eclipsenot in Tomcat. I'm using GWT 2.3 and Smart GWT 2.5 - this call is a GWT RPC call - here's the code: @RemoteServiceRelativePath(miscService) public interface MiscService extends RemoteService { UserSessionDto beginUserSession(String token) throws BookAServiceException; } public interface MiscServiceAsync { void beginUserSession(String token, AsyncCallbackUserSessionDto callback); } public class MiscServiceImpl extends RemoteServiceServlet implements MiscService { public UserDetailDto userLogin(String email, String password, String sessionId) throws BookAServiceException { UserDetailDto userDetailDto = null; try { . } catch (Throwable e) { throw new BookAServiceException(e); } return userDetailDto; } } Tomcat logs: Aug 11, 2011 3:25:52 PM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.20. Aug 11, 2011 3:25:52 PM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. Aug 11, 2011 3:25:52 PM org.apache.coyote.AbstractProtocolHandler init INFO: Initializing ProtocolHandler [http-apr-8080] Aug 11, 2011 3:25:52 PM org.apache.coyote.AbstractProtocolHandler init INFO: Initializing ProtocolHandler [ajp-apr-8009] Aug 11, 2011 3:25:52 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 789 ms Aug 11, 2011 3:25:52 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Aug 11, 2011 3:25:52 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.6 Aug 11, 2011 3:25:52 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive BookAService.war === 2011-08-11 15:25:59,241 [ad-2] INFO DispatcherServlet - FrameworkServlet 'bookaservice': initialization started === 2011-08-11 15:25:59,304 [ad-2] INFO XmlWebApplicationContext - Refreshing org.springframework.web.context.support.XmlWebApplicationContext@746a63d3: display name [WebApplicationContext for namespace 'bookaservice- servlet']; startup date [Thu Aug 11 15:25:59 CAT 2011]; root of context hierarchy === 2011-08-11 15:25:59,366 [ad-2] INFO XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/ bookaservice-servlet.xml] === 2011-08-11 15:25:59,444 [ad-2] INFO XmlWebApplicationContext - Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@746a63d3 ]: org.springframework.beans.factory.support.DefaultListableBeanFactory@538eb7b8 === 2011-08-11 15:25:59,475 [ad-2] INFO DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@538eb7b8 : defining beans [urlMapping,hibernateOperationsController]; root of factory hierarchy === 2011-08-11 15:25:59,522 [ad-2] INFO DispatcherServlet - FrameworkServlet 'bookaservice': initialization completed in 234 ms ISC: Configuring log4j from: file:/C:/Dev/apache-tomcat-7.0.6/webapps/ BookAService/WEB-INF/classes/log4j.isc.config.xml === 2011-08-11 15:25:59,538 [ad-2] INFO ISCInit - Isomorphic SmartClient Framework - Initializing === 2011-08-11 15:25:59,553 [ad-2] INFO ConfigLoader - Attempting to load framework.properties from CLASSPATH === 2011-08-11 15:25:59,662 [ad-2] INFO ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/ Dev/apache-tomcat-7.0.6/webapps/BookAService/WEB-INF/lib/ isomorphic_core_rpc.jar!/framework.properties === 2011-08-11 15:25:59,662 [ad-2] INFO ConfigLoader - Attempting to load project.properties from CLASSPATH === 2011-08-11 15:25:59,662 [ad-2] INFO ConfigLoader - Unable to locate project.properties in CLASSPATH === 2011-08-11 15:25:59,678 [ad-2] INFO ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/ C:/Dev/apache-tomcat-7.0.6/webapps/BookAService/WEB-INF/lib/ isomorphic_core_rpc.jar!/isc_interfaces.properties === 2011-08-11 15:25:59,678
Re: Accessing custom JS events in GWT
On 8/10/2011 4:50 PM, e-lena-s wrote: I am trying to listen to a custom JS event that is created outside my GWT module. In my JS file I create the event, and then fire it as such : var evt = document.createEvent(Event); evt.initEvent('customEvent', true, true); evt.customData = someData; window.addEventListener('customEvent', function(evt) { console.log(test: + evt.customData)}, false); window.dispatchEvent(evt); Now, in my GWT code, I have a JSNI method that adds a listener to listen to my customEvent and act on it. Code as follows: public native void addLookupResultHandler()/*-{ $wnd.addEventListener('lookupEntitySelected', $entry(function(evt){ console.log(gwt: + evt.customData); console.log(gwt: + evt.type); @myClassName::handleEvent(LmyCustomEventEvent;)(evt) }), false); }-*/; The problem I have is that the customData is being dropped when the event gets to JSNI code. I can see that the event listner written in JS does get the correct event with the correct customData, but logging the event properties in JSNI shows that customData is undefined (event type looks correct though) Am I doing something wrong here ? Is there may be a better way to create custom events (it has to be created in JavaScript, since the code firing it won't be in GWT module) Probably make your JSNI much lighter in that it should just pass arguments to a GWT routine that actually fires the event. The docs are very good on this account. Believe it or not, but your JS example is doing too much work. Unless you're porting existing code, in which case you're actually just writing wrappers, there should be a good reason to write a JSNI routine that's more than one or two lines. This example does not clear that bar. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Accessing custom JS events in GWT
On 8/10/2011 4:50 PM, e-lena-s wrote: I am trying to listen to a custom JS event that is created outside my GWT module. In my JS file I create the event, and then fire it as such : var evt = document.createEvent(Event); evt.initEvent('customEvent', true, true); evt.customData = someData; window.addEventListener('customEvent', function(evt) { console.log(test: + evt.customData)}, false); window.dispatchEvent(evt); Now, in my GWT code, I have a JSNI method that adds a listener to listen to my customEvent and act on it. Code as follows: public native void addLookupResultHandler()/*-{ $wnd.addEventListener('lookupEntitySelected', $entry(function(evt){ console.log(gwt: + evt.customData); console.log(gwt: + evt.type); @myClassName::handleEvent(LmyCustomEventEvent;)(evt) }), false); }-*/; The problem I have is that the customData is being dropped when the event gets to JSNI code. I can see that the event listner written in JS does get the correct event with the correct customData, but logging the event properties in JSNI shows that customData is undefined (event type looks correct though) Am I doing something wrong here ? Is there may be a better way to create custom events (it has to be created in JavaScript, since the code firing it won't be in GWT module) My earlier answer was not correct. I don't see why addLookupResultHandler is a JSNI routine. I think you want to write it in GWT, via handling a NativeEvent. However, I've never tried this, so it may not work as you intend. OTOH, maybe you should be using the GWT event bus. From an architectural perspective, I think that's a better choice. Instead of using window.dispatch(), fire the event via a JSNI method. So, your first JS sample should become a JSNI routine that calls a Java routine that calls eventBus.fire(), and your second example should become Java. It's possible to call eventBus.fire() entirely within JSNI, but getting that eventBus argument to your JSNI method may be problematic. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to use Mockito for testing Async calls?
Hi all, I want to know how to use Mockito for testing Async calls. I went through few blogs, and I am not sure it is implemented and how it runs. For instance, if I have an server implementation as: public class GreetingServiceImpl extends RemoteServiceServlet implements GreetingService { public String greetServer(String input) { return Hello, + input; } } And in the client code I write GreetingServiceAsync greetingServer = GWT.create(GreetinService.class); greetingServer.greetServer(World, new AsyncCallbackString() { ... } }); How do I exactly test this using Mockito? Any code snippet you can share? Thanks a lot. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Need to store a session-specific string for use in other threads
Hey All, First off, I am new to gwt, so I hope I phrase everything right. Our team has a gwt application that needs to access a custom, (string) token that comes in the http header from our perimiter authentication device; I have already solved this problem with a (non-gwt, regular) servlet welcome page, which extracts the header item then writes the same html as the original, static html page, which then runs the gwt app just fine, as it did before. But my real problem now is how to store that token in some kind of (session-specific) variable so that it can be accessed by other threads when they make web service calls; I have successfully inserted handler(s) into my outgoing SOAP web service calls, but my dilemma is how to get the correct token that the servlet got from the http header... Again, I need the one from This Session. So, can anyone suggest a way to store and retreive a session-specific string token, on the server side, which can be accessed by any of the threads from the pool? Thanks in advance, and Take Care, Drew -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Accessing custom JS events in GWT
The issue is that the JS function is written by some other library. The custom event will be fired not by my module but by other code on the page . I however need to listen to that event, and get the customData out of that event for further processing within the module. I have tried to use DOM.sinkBitlessEvent (and seeing if I can catch this event in onBrowserEvent() ), but that didn't work. Not sure what other way I can get that event , or why does the custom event looses its customData when within JSNI method On Aug 11, 8:17 am, Jeffrey Chimene jchim...@gmail.com wrote: On 8/10/2011 4:50 PM, e-lena-s wrote: I am trying to listen to a custom JS event that is created outside my GWT module. In my JS file I create the event, and then fire it as such : var evt = document.createEvent(Event); evt.initEvent('customEvent', true, true); evt.customData = someData; window.addEventListener('customEvent', function(evt) { console.log(test: + evt.customData)}, false); window.dispatchEvent(evt); Now, in my GWT code, I have a JSNI method that adds a listener to listen to my customEvent and act on it. Code as follows: public native void addLookupResultHandler()/*-{ $wnd.addEventListener('lookupEntitySelected', $entry(function(evt){ console.log(gwt: + evt.customData); console.log(gwt: + evt.type); @myClassName::handleEvent(LmyCustomEventEvent;)(evt) }), false); }-*/; The problem I have is that the customData is being dropped when the event gets to JSNI code. I can see that the event listner written in JS does get the correct event with the correct customData, but logging the event properties in JSNI shows that customData is undefined (event type looks correct though) Am I doing something wrong here ? Is there may be a better way to create custom events (it has to be created in JavaScript, since the code firing it won't be in GWT module) My earlier answer was not correct. I don't see why addLookupResultHandler is a JSNI routine. I think you want to write it in GWT, via handling a NativeEvent. However, I've never tried this, so it may not work as you intend. OTOH, maybe you should be using the GWT event bus. From an architectural perspective, I think that's a better choice. Instead of using window.dispatch(), fire the event via a JSNI method. So, your first JS sample should become a JSNI routine that calls a Java routine that calls eventBus.fire(), and your second example should become Java. It's possible to call eventBus.fire() entirely within JSNI, but getting that eventBus argument to your JSNI method may be problematic. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Aw: Need to store a session-specific string for use in other threads
Can't you save it in the http session? In your custom servlet that extracts the http header value you already have a session where you can store the header value. Now when your GWT app makes server requests you should have the same session in your GWT servlets. Retrieve the header value from the session and start your outgoing SOAP web service call. Or am I missing something? -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/HxANetmL7FAJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Runtime issue with RTL support for CssResource
Hi, additionnally, since I finally found it, here is the code that caused this issue: public class AuthPanel extends com.google.gwt.user.client.ui.DialogBox { ... private com.google.gwt.user.client.ui.CheckBox rememberLoginCheckBox = new com.google.gwt.user.client.ui.CheckBox(); ... rememberLoginCheckBox.setText(Messages.INSTANCE.getAuthPanelRememberLoginLabel(), com.google.gwt.i18n.client.HasDirection.Direction.LTR); ... } (Messages.INSTANCE.getAuthPanelRememberLoginLabel() is a translated text.) I've changed the last line with: rememberLoginCheckBox.setText(Messages.INSTANCE.getAuthPanelRememberLoginLabel()); and it worked. I don't need the RTL feature for my application, so I'm not stuck here, but I guess if the issue is confirmed, it should still be fixed for developers who would need the RTL feature. Regards On Aug 11, 9:34 am, Patrick Herrmann patrick.herrm...@gmail.com wrote: Hi all, I'm having a weird issue when I run a war I created using the Maven plugin (gwt.version is 2.3.0): plugin groupIdorg.codehaus.mojo/groupId artifactIdgwt-maven-plugin/artifactId version${gwt.version}/version dependencies dependency groupIdcom.google.gwt/groupId artifactIdgwt-user/artifactId version${gwt.version}/version /dependency dependency groupIdcom.google.gwt/groupId artifactIdgwt-dev/artifactId version${gwt.version}/version /dependency /dependencies configuration logLevelINFO/logLevel extraJvmArgs-Xmx512m -Xss1024k/extraJvmArgs module${gwt.module.name}/module runTargetfront.html/runTarget webappDirectory${gwt.output.directory}/webappDirectory style${gwt.style}/style /configuration executions execution goals goalcompile/goal /goals /execution /executions /plugin The browser cannot open the main page because it complains about LAST_STRONG_IS_RTL_REis undefined. I've checked ant noticedLAST_STRONG_IS_RTL_REis a regular expression declared in class com.google.gwt.i18n.shared.BidiUtils. And this class exists in the dependencies above. When I run the same code in embedded mode, everything runs fine. Also, I've noticed that this issue appeared after I introduced a class extending CssResource in my code to manage CSS styles. I cannot find any occurrence of this issue on the web, so I guess I'm just missing something obvious, but cannot find out what. Could anyone give me a hint? Thanks a lot for your feedback -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
CSS compiler + ie gradients = strange behaviour
Hi GWTlist, we are getting strange css compile behaviours with special styles for ie7 and ie8. Our goal is to get css for gradients in IE7 and IE8 into our css files. That works fine for webkit or firefox but fails when it comes to more complex strings for IE7 and IE8. For this we have the following setup (looks quite complicated but fits our needs, until now ;-)): A ColorDefinition file: .. private static String COLOR1 = #32333D; private static String COLOR3 = #00; .. __ A PlatformStyle file to build some strings to be used later in CSS files: public String getPrimaryGradientWebkit() { return -webkit-linear-gradient(top, + color1 + , + color3 + ); } public String getPrimaryGradientIE8() { return \progid:DXImageTransform.Microsoft.gradient(startColorstr=' + color1 + ', endColorstr=' + color3 + ')\; } public String getPrimaryGradientIE7() { return progid:DXImageTransform.Microsoft.gradient(startColorstr=' + color1 + ', endColorstr=' + color3 + '); } __ And finally a css file: .header { /* style above... */ background-image: primaryGradientWebkit; /* Chrome 10+, Saf5.1+ */ -ms-filter:: primaryGradientIE; filter:primaryGradientIE7; } __ The output for webkit is background-image: -webkit-linear- gradient(top, #32333D, #00). Yay! The UNEXPECTED output for IE7 is filter:primaryGradientIE7, so we got nothing that can be interpreted as style, IE8 gets the same filter:primaryGradientIE8,. We would EXPECT something like this for ie7: filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#32333D', endColorstr='#00') Question: Maybe somebody knows something like that, or have a good starting point to get to the root of that problem? Any help appreciated... Thanks, Peter -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Accessing custom JS events in GWT
On 08/11/2011 08:38 AM, e-lena-s wrote: The issue is that the JS function is written by some other library. The custom event will be fired not by my module but by other code on the page . I however need to listen to that event, and get the customData out of that event for further processing within the module. I have tried to use DOM.sinkBitlessEvent (and seeing if I can catch this event in onBrowserEvent() ), but that didn't work. Not sure what other way I can get that event , or why does the custom event looses its customData when within JSNI method Interesting problem. Are you sure the event data is kept for the case of js -- js? I'd eliminate that possibility first. I'm sure it works, but nothing you've said so far positively eliminates that (admittedly small) possibility. If it /is/ kept, then: 0) write an event hander in js (i.e. outside gwt) that calls addLookupResultHandler 1) load the event handler from step 0 as part of your external library's load phase 2) hook your addLookupResultHandler to GWT's $wnd object before step 3) 3) fire the event in the library. That will call the event handler written in step 0 On Aug 11, 8:17 am, Jeffrey Chimene jchim...@gmail.com wrote: On 8/10/2011 4:50 PM, e-lena-s wrote: I am trying to listen to a custom JS event that is created outside my GWT module. In my JS file I create the event, and then fire it as such : var evt = document.createEvent(Event); evt.initEvent('customEvent', true, true); evt.customData = someData; window.addEventListener('customEvent', function(evt) { console.log(test: + evt.customData)}, false); window.dispatchEvent(evt); Now, in my GWT code, I have a JSNI method that adds a listener to listen to my customEvent and act on it. Code as follows: public native void addLookupResultHandler()/*-{ $wnd.addEventListener('lookupEntitySelected', $entry(function(evt){ console.log(gwt: + evt.customData); console.log(gwt: + evt.type); @myClassName::handleEvent(LmyCustomEventEvent;)(evt) }), false); }-*/; The problem I have is that the customData is being dropped when the event gets to JSNI code. I can see that the event listner written in JS does get the correct event with the correct customData, but logging the event properties in JSNI shows that customData is undefined (event type looks correct though) Am I doing something wrong here ? Is there may be a better way to create custom events (it has to be created in JavaScript, since the code firing it won't be in GWT module) My earlier answer was not correct. I don't see why addLookupResultHandler is a JSNI routine. I think you want to write it in GWT, via handling a NativeEvent. However, I've never tried this, so it may not work as you intend. OTOH, maybe you should be using the GWT event bus. From an architectural perspective, I think that's a better choice. Instead of using window.dispatch(), fire the event via a JSNI method. So, your first JS sample should become a JSNI routine that calls a Java routine that calls eventBus.fire(), and your second example should become Java. It's possible to call eventBus.fire() entirely within JSNI, but getting that eventBus argument to your JSNI method may be problematic. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Cannot display Facebook Like or Send button in GWT
Thank you very much for your reply. I have looked at gwtfb earlier and it looks like a very good solution for sending requests to Facebook API and implementing custom features. But I need to use Facebook Send button as it is. I do not want to reimplement the FB Send button UI using GWT and send requests to Facebook via gwtfb. I wonder why FB Send button does not appear even though in generated HTML source it looks like GWT HTML panel does it's job and inserts FB tags correctly. Sergey On Thursday, August 11, 2011, BST babusri...@gmail.com wrote: Probably you may find something in this https://groups.google.com/d/topic/google-web-toolkit/XK0L5uiKh1A/discussion http://code.google.com/p/gwtfb/ I noticed they were using anchors etc. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/x2DRtgSjI44J. 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.com google-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-toolkit@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: Accessing custom JS events in GWT
Yup, the js-- js event is kept in tact. I can see all the right data with the console.log. I'll try your suggestion for alternative way of handling the event On Aug 11, 9:50 am, Jeff Chimene jchim...@gmail.com wrote: On 08/11/2011 08:38 AM, e-lena-s wrote: The issue is that the JS function is written by some other library. The custom event will be fired not by my module but by other code on the page . I however need to listen to that event, and get the customData out of that event for further processing within the module. I have tried to use DOM.sinkBitlessEvent (and seeing if I can catch this event in onBrowserEvent() ), but that didn't work. Not sure what other way I can get that event , or why does the custom event looses its customData when within JSNI method Interesting problem. Are you sure the event data is kept for the case of js -- js? I'd eliminate that possibility first. I'm sure it works, but nothing you've said so far positively eliminates that (admittedly small) possibility. If it /is/ kept, then: 0) write an event hander in js (i.e. outside gwt) that calls addLookupResultHandler 1) load the event handler from step 0 as part of your external library's load phase 2) hook your addLookupResultHandler to GWT's $wnd object before step 3) 3) fire the event in the library. That will call the event handler written in step 0 On Aug 11, 8:17 am, Jeffrey Chimene jchim...@gmail.com wrote: On 8/10/2011 4:50 PM, e-lena-s wrote: I am trying to listen to a custom JS event that is created outside my GWT module. In my JS file I create the event, and then fire it as such : var evt = document.createEvent(Event); evt.initEvent('customEvent', true, true); evt.customData = someData; window.addEventListener('customEvent', function(evt) { console.log(test: + evt.customData)}, false); window.dispatchEvent(evt); Now, in my GWT code, I have a JSNI method that adds a listener to listen to my customEvent and act on it. Code as follows: public native void addLookupResultHandler()/*-{ $wnd.addEventListener('lookupEntitySelected', $entry(function(evt){ console.log(gwt: + evt.customData); console.log(gwt: + evt.type); @myClassName::handleEvent(LmyCustomEventEvent;)(evt) }), false); }-*/; The problem I have is that the customData is being dropped when the event gets to JSNI code. I can see that the event listner written in JS does get the correct event with the correct customData, but logging the event properties in JSNI shows that customData is undefined (event type looks correct though) Am I doing something wrong here ? Is there may be a better way to create custom events (it has to be created in JavaScript, since the code firing it won't be in GWT module) My earlier answer was not correct. I don't see why addLookupResultHandler is a JSNI routine. I think you want to write it in GWT, via handling a NativeEvent. However, I've never tried this, so it may not work as you intend. OTOH, maybe you should be using the GWT event bus. From an architectural perspective, I think that's a better choice. Instead of using window.dispatch(), fire the event via a JSNI method. So, your first JS sample should become a JSNI routine that calls a Java routine that calls eventBus.fire(), and your second example should become Java. It's possible to call eventBus.fire() entirely within JSNI, but getting that eventBus argument to your JSNI method may be problematic. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Accessing custom JS events in GWT
On 08/11/2011 09:57 AM, e-lena-s wrote: Yup, the js-- js event is kept in tact. I can see all the right data with the console.log. OK I'll try your suggestion for alternative way of handling the event Just to be clear, the event handler from step 0 calls the addLookupResultHandler via GWT's $wnd object. I think you know that, but I missed that point in the previous post. On Aug 11, 9:50 am, Jeff Chimene jchim...@gmail.com wrote: On 08/11/2011 08:38 AM, e-lena-s wrote: The issue is that the JS function is written by some other library. The custom event will be fired not by my module but by other code on the page . I however need to listen to that event, and get the customData out of that event for further processing within the module. I have tried to use DOM.sinkBitlessEvent (and seeing if I can catch this event in onBrowserEvent() ), but that didn't work. Not sure what other way I can get that event , or why does the custom event looses its customData when within JSNI method Interesting problem. Are you sure the event data is kept for the case of js -- js? I'd eliminate that possibility first. I'm sure it works, but nothing you've said so far positively eliminates that (admittedly small) possibility. If it /is/ kept, then: 0) write an event hander in js (i.e. outside gwt) that calls addLookupResultHandler 1) load the event handler from step 0 as part of your external library's load phase 2) hook your addLookupResultHandler to GWT's $wnd object before step 3) 3) fire the event in the library. That will call the event handler written in step 0 On Aug 11, 8:17 am, Jeffrey Chimene jchim...@gmail.com wrote: On 8/10/2011 4:50 PM, e-lena-s wrote: I am trying to listen to a custom JS event that is created outside my GWT module. In my JS file I create the event, and then fire it as such : var evt = document.createEvent(Event); evt.initEvent('customEvent', true, true); evt.customData = someData; window.addEventListener('customEvent', function(evt) { console.log(test: + evt.customData)}, false); window.dispatchEvent(evt); Now, in my GWT code, I have a JSNI method that adds a listener to listen to my customEvent and act on it. Code as follows: public native void addLookupResultHandler()/*-{ $wnd.addEventListener('lookupEntitySelected', $entry(function(evt){ console.log(gwt: + evt.customData); console.log(gwt: + evt.type); @myClassName::handleEvent(LmyCustomEventEvent;)(evt) }), false); }-*/; The problem I have is that the customData is being dropped when the event gets to JSNI code. I can see that the event listner written in JS does get the correct event with the correct customData, but logging the event properties in JSNI shows that customData is undefined (event type looks correct though) Am I doing something wrong here ? Is there may be a better way to create custom events (it has to be created in JavaScript, since the code firing it won't be in GWT module) My earlier answer was not correct. I don't see why addLookupResultHandler is a JSNI routine. I think you want to write it in GWT, via handling a NativeEvent. However, I've never tried this, so it may not work as you intend. OTOH, maybe you should be using the GWT event bus. From an architectural perspective, I think that's a better choice. Instead of using window.dispatch(), fire the event via a JSNI method. So, your first JS sample should become a JSNI routine that calls a Java routine that calls eventBus.fire(), and your second example should become Java. It's possible to call eventBus.fire() entirely within JSNI, but getting that eventBus argument to your JSNI method may be problematic. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CSS compiler + ie gradients = strange behaviour
How about you check out http://css3pie.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Q-9lObFEcKUJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
getting error - upgrade to gwt sdk 2.3
Hi, When I tried to upgrade to gwt sdk 2.3.0 thru eclise (helios 3.6) help- install new software, i am getting the following error Cannot complete the install because of a conflicting dependency. Software being installed: Google App Engine Java SDK 1.5.2 1.5.2.r36v201107211953 (com.google.appengine.eclipse.sdkbundle.e36.feature.feature.group 1.5.2.r36v201107211953) Software currently installed: Google Plugin for Eclipse 3.6 2.2.0.v201102111811 (com.google.gdt.eclipse.suite.e36.feature.feature.group 2.2.0.v201102111811) Only one of the following can be installed at once: Google Web Toolkit Plugin 2.3.3.r36v201107211953 (com.google.gwt.eclipse.core 2.3.3.r36v201107211953) Google Web Toolkit Plugin 2.2.0.v201102111811 (com.google.gwt.eclipse.core 2.2.0.v201102111811) Cannot satisfy dependency: From: Google App Engine Java SDK 1.5.2 1.5.2.r36v201107211953 (com.google.appengine.eclipse.sdkbundle.e36.feature.feature.group 1.5.2.r36v201107211953) To: com.google.gdt.eclipse.suite.e36.feature.feature.group 2.3.3 Cannot satisfy dependency: From: Google Plugin for Eclipse 3.6 2.2.0.v201102111811 (com.google.gdt.eclipse.suite.e36.feature.feature.group 2.2.0.v201102111811) To: com.google.gwt.eclipse.core [2.2.0.v201102111811] Cannot satisfy dependency: From: Google Plugin for Eclipse 3.6 2.3.3.r36v201107211953 (com.google.gdt.eclipse.suite.e36.feature.feature.group 2.3.3.r36v201107211953) To: com.google.gwt.eclipse.core [2.3.3.r36v201107211953] What is it I am missing here. I am new to gwt. Can somebody help me with this. Many thanks meena -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: getting error - upgrade to gwt sdk 2.3
maybe uncheck the gae sdk 1.5.2 and only install gwt On Thursday 11 August 2011 10:48 PM, Meena wrote: Hi, When I tried to upgrade to gwt sdk 2.3.0 thru eclise (helios 3.6) help- install new software, i am getting the following error Cannot complete the install because of a conflicting dependency. Software being installed: Google App Engine Java SDK 1.5.2 1.5.2.r36v201107211953 (com.google.appengine.eclipse.sdkbundle.e36.feature.feature.group 1.5.2.r36v201107211953) Software currently installed: Google Plugin for Eclipse 3.6 2.2.0.v201102111811 (com.google.gdt.eclipse.suite.e36.feature.feature.group 2.2.0.v201102111811) Only one of the following can be installed at once: Google Web Toolkit Plugin 2.3.3.r36v201107211953 (com.google.gwt.eclipse.core 2.3.3.r36v201107211953) Google Web Toolkit Plugin 2.2.0.v201102111811 (com.google.gwt.eclipse.core 2.2.0.v201102111811) Cannot satisfy dependency: From: Google App Engine Java SDK 1.5.2 1.5.2.r36v201107211953 (com.google.appengine.eclipse.sdkbundle.e36.feature.feature.group 1.5.2.r36v201107211953) To: com.google.gdt.eclipse.suite.e36.feature.feature.group 2.3.3 Cannot satisfy dependency: From: Google Plugin for Eclipse 3.6 2.2.0.v201102111811 (com.google.gdt.eclipse.suite.e36.feature.feature.group 2.2.0.v201102111811) To: com.google.gwt.eclipse.core [2.2.0.v201102111811] Cannot satisfy dependency: From: Google Plugin for Eclipse 3.6 2.3.3.r36v201107211953 (com.google.gdt.eclipse.suite.e36.feature.feature.group 2.3.3.r36v201107211953) To: com.google.gwt.eclipse.core [2.3.3.r36v201107211953] What is it I am missing here. I am new to gwt. Can somebody help me with this. Many thanks meena -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Change events not firing TextBox in IE
I am not seeing ChangeEvent or ValueChangeEventT fire in IE8 or IE9. Then change handlers have been added, the value is clearly being changed, but when I tab out or click a button elsewhere on the screen, the event does not fire. Both ChangeEvent or ValueChangeEventT fire in Firefox, Safari, and Chrome. BlurEvent fires in IE, but I prefer a change event of either type. I see where something similar has been addressed in http://groups.google.com/group/google-web-toolkit/msg/cf0cc43308a2235e I also see Issue 5144: ChangeHandler not propagate throw panel in internet explorer I'm guessing that I dealing with the same issue. Curse you, Micro$loth. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
problemas con stylos
Buenas amigo les explico mi problema , quiero modificar el css de un menubar logro modificarlo todo excepto cuando esta seleccionado algun item del menu que me coloca un background por defecto quiero modificar ese background. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: problemas con stylos
mira esto: http://examples.roughian.com/index.htm#Widgets~MenuBar 2011/8/11 jose felix estevez josefel...@gmail.com Buenas amigo les explico mi problema , quiero modificar el css de un menubar logro modificarlo todo excepto cuando esta seleccionado algun item del menu que me coloca un background por defecto quiero modificar ese background. -- 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.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-toolkit@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: problemas con stylos
justo me estoy guiando por ese ejemplo pero el ultimo selector del css que es justo el que quiero modificar no lo toma observe por firebug que el sobrepone el por defecto con el que yo creo ahi. 2011/8/11 Juan Pablo Gardella gardellajuanpa...@gmail.com mira esto: http://examples.roughian.com/index.htm#Widgets~MenuBar 2011/8/11 jose felix estevez josefel...@gmail.com Buenas amigo les explico mi problema , quiero modificar el css de un menubar logro modificarlo todo excepto cuando esta seleccionado algun item del menu que me coloca un background por defecto quiero modificar ese background. -- 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.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-toolkit@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. -- Jose F.Estevez H. T.S.U. en Analisis y Diseño de Sistemas Consultor Staff I Tecnology Consulting Solutions - TCS -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: problemas con stylos
refresca la cache. con eso debería andar 2011/8/11 jose felix estevez josefel...@gmail.com justo me estoy guiando por ese ejemplo pero el ultimo selector del css que es justo el que quiero modificar no lo toma observe por firebug que el sobrepone el por defecto con el que yo creo ahi. 2011/8/11 Juan Pablo Gardella gardellajuanpa...@gmail.com mira esto: http://examples.roughian.com/index.htm#Widgets~MenuBar 2011/8/11 jose felix estevez josefel...@gmail.com Buenas amigo les explico mi problema , quiero modificar el css de un menubar logro modificarlo todo excepto cuando esta seleccionado algun item del menu que me coloca un background por defecto quiero modificar ese background. -- 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.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-toolkit@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. -- Jose F.Estevez H. T.S.U. en Analisis y Diseño de Sistemas Consultor Staff I Tecnology Consulting Solutions - TCS -- 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.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-toolkit@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 use Mockito for testing Async calls?
In my experience, using of mocking frameworks for testing of Async calls is not so good and tests are becoming un-readable at some point of time. In our app we are using Command Pattern to send different requests (Action/Response) and here is our helper class that we are using for testing: public class FakeRpcService implements RpcServiceAsync { public Action? lastAction; public AsyncCallback? lastCallback; public T extends Response void execute(ActionT action, AsyncCallbackT async) { lastAction = action; lastCallback = async; } public T T lastAction() { return (T) lastAction; } public void responsesWith(Response response) { // SMELL private members of simple object are referencing template members? ((AsyncCallbackResponse) lastCallback).onSuccess(response); } public void failsWith(RuntimeException e) { ((AsyncCallbackResponse) lastCallback).onFailure(e); } } so our tests now are looking like: @Test public void exportSelectedInvoices() { ListInvoiceDto invoices = Lists.newArrayList(createInvoice(1,PaymentType.CASH)); // filter button was clicked presenter.onReportRequested(); service.responsesWith(new GetInvoicesPeriodReportResponse(invoices)); presenter.onExportSelectedInvoices(new HashSetInvoiceDto()); GenerateAjurExportAction action = service.lastAction(); assertThat(the one selected invoice was not sent for export?,action.getInvoices(), is(equalTo(invoices))); service.responsesWith(new GenerateAjurExportResponse(test test)); assertThat(export response was not displayed?,display.exportResponse,is(equalTo(test test))); } Hope this will help you figure out what's the best choice for you. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/OTxCnyHee14J. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Compile Icon on GPE: No more selective compile?
STS 2.7.1 Eclipse Indigo, latest and greatest GPE (GWT 2.3). 1. To define the GWT modules avail for compilation: Project Properties - Google - GWT. 2. To compile modules: Click on little red compile icon and proceed with compiling. 3. To selectively compile modules without permanently removing them from list of GWT modules: Click on little red compile icon, remove modules you don't want to include in the compilation run. And click on [Compile]. Unfortunately step 3 is no longer working. If you remove any module from the list after pressing the little red compile icon, those modules will be permanently removed from the list. And then you would have to add them back. If I wanted to permanently remove modules, I should either click [Apply] or do it at Project Properties - Google - GWT, right? Clicking on the [Compile] button should not remove any modules (which I had removed from the list within the compile dialog), RIGHT? It is convenient to be able to exclude modules from a compilation run, without removing them permanently from the list of modules in the project, RIGHT? It is a bug, not a change in feature, RIGHT? So, pls transform the bug back into a feature. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Create Canvas widget from CanvasElement
I want to wrap a CanvasElement (canvas in HTML) in an Canvas widget. Many widgets (e.g. Label) have a static method SomeWidget.wrap(Element) for wrapping an existing DOM element. I imagine Canvas does not feature such a method because not all browser support canvas and therefore the user should be forced to go through createIfSupported(). Unfortunately the constructor in Canvas is private, which means that Canvas can not be subclassed. (There isn't any constructor available in the derived class.) Code snippets of createIfSupported and the constructor in Canvas: public static Canvas createIfSupported() { // check if canvas is supported; if it is not supported: return null return new Canvas(element); } private Canvas(CanvasElement element) { setElement(element); } I ended up copying the Canvas class and making the constructor public. Is there a better way to do this? If not, what is the reasoning behind it (besides that it might not be supported)? I am using version 2.4.0.rc1. Thanks, Julian -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/MpcJQFQy4BAJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use Mockito for testing Async calls?
you can see gwt-dispatch http://code.google.com/p/gwt-dispatch/ for command pattern. 2011/8/11 Miroslav Genov mge...@gmail.com In my experience, using of mocking frameworks for testing of Async calls is not so good and tests are becoming un-readable at some point of time. In our app we are using Command Pattern to send different requests (Action/Response) and here is our helper class that we are using for testing: public class FakeRpcService implements RpcServiceAsync { public Action? lastAction; public AsyncCallback? lastCallback; public T extends Response void execute(ActionT action, AsyncCallbackT async) { lastAction = action; lastCallback = async; } public T T lastAction() { return (T) lastAction; } public void responsesWith(Response response) { // SMELL private members of simple object are referencing template members? ((AsyncCallbackResponse) lastCallback).onSuccess(response); } public void failsWith(RuntimeException e) { ((AsyncCallbackResponse) lastCallback).onFailure(e); } } so our tests now are looking like: @Test public void exportSelectedInvoices() { ListInvoiceDto invoices = Lists.newArrayList(createInvoice(1,PaymentType.CASH)); // filter button was clicked presenter.onReportRequested(); service.responsesWith(new GetInvoicesPeriodReportResponse(invoices)); presenter.onExportSelectedInvoices(new HashSetInvoiceDto()); GenerateAjurExportAction action = service.lastAction(); assertThat(the one selected invoice was not sent for export?,action.getInvoices(), is(equalTo(invoices))); service.responsesWith(new GenerateAjurExportResponse(test test)); assertThat(export response was not displayed?,display.exportResponse,is(equalTo(test test))); } Hope this will help you figure out what's the best choice for you. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/OTxCnyHee14J. 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.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-toolkit@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: CellTree and SelectionModel
Hi There. I got the same issue. But haven't found a way to fix this. I would rather prefere to be able to select only leaf node. On 11 août, 13:10, tom majortom...@gmail.com wrote: Hi, thanks for the link, but I think the example is a different case. In the example tree, they apply the selectionModel only for the 'Song' layer, which never contains anything but leaf nodes. In my case, there's layers with both leaf- and subtree nodes. Like in a filesystem tree, where there's both files and subdirectories on the same level. When simply applying a SingleSelectionModel to any kind of node, I get weird behaviour upon selection (multiple tree nodes get selected, each on every expanded tree layer). On 11 Aug., 09:47, Peter Nøbbe akpe...@gmail.com wrote: Hi mate... Take a look on this.. http://www.google.com/codesearch/p?hl=en#A1edwVHBClQ/user/javadoc/com... This will help you get to the leafs en a mulit layed tree. Basicly what you need to do is just create a selection model and parse it into the node... -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
multiple gwt modules
I want to able to load a gwt module from another gwt module for eg: if i click a button ,the new module should be loaded in a new browser ,with the same session attributes. how do we communicate between modules i.e . if i want to pass some information from one module to another and vice versa . any help is greatly appreicated -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
RequestBuilder Question
I need to try to make a requestbuilder post to a servlet, but open a new browser first. I am creating a single singon to a different application. Link and launch like. 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-toolkit@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: RequestBuilder Question
Or, when I return from the requestbuilder call, I want to do something like a Window.opent(ReturnedHTML,_blank) . On Aug 11, 3:28 pm, skippy al.leh...@fisglobal.com wrote: I need to try to make a requestbuilder post to a servlet, but open a new browser first. I am creating a single singon to a different application. Link and launch like. 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-toolkit@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: Celltable loading state
Hi John, Is there any way to disable the loading indicator from showing ? I even tried native methods, no luck. I am using a ListDataProvider, when I have data to show I just clear the existing list of the data provider. But problem is first time the image always shows. One way is to replace the current image with a blank image. But I was hoping for another solution. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/fVQwnBKZ40YJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Alternative to DTO's
Hi, I was wondering if there is an alternative to using DTO's to send persistent objects from server to client and vice versa that is compatible with Google App Engine. The objects are persisted through JDO. I would appreciate it if you could provide some suggestions. Thank you. J D -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use Mockito for testing Async calls?
Here's how I do it. @Test public void testAsync() { doAnswer(new AnswerVoid() { @Override public Void answer(InvocationOnMock invocation) throws Throwable { AsyncCallbackCommandResult callback = (AsyncCallbackCommandResult) invocation.getArguments()[1]; callback.onSuccess(new CommandResult()); return null; } }).when(commandProcessor).execute(any(Command.class), any(AsyncCallback.class)); // invoke something that sends the command ... then verify the results verify(...)...; } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/xx0OrJ46MUwJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Alternative to DTO's
What is the problem with DTOs that you're looking to avoid? The duplication? Being more specific might help people give you relevant suggestions. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/JIrFJGWkp0EJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Alternative to DTO's
Yes, I'm trying to avoid having to duplicate, and convert between the DTO and the persistent object, because I'm worried that the increase in number of DTO's will result in too much repetition of code. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/LwpOV-3Asp8J. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Need to store a session-specific string for use in other threads
Hey Jens, Thanks for the quick reply; Your idea sounds great, and I'm sure I can figure out how to store it in that session (at the Welcome servlet)... How, then, would I get that http session (with the contained token) back while in a SOAP handler? Thanks, and Take Care, Drew On Aug 11, 9:01 am, Jens jens.nehlme...@gmail.com wrote: Can't you save it in the http session? In your custom servlet that extracts the http header value you already have a session where you can store the header value. Now when your GWT app makes server requests you should have the same session in your GWT servlets. Retrieve the header value from the session and start your outgoing SOAP web service call. Or am I missing something? -- J. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Alternative to DTO's
You can try RequestFactory. On Thu, Aug 11, 2011 at 4:47 PM, J D narusakur...@gmail.com wrote: Yes, I'm trying to avoid having to duplicate, and convert between the DTO and the persistent object, because I'm worried that the increase in number of DTO's will result in too much repetition of code. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/LwpOV-3Asp8J. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- -- Pav -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Alternative to DTO's
Totally valid concern. A lot depends on your situation and the purpose of your app. One alternative is the RequestFactory. I've not used it myself, however. Another alternative is to just detach your domain objects and send them to the client. You'll want to be sure there's nothing in there you don't want your client to see, of course. And then you might have some conflicting needs between making your model good for business purposes vs. making them convenient for your UI. Personally, I'm not a big fan of DTOs, but, in GWT-land, I think they make a lot of sense. I don't have a 1-to-1 mapping of domain object to DTOs, but rather try to design my DTOs for a particular UI need. It's still more work, but (I think) my UIs end up being better, stronger, faster ... whoops, got carried way. :) But YMMV. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/MAG3sVnEncoJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Alternative to DTO's
Thank you for your suggestions. I will look into them promptly. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/VNEXASicZeEJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Strange session/cookies problem
Thanks. I don't believe there is a clustering issue as the application isn't running on a clustered environment, and its only one of two applications deployed on the server's Tomcat instance. Neither have anything to do with each other. The application is also an internal one that's used by 25 users at a time, so its unlikely there's anything malicious going on. On Aug 12, 12:32 am, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: I tell you because we have similar issue in the past (not with gwt) and is relate to authentication and authorization mechanism. We do the authentication with a servlet and don't put filters. Both authentication and authorization at now is made by filters. All operations is made by filters in same threads (or not is there are clusters). Sounds a concurrency problem. PD: Check if you can have session fixationhttp://en.wikipedia.org/wiki/Session_fixation when you use sessionId. 2011/8/11 sunny...@gmail.com sunny...@gmail.com Authentication is done once at login. The user credentials are sent to the server using GWT-RPC, and the server authenticates using LDAP. Once authenticated, the user loads the full user object into the hashmap keyed by session IDs. Part of this user object contains a hashmap of permissions allowable by this user (loaded from a database). When a client calls a GWT-RPC, the checked session ID is used to retrieve the user object on the server side, and its hashmap of permissions is checked to see it contains the required permissions for using that GWT-RPC. How does my mechanism of authentication/authorisation affect the scenario I described? On Aug 11, 9:35 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: How manage authorization and authentication? 2011/8/11 sunny...@gmail.com sunny...@gmail.com Hi all, I have an application that's been in use for the last 6 months or so and will be going into production 2 months. I've now see two instances of the problem described below and I'm fairly lost on how it could possibly happen. The client first needs to login. When the server authenticates the credentials sent by the client, the server returns a User object which has a subset of the user's properties (a 'light' user object), plus the session ID as retrieved on the server by calling getThreadLocalRequest().getSession().getId(). The server keeps a hashmap of session IDs against a fully populated user object (which includes their permissions properties amongst other things). Whenever a client accesses a GWT-RPC that should be protected, one of the parameters of the RPC is the light user object that the client has received from the server. The server authenticates this by: 1) Using HttpServletRequest.isRequestedSessionIdValid() 2) Comparing the session ID sent by the client (as stored in the light user object) and the one stored by the server's hashmap, and the one sent in the RPC's getThreadLocalRequest().getSession.getId(). Any inconsistency between the three raises an exception. Recently, the second occurrence of a weird error happened: The client has a timer which fires one of these RPCs every 5 seconds to refresh a table. This works really really well - we're using SmartGWT to have a grid that loads new data without the need to flicker or refresh (new rows simply appear, or existing rows update their data every 5 seconds). On this RPC's callback onFailure I just give a generic message with a caught.getMessage() appearing in a popup. I've had two instances reported by two different users on two different computers now (but both Chrome) this page has shown a popup showing my generic error, but the contents of the error is actually an error page from another website. Its almost as though GWT made the RPC call to the wrong server! (the user sent me a screenie, and surely in my popup there's a 403 error from the gov website) This completely blows my mind. Both instances the error was from a different website (one was a horse racing site, one a government site). I haven't been able to confirm yet whether the users were actually on those sites at any stage or whether there were cookies from those sites (also note I do not specifically use the Cookies class, and I can verify in Chrome that the JSESSIONID cookie is set with the correct domain and path). I haven't been able to replicate this either. I'm open to any suggestions on how this could be possible. -- 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.com. For more options, visit this group at
Re: Alternative to DTO's
I exchange directly JPA annotated POJOs between the client and the server, and I persist the same objects within the servlet. GWT compiler ignores the annotations, the servlet use them for persistence. I do not use RequestFactory (I've not yet studied it, probably I'll use it in the future but for other reasons), I'm using GWT RPC and it works well. I like this approach as I achieve minimal duplication with only one class in the GWT's shared folder, but there might be some side effect in some specific cases (all the persistence logic has to be handled on the server side). Cristiano On 12 Ago, 00:13, J D narusakur...@gmail.com wrote: Thank you for your suggestions. I will look into them promptly. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: use ui:text from
not exactly, ui:name and ui:description are for messages that uibinder generates from templates (e.g.: the default set messages - the other you should provide anyway as files). the proper how-to is in the link to docs you gave above. ui:text is used when you have messages in resources that you expose to uibinder template. (which is for example what i prefer to do) than you us eit like this: ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:with field='msg' type='com.tomaszgawel.client.YourWidget.Messages'/ g:HTMLPanel span ui:text from={msg.hello}/ /spans g:InlineLabel text={msg.world} / /g:HTMLPanel /ui:UiBinder in java you have sth like that: public class YourWidget extends Composite { //messages interface does not need to extend any of com.google.gwt.i18n.client.* iterfaces but it probably will ;) interface Messages extends ConstantsWithLookup { String world(); String hello(); } @UiField Messages msg; //messages must be ui:field - if you allready have an instance of messages use @UiField(provided = true) that's all :) -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: use ui:text from
but to the original question ;) you don,t need ui:text markup at all :). ui:text element has been introduced because you could not use {messages.messageKey} in plain text not as attribute. as title is an attribute it is not needed in that case. just write: span title={msg.yourTitleMessage}ui:text from={msg.someText} / /span -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Create Canvas widget from CanvasElement
i suppose it's a bug . in majority of widgets constructor with Element argument is protected. even a comment in source code of canvas it should be protected not private: /** * Protected constructor. Use {@link #createIfSupported()} to create a Canvas. */ private Canvas(CanvasElement element) { setElement(element); } i think you should raise the issue in gwt-contributors group. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Alternative to DTO's
What's JPA implementation are you use? 2011/8/11 Cristiano cristiano.costant...@gmail.com I exchange directly JPA annotated POJOs between the client and the server, and I persist the same objects within the servlet. GWT compiler ignores the annotations, the servlet use them for persistence. I do not use RequestFactory (I've not yet studied it, probably I'll use it in the future but for other reasons), I'm using GWT RPC and it works well. I like this approach as I achieve minimal duplication with only one class in the GWT's shared folder, but there might be some side effect in some specific cases (all the persistence logic has to be handled on the server side). Cristiano On 12 Ago, 00:13, J D narusakur...@gmail.com wrote: Thank you for your suggestions. I will look into them promptly. -- 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.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-toolkit@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: multiple gwt modules
You sure use the module: inherits name='com.google.gwt.user.User' / This module is define in gwt-user.jar. Check how is it do. Is this do you need? 2011/8/11 Daemon Zak saje...@gmail.com I want to able to load a gwt module from another gwt module for eg: if i click a button ,the new module should be loaded in a new browser ,with the same session attributes. how do we communicate between modules i.e . if i want to pass some information from one module to another and vice versa . any help is greatly appreicated -- 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.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-toolkit@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: multiple gwt modules
hi juan! I'm aware of that ! I want to be able to load a module in a new browser window from another module by some action ...say by clicking a button On Aug 11, 10:14 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: You sure use the module: inherits name='com.google.gwt.user.User' / This module is define in gwt-user.jar. Check how is it do. Is this do you need? 2011/8/11 Daemon Zak saje...@gmail.com I want to able to load a gwt module from another gwt module for eg: if i click a button ,the new module should be loaded in a new browser ,with the same session attributes. how do we communicate between modules i.e . if i want to pass some information from one module to another and vice versa . any help is greatly appreicated -- 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.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-toolkit@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: Doubt about using ValueListBox + UIBinder + Editors Framework
Hi, i have the same problem, do you have a class documentation link or some kind of documentation about LeafValueEditor? i only could get a description. Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/5pZJIpnKztQJ. 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: multiple gwt modules
GWT module is a simply a javascript bundle. I guess you are looking to open a component in another window. you can use Window.Open(..). This gives better info regarding modules http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModules On Aug 11, 7:38 pm, Daemon Zak saje...@gmail.com wrote: hi juan! I'm aware of that ! I want to be able to load a module in a new browser window from another module by some action ...say by clicking a button On Aug 11, 10:14 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: You sure use the module: inherits name='com.google.gwt.user.User' / This module is define in gwt-user.jar. Check how is it do. Is this do you need? 2011/8/11 Daemon Zak saje...@gmail.com I want to able to load a gwt module from another gwt module for eg: if i click a button ,the new module should be loaded in a new browser ,with the same session attributes. how do we communicate between modules i.e . if i want to pass some information from one module to another and vice versa . any help is greatly appreicated -- 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.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-toolkit@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.
CellTable + Editor displaying only those rows based on a flag in the bean
Hi, I am not sure whether any solution posted regarding this, but I couldn't find any. I am using GWT + MVP + Editor + Celltable. I am trying to display a list of objects in the cell table using editors and I want to display only those beans (rows) based on a flag set in the bean itself. For ex. if the bean is User User { // This is just an example Long id; String Name; String role; boolean active; } I want to display a list of user records in a celltable using editors. But i want to restrict what is displayed based on the active flag. say for example, display the user in the table only if they are active. Any suggestions how i can accomplish this? Thanks in advance -- 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Aw: Re: [gwt-contrib] Aw: Regression: instanceof compiler issue
I'll try to create 2 demo projects once I find the time. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] CachedCompilationUnits were inadvertently writing (issue1517803)
Reviewers: jbrosenberg, tobyr, Description: CachedCompilationUnits were inadvertently writing two compies when serialized, because CompiledClass contained a reference to the previous compilation unit used to create the CCU. Please review this at http://gwt-code-reviews.appspot.com/1517803/ Affected files: M dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java Index: dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java === --- dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java (revision 10516) +++ dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java (working copy) @@ -54,6 +54,10 @@ String resourceLocation) { assert unit != null; this.compiledClasses = unit.getCompiledClasses(); +// CompiledClass contains a backref to CompilationUnit - repoint it. +for (CompiledClass cc : compiledClasses) { + cc.initUnit(this); +} this.contentId = unit.getContentId(); this.dependencies = unit.getDependencies(); this.resourcePath = unit.getResourcePath(); @@ -86,6 +90,10 @@ CachedCompilationUnit(CompilationUnit unit, long astToken) { assert unit != null; this.compiledClasses = unit.getCompiledClasses(); +// CompiledClass contains a backref to CompilationUnit - repoint it. +for (CompiledClass cc : compiledClasses) { + cc.initUnit(this); +} this.contentId = unit.getContentId(); this.dependencies = unit.getDependencies(); this.resourceLocation = unit.getResourceLocation(); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: CachedCompilationUnits were inadvertently writing (issue1517803)
http://gwt-code-reviews.appspot.com/1517803/diff/1/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java File dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java (right): http://gwt-code-reviews.appspot.com/1517803/diff/1/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java#newcode59 dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java:59: cc.initUnit(this); This is the essence of what I want to do, but I've just realized that its going to create memory leaks, because the cached compilation units are likely copies of other types of units, meaning the class reference back to compilation unit will keep the cached compilation unit refs live. http://gwt-code-reviews.appspot.com/1517803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] The logic to avoid rewriting compilation units into archived units failed in some build environm... (issue1518803)
Reviewers: jbrosenberg, tobyr, Description: The logic to avoid rewriting compilation units into archived units failed in some build environments where the output of the CompileModule tool does not end up on the classpath. Each resulting .gwtar file contained all compilation units, regardless of whether a nested .gwtar file already contained the units. Please review this at http://gwt-code-reviews.appspot.com/1518803/ Affected files: M dev/core/src/com/google/gwt/dev/CompileModule.java M dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java M dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java Index: dev/core/src/com/google/gwt/dev/CompileModule.java === --- dev/core/src/com/google/gwt/dev/CompileModule.java (revision 10516) +++ dev/core/src/com/google/gwt/dev/CompileModule.java (working copy) @@ -34,6 +34,7 @@ import com.google.gwt.dev.util.arg.OptionStrict; import com.google.gwt.dev.util.log.speedtracer.CompilerEventType; import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger; +import com.google.gwt.thirdparty.guava.common.collect.Sets; import java.io.File; import java.io.IOException; @@ -191,7 +192,10 @@ // same archive twice. Key is archive URL string. Maps to the set of unit resource paths // for the archive. MapString, SetString unitsInArchives = new HashMapString, SetString(); - +// Modules archived in this session. They may not have been written to the classpath, +// but assume that we don't want to redundantly archive compilation units into +// modules compiled in the same session. +MapString, SetString compiledModules = new HashMapString, SetString(); File outputDir = options.getOutDir(); if (!outputDir.isDirectory() !outputDir.mkdirs()) { logger.log(Type.ERROR, Error creating directories for ouptut: @@ -225,6 +229,15 @@ } } +// Don't re-archive previously compiled units from this session. +for (String compiledModuleName : compiledModules.keySet()) { + if (module.isInherited(compiledModuleName)) { + currentModuleArchivedUnits.addAll(compiledModules.get(compiledModuleName)); + } +} + +// Don't re-archive units that are already archived in another archive +// on the classpath. for (URL archiveURL : archiveURLs) { String archiveURLString = archiveURL.toString(); SetString unitPaths = unitsInArchives.get(archiveURLString); @@ -277,12 +290,15 @@ return false; } + SetString compiledUnits = Sets.newHashSet(); CompilationUnitArchive outputArchive = new CompilationUnitArchive(moduleToCompile); for (CompilationUnit unit : compilationState.getCompilationUnits()) { if (!currentModuleArchivedUnits.contains(unit.getResourcePath())) { outputArchive.addUnit(unit); -} - } + compiledUnits.add(unit.getResourcePath()); +} + } + compiledModules.put(moduleToCompile, compiledUnits); String slashedModuleName = module.getName().replace('.', '/') + ModuleDefLoader.COMPILATION_UNIT_ARCHIVE_SUFFIX; Index: dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java === --- dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java (revision 10516) +++ dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java (working copy) @@ -113,6 +113,8 @@ private final SetFile gwtXmlFiles = new HashSetFile(); + private final SetString inheritedModules = new HashSetString(); + /** * All resources found on the public path, specified by public directives in * modules (or the implicit ./public directory). Marked 'lazy' because it does not @@ -133,7 +135,7 @@ private final MapString, Class? extends Linker linkerTypesByName = new LinkedHashMapString, Class? extends Linker(); - + private final long moduleDefCreationTime = System.currentTimeMillis(); private final String name; @@ -197,13 +199,13 @@ publicPrefixSet.add(new PathPrefix(publicPackage, defaultFilters.customResourceFilter( includeList, excludeList, skipList, defaultExcludes, caseSensitive), true, excludeList)); } - + public void addSourcePackage(String sourcePackage, String[] includeList, String[] excludeList, String[] skipList, boolean defaultExcludes, boolean caseSensitive) { addSourcePackageImpl(sourcePackage, includeList, excludeList, skipList, defaultExcludes, caseSensitive, false); } - + public void addSourcePackageImpl(String sourcePackage, String[] includeList, String[] excludeList, String[] skipList, boolean defaultExcludes, boolean caseSensitive, boolean isSuperSource) { @@ -443,6 +445,10 @@ return lastModified() moduleDefCreationTime; } + public boolean isInherited(String moduleName) { +return
[gwt-contrib] [google-web-toolkit] r10517 committed - Deferring updating column widths until the redraw loop executes in a f...
Revision: 10517 Author: gwt.mirror...@gmail.com Date: Thu Aug 11 07:57:03 2011 Log: Deferring updating column widths until the redraw loop executes in a finally command. Currently, every time the user adds or removes a column, we refresh the widths of all columns. This leads to an O(n^2) creation time for the table. Resetting the column widths in the redraw loop reduces that to O(n), and is consistent with the rendering implementation of the table itself. We use a dirty bit to indicate that the column widths need to be updated, to avoid unnecessary work in the redraw loop. When setting or clearing column widths, we update the affectected col element synchronously. Review at http://gwt-code-reviews.appspot.com/1509808 Review by: pengzhu...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10517 Modified: /trunk/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java /trunk/user/test/com/google/gwt/user/cellview/client/CellTableTest.java === --- /trunk/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java Tue Aug 9 05:15:24 2011 +++ /trunk/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java Thu Aug 11 07:57:03 2011 @@ -952,6 +952,7 @@ private boolean cellIsEditing; private final ListColumnT, ? columns = new ArrayListColumnT, ?(); private final MapColumnT, ?, String columnWidths = new HashMapColumnT, ?, String(); + private boolean columnWidthsDirty; private final MapInteger, String columnWidthsByIndex = new HashMapInteger, String(); /** @@ -1134,7 +1135,7 @@ */ public void clearColumnWidth(ColumnT, ? column) { columnWidths.remove(column); -refreshColumnWidths(); +updateColumnWidthImpl(column, null); } /** @@ -1144,7 +1145,10 @@ */ public void clearColumnWidth(Integer column) { columnWidthsByIndex.remove(column); -refreshColumnWidths(); +// TODO(jlabanca): Compare to realColumnCount when headerBuilder lands. +if (column getColumnCount()) { + doSetColumnWidth(column, null); +} } /** @@ -1359,7 +1363,7 @@ } CellBasedWidgetImpl.get().sinkEvents(this, consumedEvents); -redraw(); +refreshColumnsAndRedraw(); } /** @@ -1413,12 +1417,6 @@ SafeHtml footerHtml) { insertColumn(beforeIndex, col, new SafeHtmlHeader(headerHtml), new SafeHtmlHeader(footerHtml)); } - - @Override - public void redraw() { -refreshColumnWidths(); -super.redraw(); - } /** * Redraw the table's footers. @@ -1466,7 +1464,7 @@ } // Redraw the table asynchronously. -redraw(); +refreshColumnsAndRedraw(); // We don't unsink events because other handlers or user code may have sunk // them intentionally. @@ -1490,7 +1488,7 @@ */ public void setColumnWidth(ColumnT, ? column, String width) { columnWidths.put(column, width); -refreshColumnWidths(); +updateColumnWidthImpl(column, width); } /** @@ -1525,7 +1523,10 @@ */ public void setColumnWidth(int column, String width) { columnWidthsByIndex.put(column, width); -refreshColumnWidths(); +// TODO(jlabanca): Compare to realColumnCount when headerBuilder lands. +if (column getColumnCount()) { + doSetColumnWidth(column, width); +} } /** @@ -2003,8 +2004,7 @@ @Override protected void replaceAllChildren(ListT values, SafeHtml html) { -// Render the headers and footers. -createHeadersAndFooters(); +refreshHeadersAndColumnsImpl(); /* * If html is not null, then the user overrode renderRowValues() and @@ -2024,7 +2024,7 @@ @SuppressWarnings(deprecation) @Override protected void replaceChildren(ListT values, int start, SafeHtml html) { -createHeadersAndFooters(); +refreshHeadersAndColumnsImpl(); /* * If html is not null, then the user override renderRowValues() and @@ -2569,6 +2569,28 @@ String cellId = elem.getAttribute(CELL_ATTRIBUTE); return (cellId == null) || (cellId.length() == 0) ? null : cellId; } + + /** + * Mark the column widths as dirty and redraw the table. + */ + private void refreshColumnsAndRedraw() { +columnWidthsDirty = true; +redraw(); + } + + /** + * Refresh the headers and column widths. + */ + private void refreshHeadersAndColumnsImpl() { +// Refresh the column widths if needed. +if (columnWidthsDirty) { + columnWidthsDirty = false; + refreshColumnWidths(); +} + +// Render the headers and footers. +createHeadersAndFooters(); + } private C boolean resetFocusOnCellImpl(int row, int col, HasCellT, C column, Element cellParent) { @@ -2595,4 +2617,21 @@ setStyleName(cells.getItem(i), cellStyle, add); } } -} + + /** + * Update the width of all instances of the specified column. A column + * instance may appear multiple times in the table. + * +
[gwt-contrib] Re: The logic to avoid rewriting compilation units into archived units failed in some build environm... (issue1518803)
http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java File dev/core/src/com/google/gwt/dev/CompileModule.java (right): http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode194 dev/core/src/com/google/gwt/dev/CompileModule.java:194: MapString, SetString unitsInArchives = new HashMapString, SetString(); I'm a little confused by this comment. When you say session, is it referring specifically to a dev mode session? Or could it also apply to a web-mode compile? In which case what's a session? What's the significance of units being written to the classpath? http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode197 dev/core/src/com/google/gwt/dev/CompileModule.java:197: // modules compiled in the same session. maybe a more specific name (newlyCompiledModules)? http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode231 dev/core/src/com/google/gwt/dev/CompileModule.java:231: session? http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode238 dev/core/src/com/google/gwt/dev/CompileModule.java:238: Is this really the right comment for this entire for loop? http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java File dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java (right): http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java#newcode137 dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java:137: new LinkedHashMapString, Class? extends Linker(); whitespace? Here and below? http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java File dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java (right): http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java#newcode232 dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java:232: } whitespace? http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java#newcode241 dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java:241: } will this add inherited modules from multiple levels in the hierarchy? Or only first level inheritance? It seems like it would be relevant to detecting whether a module's compilation units are already loaded, etc. http://gwt-code-reviews.appspot.com/1518803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: CachedCompilationUnits were inadvertently writing (issue1517803)
http://gwt-code-reviews.appspot.com/1517803/diff/1/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java File dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java (right): http://gwt-code-reviews.appspot.com/1517803/diff/1/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java#newcode59 dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java:59: cc.initUnit(this); So, are you saying we should hold off on reviewing for now? I'm not sure I understand fully how this solves the issue at hand (perhaps more comments?). http://gwt-code-reviews.appspot.com/1517803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Deferring updating column widths until the redraw loop executes in a finally command. Currently... (issue1509808)
committed as r10517 http://gwt-code-reviews.appspot.com/1509808/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: CachedCompilationUnits were inadvertently writing (issue1517803)
http://gwt-code-reviews.appspot.com/1517803/diff/1/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java File dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java (right): http://gwt-code-reviews.appspot.com/1517803/diff/1/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java#newcode59 dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java:59: cc.initUnit(this); Hold off reviewing until the next patch set - I added logic to clone the CompiledClass instances too. http://gwt-code-reviews.appspot.com/1517803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: CachedCompilationUnits were inadvertently writing (issue1517803)
http://gwt-code-reviews.appspot.com/1517803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: CachedCompilationUnits were inadvertently writing (issue1517803)
http://gwt-code-reviews.appspot.com/1517803/diff/5002/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java File dev/core/src/com/google/gwt/dev/javac/CompiledClass.java (right): http://gwt-code-reviews.appspot.com/1517803/diff/5002/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java#newcode57 dev/core/src/com/google/gwt/dev/javac/CompiledClass.java:57: copyCc.initUnit(newUnit); This fixes the problem with writing out 2 units every time we write out a CachedCompilation unit that has been copied from another compilation unit. In my first attempt to fix, I repointed this, but the CompiledClass was shared between two different units. Now that it the CompiledClasses are copied, once we write out the cached cmopilation unit and throw away the reference, the old compilation unit's CompiledClasses won't keep the cached compilation unit memroy alive. http://gwt-code-reviews.appspot.com/1517803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: The logic to avoid rewriting compilation units into archived units failed in some build environm... (issue1518803)
http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java File dev/core/src/com/google/gwt/dev/CompileModule.java (right): http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode194 dev/core/src/com/google/gwt/dev/CompileModule.java:194: MapString, SetString unitsInArchives = new HashMapString, SetString(); On 2011/08/11 15:29:46, jbrosenberg wrote: I'm a little confused by this comment. When you say session, is it referring specifically to a dev mode session? Or could it also apply to a web-mode compile? In which case what's a session? What I mean is an invocation of CompileModule, which is a standalone program. Updated to make that more clear. What's the significance of units being written to the classpath? http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode197 dev/core/src/com/google/gwt/dev/CompileModule.java:197: // modules compiled in the same session. On 2011/08/11 15:29:46, jbrosenberg wrote: maybe a more specific name (newlyCompiledModules)? Done. http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode231 dev/core/src/com/google/gwt/dev/CompileModule.java:231: On 2011/08/11 15:29:46, jbrosenberg wrote: session? Done. http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode238 dev/core/src/com/google/gwt/dev/CompileModule.java:238: On 2011/08/11 15:29:46, jbrosenberg wrote: Is this really the right comment for this entire for loop? Done. http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java File dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java (right): http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java#newcode137 dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java:137: new LinkedHashMapString, Class? extends Linker(); On 2011/08/11 15:29:46, jbrosenberg wrote: whitespace? Here and below? Done. http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java File dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java (right): http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java#newcode232 dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java:232: } On 2011/08/11 15:29:46, jbrosenberg wrote: whitespace? Done. http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java#newcode241 dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java:241: } On 2011/08/11 15:29:46, jbrosenberg wrote: will this add inherited modules from multiple levels in the hierarchy? Or only first level inheritance? nestedLoad is invoked recursively, if that's what you mean. It seems like it would be relevant to detecting whether a module's compilation units are already loaded, etc. Essentially, I just moved a Set out of ModuleDefLoader we were keeping into ModuleDef because I wanted to be able to query the set after the module had been loaded to fix the problem in CompileModule. Compile Module wants to exclude units from an archive if they are a part of an inherited module, but the inheritance information was lost after load time. http://gwt-code-reviews.appspot.com/1518803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: The logic to avoid rewriting compilation units into archived units failed in some build environm... (issue1518803)
http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java File dev/core/src/com/google/gwt/dev/CompileModule.java (right): http://gwt-code-reviews.appspot.com/1518803/diff/1/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode194 dev/core/src/com/google/gwt/dev/CompileModule.java:194: MapString, SetString unitsInArchives = new HashMapString, SetString(); On 2011/08/11 15:29:46, jbrosenberg wrote: ... What's the significance of units being written to the classpath? Forgot to address this one. A module looks on the classpath to find .gwt.xml files, when it does, it also looks for a corrsponding .gwtar file. In a normal build, some earlier program put the .gwtar file there and it was there when dev mode or the compiler started, but when you are running CompileModule itself, you are creating these new files. In the normal ant build, the .gwtar files are directly output into the classpath, so that you can read them back when the next module is compiled. But some build environments write out the .gwtar file to a temporary spot, then when the entire CompileModule is done, it moves the .gwtar files onto the classpath for the next task in the build. CompileModule wasn't smart enough to handle that second case efficiently, and compiled each module as if there were no nested modules already compiled. http://gwt-code-reviews.appspot.com/1518803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Added methods to ColumnSortEvent.ListHandler to set the Handler's list and to retrieve sorting c... (issue1519803)
LGTM http://gwt-code-reviews.appspot.com/1519803/diff/1/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java File user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java (right): http://gwt-code-reviews.appspot.com/1519803/diff/1/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java#newcode88 user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java:88: extra spaces http://gwt-code-reviews.appspot.com/1519803/diff/1/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java#newcode137 user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java:137: extra spaces http://gwt-code-reviews.appspot.com/1519803/diff/1/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java#newcode138 user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java:138: public void setList(ListT list) { You should assert that list is not null. http://gwt-code-reviews.appspot.com/1519803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: The logic to avoid rewriting compilation units into archived units failed in some build environm... (issue1518803)
LGTM w/a comment nit http://gwt-code-reviews.appspot.com/1518803/diff/3002/dev/core/src/com/google/gwt/dev/CompileModule.java File dev/core/src/com/google/gwt/dev/CompileModule.java (right): http://gwt-code-reviews.appspot.com/1518803/diff/3002/dev/core/src/com/google/gwt/dev/CompileModule.java#newcode194 dev/core/src/com/google/gwt/dev/CompileModule.java:194: MapString, SetString unitsInArchives = new HashMapString, SetString(); Ok, so can you make it a bit more clear in this comment, so we know why it's relevant to say they may not have been written to the classpath...? Are you saying that archive files are written to the classpath, and then reloaded from the classpath, in the same process? Or is it always a matter of writing things so that the next process (with a new classloader) will find them? In which case it make more sense to refer to in that way (since how do I know a subsequent process will even have the same classpath as the current invocation)? http://gwt-code-reviews.appspot.com/1518803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10519 committed - The logic to avoid rewriting compilation units into archived units fai...
Revision: 10519 Author: gwt.mirror...@gmail.com Date: Thu Aug 11 08:42:43 2011 Log: The logic to avoid rewriting compilation units into archived units failed in some build environments where the output of the CompileModule tool does not end up on the classpath. Each resulting .gwtar file contained all compilation units, regardless of whether a nested .gwtar file already contained the units. Review at http://gwt-code-reviews.appspot.com/1518803 http://code.google.com/p/google-web-toolkit/source/detail?r=10519 Modified: /trunk/dev/core/src/com/google/gwt/dev/CompileModule.java /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java === --- /trunk/dev/core/src/com/google/gwt/dev/CompileModule.java Thu Jun 23 08:42:50 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/CompileModule.java Thu Aug 11 08:42:43 2011 @@ -34,6 +34,7 @@ import com.google.gwt.dev.util.arg.OptionStrict; import com.google.gwt.dev.util.log.speedtracer.CompilerEventType; import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger; +import com.google.gwt.thirdparty.guava.common.collect.Sets; import java.io.File; import java.io.IOException; @@ -191,7 +192,12 @@ // same archive twice. Key is archive URL string. Maps to the set of unit resource paths // for the archive. MapString, SetString unitsInArchives = new HashMapString, SetString(); - +// Modules archived by this invocation of CompileModule. Once a compiled module is +// written out as an archive file, it may or may not appear on the classpath +// and come back with module.getAllCompilationUnitArchiveURLs(). Thus, use a second check +// so that the tool doesn't redundantly write the same compilation units into +// multiple archives. +MapString, SetString newlyCompiledModules = new HashMapString, SetString(); File outputDir = options.getOutDir(); if (!outputDir.isDirectory() !outputDir.mkdirs()) { logger.log(Type.ERROR, Error creating directories for ouptut: @@ -225,6 +231,14 @@ } } +// Don't re-archive previously compiled units from this invocation of CompileModule. +for (String compiledModuleName : newlyCompiledModules.keySet()) { + if (module.isInherited(compiledModuleName)) { + currentModuleArchivedUnits.addAll(newlyCompiledModules.get(compiledModuleName)); + } +} + +// Load up previously archived modules for (URL archiveURL : archiveURLs) { String archiveURLString = archiveURL.toString(); SetString unitPaths = unitsInArchives.get(archiveURLString); @@ -277,12 +291,15 @@ return false; } + SetString compiledUnits = Sets.newHashSet(); CompilationUnitArchive outputArchive = new CompilationUnitArchive(moduleToCompile); for (CompilationUnit unit : compilationState.getCompilationUnits()) { if (!currentModuleArchivedUnits.contains(unit.getResourcePath())) { outputArchive.addUnit(unit); + compiledUnits.add(unit.getResourcePath()); } } + newlyCompiledModules.put(moduleToCompile, compiledUnits); String slashedModuleName = module.getName().replace('.', '/') + ModuleDefLoader.COMPILATION_UNIT_ARCHIVE_SUFFIX; === --- /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java Wed Jun 29 10:55:34 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java Thu Aug 11 08:42:43 2011 @@ -113,6 +113,8 @@ private final SetFile gwtXmlFiles = new HashSetFile(); + private final SetString inheritedModules = new HashSetString(); + /** * All resources found on the public path, specified by public directives in * modules (or the implicit ./public directory). Marked 'lazy' because it does not @@ -442,6 +444,10 @@ public boolean isGwtXmlFileStale() { return lastModified() moduleDefCreationTime; } + + public boolean isInherited(String moduleName) { +return inheritedModules.contains(moduleName); + } public long lastModified() { long lastModified = 0; @@ -487,6 +493,10 @@ void addCompilationUnitArchiveURL(URL url) { archiveURLs.add(url); } + + void addInteritedModule(String moduleName) { +inheritedModules.add(moduleName); + } /** * The final method to call when everything is setup. Before calling this === --- /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java Wed Jun 29 10:55:34 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java Thu Aug 11 08:42:43 2011 @@ -32,9 +32,7 @@ import java.net.URISyntaxException; import java.net.URL; import java.util.HashMap; -import java.util.HashSet; import java.util.Map; -import java.util.Set; /** * The top-level API for loading module XML.
[gwt-contrib] [google-web-toolkit] r10520 committed - Added methods to ColumnSortEvent.ListHandler to set the Handler's list...
Revision: 10520 Author: smcgr...@google.com Date: Thu Aug 11 09:26:57 2011 Log: Added methods to ColumnSortEvent.ListHandler to set the Handler's list and to retrieve sorting comparators that have been registered to Columns. Review at http://gwt-code-reviews.appspot.com/1519803 Review by: jlaba...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10520 Modified: /trunk/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java /trunk/user/test/com/google/gwt/user/cellview/client/ColumnSortEventTest.java === --- /trunk/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java Mon Mar 21 12:22:19 2011 +++ /trunk/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java Thu Aug 11 09:26:57 2011 @@ -80,11 +80,21 @@ */ public static class ListHandlerT implements Handler { private final MapColumn?, ?, ComparatorT comparators = new HashMapColumn?, ?, ComparatorT(); -private final ListT list; +private ListT list; public ListHandler(ListT list) { this.list = list; } + +/** + * Returns the comparator that has been set for the specified column, or + * null if no comparator has been set. + * + * @param column the {@link Column} + */ +public ComparatorT getComparator(ColumnT, ? column) { + return comparators.get(column); +} public ListT getList() { return list; @@ -124,6 +134,11 @@ public void setComparator(ColumnT, ? column, ComparatorT comparator) { comparators.put(column, comparator); } + +public void setList(ListT list) { + assert list != null : list cannot be null; + this.list = list; +} } /** === --- /trunk/user/test/com/google/gwt/user/cellview/client/ColumnSortEventTest.java Wed Jan 12 14:44:03 2011 +++ /trunk/user/test/com/google/gwt/user/cellview/client/ColumnSortEventTest.java Thu Aug 11 09:26:57 2011 @@ -74,11 +74,12 @@ // Create a handler for the list of values. ListHandlerString handler = new ListHandlerString(values); IdentityColumnString col0 = new IdentityColumnString(new TextCell()); -handler.setComparator(col0, new ComparatorString() { +ComparatorString col0Comparator = new ComparatorString() { public int compare(String o1, String o2) { return o1.compareTo(o2); } -}); +}; +handler.setComparator(col0, col0Comparator); IdentityColumnString col1 = new IdentityColumnString(new TextCell()); handler.setComparator(col1, null); @@ -102,5 +103,34 @@ assertEquals(c, values.get(0)); assertEquals(b, values.get(1)); assertEquals(a, values.get(2)); + +// Retrieve the comparators. +assertEquals(col0Comparator, handler.getComparator(col0)); +assertNull(handler.getComparator(col1)); +assertNull(handler.getComparator(new IdentityColumnString( +new TextCell(; + +// Create some new unsorted values. +ListString newValues = new ArrayListString(); +newValues.add(e); +newValues.add(d); +newValues.add(f); + +// Update the handler to be for the new list of values. +handler.setList(newValues); + +// Sort the new list in ascending order. +sortList.push(col0); +handler.onColumnSort(new ColumnSortEvent(sortList)); + +// The new values, sorted in ascending order. +assertEquals(d, newValues.get(0)); +assertEquals(e, newValues.get(1)); +assertEquals(f, newValues.get(2)); + +// The old values, still sorted in descending order. +assertEquals(c, values.get(0)); +assertEquals(b, values.get(1)); +assertEquals(a, values.get(2)); } } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10521 committed - CachedCompilationUnits were inadvertently writing...
Revision: 10521 Author: zun...@google.com Date: Thu Aug 11 10:00:33 2011 Log: CachedCompilationUnits were inadvertently writing two compies when serialized, because CompiledClass contained a reference to the previous compilation unit used to create the CCU. Review at http://gwt-code-reviews.appspot.com/1517803 http://code.google.com/p/google-web-toolkit/source/detail?r=10521 Modified: /trunk/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java /trunk/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java === --- /trunk/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java Thu Aug 4 06:30:44 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java Thu Aug 11 10:00:33 2011 @@ -53,7 +53,7 @@ public CachedCompilationUnit(CachedCompilationUnit unit, long lastModified, String resourceLocation) { assert unit != null; -this.compiledClasses = unit.getCompiledClasses(); +this.compiledClasses = CompiledClass.copyForUnit(unit.getCompiledClasses(), this); this.contentId = unit.getContentId(); this.dependencies = unit.getDependencies(); this.resourcePath = unit.getResourcePath(); @@ -85,7 +85,7 @@ @SuppressWarnings(deprecation) CachedCompilationUnit(CompilationUnit unit, long astToken) { assert unit != null; -this.compiledClasses = unit.getCompiledClasses(); +this.compiledClasses = CompiledClass.copyForUnit(unit.getCompiledClasses(), this); this.contentId = unit.getContentId(); this.dependencies = unit.getDependencies(); this.resourceLocation = unit.getResourceLocation(); @@ -109,7 +109,7 @@ this.astToken = new DiskCacheToken(astToken); this.astVersion = GwtAstBuilder.getSerializationVersion(); } - + @Override public CachedCompilationUnit asCachedCompilationUnit() { return this; === --- /trunk/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java Tue Jun 21 16:17:16 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java Thu Aug 11 10:00:33 2011 @@ -16,16 +16,23 @@ package com.google.gwt.dev.javac; import com.google.gwt.dev.javac.TypeOracleMediator.TypeData; +import com.google.gwt.dev.jjs.InternalCompilerException; import com.google.gwt.dev.util.DiskCache; import com.google.gwt.dev.util.DiskCacheToken; -import com.google.gwt.dev.util.StringInterner; import com.google.gwt.dev.util.Name.InternalName; +import com.google.gwt.dev.util.StringInterner; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader; import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException; import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer; import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * Encapsulates the state of a single compiled class file. @@ -34,20 +41,52 @@ private static final DiskCache diskCache = DiskCache.INSTANCE; - private final CompiledClass enclosingClass; - private final String internalName; - private final String sourceName; - private final boolean isLocal; - private transient TypeData typeData; - private CompilationUnit unit; - private String signatureHash; + static CollectionCompiledClass copyForUnit(CollectionCompiledClass in, CompilationUnit newUnit) { +if (in == null) { + return null; +} +CompiledClass[] orig = new CompiledClass[in.size()]; +ListCompiledClass copy = new ArrayListCompiledClass(); + +MapCompiledClass, CompiledClass enclosingClassMap = new HashMapCompiledClass, CompiledClass(); +for (CompiledClass cc : in) { + CompiledClass copyCc = new CompiledClass(cc, newUnit); + copy.add(copyCc); + enclosingClassMap.put(cc, copyCc); +} + +// Update the enclosing class references. With enough effort, we could determine the +// hierarchical relationship of compiled classes and initialize the copies with the +// copied enclosing class, but this is less effort. +for (CompiledClass copyCc : copy) { + if (copyCc.enclosingClass == null) { +continue; + } + CompiledClass newRef = enclosingClassMap.get(copyCc.enclosingClass); + if (null == newRef) { +throw new InternalCompilerException(Enclosing type not found for + copyCc.sourceName); + } + copyCc.enclosingClass = newRef; +} + +return Collections.unmodifiableCollection(copy); + } /** * A token to retrieve this object's bytes from the disk cache. byte code is * placed in the cache when the object is deserialized. */ private final DiskCacheToken classBytesToken; + private CompiledClass enclosingClass; + private final String internalName; + private final boolean isLocal; private transient NameEnvironmentAnswer nameEnvironmentAnswer; + private