Re: can't debug with eclipse because launching in eclipse fails
thx for this info - it helped in some way: now i get: Caused by: java.lang.NoClassDefFoundError: Could not initialize class packageInReferencedLibrary.usedClass Errors for every RP-Call. Since it runs fine with mvn gwt:run it remains a gwt-maven-plugin problen right? i'll post now there. On 23 Mrz., 16:44, David Chandler drfibona...@google.com wrote: In order to get all resources copied onto the maven classpath when running dev mode from Eclipse, you'll need to use copyWebapptrue/copyWebapp in the config section for gwt-maven-plugin (or run mvn package each time you update resources). If this doesn't work, please post on the gwt-maven-plugin forum: http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users HTH, /dmc On Tue, Mar 22, 2011 at 1:28 PM, tanteanni tantea...@hotmail.com wrote: first i thought my project is not working at all (http:// groups.google.com/group/google-web-toolkit/browse_frm/thread/ 2363c9992dee4e51) the problem short: a referenced library in server code can't access/ see one of its resources - the persistence.xml. but it seems only a problem with eclipse/maven project configuration: my project works fine if started via mvn gwt:run and it also works in tomcat. the problem mentioned in the thread mentiond above also occurs if i run the app via the generated launch configuration (the app was generated with webappcreator -maven). so how to debug my app? or how to configure launch/eclipse-project to get it work? thx 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. -- David Chandler Developer Programs Engineer, Google Web Toolkit w:http://code.google.com/ b:http://googlewebtoolkit.blogspot.com/ t: @googledevtools -- 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.
ORM or JDBC?
Hi everybody, I would like your opinion regarding the use of ORM in web applications built with GWT. I'm a little reconsider about the ORM, and I wonder whether it is worth to use in web applications built with GWT. What would be real advantages in addition to greater independence and portability? Waiting for your comments :) -- 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: ORM or JDBC?
JDBC rocks. so does hand written finely tuned sql statements. presence of a DBA helps a lot. my 2 cents. Thanks, Subhro. On Thu, Mar 24, 2011 at 2:22 PM, csaffi csaff...@gmail.com wrote: Hi everybody, I would like your opinion regarding the use of ORM in web applications built with GWT. I'm a little reconsider about the ORM, and I wonder whether it is worth to use in web applications built with GWT. What would be real advantages in addition to greater independence and portability? Waiting for your comments :) -- 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: Style TabLayoutPanel
I've try to found a solution online but nothing. I had this css .gwt-DecoratorPanel { } .gwt-DecoratorPanel .topCenter, .gwt-DecoratorPanel .bottomCenter { background: #cc; } .gwt-DecoratorPanel .middleLeft, .gwt-DecoratorPanel .middleRight { background: #cc; } .gwt-DecoratorPanel .topLeftInner, .gwt-DecoratorPanel .topRightInner, .gwt-DecoratorPanel .bottomLeftInner, .gwt-DecoratorPanel .bottomRightInner { background: #cc; } .gwt-DecoratedTabBar .tabTopLeft { background: url(images/corner.png) no-repeat 0px -55px; -background: url(images/corner_ie6.png) no-repeat 0px -55px; } .gwt-DecoratedTabBar .tabTopRight { background: url(images/corner.png) no-repeat -6px -55px; -background: url(images/corner_ie6.png) no-repeat -6px -55px; } .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft { background-position: 0px -61px; } .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight { background-position: -6px -61px; } But nothing change. There is another way? On Wed, Mar 23, 2011 at 10:45 PM, Marco Gadaleta gadaleta.ma...@gmail.comwrote: Hello everyone, I'm trying to style a TabLayoutPanel but without success. More precisely, I'm trying to change the color of tab and the border of content area.. but i cannot find their way.. Any suggestion would be appreciated. Thx -- Marco -- Marco -- 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 2.2 Celltable Paging
Hi, thank you very much. That solved the problem. On 23 Mrz., 22:22, Alexandre Ardhuin alexandre.ardh...@gmail.com wrote: Hi, I think you should use : cellTable.setRowCount(result.size()); cellTable.setRowData(0, result); instead of : cellTable.setRowData(result); Javadoc of com.google.gwt.user.cellview.client.AbstractHasData.setRowData(List? extends T) tells : Set the complete list of values to display on one page. Alexandre. 2011/3/22 Dovakhin o.fr...@freenet.de Hi, I have the following problem. I have a celltable with 2 columns. These columns contain Filenames and their size. Due to the fact that i have many files that i want to display I want to use Paging. In my last project i used gwt 2.1 and the paging worked there. The simplePager in GWT 2.2 does not work in my new project but its still the same code that should work. Can anyone show me where it goes wrong? Thanks. Here´s my code reduced to the SimplePager things: public class CellTableTestClass { private VerticalPanel applicationPanel = new VerticalPanel(); private CellTableLogData cellTable = new CellTableLogData(); private SingleSelectionModelLogData selectionModel = new SingleSelectionModelLogData(); public VerticalPanel createContent() { LogFileServiceAsync initData = (LogFileServiceAsync) GWT.create(LogFileService.class); initData.getLogs(new AsyncCallbackList LogData() { public void onFailure(Throwable caught) { Window.alert(caught.getLocalizedMessage()); } public void onSuccess(ListLogData result) { cellTable.setRowData(result); } }); cellTable.setSelectionModel(selectionModel); { cellTable.addColumn(new TextColumnLogData() { @Override public String getValue(LogData object) { return object.getLogName(); } }, Log Name); cellTable.addColumn(new TextColumnLogData() { @Override public String getValue(LogData object) { return object.getSize(); } }, Size); } // create a pager, giving it a handle to the CellTable SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class); SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true); pager.setDisplay(cellTable); pager.setPageSize(10); // add the Pager to the dialog applicationPanel.add(pager); applicationPanel.add(new HTML(hr /)); applicationPanel.add(cellTable); return applicationPanel; } } -- 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.
MVP placeController History back activity mayStop
Hi I have an activity with a mayStop method implemented to ask Have you finished your work ? In some cases, i programmatically use History.back() to go to the previous token/place. But i dont want the question to be asked in that case (because i am sure the work has been done). may Stop does not have any parameter that allows me to distinguish this case from other manual actions (navigator url change, navigator close, menu navigation, ...) http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/activity/shared/Activity.html#mayStop() http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/place/shared/PlaceController.html Any idea ? Thanks Francois Wauquier -- 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: ORM or JDBC?
note, that you can mix JPA and JDBC - there's no need to decide for only one of them. I try to use JPA 2.0 as much as possible with Hibernate as persistence provider. For special cases , I fall back to native SQL commands or even plain JDBC. what I like with JPA/Hibernate: * it's easier to use objects than mess with the basic data types * you get a lot of type checking out of the box * JPA 2.0 has type-safe queries * Hibernate can generate the DB-create scripts for you (and also update scripts to a certain degree) another note: you cannot use Entities directly on the GWT client side, but there are different ways to handle this: e.g. DTOs or GWT-Request Factory, or tools like GILEAD, etc.. see: * http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html * http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html On Mar 24, 10:13 am, Subhrajyoti Moitra subhrajyo...@gmail.com wrote: JDBC rocks. so does hand written finely tuned sql statements. presence of a DBA helps a lot. my 2 cents. Thanks, Subhro. On Thu, Mar 24, 2011 at 2:22 PM, csaffi csaff...@gmail.com wrote: Hi everybody, I would like your opinion regarding the use of ORM in web applications built with GWT. I'm a little reconsider about the ORM, and I wonder whether it is worth to use in web applications built with GWT. What would be real advantages in addition to greater independence and portability? Waiting for your comments :) -- 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.
RPC Serializable = invalid objects graph?
Hi, I have the following setup: import java.io.Serializable; class A implements Serializable { SetB bs; SetC cs; } class B implements Serializable { SetC cs; } class C implements Serializable { SetB bs; } I send an instance of A from client to server using GWT RPC. After deserialization the objects graph is no longer intact. Multiple instances of what was earlier one instance have been created and referenced to respectively. Example: Before serialization: instance x of A.bs == instance x of C.bs. After deserialization: instance x of A.bs != instance x of C.bs. As I understand it, this should not happen as the serialization of all the above instances is written to the same stream. I know that GWT RPC only implements parts of java.io.Serializable. Does this explain this behavior or does anyone have an idea? Thanks, Carl -- 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: MVP placeController History back activity mayStop
Maybe setting a static field to a specific value which could be read in the mayStop() method. If it's set to the parameter, do not ask the questions. Don't think this will cause problems b/c/ the activity will be newly created everytime a user navigates to the corresponding site. Erik On Mar 24, 11:32 am, Francois Wauquier wok...@gmail.com wrote: Hi I have an activity with a mayStop method implemented to ask Have you finished your work ? In some cases, i programmatically use History.back() to go to the previous token/place. But i dont want the question to be asked in that case (because i am sure the work has been done). may Stop does not have any parameter that allows me to distinguish this case from other manual actions (navigator url change, navigator close, menu navigation, ...)http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...()http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g... Any idea ? Thanks Francois Wauquier -- 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: RPC Serializable = invalid objects graph?
GWT-RPC serialize objets graphs by POST and isn't do exact JVM serialization. You must implement equals and hashcode and then if you compare with equals then: Before serialization: instance x of A.bs equals instance x of C.bs. After deserialization: instance x of A.bs equals instance x of C.bs. 2011/3/24 Carl c...@rahmstrom.com Hi, I have the following setup: import java.io.Serializable; class A implements Serializable { SetB bs; SetC cs; } class B implements Serializable { SetC cs; } class C implements Serializable { SetB bs; } I send an instance of A from client to server using GWT RPC. After deserialization the objects graph is no longer intact. Multiple instances of what was earlier one instance have been created and referenced to respectively. Example: Before serialization: instance x of A.bs == instance x of C.bs. After deserialization: instance x of A.bs != instance x of C.bs. As I understand it, this should not happen as the serialization of all the above instances is written to the same stream. I know that GWT RPC only implements parts of java.io.Serializable. Does this explain this behavior or does anyone have an idea? Thanks, Carl -- 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 troubleshoot NPE during UIBinder component initialization
No. private static MainPageViewUiBinder uiBinder = GWT.create(MainPageViewUiBinder.class); @Inject public MainPageView(SignInOutLink signInOutLink, ShortMessageBox shortMessageBox) { this.signInOutLink = signInOutLink; this.shortMessageBox = shortMessageBox; widget = uiBinder.createAndBindUi(this); } On Mar 23, 9:59 am, Y2i yur...@gmail.com wrote: More likely you are calling createAndBindUi() before initializing shortMessageBox -- 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: MVP pattern for Tabbed UI (Each Tab = Unique Module e.g. Orders)
Y2i, thanks for the suggestion. That sounds like a good idea. I was wondering if there's an existing sample app that does things similar to what I want to achieve. It would be really helpful. Thanks once again! On Thu, Mar 24, 2011 at 12:21 AM, Y2i yur...@gmail.com wrote: From my experience TabPanel does not fit with MVP, but TabBar on top of a client area fits well. Use DockLayoutPanel, place TabBar into g:north and the client area into g:center -- 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.
ProxyAutoBean server-side cache
Hi, it appears that for every EntityProxy instance that a client requests via RequestFactory, a ProxyAutoBean object is created on the server. Is this correct? If so, what is the lifecycle of the ProxyAutoBean, at what point does it get deleted? I can see (in jvisualvm) that it lives in a WeakMapping, so maybe it is intended to be removed when the GC needs the memory it occupies. However, a few initial tests seem to show that the ProxyAutoBeans survive low memory conditions and keep accumulating. Am I doing something wrong or is this expected behaviour? -- 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.
Getting Exceptions after updating to GWT 2.2
Getting following exception on ListBox.addItem after I upgraded to GWT 2.2 The ListBox is created by wrapping an HTML element and already have a single option i.e. Select. Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 at java.util.ArrayList.add(ArrayList.java:367) at com.google.gwt.user.client.ui.ListBox.insertItem(ListBox.java:350) at com.google.gwt.user.client.ui.ListBox.insertItem(ListBox.java:323) at com.google.gwt.user.client.ui.ListBox.addItem(ListBox.java:194) -- 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.
Dialog box that doesnt grey out background and allows me interact with background
Hi Folks, Im designing the UI for a web app and have been so far creating designs in photoshop that suggest a dialogue box that popups up but the user can still interact with the background behind it. My users will need to be able to copy and paste text from the background into the dialogue box... and things like that. I see that there is only one type of dialogue box with GWT. Its great that its dragable, however it greys out the background :( Also I was hoping for a dialog that is collabsible. Our team has to use GWT and cant use any other toolkit (ajax/jquery). Im not even sure we can use third parties. Id love to hear someones opinion on how I could acheive what I want with the core GWT toolkit. If not a suggestion for a third party GWT extnesion might do. Thanks for your help community. CURRENT GWT DIALOGUE http://gwt.google.com/samples/Showcase/Showcase.html#!CwDialogBox -- 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.
JFreeChart GWT
Ma question très simple, comment intégrer JFreeChart dans un projet GWT à fin de créer un diagramme de Gantt? -- 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.
data-icon
Does GWT support data-icon attribute for anchors? -- 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 Code generator is based on which Framework
I want to know how GWT generates the source code. Is it using EMF framework or some other? -- 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.
Doc reference perhaps?
Hi Giuys, I'm evaluating GWt as an HTML5 game development tool. I've looked over the JSNI stuff and that covers oen of my questions-- using or writing javascript libraries. My second question is how to create libraires in GWT for other GWT projects to use? In the JavaVM I would generate a JAR containing the library classe.s What is the equivalent in GWT/ Is there soem thing in the docs about this I haven't stumbled on yet? Thanks JK -- 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: Style TabLayoutPanel
try reorder css files. usually your css file has to be in the last position, to override standard.css from GWT. other way is to use ! important. example: .gwt-DecoratorPanel .bottomCenter { background: #ccc !important; } marko -- 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: Is gwt serialization backward compatible ?
any ideas or advises ? On 23 mar, 14:04, Kroc vincent.legen...@gmail.com wrote: I've serialized data with standard java way into files and database. As I'm dicovering RPC.encodeResponseForSuccess to inject data in web pages, I wondered to know if it's safe to store GWT serialized data into files and blobs for future use (either on client and server side) ? And if yes, is gwt (de)serialization procedure slower than stadard java serialization ? -- 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: Doc reference perhaps?
All you need to do is to create a jar file with: - your .class files as you would for a regular java program - your .java source files -- these are required so your users can use GWT to translate to javascript - whatever gwt.xml files are appropriate (at least one) Then, a user of your library would put your jar file on their classpath at compile time, and add an inherits ... line into their gwt.xml to inherit your module(s). HTH Paul On 24/03/11 00:01, CyberQat wrote: Hi Giuys, I'm evaluating GWt as an HTML5 game development tool. I've looked over the JSNI stuff and that covers oen of my questions-- using or writing javascript libraries. My second question is how to create libraires in GWT for other GWT projects to use? In the JavaVM I would generate a JAR containing the library classe.s What is the equivalent in GWT/ Is there soem thing in the docs about this I haven't stumbled on yet? Thanks JK -- 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: Is gwt serialization backward compatible ?
I would not recommend either use GWT serialization or JVM serialization to store in a file, it isn't the main purpose. First, don't trust that GWT never change Serialization method in the future. Second, JVM serialization use serialversionuid to check if the .class is compatible and the version of JVM (a class serializate with 1.5 is not compatible with 1.6). I recomend use XML o JSON to store class. There are a lots of frameworks around to do this job. Juan 2011/3/24 Kroc vincent.legen...@gmail.com any ideas or advises ? On 23 mar, 14:04, Kroc vincent.legen...@gmail.com wrote: I've serialized data with standard java way into files and database. As I'm dicovering RPC.encodeResponseForSuccess to inject data in web pages, I wondered to know if it's safe to store GWT serialized data into files and blobs for future use (either on client and server side) ? And if yes, is gwt (de)serialization procedure slower than stadard java serialization ? -- 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: RPC Serializable = invalid objects graph?
GWT RPC does normally preserve object graphs properly, so an instance is only ever written out once. If the same object is referenced multiple times in an object graph, the first time it writes out the full object, and subsequent times it writes a reference back to the thing it wrote out before. You need to be careful with circular references held in sets/maps, but it doesn't sound like this is your issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=3577 Paul On 24/03/11 10:35, Carl wrote: Hi, I have the following setup: import java.io.Serializable; class A implements Serializable { SetB bs; SetC cs; } class B implements Serializable { SetC cs; } class C implements Serializable { SetB bs; } I send an instance of A from client to server using GWT RPC. After deserialization the objects graph is no longer intact. Multiple instances of what was earlier one instance have been created and referenced to respectively. Example: Before serialization: instance x of A.bs == instance x of C.bs. After deserialization: instance x of A.bs != instance x of C.bs. As I understand it, this should not happen as the serialization of all the above instances is written to the same stream. I know that GWT RPC only implements parts of java.io.Serializable. Does this explain this behavior or does anyone have an idea? Thanks, Carl -- 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.
complex example GWT Activity and Place
Hello, Is there any complex example on how to nest Views when using the GWT Activity and Place. For example, I have a MainWidget which acts as a parent View for all other Views that have got a Place. My question is, how can I place other Views in the MainWidget? If this is not possible, does this mean every View can outrightly be its own widget? My reason for wanting the MainWidget to house other Views is because I want the MainWidget to control the entire layout of the application, so that other Views (URL based widgets) can just go ahead and do their own specific things. From the HelloMVP, there's this line: private Place defaultPlace = new HelloPlace(World!); private SimplePanel appWidget = new SimplePanel(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = new AppActivityMapper(clientFactory); ActivityManager activityManager = new ActivityManager(activityMapper, eventBus); activityManager.setDisplay(appWidget); Taking this one level up, does this mean that the GoodbyeView and HelloView Views are attached to appWidget and are both visible at Place World? What about if I have widgets and not Views, can these widgets be attached to for example appWidget? Also, assuming I have another Place at Heaven, with its own Views, how can I discard the widgets already showing in appWidget? Is this something the ActivityManager takes care of automatically? One other question, I have an Hyperlink that's got a #profile token. From my understanding of Place, if I click on the Hyperlink which appends #profile to the URL, the ActivityManager should call the corresponding Place which is set at profile. Right now this is not working for me. I have this: registerHandler(display.showAgentProfileView().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { //eventBus.fireEvent(new MainSignupEvent()); getAgentProfileActivity(); } public void getAgentProfileActivity() { Window.alert(getAgentProfileActivity Request is called); History.newItem(profile); History.addValueChangeHandler(this); History.fireCurrentHistoryState(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = new AppActivityMapper(mainp); ActivityManager activityManager = new ActivityManager(activityMapper, geventBus); activityManager.setDisplay((AcceptsOneWidget)mainp.getDisplay().getAgentProfileView().asWidget()); Place agentprofile = new AgentProfilePlace(profile); PlaceController agentprofilePlaceController = mainp.getPlaceController(); AgentProfilePlaceHistoryMapper agentprofilehistoryMapper= GWT.create(AgentProfilePlaceHistoryMapper.class); PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(agentprofilehistoryMapper); historyHandler.register(placecontroller, geventBus, agentprofile); } I will also like to know, can the ActivityManager be called anywhere else other than in onModuleLoad. My reason is because, since the issue of decoupling is a big factor in MVP, I tend to have my events handled in the Presenter implementing class. Please correct me if I'm wrong with the interpretation. -- Odeyemi 'Kayode O. B.Sc(Hons) Econs, Application Developer Systems Engineer (Sun Certified Professional), Oracle Certified Associate, Solaris Systems Administrator, Drupal Developer Website: http://sinati.com http://www.sinati.com Socialize with me: http://profile.to/charyorde, http://twitter.com/charyorde, http://www.google.com/profiles/dreyemi Skype:drecute -- 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: complex example GWT Activity and Place
See this http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni 2011/3/24 Kayode Odeyemi drey...@gmail.com Hello, Is there any complex example on how to nest Views when using the GWT Activity and Place. For example, I have a MainWidget which acts as a parent View for all other Views that have got a Place. My question is, how can I place other Views in the MainWidget? If this is not possible, does this mean every View can outrightly be its own widget? My reason for wanting the MainWidget to house other Views is because I want the MainWidget to control the entire layout of the application, so that other Views (URL based widgets) can just go ahead and do their own specific things. From the HelloMVP, there's this line: private Place defaultPlace = new HelloPlace(World!); private SimplePanel appWidget = new SimplePanel(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = new AppActivityMapper(clientFactory); ActivityManager activityManager = new ActivityManager(activityMapper, eventBus); activityManager.setDisplay(appWidget); Taking this one level up, does this mean that the GoodbyeView and HelloView Views are attached to appWidget and are both visible at Place World? What about if I have widgets and not Views, can these widgets be attached to for example appWidget? Also, assuming I have another Place at Heaven, with its own Views, how can I discard the widgets already showing in appWidget? Is this something the ActivityManager takes care of automatically? One other question, I have an Hyperlink that's got a #profile token. From my understanding of Place, if I click on the Hyperlink which appends #profile to the URL, the ActivityManager should call the corresponding Place which is set at profile. Right now this is not working for me. I have this: registerHandler(display.showAgentProfileView().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { //eventBus.fireEvent(new MainSignupEvent()); getAgentProfileActivity(); } public void getAgentProfileActivity() { Window.alert(getAgentProfileActivity Request is called); History.newItem(profile); History.addValueChangeHandler(this); History.fireCurrentHistoryState(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = new AppActivityMapper(mainp); ActivityManager activityManager = new ActivityManager(activityMapper, geventBus); activityManager.setDisplay((AcceptsOneWidget)mainp.getDisplay().getAgentProfileView().asWidget()); Place agentprofile = new AgentProfilePlace(profile); PlaceController agentprofilePlaceController = mainp.getPlaceController(); AgentProfilePlaceHistoryMapper agentprofilehistoryMapper= GWT.create(AgentProfilePlaceHistoryMapper.class); PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(agentprofilehistoryMapper); historyHandler.register(placecontroller, geventBus, agentprofile); } I will also like to know, can the ActivityManager be called anywhere else other than in onModuleLoad. My reason is because, since the issue of decoupling is a big factor in MVP, I tend to have my events handled in the Presenter implementing class. Please correct me if I'm wrong with the interpretation. -- Odeyemi 'Kayode O. B.Sc(Hons) Econs, Application Developer Systems Engineer (Sun Certified Professional), Oracle Certified Associate, Solaris Systems Administrator, Drupal Developer Website: http://sinati.com http://www.sinati.com Socialize with me: http://profile.to/charyorde, http://twitter.com/charyorde, http://www.google.com/profiles/dreyemi Skype:drecute -- 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.
How to get mouse position from NativeEvent
Hello, everybody! I'm implementing custom cell, extending AbstractCell. One problem I have is related to event handling. My cell has image, and I need to know the mouse position related to this image. In method public void onBrowserEvent(Context context, Element parent, Integer value, NativeEvent event, ValueUpdaterInteger valueUpdater) { } I have NativeEvent which has methods getClientX()/getClientY() which is position in the browser window's client area. How to convert them to my image coordinate? Thank you , Andrey -- 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: complex example GWT Activity and Place
I have seen that Juan thanks. It addresses on nesting. But I have other questions such as can the ActivityManager be called anywhere else other than in onModuleLoad? Also, the concept of Place itself, as described above. On Thu, Mar 24, 2011 at 2:21 PM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: See this http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni 2011/3/24 Kayode Odeyemi drey...@gmail.com Hello, Is there any complex example on how to nest Views when using the GWT Activity and Place. For example, I have a MainWidget which acts as a parent View for all other Views that have got a Place. My question is, how can I place other Views in the MainWidget? If this is not possible, does this mean every View can outrightly be its own widget? My reason for wanting the MainWidget to house other Views is because I want the MainWidget to control the entire layout of the application, so that other Views (URL based widgets) can just go ahead and do their own specific things. From the HelloMVP, there's this line: private Place defaultPlace = new HelloPlace(World!); private SimplePanel appWidget = new SimplePanel(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = new AppActivityMapper(clientFactory); ActivityManager activityManager = new ActivityManager(activityMapper, eventBus); activityManager.setDisplay(appWidget); Taking this one level up, does this mean that the GoodbyeView and HelloView Views are attached to appWidget and are both visible at Place World? What about if I have widgets and not Views, can these widgets be attached to for example appWidget? Also, assuming I have another Place at Heaven, with its own Views, how can I discard the widgets already showing in appWidget? Is this something the ActivityManager takes care of automatically? One other question, I have an Hyperlink that's got a #profile token. From my understanding of Place, if I click on the Hyperlink which appends #profile to the URL, the ActivityManager should call the corresponding Place which is set at profile. Right now this is not working for me. I have this: registerHandler(display.showAgentProfileView().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { //eventBus.fireEvent(new MainSignupEvent()); getAgentProfileActivity(); } public void getAgentProfileActivity() { Window.alert(getAgentProfileActivity Request is called); History.newItem(profile); History.addValueChangeHandler(this); History.fireCurrentHistoryState(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = new AppActivityMapper(mainp); ActivityManager activityManager = new ActivityManager(activityMapper, geventBus); activityManager.setDisplay((AcceptsOneWidget)mainp.getDisplay().getAgentProfileView().asWidget()); Place agentprofile = new AgentProfilePlace(profile); PlaceController agentprofilePlaceController = mainp.getPlaceController(); AgentProfilePlaceHistoryMapper agentprofilehistoryMapper= GWT.create(AgentProfilePlaceHistoryMapper.class); PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(agentprofilehistoryMapper); historyHandler.register(placecontroller, geventBus, agentprofile); } I will also like to know, can the ActivityManager be called anywhere else other than in onModuleLoad. My reason is because, since the issue of decoupling is a big factor in MVP, I tend to have my events handled in the Presenter implementing class. Please correct me if I'm wrong with the interpretation. -- Odeyemi 'Kayode O. B.Sc(Hons) Econs, Application Developer Systems Engineer (Sun Certified Professional), Oracle Certified Associate, Solaris Systems Administrator, Drupal Developer Website: http://sinati.com http://www.sinati.com Socialize with me: http://profile.to/charyorde, http://twitter.com/charyorde, http://www.google.com/profiles/dreyemi Skype:drecute -- 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: Style TabLayoutPanel
Thx, it has produced a result only : the images on the angles has changed, but the tab color is the same... I don't know where is the problem.. On Thu, Mar 24, 2011 at 11:44 AM, mtrebizan mtrebi...@gmail.com wrote: try reorder css files. usually your css file has to be in the last position, to override standard.css from GWT. other way is to use ! important. example: .gwt-DecoratorPanel .bottomCenter { background: #ccc !important; } marko -- 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. -- Marco -- 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.
FocusPanel selection borderless
Hello everyone, I'm using a FocusPanel widget and i wan't to remove the border of selection when i click on the focus panel. I've try with a css with border: none but without succes.. Any idea? -- Marco -- 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: Style TabLayoutPanel
You tried assign !important to all your styles or did you just used mine? You should try using Firebug (addon for Firefox). -- 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: Style TabLayoutPanel
I use !important for all.. On Thu, Mar 24, 2011 at 3:45 PM, mtrebizan mtrebi...@gmail.com wrote: You tried assign !important to all your styles or did you just used mine? You should try using Firebug (addon for Firefox). -- 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. -- Marco -- 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: ORM or JDBC?
We use Mybatis which gives you some of the power of an ORM without the complexity and also complete transparency regarding the sql that is executed. Given that it works with straight POJO's it works great with RPC. -- 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: Intermittent XSRF attacks: Hosted Mode, FF3.6, GWT2.2
This has also been observed in web mode too. -- 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.
safehtml and onclick event
how to add onclick event to safehtml @Template() in gwt2.2 ? any example? -- 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.
@AlternateMessage and null values
Hey All, I'm trying to use the new @AlternateMessage annotation in my message interface to control messages when some values are null and some are not. The javadoc for the AlternateMessage says it accepts Strings but it doesn't seem to handle a null value whether I try to mark it with none or null. Any suggestions on how I can get this to work? @DefaultMessage(span class=''label''User ID:/span {0}, span class=''label''Alt ID:/span {1}, span class=''label''CIS #:/ span {2}, span class=''label''Name:/span {3}) @AlternateMessage({ other|none|none, span class=''label''User ID:/span {0}, span class=''label''Name:/span {3}, other|other|none, span class=''label''User ID:/span {0}, span class=''label''Alt ID:/span {1}, span class=''label''Name:/span {3}, other|none|other, span class=''label''User ID:/span {0}, span class=''label''CIS #:/span {2}, span class=''label''Name:/span {3}, none|other|other, span class=''label''Alt ID:/span {1}, span class=''label''CIS #:/span {2}, span class=''label''Name:/ span {3} }) public String userSelection(@Select String memberNumber, @Select String altMemberNumber, @Select String cisNumber, String memberName); 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.
GWT For Usability Testing. Do I need to know Java? Can I use a HTML template?
Hi Folks, I need to create a prototype of a UI for usability testing. Im not a Java programmer and was wondering do I need Java to be able to put together an interface that is not hooked up to data? My plan is to use Eclipse and its GWT plugin. Second question, is it better to build my web template in HTML/CSS seperately, then bring it into the project? Or its it more common to build the template within the project? Im talking about the layout and look and feel. Im coming from a Web Designer/ Usability specialist direction. Thanks a lot community. Rob -- 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: MVP pattern for Tabbed UI (Each Tab = Unique Module e.g. Orders)
I'm not aware of an existing sample app, but it's not hard to implement. Start from this tutorial http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html In the entry point http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html#Putting_it_all_together Instead of SimplePanel create DockLayoutPanel. Add TabBar as a north widget, and a SimplePanel as the center widget. Initialize the TabBar with tabs Add SelectionHandlerInteger to the TabBar In the selection handler call placeCotroller.goTo() depending on which tab is selected. Set SimpleWidget as the display of the activityManager. Add the DockLayoutPanel to the RootPanel at the end. You also have to create a presenter, a view, a view implementation (that implements the view) and an activity (that implements the presenter) for each tab. -- 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 For Usability Testing. Do I need to know Java? Can I use a HTML template?
On 24 March 2011 16:30, rob-uidesign rob.coyle...@gmail.com wrote: Hi Folks, I need to create a prototype of a UI for usability testing. Im not a Java programmer and was wondering do I need Java to be able to put together an interface that is not hooked up to data? My plan is to use Eclipse and its GWT plugin. Honestly, hard to tell the big true in this case. I think, the big part of create UI prototype job you can do it with GWT Designer, but those part of the UI which make the _real_ (fancy, nice, easy to use, etc.) usability value you have to programming. I don't know how many time do you have. I think, worth it if you have somebody who is a gwt developer. I'm a tester, I have been testing websites and swing applications for 3,5 years and I'm programming my gwt based application if I have any freetime for it. -- - - -- Csanyi Andras (Sayusi Ando) -- http://sayusi.hu -- http://facebook.com/andras.csanyi -- Trust in God and keep your gunpowder dry! - Cromwell -- 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.
Problem with Gilead Integration in GWT, Spring and JPA
hey, I'm a newbie with these frameworks. Firstly i want to write a small web app with gwt for the frontend, spring for backend and jpa for the persistence operations. I use Hibernate as JPA implementation. I started with a simple construction (2 simply entities, 2 DAO,1 remote service). I have no problems with this example. After i had extended the entities with lists, i got some problems with the lazy loading and serialization. Therefore i searched for solution and found the Gilead Framework. Now i have following problem: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: list attribute of my class, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java: 383) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java: 375) I don't understand the problem, because i marked the service method with @Transactional(propagation=Propagation.NESTED, readOnly=true). What is the cause of my problem? 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.
DoubleClickEvent on IE8
Hello I have a SimplePanel with an Label. On my label I put a DoubleCLickHandler. On doubleClick event, I want to change the content of my panel. On firefox/ie6, it's work fine On IE8, it's work... but all my content become selected!!! public class PageTest extends Composite { SimplePanel sp = new SimplePanel(); Label lbl = new Label(label); DoubleClickHandler dch = new DoubleClickHandler() { @Override public void onDoubleClick(DoubleClickEvent event) { sp.remove(lbl); Grid gd = new Grid(20, 20); for (int i = 0 ; i 20 ; i++) for (int j = 0 ; j 20 ; j ++) gd.setText(i, j, dest+i+-+j); sp.setWidget(gd); } }; public PageTest() { lbl.addDoubleClickHandler(dch); sp.add(lbl); initWidget(sp); } } Could you help me??? 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: MVP pattern for Tabbed UI (Each Tab = Unique Module e.g. Orders)
I concur with Y2i regarding the use of a top TabBar, I'm using a similar approach. Other things you may want to add: - Loose coupling between TabBar and content presenters (they are not injected in one another). The TabBar sends an event on the bus to discover and collect all the content presenters it should handle. The TabBar sends an event when a tab is clicked to display the corresponding presenter. - History support You may want each tab to corresponds to a different history token. This one is trickier to do as it requires two way communication between the content presenters and the TabBar presenter: when a presenter is displayed, it needs to tell the TabBar which tab to highlight. - Nested tabs It gets slightly trickier if you want to support TabBars within TabBars, à-la Google Code You can have a look at GWTP for inspiration on how to do all of the above. Cheers, Philippe On Thu, Mar 24, 2011 at 8:30 AM, Y2i yur...@gmail.com wrote: I'm not aware of an existing sample app, but it's not hard to implement. Start from this tutorial http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html In the entry point http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html#Putting_it_all_together Instead of SimplePanel create DockLayoutPanel. Add TabBar as a north widget, and a SimplePanel as the center widget. Initialize the TabBar with tabs Add SelectionHandlerInteger to the TabBar In the selection handler call placeCotroller.goTo() depending on which tab is selected. Set SimpleWidget as the display of the activityManager. Add the DockLayoutPanel to the RootPanel at the end. You also have to create a presenter, a view, a view implementation (that implements the view) and an activity (that implements the presenter) for each tab. -- 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: Dialog box that doesnt grey out background and allows me interact with background
A DialogBox can be *modal* or *modeless*: http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/DialogBox.html#DialogBox(boolean, boolean) In the Showcase, it's created using the default (no-arg) constructor, which makes it a modal dialog box that does *not* auto-hide. Moreover, it's setup with *glass enabledhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/PopupPanel.html#isGlassEnabled() *, with a style that makes it gray-out the rest of the page; but again that's just one option. There's no collapsible dialog box in GWT, but you might be able to do it by adding a clickhandler to the caption and playing with the dialog content in response to click events. -- 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: complex example GWT Activity and Place
Hi Odeyemi, See slides 32-47 here: http://www.slideshare.net/turbomanage/whats-new-in-gwt-22 Also, this sample project has two ActivityManagers showing how the same Place can be mapped in both (albeit one is null). http://code.google.com/p/listwidget/ Inline comments below... HTH, /dmc On Thu, Mar 24, 2011 at 10:18 AM, Kayode Odeyemi drey...@gmail.com wrote: Hello, Is there any complex example on how to nest Views when using the GWT Activity and Place. For example, I have a MainWidget which acts as a parent View for all other Views that have got a Place. My question is, how can I place other Views in the MainWidget? If this is not possible, does this mean every View can outrightly be its own widget? My reason for wanting the MainWidget to house other Views is because I want the MainWidget to control the entire layout of the application, so that other Views (URL based widgets) can just go ahead and do their own specific things. From the HelloMVP, there's this line: private Place defaultPlace = new HelloPlace(World!); private SimplePanel appWidget = new SimplePanel(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = new AppActivityMapper(clientFactory); ActivityManager activityManager = new ActivityManager(activityMapper, eventBus); activityManager.setDisplay(appWidget); Taking this one level up, does this mean that the GoodbyeView and HelloView Views are attached to appWidget and are both visible at Place World? Each ActivityManager is responsible for its own area of the screen. Each ActivityManager has its own ActivityMapper, and each can map the same Place to a different Activity. What about if I have widgets and not Views, can these widgets be attached to for example appWidget? Also, assuming I have another Place at Heaven, with its own Views, how can I discard the widgets already showing in appWidget? Is this something the ActivityManager takes care of automatically? When you change Place, the new Activity(ies) start() method(s) should call panel.setWidget() to replace the current contents of the panel. ActivityManager does not discard widgets automatically unless the new Activity is null. One other question, I have an Hyperlink that's got a #profile token. From my understanding of Place, if I click on the Hyperlink which appends #profile to the URL, the ActivityManager should call the corresponding Place which is set at profile. Right now this is not working for me. I have this: registerHandler(display.showAgentProfileView().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { //eventBus.fireEvent(new MainSignupEvent()); getAgentProfileActivity(); } public void getAgentProfileActivity() { Window.alert(getAgentProfileActivity Request is called); History.newItem(profile); History.addValueChangeHandler(this); History.fireCurrentHistoryState(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = new AppActivityMapper(mainp); ActivityManager activityManager = new ActivityManager(activityMapper, geventBus); activityManager.setDisplay((AcceptsOneWidget)mainp.getDisplay().getAgentProfileView().asWidget()); Place agentprofile = new AgentProfilePlace(profile); PlaceController agentprofilePlaceController = mainp.getPlaceController(); AgentProfilePlaceHistoryMapper agentprofilehistoryMapper= GWT.create(AgentProfilePlaceHistoryMapper.class); PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(agentprofilehistoryMapper); historyHandler.register(placecontroller, geventBus, agentprofile); } When using Activities Places, you don't need to call any methods on History directly. Instead use historyHandler.handleCurrentHistory(). The rest of the code in your getAgentProfileActivity() method should be run during application setup (called from onModuleLoad, not a ClickHandler as shown here). Finally, the ClickHandler should call placeController.goTo(new AgentProfilePlace()); I will also like to know, can the ActivityManager be called anywhere else other than in onModuleLoad. My reason is because, since the issue of decoupling is a big factor in MVP, I tend to have my events handled in the Presenter implementing class. Please correct me if I'm wrong with the interpretation. -- Odeyemi 'Kayode O. B.Sc(Hons) Econs, Application Developer Systems Engineer (Sun Certified Professional), Oracle Certified Associate, Solaris Systems Administrator, Drupal Developer Website: http://sinati.com http://www.sinati.com Socialize with me: http://profile.to/charyorde, http://twitter.com/charyorde, http://www.google.com/profiles/dreyemi Skype:drecute -- You received this
Re: Creating a reusable DialogBox with UiBinder?
Your class using custom widget should be able to make calls related to styling as you do for any other widget. And add styling to it as you would do for widgets. Do you mean you want to have only one uniform style accross the application? If yes then you can add styling inside the uibinder or in factory m,ethod you have in your custom widget. Hope that helps. On Mar 23, 2:35 pm, TheCatWhisperer thecatwhispe...@gmail.com wrote: Hi, I'm trying to create a number of reusable dialog boxes using UiBinder. Basically, I want to be able to call... void someFn() { MyDialogBox box = new MyDialogBox(myConfigObj); box.show(); } ... but I want to define the Dialog in its Own MyDialogBox.ui.xml MyDialogBox.java files and the above code could be called in a number of places. So far I have: !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:style ... /ui:style g:DialogBox autoHide=true modal=true glassEnabled=true g:caption btitle/b /g:caption g:DockLayoutPanel unit=PX width=700px height=450px ... /g:DockLayoutPanel /g:DialogBox /ui:UiBinder ... and ... public class MyDialogBox extends DialogBox { private static MyDialogBoxUiBinder uiBinder = GWT.create(MyDialogBoxUiBinder.class); interface MyDialogBoxUiBinder extends UiBinderWidget, MyDialogBox { } public MyDialogBox() { uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { return this; } } This seems... wrong? Is there a better way?? I can't control the dialog size with setWidth/Height.. it screws up royally. Is there a tutorial? And I DO NOT want to embed the dialog box in another UiBinder file as I see all over the place.. its not reusable. (as in:http://h2g2java.blessedgeek.com/2010/02/tutorial-gwt-rpc-stub-modifie...) The closest example (used above) i can find is:http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg36... -- 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.
Out of memory: PermGen space
I'm using Eclipse IDE on RHEL. I am trying to determine if the problem is from the jvm, birt, gwt or my code. I started eclipse with a bigger perm gen space but still got the error. I am able to make an rpc call, return from it and then display the report, but once i try to run a 2nd report, the rpc calls again and this is where it fails. Here is the error: [WARN] A new version of GWT (2.2.0) is available For additional info see: file:/tmp/gwt-update-2.2.0.html Done generating report. The response was successful Starting Jetty on port [ERROR] Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.birt.rpc.gwt.client.ReportGenerationService.executeReport(java.lang.String,java.util.ArrayList,java.util.ArrayList)' threw an unexpected exception: java.lang.OutOfMemoryError: PermGen space [ERROR] Error for /rpcsamplebirt/report java.lang.OutOfMemoryError: PermGen space [ERROR] EXCEPTION java.lang.OutOfMemoryError: PermGen space [ERROR] Out of memory; to increase the amount of memory, use the - Xmx flag at startup (java -Xmx128M ...) com.google.gwt.user.client.rpc.StatusCodeException: 500 Exception in thread State Saver java.lang.OutOfMemoryError: PermGen space -- 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.
GIN and different views implementations
Hello everybody. I have a view (interface extending IsWidget) and binded in the GinModule: bind(MyView.class).to(MyViewImpl.class).in(Singleton.class); And the question is: if I had several implementations of a given view (interface) in order to have a mobile view and a desktop view, how do I have to do it with GIN? Thank you very much. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: Creating a reusable DialogBox with UiBinder?
Hrm, perhaps I'm not understanding you or I may not be explaining the issue right... I want to create a UiBinder that represents a DialogBox.. this DialogBox will be passed a bean that describes the data it should use to build itself (perhaps it is an editor, or a viewer). The point of creating it as its own entity is that I can then call it from anywhere, as opposed to it being embedded into another UiBinder, and me having to replicate the UiBinder DialogBox there as well. I'm basically making a custom DialogBox widget. Am I making any sense? I just can't find a good example of anyone doing this. Everyone seems to embed the g:DialogBox .../ ui in other UiBinder components. -- 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: Creating a reusable DialogBox with UiBinder?
PS: and yes I would be embedding some styling information about the Ui layout in the dialog. The app has its own custom theme derived from the default GWT theme that describes basic look feel. -- 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: ScrollBar color
It is not recomanded to change forms at all, so basicaly safari have some custom css selectors, mozzila ignores them completely, and for IE i am not sure. If you want to create something like that, you should probably create new widget that will have same behaviour like ScrollPanel, ie. catch all mouse handlers, create custom buttons that will scroll some div inside your custom panel... I was looking for same solution few weeks ago, and decided to make my own as there are no widget availaible. I need to fix some code, and i will release it as open source in a week or two. Hope this helps On Mar 23, 12:18 pm, Issam boualem.is...@gmail.com wrote: Hi, I would like to change the color of the scrollBar (ScrollBarPanel) but I learn that ScrollBarPanel is scroll panel is simply a div with overflow set to scroll. So anyone has an idea how to change the color ?? 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: Creating a reusable DialogBox with UiBinder?
Why does your example seem wrong? Looks like the right way to do it to me. -- 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: Dialog box that doesnt grey out background and allows me interact with background
If you're looking to add functionality to the DialogBox caption, you'll want to use/extend the DialogBox that is in trunk. In that version you can inject your own header caption and add whatever functionality you want/need. -- 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 Gilead Integration in GWT, Spring and JPA
Your collection is mapped as lazy, which means hibernate will load data on demand rather than up-front. However, you then try and access the collection outside a hibernate session, so it cannot do the load. You should either load what you need inside the hibernate session, or make your collection be non-lazy. On 24/03/11 14:50, marky8264 wrote: hey, I'm a newbie with these frameworks. Firstly i want to write a small web app with gwt for the frontend, spring for backend and jpa for the persistence operations. I use Hibernate as JPA implementation. I started with a simple construction (2 simply entities, 2 DAO,1 remote service). I have no problems with this example. After i had extended the entities with lists, i got some problems with the lazy loading and serialization. Therefore i searched for solution and found the Gilead Framework. Now i have following problem: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role:list attribute of my class, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java: 383) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java: 375) I don't understand the problem, because i marked the service method with @Transactional(propagation=Propagation.NESTED, readOnly=true). What is the cause of my problem? 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.
Re: Out of memory: PermGen space
Increase Permgem memory ( http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_available_to_Eclipse%3F), perhaps its too low 2011/3/24 azuniga alessandro.zun...@gmail.com I'm using Eclipse IDE on RHEL. I am trying to determine if the problem is from the jvm, birt, gwt or my code. I started eclipse with a bigger perm gen space but still got the error. I am able to make an rpc call, return from it and then display the report, but once i try to run a 2nd report, the rpc calls again and this is where it fails. Here is the error: [WARN] A new version of GWT (2.2.0) is available For additional info see: file:/tmp/gwt-update-2.2.0.html Done generating report. The response was successful Starting Jetty on port [ERROR] Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.birt.rpc.gwt.client.ReportGenerationService.executeReport(java.lang.String,java.util.ArrayList,java.util.ArrayList)' threw an unexpected exception: java.lang.OutOfMemoryError: PermGen space [ERROR] Error for /rpcsamplebirt/report java.lang.OutOfMemoryError: PermGen space [ERROR] EXCEPTION java.lang.OutOfMemoryError: PermGen space [ERROR] Out of memory; to increase the amount of memory, use the - Xmx flag at startup (java -Xmx128M ...) com.google.gwt.user.client.rpc.StatusCodeException: 500 Exception in thread State Saver java.lang.OutOfMemoryError: PermGen space -- 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: Creating a reusable DialogBox with UiBinder?
I guess it *seems* wrong because I don't fully understand it, and that there is no official example. GWT is pretty light on the documentation, especially in regards to the UiBinder. Some components (DatePicker/DateBox) don't even have UiBinder Docs. I had to do a google search to confirm that yes, importing com.google.gwt.user.datepicker.clientas another xmlns is required (why isn't it in the UI package???). I also have minor issues in that I cannot set the width and height via the g:DialogBox .../ tag. It either does not work or renders out of sorts... ?? Perhaps I did something wrong elsewhere. Calling .center() also seems to not quite work. (it is certainly NOT centred). I just want to make sure I'm doing it right before I get too far down the development path. *Off Topic: The GWT is fantastic, don't get me wrong. I hardily recommend it over Ext.js, Dojo, etc. However there isn't a clear indication of any right way. There is The MVP, MVC, then RPC or RequestFactory... UiBinder or Java abased UI definition... GAE (which we can't use) or 2-3 year old examples of JPA/Hibernate... Spring/Spring Roo/GINGUICE. And just about every tutorial has a mixture of these frameworks. There are half a dozen different custom frameworks that implement the EventBus and some form of MVP/Action/Presentation/etc... And nowhere is there a central repository of knowledge where the merits of all the different options are debated, where the winners are presented as a cohesive solution. As a newcomer to GWT, I am left feeling lost half the time. I develop a piece of functionality then stumble across a better way that someone else has developed...* -- 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: Creating a reusable DialogBox with UiBinder?
Is this what you are after: public class TabbedDialogView extends DialogBox { private static TabbedDialogViewUiBinder uiBinder = GWT.create(TabbedDialogViewUiBinder.class); interface TabbedDialogViewUiBinder extends UiBinderWidget, TabbedDialogView { } public TabbedDialogView() { setWidget(uiBinder.createAndBindUi(this)); } } The UiBinder file should just contain say a HTMLPanel or say a FlowPanel containing the dialog contents. -- 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: Creating a reusable DialogBox with UiBinder?
Set width and height on the dialog box doesn't work. You need to set the width and hight of the first widget added to the dialog box. This is a know limitation. -- 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: Creating a reusable DialogBox with UiBinder?
How do I set the caption? ...since the file no longer contains the g:DialogBox .../ definition in your example? -- 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: Creating a reusable DialogBox with UiBinder?
ie, should I be using: public MyDialog() { setWidget(uiBinder.createAndBindUi(this)); setModal(true); setGlassEnabled(true); setAutoHideEnabled(true); setTitle(My Title); } ? -- 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 Gilead Integration in GWT, Spring and JPA
thanks for your answer. However, if i use a eager loading for the list, i will get this: Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'org.hibernate.collection.PersistentBag' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = [] at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java: 614) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java: 126) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:152) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java: 534) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java: 704) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java: 734) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java: 616) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java: 126) at com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize(Map_CustomFieldSerializerBase.java: 52) at com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serialize(HashMap_CustomFieldSerializer.java: 38) ... 76 more Although i use Gilead, i get this exception. I thought that Gilead will clone the entity object and replace the hibernate collections with normal collections. Why do i get this exception? Is it possible that this is the reason: [...] 24 Mär 2011 16:43:38,695 DEBUG PersistentBeanManager: Not persistent object, merge is not needed : 1 24 Mär 2011 16:43:38,696 DEBUG GileadRPCHelper: Merge took 92 ms. 24 Mär 2011 16:43:38,979 TRACE HibernateUtil : Exception during getCurrentSession org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java: 63) at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java: 700) at net.sf.gilead.core.hibernate.HibernateUtil.getCurrentSession(HibernateUtil.java: 1829) at net.sf.gilead.core.hibernate.HibernateUtil.flushIfNeeded(HibernateUtil.java: 975) at net.sf.gilead.core.PersistentBeanManager.clone(PersistentBeanManager.java: 227) at net.sf.gilead.gwt.GileadRPCHelper.parseReturnValue(GileadRPCHelper.java: 157) [...] Here my gilead config: bean id=proxySerializer class=net.sf.gilead.core.serialization.GwtProxySerialization / bean id=proxyStore class=net.sf.gilead.core.store.stateless.StatelessProxyStore property name=proxySerializer ref=proxySerializer / /bean bean id=persistenceUtil class=net.sf.gilead.core.hibernate.jpa.HibernateJpaUtil property name=entityManagerFactory ref=entityManagerFactory / /bean bean id=persistentBeanManager class=net.sf.gilead.core.PersistentBeanManager property name=proxyStore ref=proxyStore / property name=persistenceUtil ref=persistenceUtil / /bean On 24 Mrz., 18:31, Paul Robinson ukcue...@gmail.com wrote: Your collection is mapped as lazy, which means hibernate will load data on demand rather than up-front. However, you then try and access the collection outside a hibernate session, so it cannot do the load. You should either load what you need inside the hibernate session, or make your collection be non-lazy. On 24/03/11 14:50, marky8264 wrote: hey, I'm a newbie with these frameworks. Firstly i want to write a small web app with gwt for the frontend, spring for backend and jpa for the persistence operations. I use Hibernate as JPA implementation. I started with a simple construction (2 simply entities, 2 DAO,1 remote service). I have no problems with this example. After i had extended the entities with lists, i got some problems with the lazy loading and serialization. Therefore i searched for solution and found the Gilead Framework. Now i have following problem: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role:list attribute of my class, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java: 383)
Re: Creating a reusable DialogBox with UiBinder?
Just use: setWidget(uiBinder.createAndBindUi(this)); setAutoHideEnabled(true); setText(My Title); setGlassEnabled(true); //This will show the dialog Don't use SetModal it is broken. setGlassEnabled has the same effect. -- 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: Creating a reusable DialogBox with UiBinder?
setText, setHTML will set the caption. -- 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: GIN and different views implementations
Post in guice forum, perhaps you can receive best help 2011/3/24 Ernesto Reig erniru...@gmail.com Hello everybody. I have a view (interface extending IsWidget) and binded in the GinModule: bind(MyView.class).to(MyViewImpl.class).in(Singleton.class); And the question is: if I had several implementations of a given view (interface) in order to have a mobile view and a desktop view, how do I have to do it with GIN? Thank you very much. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: RequestFactory EntityProxy and AutoBean category
I believe I read about it. Actually it's not available but it is planned. Is this right? If yes, for when? -- 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: Out of memory: PermGen space
Actually, I've tried that. Still get the same error. This is my eclipse.ini file. - -startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.0.v20100503 -product org.eclipse.epp.package.reporting.product --launcher.defaultAction openFile -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m - On Mar 24, 1:31 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Increase Permgem memory (http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_availa...), perhaps its too low 2011/3/24 azuniga alessandro.zun...@gmail.com I'm using Eclipse IDE on RHEL. I am trying to determine if the problem is from the jvm, birt, gwt or my code. I started eclipse with a bigger perm gen space but still got the error. I am able to make an rpc call, return from it and then display the report, but once i try to run a 2nd report, the rpc calls again and this is where it fails. Here is the error: [WARN] A new version of GWT (2.2.0) is available For additional info see: file:/tmp/gwt-update-2.2.0.html Done generating report. The response was successful Starting Jetty on port [ERROR] Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.birt.rpc.gwt.client.ReportGenerationService.executeReport(java.lang.Str ing,java.util.ArrayList,java.util.ArrayList)' threw an unexpected exception: java.lang.OutOfMemoryError: PermGen space [ERROR] Error for /rpcsamplebirt/report java.lang.OutOfMemoryError: PermGen space [ERROR] EXCEPTION java.lang.OutOfMemoryError: PermGen space [ERROR] Out of memory; to increase the amount of memory, use the - Xmx flag at startup (java -Xmx128M ...) com.google.gwt.user.client.rpc.StatusCodeException: 500 Exception in thread State Saver java.lang.OutOfMemoryError: PermGen space -- 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: Out of memory: PermGen space
From the log I see that it's the Developer Server who is complaining so adjusting the PermGen size in eclipse.ini won't help. Go to your Debug config of the Google Web Application (the main class should be com.google.appengine.tools.development.DevAppServerMain) and add * -XX:MaxPermSize=512m* to the VM arguments. On Thu, Mar 24, 2011 at 4:07 PM, azuniga alessandro.zun...@gmail.comwrote: Actually, I've tried that. Still get the same error. This is my eclipse.ini file. - -startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.0.v20100503 -product org.eclipse.epp.package.reporting.product --launcher.defaultAction openFile -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m - On Mar 24, 1:31 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Increase Permgem memory ( http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_availa...), perhaps its too low 2011/3/24 azuniga alessandro.zun...@gmail.com I'm using Eclipse IDE on RHEL. I am trying to determine if the problem is from the jvm, birt, gwt or my code. I started eclipse with a bigger perm gen space but still got the error. I am able to make an rpc call, return from it and then display the report, but once i try to run a 2nd report, the rpc calls again and this is where it fails. Here is the error: [WARN] A new version of GWT (2.2.0) is available For additional info see: file:/tmp/gwt-update-2.2.0.html Done generating report. The response was successful Starting Jetty on port [ERROR] Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.birt.rpc.gwt.client.ReportGenerationService.executeReport(java.lang.Str ing,java.util.ArrayList,java.util.ArrayList)' threw an unexpected exception: java.lang.OutOfMemoryError: PermGen space [ERROR] Error for /rpcsamplebirt/report java.lang.OutOfMemoryError: PermGen space [ERROR] EXCEPTION java.lang.OutOfMemoryError: PermGen space [ERROR] Out of memory; to increase the amount of memory, use the - Xmx flag at startup (java -Xmx128M ...) com.google.gwt.user.client.rpc.StatusCodeException: 500 Exception in thread State Saver java.lang.OutOfMemoryError: PermGen space -- 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. -- Lee Cheng Wei -- 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: GIN and different views implementations
I believe you need to use deferred bindings instead of Gin/Guice bindings http://code.google.com/p/google-gin/wiki/GinTutorial#Deferred_Binding http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsDeferred.html -- 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 some help on Editors
Hi everyone I'm having trouble understanding Editors introduced in GWT 2.1. It sounds like a nice feature to reduce boilerplate code. The Dev Guide is very very useful, but I couldn't get all the answers _ == my first question is about validation and error reporting. take the Dev Guide example, public class PersonEditor extends Dialog implements EditorPerson { Label nameEditor; ... } I wish to detect bad names, create a visual feedback upon error, and bubble this information up so the caller knows not to proceed further. I see there is recordError in EditorDelegate. Is it the right method to tackle this? Can I get an example please? I have a lot fields to edit. I hope I don't have to create bunch delegates. The less code the better =) == second question is about Q: How can I edit objects with a large number of properties? from the FAQ section It has the following example class BagOfStateBiographicalEditor implements EditorBagOfState { AddressEditor address; Label name; } class BagOfStateUserPreferencesEditor implements EditorBagOfState { CheckBox likesCats; CheckBox likesDogs; } How do I chain up the two editors? Should I use a CompositeEditor? or a list of drivers? = many 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: GIN and different views implementations
You have to use deferred bindings to switch between two Ginjectors. See https://github.com/ashtonthomas/gwt-seminar/tree/master/src/com/gwt/seminar to get an idea. -- 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.
CellTree Resources too general?
The CellTree's Resources seem a bit too prohibitive for what I'm trying to do. My tree is a table of contents for a set of topics for online documentation. We have a scope setting where a user can choose to filter out any topics that don't pertain to them. In the TOC, these topics appear gray. You can see the current version here: http://dcx.sybase.com/index.html#1200en/sqlanywhere_en12/help_top_index.htm I'm trying to change the tree implementation to a CellTree, but I'm having difficulties styling it to look the same. First off, I'd like to have an image specific for leaf nodes. I can probably get around this one inside the cell rendering. My model is pretty robust, so information about whether child nodes exist (even if they haven't been loaded) is available. The more difficult issue I'm having is figuring out what to do about styling branches of the tree with different images. Basically, I want to be able to change the open/closed images for only specific branches of the tree. The Resources class doesn't seem extensible in this way, however. Any suggestions on how I should go about this would be greatly appreciated! Thanks, Andrew Arnott -- 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: [Announcement] Protovis-GWT
Awesome Lars! I was looking at that vis library earlier! With Android supporting SVG in Honeycomb, and iOS already supporting it, this would be a GREAT solution! Thanks for doing this! E -- 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 can I put Hyperlinks inside a CellTable, which behave the same as the Hyperlink widget?
Thanks John, # + myToken seems to be the simplest solution. -- 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: image.getWidth() does not work in GWT. Any workarounds?
That works perfect. Thank you! testImg.addLoadHandler(new LoadHandler() { public void onLoad(LoadEvent event) { System.out.println( testImg.addLoadHandler(): width + testImg.getWidth()); } }); Brandon Donnelson http://gwt-examples.googlecode.com On Mar 23, 2:13 pm, Philip Rogers p...@google.com wrote: Did you try using the onload event in GWT, like you did in the JS? For example: public class MyTest implements EntryPoint { public void onModuleLoad() { final Image testImg = new Image(http://i.cdn.turner.com/ cnn/.element/img/3.0/global/header/hdr-main.gif?nocache= + Math.random()); RootPanel.get().add(testImg); printImageWidth(testImg); // will print 0 testImg.addLoadHandler(new LoadHandler() { public void onLoad(LoadEvent event) { printImageWidth(testImg); // will print a number } }); } public void printImageWidth(Image image) { System.out.println(image width is: + image.getWidth()); } } On Mar 23, 12:30 pm, Brandon Donnelson branflake2...@gmail.com wrote: Is there a way to get the width via the java code? I've documented it and made an issue: Issue:http://code.google.com/p/google-web-toolkit/issues/detail?id=3999can... Getting images size width and height attributes does not work in GWT Image. GWT 2.2.0, Mac OSX, Chrome 10.0.648.151 This will not work: Image testImg = new Image(/images/test.jpg); FlowPanel panel = new FlowPanel(); RootPanel.get().add(panel); panel.add(testImg); System.out.println(testImg.getElement.getOffsetWidth= + testImg.getElement().getOffsetWidth()); // nope System.out.println(testImg.getWidth= + testImg.getWidth()); // nope System.out.println(panel.getOffsetWidth()= + panel.getOffsetWidth()); // gets the windows/document/body width if image overflows System.out.println(panel.getOffsetHeight()= + panel.getOffsetHeight()); // gets the windows/document/body width if the image overflows System.out.println(root width: + RootPanel.get().getOffsetWidth()); // gets the windows/document/body width width if the image overflows This does work in native javascript: script function getWidthAndHeight() { alert(' + this.name + ' is + this.width + by + this.height + pixels in size.); return true;} function loadFailure() { alert(' + this.name + ' failed to load.); return true;} var myImage = new Image(); myImage.name = /images/test.jpg; myImage.onload = getWidthAndHeight; myImage.onerror = loadFailure; myImage.src = /images/test.jpg; /script Brandon Donnelsonhttp://gwt-examples.googlecode.comhttp://c.gawkat.com -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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 some help on Editors
On Thursday, March 24, 2011 9:21:00 PM UTC+1, Potate wrote: Hi everyone I'm having trouble understanding Editors introduced in GWT 2.1. It sounds like a nice feature to reduce boilerplate code. The Dev Guide is very very useful, but I couldn't get all the answers _ == my first question is about validation and error reporting. take the Dev Guide example, public class PersonEditor extends Dialog implements EditorPerson { Label nameEditor; ... } I wish to detect bad names, create a visual feedback upon error, and bubble this information up so the caller knows not to proceed further. I see there is recordError in EditorDelegate. Is it the right method to tackle this? Can I get an example please? Yes, have a look at the DynatableRf sample and its ZipPlusFourBox widget. It extends ValueBox, so actually, have a look at the ValueBoxEditor adapter from GWT. I have a lot fields to edit. I hope I don't have to create bunch delegates. The less code the better =) The delegate is provided to you by the editor framework, you have to implement HasEditorDelegate. == second question is about Q: How can I edit objects with a large number of properties? from the FAQ section It has the following example class BagOfStateBiographicalEditor implements EditorBagOfState { AddressEditor address; Label name; } class BagOfStateUserPreferencesEditor implements EditorBagOfState { CheckBox likesCats; CheckBox likesDogs; } How do I chain up the two editors? Should I use a CompositeEditor? or a list of drivers? What do you mean by chaining them? à la wizard? then either you use them as they do in the example and just adjust their visibility (use a DeckPanel or TabPanel/TabLayoutPanel?), or you use 2 drivers. I think you don't generally need 2 drivers; and you don't need a CompositeEditor here, CompositeEditor is for editing an object that's composed of zero or more other objects (zero or one = OptionalEditor, a List of objects = ListEditor) -- 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: When is an object passed over RPC safe to modify?
Javascript is single threaded, so you can just mark them as clean just before you send them. IOW. It won't be possible for them to be updated between when they are marked as clean, and when the call to save starts. If the save fails, just mark them back to being modified. Note: During the save process on the server, they can be modified. On Mar 24, 4:19 am, Martin Larsson martin.liste.lars...@gmail.com wrote: We're experimenting with background saving in our GWT-app. IOW. we mark objects as 'modified', and then at regular intervals, find all modified objects and pass them to the database for storage. The question is when is it safe to mark the object as 'clean'. The on- success-handler of the save()-method is too late, obviously. That can happen any time later and the user might have modified the object(s) again. As the status also can be 'new' or 'deleted', I need to pass the status to the server so it knows what to do. IOW. I can't mark the object clean too early. What I'd like is to mark them 'clean' when they're safely serialized, and have the on-failure-handler set them back to 'modified' if the save() failed. So ... is there any point in the code where I can be certain that the objects are serialized and on their way to the server so I can start modifying them in the client without interfering? Figure 4 here:http://eclipse.dzone.com/news/making-gwt-remote-procedure-ca indicates that the objects are safe once the method in *Async returns. Is that safe? M. -- 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: image.getWidth() does not work in GWT. Any workarounds?
Make sure you add the load handler before attached to the root panel. If the image is cached, IE will fire the load event synchronously, before your handler is attached. Thanks, John LaBanca jlaba...@google.com On Thu, Mar 24, 2011 at 7:54 PM, Brandon Donnelson branflake2...@gmail.comwrote: That works perfect. Thank you! testImg.addLoadHandler(new LoadHandler() { public void onLoad(LoadEvent event) { System.out.println( testImg.addLoadHandler(): width + testImg.getWidth()); } }); Brandon Donnelson http://gwt-examples.googlecode.com On Mar 23, 2:13 pm, Philip Rogers p...@google.com wrote: Did you try using the onload event in GWT, like you did in the JS? For example: public class MyTest implements EntryPoint { public void onModuleLoad() { final Image testImg = new Image(http://i.cdn.turner.com/ cnn/.element/img/3.0/global/header/hdr-main.gif?nocache= + Math.random()); // If image is cached, IE will have fired a load event. GWT will suppress the event until attached. RootPanel.get().add(testImg); // GWT fires the suppressed event. Its also possible that other browsers will fire an event synchronously if cached. printImageWidth(testImg); // will print 0 testImg.addLoadHandler(new LoadHandler() { // Its too late to add a handler. The load event has been fired. public void onLoad(LoadEvent event) { printImageWidth(testImg); // will print a number } }); } public void printImageWidth(Image image) { System.out.println(image width is: + image.getWidth()); } } On Mar 23, 12:30 pm, Brandon Donnelson branflake2...@gmail.com wrote: Is there a way to get the width via the java code? I've documented it and made an issue: Issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=3999can... Getting images size width and height attributes does not work in GWT Image. GWT 2.2.0, Mac OSX, Chrome 10.0.648.151 This will not work: Image testImg = new Image(/images/test.jpg); FlowPanel panel = new FlowPanel(); RootPanel.get().add(panel); panel.add(testImg); System.out.println(testImg.getElement.getOffsetWidth= + testImg.getElement().getOffsetWidth()); // nope System.out.println(testImg.getWidth= + testImg.getWidth()); // nope System.out.println(panel.getOffsetWidth()= + panel.getOffsetWidth()); // gets the windows/document/body width if image overflows System.out.println(panel.getOffsetHeight()= + panel.getOffsetHeight()); // gets the windows/document/body width if the image overflows System.out.println(root width: + RootPanel.get().getOffsetWidth()); // gets the windows/document/body width width if the image overflows This does work in native javascript: script function getWidthAndHeight() { alert(' + this.name + ' is + this.width + by + this.height + pixels in size.); return true;} function loadFailure() { alert(' + this.name + ' failed to load.); return true;} var myImage = new Image(); myImage.name = /images/test.jpg; myImage.onload = getWidthAndHeight; myImage.onerror = loadFailure; myImage.src = /images/test.jpg; /script Brandon Donnelsonhttp://gwt-examples.googlecode.comhttp://c.gawkat.com -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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.
[gwt-contrib] Re: Issue 1054 (issue1380807)
http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/src/com/google/gwt/user/rebind/rpc/FieldSerializerCreator.java File user/src/com/google/gwt/user/rebind/rpc/FieldSerializerCreator.java (right): http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/src/com/google/gwt/user/rebind/rpc/FieldSerializerCreator.java#newcode469 user/src/com/google/gwt/user/rebind/rpc/FieldSerializerCreator.java:469: if (true.equals(Shared.shouldSerializeFinalFields())) { Use a enum instead of string comparisons. http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java File user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java (right): http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java#newcode276 user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java:276: !field.getDeclaringClass().toString().contains(java.lang.Enum); The use of toString() for any purpose other than debugging is an anti-pattern. !field.getDeclaringClass().equals(Enum.class) http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/test/com/google/gwt/user/client/rpc/FinalFieldsTest.java File user/test/com/google/gwt/user/client/rpc/FinalFieldsTest.java (right): http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/test/com/google/gwt/user/client/rpc/FinalFieldsTest.java#newcode2 user/test/com/google/gwt/user/client/rpc/FinalFieldsTest.java:2: * Copyright 2010 Google Inc. Update copyright dates in new files. http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/test/com/google/gwt/user/client/rpc/FinalFieldsTest.java#newcode35 user/test/com/google/gwt/user/client/rpc/FinalFieldsTest.java:35: service.transfer_object(node, new AsyncCallback() { Don't use a raw type for these callbacks. http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/test/com/google/gwt/user/client/rpc/FinalFieldsTestFalseNoWarn.java File user/test/com/google/gwt/user/client/rpc/FinalFieldsTestFalseNoWarn.java (right): http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/test/com/google/gwt/user/client/rpc/FinalFieldsTestFalseNoWarn.java#newcode39 user/test/com/google/gwt/user/client/rpc/FinalFieldsTestFalseNoWarn.java:39: public void onSuccess(Object result) { Verify the values of the unserialized final fields in the object. http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/test/com/google/gwt/user/client/rpc/FinalFieldsTestService.java File user/test/com/google/gwt/user/client/rpc/FinalFieldsTestService.java (right): http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/test/com/google/gwt/user/client/rpc/FinalFieldsTestService.java#newcode20 user/test/com/google/gwt/user/client/rpc/FinalFieldsTestService.java:20: * TODO: document me. Do so. http://gwt-code-reviews.appspot.com/1380807/diff/1001/user/test/com/google/gwt/user/client/rpc/FinalFieldsTestService.java#newcode46 user/test/com/google/gwt/user/client/rpc/FinalFieldsTestService.java:46: FinalFieldsNode transfer_object(FinalFieldsNode node); Use camel-cased method names. http://gwt-code-reviews.appspot.com/1380807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Move com.google.gwt.requestfactory to com.google.requestfactory (issue1383808)
Hollow out the to-be-deleted classes to avoid the massive duplication of code going on in this patch. The old types should extend the new types and where that isn't possible, the old type should be rewritten as a delegate. Anything in the rebind or **/impl packages can be a straight move. They're not public types. http://gwt-code-reviews.appspot.com/1383808/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] How do I submit a patch with binary files?
I've got a patch for TabLayoutPanel which will allow for handling tabs that scroll off the viewable area. For this I've got some horrifically ugly images that I created with MSPaint. How do I include those in a patch? SVN patches are just text files. I didn't spend any real time making these images on the assumption that you would want your graphic designer to make something that is far superior to anything I could create. I'm no artist. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Move com.google.gwt.requestfactory to com.google.requestfactory (issue1383808)
I spent a few days attempting this -- it's not so simple. For example: 1) Enums can't extend Enums. Several public types contain nested Enums. 2) If a type oldA extends newA, and a method in it returns an instance of oldA, you cant simply delegate to the implementation in newA since that will return a newA, which is not an instanceof oldA. So you need to write wrappers for everything. 3) It's unclear to me how inheritance works on annotations 4) Generators will have to be modified to work off the different annotation types I think there were other problems as well that I can't recall at the moment. My belief is that continuing with this approach would have polluted the new code base with special cases to handle parallel enums and annotations. I spoke to Ray about it and he agreed to the plan of leaving a snapshot in the old location and trying to remove it in the next release. On Thu, Mar 24, 2011 at 8:57 AM, b...@google.com wrote: Hollow out the to-be-deleted classes to avoid the massive duplication of code going on in this patch. The old types should extend the new types and where that isn't possible, the old type should be rewritten as a delegate. Anything in the rebind or **/impl packages can be a straight move. They're not public types. http://gwt-code-reviews.appspot.com/1383808/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] How do I submit a patch with binary files?
Hi All, This would be real good feature which is pending from long time. We should incorporate this in GWT 2.3 release. It should go in Milestone trunk. Regards, Allahbaksh Mohammedali Asadullah On Thu, Mar 24, 2011 at 7:44 PM, Jeff Larsen larse...@gmail.com wrote: I've got a patch for TabLayoutPanel which will allow for handling tabs that scroll off the viewable area. For this I've got some horrifically ugly images that I created with MSPaint. How do I include those in a patch? SVN patches are just text files. I didn't spend any real time making these images on the assumption that you would want your graphic designer to make something that is far superior to anything I could create. I'm no artist. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding a new TextButton widget to replace the existing Button widget. The new widget provides th... (issue1383806)
committed as r9879 http://gwt-code-reviews.appspot.com/1383806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9888 committed - Update partial support elements for ie9....
Revision: 9888 Author: p...@google.com Date: Thu Mar 24 04:35:37 2011 Log: Update partial support elements for ie9. Review at http://gwt-code-reviews.appspot.com/1389802 Review by: jlaba...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9888 Modified: /trunk/user/src/com/google/gwt/canvas/Canvas.gwt.xml /trunk/user/src/com/google/gwt/media/Media.gwt.xml === --- /trunk/user/src/com/google/gwt/canvas/Canvas.gwt.xml Mon Jan 24 12:09:10 2011 +++ /trunk/user/src/com/google/gwt/canvas/Canvas.gwt.xml Thu Mar 24 04:35:37 2011 @@ -20,14 +20,14 @@ !-- Define the support property -- define-property name=canvasElementSupport values=maybe,no / - !-- Give default support value of no -- - set-property name=canvasElementSupport value=no / - - set-property name=canvasElementSupport value=maybe + !-- Give default support value of maybe -- + set-property name=canvasElementSupport value=maybe / + + !-- Give default support value of no to unsupported browsers -- + set-property name=canvasElementSupport value=no any - when-property-is name=user.agent value=safari / - when-property-is name=user.agent value=gecko1_8 / - when-property-is name=user.agent value=opera / + when-property-is name=user.agent value=ie6 / + when-property-is name=user.agent value=ie8 / /any /set-property === --- /trunk/user/src/com/google/gwt/media/Media.gwt.xml Thu Feb 10 10:28:27 2011 +++ /trunk/user/src/com/google/gwt/media/Media.gwt.xml Thu Mar 24 04:35:37 2011 @@ -21,23 +21,21 @@ define-property name=videoElementSupport values=maybe,no / define-property name=audioElementSupport values=maybe,no / - !-- Give default support value of no -- - set-property name=videoElementSupport value=no / - set-property name=audioElementSupport value=no / - - set-property name=videoElementSupport value=maybe + !-- Give default support value of maybe -- + set-property name=videoElementSupport value=maybe / + set-property name=audioElementSupport value=maybe / + + set-property name=videoElementSupport value=no any - when-property-is name=user.agent value=safari / - when-property-is name=user.agent value=gecko1_8 / - when-property-is name=user.agent value=opera / + when-property-is name=user.agent value=ie6 / + when-property-is name=user.agent value=ie8 / /any /set-property - set-property name=audioElementSupport value=maybe + set-property name=audioElementSupport value=no any - when-property-is name=user.agent value=safari / - when-property-is name=user.agent value=gecko1_8 / - when-property-is name=user.agent value=opera / + when-property-is name=user.agent value=ie6 / + when-property-is name=user.agent value=ie8 / /any /set-property @@ -53,7 +51,7 @@ replace-with class=com.google.gwt.media.client.Audio.AudioElementSupportDetectedMaybe when-type-is class=com.google.gwt.media.client.Audio.AudioElementSupportDetector / -when-property-is name=videoElementSupport value=maybe / +when-property-is name=audioElementSupport value=maybe / /replace-with replace-with class=com.google.gwt.media.client.Audio.AudioElementSupportDetectedNo -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Making rendered Cells in CellWidgets fill the root element of the widget so that setting the hei... (issue1383807)
committed as r9884 Created a new change with tbroyer's suggestion: http://gwt-code-reviews.appspot.com/1385806 http://gwt-code-reviews.appspot.com/1383807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Issue 5700 (issue1388804)
Reviewers: , Description: http://code.google.com/p/google-web-toolkit/issues/detail?id=5700 Please review this at http://gwt-code-reviews.appspot.com/1388804/ Affected files: user/src/com/google/gwt/event/shared/ResettableEventBus.java user/test/com/google/gwt/event/shared/ResettableEventBusTest.java Index: user/test/com/google/gwt/event/shared/ResettableEventBusTest.java === --- user/test/com/google/gwt/event/shared/ResettableEventBusTest.java (revision 9877) +++ user/test/com/google/gwt/event/shared/ResettableEventBusTest.java (working copy) @@ -58,4 +58,48 @@ }); assertNotFired(mouse1, mouse2, mouse3); } + + public void testManualRemove() { +SimpleEventBus eventBus = new SimpleEventBus(); +ResettableEventBus subject = new ResettableEventBus(eventBus); + +TypeMouseDownHandler type = MouseDownEvent.getType(); + +HandlerRegistration registration1 = subject.addHandler(type, mouse1); +HandlerRegistration registration2 = subject.addHandler(type, mouse2); +HandlerRegistration registration3 = subject.addHandler(type, mouse3); + +registration1.removeHandler(); +// how do we check for memory leak? The ResettableEventBus.registration.size() should be 2 + +registration2.removeHandler(); +registration3.removeHandler(); + +// The ResettableEventBus.registration.size() should be 0 + +subject.removeHandlers(); + } + + public void testNested() { +SimpleEventBus eventBus = new SimpleEventBus(); +ResettableEventBus eventBus2 = new ResettableEventBus(eventBus); +ResettableEventBus subject = new ResettableEventBus(eventBus2); + +TypeMouseDownHandler type = MouseDownEvent.getType(); +eventBus2.addHandler(type, mouse1); +subject.addHandler(type, mouse2); +subject.addHandler(type, mouse3); + +subject.removeHandlers(); +// eventBus2.registration.size() == 1 subject.registration.size() == 0 +eventBus2.removeHandlers(); +// eventBus2.registration.size() == 0 subject.registration.size() == 0 + +eventBus2.addHandler(type, mouse1); +subject.addHandler(type, mouse2); + +eventBus2.removeHandlers(); +// eventBus2.registration.size() == 0 subject.registration.size() == 0 +subject.removeHandlers(); + } } Index: user/src/com/google/gwt/event/shared/ResettableEventBus.java === --- user/src/com/google/gwt/event/shared/ResettableEventBus.java (revision 9877) +++ user/src/com/google/gwt/event/shared/ResettableEventBus.java (working copy) @@ -18,6 +18,7 @@ import com.google.gwt.event.shared.GwtEvent.Type; import java.util.HashSet; +import java.util.Iterator; import java.util.Set; /** @@ -35,18 +36,30 @@ @Override public H extends EventHandler HandlerRegistration addHandler(TypeH type, H handler) { -HandlerRegistration rtn = wrapped.addHandler(type, handler); +final HandlerRegistration rtn = wrapped.addHandler(type, handler); registrations.add(rtn); -return rtn; +// Need to wrap this to cleanup registrations. +return new HandlerRegistration() { + @Override + public void removeHandler() { +doUnregisterHandler(rtn); + } +}; } @Override public H extends EventHandler HandlerRegistration addHandlerToSource( GwtEvent.TypeH type, Object source, H handler) { -HandlerRegistration rtn = wrapped.addHandlerToSource(type, source, +final HandlerRegistration rtn = wrapped.addHandlerToSource(type, source, handler); registrations.add(rtn); -return rtn; +// Need to wrap this to cleanup registrations. +return new HandlerRegistration() { + @Override + public void removeHandler() { +doUnregisterHandler(rtn); + } +}; } @Override @@ -63,9 +76,21 @@ * Remove all handlers that have been added through this wrapper. */ public void removeHandlers() { -for (HandlerRegistration r : registrations) { - r.removeHandler(); +IteratorHandlerRegistration it = registrations.iterator(); +while(it.hasNext()) { + HandlerRegistration r = it.next(); + + // must remove before we call removeHandler. Might came from nested ResettableEventBus + it.remove(); + + r.removeHandler(); } -registrations.clear(); } + + private void doUnregisterHandler(HandlerRegistration registration) { +if(registrations.contains(registration)) { + registration.removeHandler(); + registrations.remove(registration); +} + } } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Memory leak in ResettableEventBus
Not sure how this contributing thing works. I was assuming that things get pushed here automatically if I created an issue at the review site. I uploaded some code to deal with memory leak in ResettableEventBus. Mainly with nested ResettableEventBus and passing ResettableEventBus into ActivityManager. http://code.google.com/p/google-web-toolkit/issues/detail?id=5700 http://gwt-code-reviews.appspot.com/1388804/ Really simple fix and would really love to get this included in the next release as I keep having to patch/include my own ResettableEventBus in my code. As I was working on this code I noticed that CountingEventBus has the same bug but I'm guessing that only gets used in tests? Also I wasn't sure how to write a test that check the internal state. Mainly to test for the memory leak the current ResettableEventBus has. Akito -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Cells should only fill a CellWidget if they render exactly one topmost element, or the first chi... (issue1385806)
Reviewers: pdr, Description: Cells should only fill a CellWidget if they render exactly one topmost element, or the first child will push around the other children. This is a follow-on change to r9884. Author: tbroyer, jlabanca Please review this at http://gwt-code-reviews.appspot.com/1385806/ Affected files: M user/src/com/google/gwt/user/cellview/client/CellWidget.java M user/test/com/google/gwt/user/cellview/client/CellWidgetTest.java Index: user/src/com/google/gwt/user/cellview/client/CellWidget.java === --- user/src/com/google/gwt/user/cellview/client/CellWidget.java (revision 9887) +++ user/src/com/google/gwt/user/cellview/client/CellWidget.java (working copy) @@ -179,10 +179,11 @@ /* * The rendered Cell should fill the root element so height and width styles - * applied to the widget also apply to the Cell. + * applied to the widget also apply to the Cell. If there is exactly one + * child element, the height and width are set to 100% to fill the parent. */ Element child = getElement().getFirstChildElement(); -if (child != null) { +if (child != null child.getNextSiblingElement() == null) { child.getStyle().setHeight(100, Unit.PCT); child.getStyle().setWidth(100, Unit.PCT); } Index: user/test/com/google/gwt/user/cellview/client/CellWidgetTest.java === --- user/test/com/google/gwt/user/cellview/client/CellWidgetTest.java (revision 9887) +++ user/test/com/google/gwt/user/cellview/client/CellWidgetTest.java (working copy) @@ -16,6 +16,7 @@ package com.google.gwt.user.cellview.client; import com.google.gwt.cell.client.AbstractCell; +import com.google.gwt.cell.client.Cell; import com.google.gwt.cell.client.TextButtonCell; import com.google.gwt.cell.client.ValueUpdater; import com.google.gwt.dom.client.Document; @@ -156,7 +157,33 @@ /** * Test that a cell that defines an HTML elment can be rendered. */ - public void testRedrawWithInnerChild() { + public void testRedrawWithMultipleInnerChildren() { +CellString cell = new AbstractCellString() { + @Override + public void render(com.google.gwt.cell.client.Cell.Context context, String value, + SafeHtmlBuilder sb) { + sb.appendHtmlConstant(div).appendEscaped(value).appendHtmlConstant(/div); +sb.appendHtmlConstant(divchild2/div); + } +}; +CellWidgetString cw = new CellWidgetString(cell); + +// Set value without redrawing. +cw.setValue(test123, false, false); +assertEquals(, cw.getElement().getInnerText()); + +// Redraw. +cw.redraw(); +assertTrue(cw.getElement().getInnerText().contains(test123)); +Style firstChildStyle = cw.getElement().getFirstChildElement().getStyle(); +assertFalse(firstChildStyle.getHeight().matches(100(.0)?%)); +assertFalse(firstChildStyle.getWidth().matches(100(.0)?%)); + } + + /** + * Test that a cell that defines an HTML elment can be rendered. + */ + public void testRedrawWithOneInnerChild() { CellWidgetString cw = new CellWidgetString(new TextButtonCell()); // Set value without redrawing. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Issue 5700 (issue1385805)
On 2011/03/23 17:57:01, Nozaki wrote: One of my test case is wrong. Will resubmit. http://gwt-code-reviews.appspot.com/1385805/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adds a cache (PersistenUnitCache) to store CompilationUnits (issue1375802)
I had some trouble with PersistentUnitCacheTest being flaky, which is why there are some changes in there. The count of files in the directory was not as expected at different points in the test. The solution seems to be to close all 3 output streams. http://gwt-code-reviews.appspot.com/1375802/diff/9001/dev/core/src/com/google/gwt/dev/GWTCompiler.java File dev/core/src/com/google/gwt/dev/GWTCompiler.java (right): http://gwt-code-reviews.appspot.com/1375802/diff/9001/dev/core/src/com/google/gwt/dev/GWTCompiler.java#newcode179 dev/core/src/com/google/gwt/dev/GWTCompiler.java:179: tempWorkDir = true; Reverted this file, Precompile, and PrecompileOnePerm. http://gwt-code-reviews.appspot.com/1375802/diff/9001/dev/core/src/com/google/gwt/dev/Precompile.java File dev/core/src/com/google/gwt/dev/Precompile.java (right): http://gwt-code-reviews.appspot.com/1375802/diff/9001/dev/core/src/com/google/gwt/dev/Precompile.java#newcode664 dev/core/src/com/google/gwt/dev/Precompile.java:664: CompilationStateBuilder.init(logger, options.getWorkDir()); Reverted file. http://gwt-code-reviews.appspot.com/1375802/diff/9001/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java File dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java (right): http://gwt-code-reviews.appspot.com/1375802/diff/9001/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode324 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:324: } On 2011/03/22 21:59:31, scottb wrote: That should be fine as long as the cacheDirectory is the same for all invocations, right? Seems bad to not check. If we change to add persistent caching to unit tests, we will run into problems instantiating the persistent cache over and over, so I updated UnitCacheFactory() to keep a single global instance and return it. http://gwt-code-reviews.appspot.com/1375802/diff/9001/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode350 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:350: } On 2011/03/22 21:59:31, scottb wrote: Sorry, I didn't very clearly make the point that you just made, which is that it's so cheap to instantiate an in-memory cache, you might as well just auto-initialize the in-memory cache and replace it later if necessary. Persistent unit cache doesn't make sense for unit tests. For directly testing PUC itself you'd set it up manually, and for anything else you'd rather have the hermeticism and decoupling. For GWT unit tests, I agree a persistent cache might be bad, but for tests of code other than GWT core code, it might make sense. anyway, I did as you suggested and auto-initialized unitCache to a MemoryCache instance. http://gwt-code-reviews.appspot.com/1375802/diff/10027/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode339 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:339: * On 2011/03/22 21:59:31, scottb wrote: My one issue here is that this used to lookup by location, not type name. Doing it by location means that different modules with different super source paths can coexist peacefully. Doing it by type name means that two different resources with the same logical type name end up stepping on each other. Done. http://gwt-code-reviews.appspot.com/1375802/diff/10027/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode340 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:340: * TODO: maybe use a finer brush than to synchronize the whole thing. On 2011/03/22 21:59:31, scottb wrote: Yay, nice! If it's stale, should we go ahead and evict the stale unit to free up memory (since we're about to compile, which will need a lot of memory)? Done. http://gwt-code-reviews.appspot.com/1375802/diff/10027/dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java File dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java (right): http://gwt-code-reviews.appspot.com/1375802/diff/10027/dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java#newcode184 dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java:184: return lastModified; On 2011/03/22 21:59:31, scottb wrote: Unlike SourceFileCompilationUnit, I wouldn't think this one would need this change? GeneratedUnit should handle consistency. reverted http://gwt-code-reviews.appspot.com/1375802/diff/10027/dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java File dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java (right): http://gwt-code-reviews.appspot.com/1375802/diff/10027/dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java#newcode44 dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java:44: private final UnitOrigin source; On 2011/03/22 21:59:31, scottb wrote: rename field and getter 'source' - 'origin' too? Done.
Re: [gwt-contrib] How do I submit a patch with binary files?
On Thu, Mar 24, 2011 at 10:14 AM, Jeff Larsen larse...@gmail.com wrote: I've got a patch for TabLayoutPanel which will allow for handling tabs that scroll off the viewable area. For this I've got some horrifically ugly images that I created with MSPaint. How do I include those in a patch? SVN patches are just text files. I didn't spend any real time making these images on the assumption that you would want your graphic designer to make something that is far superior to anything I could create. I'm no artist. After uploading a patch to Rietveld, just reply to the GWTC email it sends out and attach your images as attachments. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Issue 5700 (issue1385805)
Reviewers: , Description: http://code.google.com/p/google-web-toolkit/issues/detail?id=5700 Please review this at http://gwt-code-reviews.appspot.com/1385805/ Affected files: user/src/com/google/gwt/event/shared/ResettableEventBus.java user/test/com/google/gwt/event/shared/ResettableEventBusTest.java Index: user/test/com/google/gwt/event/shared/ResettableEventBusTest.java === --- user/test/com/google/gwt/event/shared/ResettableEventBusTest.java (revision 9877) +++ user/test/com/google/gwt/event/shared/ResettableEventBusTest.java (working copy) @@ -58,4 +58,54 @@ }); assertNotFired(mouse1, mouse2, mouse3); } + + public void testManualRemove() { +SimpleEventBus eventBus = new SimpleEventBus(); +ResettableEventBus subject = new ResettableEventBus(eventBus); + +TypeMouseDownHandler type = MouseDownEvent.getType(); + +HandlerRegistration registration1 = subject.addHandler(type, mouse1); +HandlerRegistration registration2 = subject.addHandler(type, mouse2); +HandlerRegistration registration3 = subject.addHandler(type, mouse3); + +registration1.removeHandler(); +// how do we check for memory leak? The ResettableEventBus.registration.size() should be 2 + +registration2.removeHandler(); +registration3.removeHandler(); + +// The ResettableEventBus.registration.size() should be 0 + +subject.removeHandlers(); + } + + public void testNested() { +SimpleEventBus eventBus = new SimpleEventBus(); +ResettableEventBus eventBus2 = new ResettableEventBus(eventBus); +ResettableEventBus subject = new ResettableEventBus(eventBus2); + +TypeMouseDownHandler type = MouseDownEvent.getType(); +eventBus2.addHandler(type, mouse1); +subject.addHandler(type, mouse2); +subject.addHandler(type, mouse3); + +subject.removeHandlers(); +// eventBus2.registration.size() == 1 subject.registration.size() == 0 +eventBus2.removeHandlers(); +// eventBus2.registration.size() == 0 subject.registration.size() == 0 + +eventBus2.addHandler(type, mouse1); +subject.addHandler(type, mouse2); +subject.addHandler(type, mouse3); + +eventBus2.removeHandlers(); +// eventBus2.registration.size() == 0 subject.registration.size() == 0 + +try { + subject.removeHandlers(); + fail(Should have asserted!); +} catch(AssertionError e) { +} + } } Index: user/src/com/google/gwt/event/shared/ResettableEventBus.java === --- user/src/com/google/gwt/event/shared/ResettableEventBus.java (revision 9877) +++ user/src/com/google/gwt/event/shared/ResettableEventBus.java (working copy) @@ -35,18 +35,30 @@ @Override public H extends EventHandler HandlerRegistration addHandler(TypeH type, H handler) { -HandlerRegistration rtn = wrapped.addHandler(type, handler); +final HandlerRegistration rtn = wrapped.addHandler(type, handler); registrations.add(rtn); -return rtn; +// Need to wrap this to cleanup registrations. +return new HandlerRegistration() { + @Override + public void removeHandler() { +doUnregisterHandler(rtn); + } +}; } @Override public H extends EventHandler HandlerRegistration addHandlerToSource( GwtEvent.TypeH type, Object source, H handler) { -HandlerRegistration rtn = wrapped.addHandlerToSource(type, source, +final HandlerRegistration rtn = wrapped.addHandlerToSource(type, source, handler); registrations.add(rtn); -return rtn; +// Need to wrap this to cleanup registrations. +return new HandlerRegistration() { + @Override + public void removeHandler() { +doUnregisterHandler(rtn); + } +}; } @Override @@ -68,4 +80,9 @@ } registrations.clear(); } + + private void doUnregisterHandler(HandlerRegistration registration) { +registration.removeHandler(); +registrations.remove(registration); + } } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] ie9 richtexteditor event fix. (issue1384808)
Reviewers: jlabanca, Description: ie9 richtexteditor event fix. Please review this at http://gwt-code-reviews.appspot.com/1384808/ Affected files: M user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java Index: user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java === --- user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java (revision 9888) +++ user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java (working copy) @@ -91,12 +91,14 @@ var elem = th...@com.google.gwt.user.client.ui.impl.RichTextAreaImpl::elem; var body = elem.contentWindow.document.body; -var handler = $entry(function() { +var handler = $entry(function(evt) { if (elem.__listener) { if (@com.google.gwt.user.client.impl.DOMImpl::isMyListener(Ljava/lang/Object;)(elem.__listener)) { // Weird: this code has the context of the script frame, but we need the // event from the edit iframe's window. - var evt = elem.contentWindow.event; + // this code is shared with all IE implementations (see RichText.gwt.xml) + // the event can be passed in as argument (IE9) or from the content window (IE8/7/6) + evt = evt || elem.contentWindow.event; @com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/EventListener;)(evt, elem, elem.__listener); } } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Memory leak in ResettableEventBus
Thanks, I'll look at this today. On Mar 24, 2011 9:08 AM, Akito Nozaki akito.noz...@gmail.com wrote: Not sure how this contributing thing works. I was assuming that things get pushed here automatically if I created an issue at the review site. I uploaded some code to deal with memory leak in ResettableEventBus. Mainly with nested ResettableEventBus and passing ResettableEventBus into ActivityManager. http://code.google.com/p/google-web-toolkit/issues/detail?id=5700 http://gwt-code-reviews.appspot.com/1388804/ Really simple fix and would really love to get this included in the next release as I keep having to patch/include my own ResettableEventBus in my code. As I was working on this code I noticed that CountingEventBus has the same bug but I'm guessing that only gets used in tests? Also I wasn't sure how to write a test that check the internal state. Mainly to test for the memory leak the current ResettableEventBus has. Akito -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add protected scheduleFinally method to HasDataPresenter (issue1385807)
LGTM http://gwt-code-reviews.appspot.com/1385807/diff/1/user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java File user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java (right): http://gwt-code-reviews.appspot.com/1385807/diff/1/user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java#newcode954 user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java:954: * Protected so that subclasses can override to use an alternative Can you add a p before this line so it formats correctly in JavaDoc. http://gwt-code-reviews.appspot.com/1385807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Move com.google.gwt.requestfactory to com.google.requestfactory (issue1383808)
Yeah, Dan made the valiant effort here but I don't think it's practical. I don't feel bad asking users to change import statements to pick up bug fixes. It would be great if we can get this into the 2.3 rc. On Mar 24, 2011 7:05 AM, Daniel Rice (דניאל רייס) r...@google.com wrote: I spent a few days attempting this -- it's not so simple. For example: 1) Enums can't extend Enums. Several public types contain nested Enums. 2) If a type oldA extends newA, and a method in it returns an instance of oldA, you cant simply delegate to the implementation in newA since that will return a newA, which is not an instanceof oldA. So you need to write wrappers for everything. 3) It's unclear to me how inheritance works on annotations 4) Generators will have to be modified to work off the different annotation types I think there were other problems as well that I can't recall at the moment. My belief is that continuing with this approach would have polluted the new code base with special cases to handle parallel enums and annotations. I spoke to Ray about it and he agreed to the plan of leaving a snapshot in the old location and trying to remove it in the next release. On Thu, Mar 24, 2011 at 8:57 AM, b...@google.com wrote: Hollow out the to-be-deleted classes to avoid the massive duplication of code going on in this patch. The old types should extend the new types and where that isn't possible, the old type should be rewritten as a delegate. Anything in the rebind or **/impl packages can be a straight move. They're not public types. http://gwt-code-reviews.appspot.com/1383808/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: ie9 richtexteditor event fix. (issue1384808)
LGTM http://gwt-code-reviews.appspot.com/1384808/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Cells should only fill a CellWidget if they render exactly one topmost element, or the first chi... (issue1385806)
On 2011/03/24 15:59:37, jlabanca wrote: LGTM, thanks for catching that tbroyer :) http://gwt-code-reviews.appspot.com/1385806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Memory leak in ResettableEventBus
Hmmm... I see it in the list now. I guess I spoke too soon. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Serialize GWT ASTs with CompilationUnits (issue1384807)
http://gwt-code-reviews.appspot.com/1384807/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/1384807/diff/1/dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java#newcode166 dev/core/src/com/google/gwt/dev/javac/CachedCompilationUnit.java:166: sourceToken = diskCache.writeByteArray(sourceBytes); seems awkward to encode/decode a byte array two separate ways like this. DiskCache knows the size, it just doesn't encode it when we call transferToStream. http://gwt-code-reviews.appspot.com/1384807/diff/1/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java File dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java (right): http://gwt-code-reviews.appspot.com/1384807/diff/1/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode129 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:129: builder.setClasses(compiledClasses).setTypes(types).setDependencies(dependencies) (aside: this is what I get out of the eclipse formatter too, but the other instance of using the Builder pattern is much more nicely formatted.) http://gwt-code-reviews.appspot.com/1384807/diff/1/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode204 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:204: final ArrayListCompilationUnit newlyBuiltUnits = new ArrayListCompilationUnit(); First of all, be aware that this block is going to have a lot of conflicts with the PersistentUnitCache patch that's up. I'm not 100% sure what time you're trying to save in here by putting this in a thread; could you add a comment in the body of the thread as to what is expensive? I guess its the calculation of contentId. Warning - I think you're in thread unsafeness land in ResourceCompilationUnitBuilder when the compiler tries to lazily compute contentId, waiting until the source is read. Did you measure the amount of time saved? It would be nice to see some speedtracer calls around it. http://gwt-code-reviews.appspot.com/1384807/diff/1/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode205 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:205: final CompilationUnitBuilder sentinal = CompilationUnitBuilder.create((GeneratedUnit) null); spelling: sentinel http://gwt-code-reviews.appspot.com/1384807/diff/1/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode253 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:253: } null out buildQueue? http://gwt-code-reviews.appspot.com/1384807/diff/1/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java File dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java (right): http://gwt-code-reviews.appspot.com/1384807/diff/1/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java#newcode316 dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java:316: throw new RuntimeException(Unexpected error deserializing AST, e); this might actually happen if the serialized object is old and the compiler internals have changed - want to put the unit name in the exception so we know what to clean up? http://gwt-code-reviews.appspot.com/1384807/diff/1/user/test/com/google/gwt/dev/jjs/GwtAstBuilderTest.java File user/test/com/google/gwt/dev/jjs/GwtAstBuilderTest.java (right): http://gwt-code-reviews.appspot.com/1384807/diff/1/user/test/com/google/gwt/dev/jjs/GwtAstBuilderTest.java#newcode145 user/test/com/google/gwt/dev/jjs/GwtAstBuilderTest.java:145: } Shouldn't you also loop through the compiled classes in compilationState and make sure there is a corresponding deserialized type? This test won't catch if there are values in compilationState that didn't make it through the serialize/deserialize process. http://gwt-code-reviews.appspot.com/1384807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9889 committed - Cells should only fill a CellWidget if they render exactly one topmost...
Revision: 9889 Author: jlaba...@google.com Date: Thu Mar 24 07:36:36 2011 Log: Cells should only fill a CellWidget if they render exactly one topmost element, or the first child will push around the other children. This is a follow-on change to r9884. Author: tbroyer, jlabanca Review at http://gwt-code-reviews.appspot.com/1385806 Review by: p...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9889 Modified: /trunk/user/src/com/google/gwt/user/cellview/client/CellWidget.java /trunk/user/test/com/google/gwt/user/cellview/client/CellWidgetTest.java === --- /trunk/user/src/com/google/gwt/user/cellview/client/CellWidget.java Wed Mar 23 11:53:24 2011 +++ /trunk/user/src/com/google/gwt/user/cellview/client/CellWidget.java Thu Mar 24 07:36:36 2011 @@ -179,10 +179,11 @@ /* * The rendered Cell should fill the root element so height and width styles - * applied to the widget also apply to the Cell. + * applied to the widget also apply to the Cell. If there is exactly one + * child element, the height and width are set to 100% to fill the parent. */ Element child = getElement().getFirstChildElement(); -if (child != null) { +if (child != null child.getNextSiblingElement() == null) { child.getStyle().setHeight(100, Unit.PCT); child.getStyle().setWidth(100, Unit.PCT); } === --- /trunk/user/test/com/google/gwt/user/cellview/client/CellWidgetTest.java Wed Mar 23 11:53:24 2011 +++ /trunk/user/test/com/google/gwt/user/cellview/client/CellWidgetTest.java Thu Mar 24 07:36:36 2011 @@ -16,6 +16,7 @@ package com.google.gwt.user.cellview.client; import com.google.gwt.cell.client.AbstractCell; +import com.google.gwt.cell.client.Cell; import com.google.gwt.cell.client.TextButtonCell; import com.google.gwt.cell.client.ValueUpdater; import com.google.gwt.dom.client.Document; @@ -156,7 +157,33 @@ /** * Test that a cell that defines an HTML elment can be rendered. */ - public void testRedrawWithInnerChild() { + public void testRedrawWithMultipleInnerChildren() { +CellString cell = new AbstractCellString() { + @Override + public void render(com.google.gwt.cell.client.Cell.Context context, String value, + SafeHtmlBuilder sb) { + sb.appendHtmlConstant(div).appendEscaped(value).appendHtmlConstant(/div); +sb.appendHtmlConstant(divchild2/div); + } +}; +CellWidgetString cw = new CellWidgetString(cell); + +// Set value without redrawing. +cw.setValue(test123, false, false); +assertEquals(, cw.getElement().getInnerText()); + +// Redraw. +cw.redraw(); +assertTrue(cw.getElement().getInnerText().contains(test123)); +Style firstChildStyle = cw.getElement().getFirstChildElement().getStyle(); +assertFalse(firstChildStyle.getHeight().matches(100(.0)?%)); +assertFalse(firstChildStyle.getWidth().matches(100(.0)?%)); + } + + /** + * Test that a cell that defines an HTML elment can be rendered. + */ + public void testRedrawWithOneInnerChild() { CellWidgetString cw = new CellWidgetString(new TextButtonCell()); // Set value without redrawing. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors