Re: Accessing HTTPSession in ServiceLocator or DAO
No one here who wants to give me some hints? We want to start our first productive project with GWT soon and I would like to understand the best way of session handling before... Best regards Mark On 15 Dez., 11:53, Bestmacfly mark.mesc...@googlemail.com wrote: Hi, I'm new to GWT and just trying to build a small but complete project from Login-Procedures over dynamic frontend up to connection to DB by JPA. This works so far for me, but I have following problem: For Login procedure I'm using RPC. In my Server Service I'm putting a User Object into HTTPSession. Mostly I'm using RequestFactoryServlet, therefore I have extended this servlet to check, if user is in session on every request. That works fine. My problem now: In my DAO's (remember: RequestFactory, not RPC) I would like to access the HTTPSession, too. I need the user object stored in HTTPSession in my DAO (for filter purposes). But I'm not finding a way to access HTTPSession in my DAO. Is there a solution for this? Else I would have to pass user informations from my client to the server on every request, this wouldn't be optimal... An alternative for me could be to access HTTPSession in my ServiceLocator and to pass the UserObject in the constructor of the DAO. But in the Locator I also can not access the HTTPSession... Does anyone has solved this problem before or is this the complete wrong way (and what solution would be better)? Best regards Mark -- 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: Removing Injected CssResources at Runtime
I don't think that GWT is currently well suited for doing this dynamically. It is however well suited to do this statically through a refresh of the page. I do it statically by using @eval in my css files that reference preference classes. Preference classes are selected through a theme and the theme is loaded through deferred binding in the gwt.xml file. See also: http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#Runtime_substitution This mechanism works well. However, doing it dynamically might be tricky as CssResource contains a method ensureInjected() method to inject the css in the DOM, but there doesn't exists a method to remove it (as far as I know). The generated style names are unique per CssResource sub class type (see above link). So calling ensureInjected() on the same CssResource class with another Css file from another ClientBundle will override the previous injected names (I noticed this behavior due to some bugs in a app I was building). You could do it in this way: that is a ClientBundle per theme that contains the smae CssResource with another css file, but it would be more elegant to be able to remove the first injected css. I can do this probably, but have to digg in the gwt code and write some Js code called from GWT. - Ed -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Z-Rf-ZgScKYJ. 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: Removing Injected CssResources at Runtime
How about making other rules apply rather than changing the content of the rules that apply? I.e. have .theme1 .someClass in theme1 and .theme2 .someClass in theme2, and simply switch the class name on the Document.get().getBody() to switch theme. That way, you don't need to uninstall the current theme before installing the new one. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/9Jxk-QL8uBsJ. 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: Removing Injected CssResources at Runtime
Yes of course, simple and straight forward... Just change the parent (cascading) style. On Tue, Dec 20, 2011 at 11:28 AM, Thomas Broyer t.bro...@gmail.com wrote: How about making other rules apply rather than changing the content of the rules that apply? I.e. have .theme1 .someClass in theme1 and .theme2 .someClass in theme2, and simply switch the class name on the Document.get().getBody() to switch theme. That way, you don't need to uninstall the current theme before installing the new one. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/9Jxk-QL8uBsJ. 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-RCharts Released (An interactive client side Charting Library with 3D CHARTS)
Hi everyone, I am very delighted to announce the release of gwt- rcharts to GWT community. It renders interactive charts on client side based on SVG and VML with cross browser support*. The library is based on a popular javascript library rapheaeljs and workaround with a custom modified version of gwt wrapper raphaelgwt. All of them comes in a bundle. The main theme of API is ease of use with 100% flexibility for styling. Its also comes with many exciting themes to give better choice for look and feel. About simplicity, its so simple that I can give you start up a lesson for BarChart right here in this post: ColumnChart chart = new ColumnChart(500, 500); //say your chart widht and height CategoryDataTableDouble dataTable = new CategoryDataTableDouble();// data structure for category chart dataTable.add(ser1, cat1, 100); dataTable.add(ser1, cat2, 150); //...and so on just like jfreechart. //you may like to apply a existing theme :- DarkGreenTheme.apply(chart); //you may like to have a 3D view:- chart.set_3d(true); RootLayoutPanel.get().add(chart); //done!! Many more things are simply configurable by self- explanatory setter methods and off course the API would work in intranet unlike Visualization. I would appreciate any kind of feedback, suggestion or contribution. *IE issue: one IE issue/bug(Probably IE bug) is still here 'http:// code.google.com/p/gwt-rcharts/issues/list' so we cant detach and then attach Chart to a parent. The workaround solution is we will need to add the new chart instance again to parent. Example Chart chart = getBarChart(); panel.add(chart); panel.clear(); // panel.add(chart); // upto IE8 a problem panel.add(getBarChart()); // works fine everywhere I explicitly show this behavior on demo site gwt-charts.com on IE, when switch between tabs happen. Happy Coding!!! Regards Saurabh Tripathi -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Accessing HTTPSession in ServiceLocator or DAO
You could for example create a public static method in your custom RequestFactoryServlet that delegates to RequestFactoryServlet.getThreadLocalRequest().getSession(). Or you just use some other class that stores the session as a ThreadLocal. But if you do it yourself, keep in mind to clear the ThreadLocal variable at the end of the request. Otherwise you will have the well known ThreadLocal memory leak. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/xrgqQC5xSJAJ. 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-RCharts Released (An interactive client side Charting Library with 3D CHARTS)
Oops!! I forgot to mention the links, here they are : http://code.google.com/p/gwt-rcharts/ and http://www.gwt-charts.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: GWT-RCharts Released (An interactive client side Charting Library with 3D CHARTS)
+1 here. Great work 2011/12/20 saurabh saurabh saurabh.bl...@gmail.com Oops!! I forgot to mention the links, here they are : http://code.google.com/p/gwt-rcharts/ and http://www.gwt-charts.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. -- Giuseppe La Scaleia CNR - IMAA geoSDI Sviluppo Software C.da S. Loja 85050 Tito Scalo - POTENZA (PZ) Italia phone: +39 0971427305 fax: +39 0971 427271 mob:+39 3804697436 mail: giuseppe.lascal...@geosdi.org skype: glascaleia web: http://www.geosdi.org -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Accessing HTTPSession in ServiceLocator or DAO
Thank you a lot, Jens, I just accessed the session via my DAO, exactly what I was looking for! With this I can implement some filters in my DAO without having to send ID's as method parameter, perfect! I didn't seen before that there are already some static methods for accessing the request...that makes all easier :-) Mark On 20 Dez., 12:27, Jens jens.nehlme...@gmail.com wrote: You could for example create a public static method in your custom RequestFactoryServlet that delegates to RequestFactoryServlet.getThreadLocalRequest().getSession(). Or you just use some other class that stores the session as a ThreadLocal. But if you do it yourself, keep in mind to clear the ThreadLocal variable at the end of the request. Otherwise you will have the well known ThreadLocal memory leak. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Non-Cloud development with GWT
Thanks for your quick answers, guys. I suppose its easy to find info about how to use my own server, datastorage, etc. in order to develop non-cloud apps with GWT. I'm very quiet (and my boss will be). Anyway, I'll be asking for help and advice. Magus. -- 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.
Caused by: java.lang.IllegalArgumentException: Cannot fetch unpersisted entity
Hi, I have a base Entity class with subclasses as shown below. I can view and update my entities but I get the exception java.lang.IllegalArgumentException: Cannot fetch unpersisted entity whenever I try to save /persist a new entity. Does request factory support inheritance ? @MappedSuperclass public class Base implements java.io.Serializable{ /** * */ private static final long serialVersionUID = -3767474991121795712L; private Integer version = 0; protected Long id; /** * Auto-increment version # whenever persisted */ @PrePersist void onPersist() { this.version++; } @Transient public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name = id, unique = true, nullable = false) public Long getId() { return this.id; } public void setId(long id) { this.id = id; } } And Other classes as follows @Entity @Table(name = Action) public class Action extends Base { /** * */ private static final long serialVersionUID = -1034167141757868139L; private String name; private String creationUser; private Date creationDate; private String modUser; private Date modDate; private SetRule ruleses = new HashSetRule(0); public Action() { } public Action(long id, String name, String creationUser, Date creationDate, String modUser, Date modDate) { this.id = id; this.name = name; this.creationUser = creationUser; this.creationDate = creationDate; this.modUser = modUser; this.modDate = modDate; } public Action(long id, String name, String creationUser, Date creationDate, String modUser, Date modDate, SetRule ruleses) { this.id = id; this.name = name; this.creationUser = creationUser; this.creationDate = creationDate; this.modUser = modUser; this.modDate = modDate; this.ruleses = ruleses; } @Column(name = name, nullable = false, length = 2000) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Column(name = creationUser, nullable = false, length = 10) public String getCreationUser() { return this.creationUser; } public void setCreationUser(String creationUser) { this.creationUser = creationUser; } @Temporal(TemporalType.TIMESTAMP) @Column(name = creationDate, nullable = false, length = 23) public Date getCreationDate() { return this.creationDate; } public void setCreationDate(Date creationDate) { this.creationDate = creationDate; } @Column(name = modUser, nullable = false, length = 10) public String getModUser() { return this.modUser; } public void setModUser(String modUser) { this.modUser = modUser; -- 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 POPUP Z AXiS Order and after Keypress data change handler
Dear Friends, i have a project on going and i need some help from you guys I have 2 questions I create a TabSet and a newTAB in it. inside the TAB i put a TextBox 1- I add an eventhandler to text box every time event fired a popup is set to be shown and after a while set to be hide. unfortunetly my popups Z-Axis ( in other words from back to front oder ) always stays at the back of the tabset could some body help me out with this? 2 - i add keypress event handler to text box this eventhandler is called before the data changes inside the textbox so i recall keypress handler twice to get the data change after every key press. this is a work around, how can i handle the data change after a keypress -- 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: Entry Point
I do the following: Create an application in a war named ROOT.war - when deployed to Tomcat this reacts to www.myserver.com/index.html Let us assume You want three entry points / - (the main application - public) /membersonly - login secured area /admin - the admin area So create two folders in /war /war/admin /war/members In these folders create an HTML page like !DOCTYPE html html head meta http-equiv=refresh content=0; URL=/index.html?admin /head body /body /html So any call to www.myserver.com/admin will be redirected to www.myserver.com/index.html?admin Now create a Main.java as real entry point: public void onModuleLoad() { String url = Window.Location.getHref(); if ( url.indexOf(?admin)-1 ) { Admin admin = new Admin(); RootPanel.get().add(admin); } else if ( url.indexOf(?member)-1 ) { Member member = new Member(); RootPanel.get().add(member); } else { Application app = new Application(); RootPanel.get().add(app); } } Any of these (Admin.java, Member.java, Application.java) is the base of its own GWT client app. They share all services, libs and shared classes and resources. Works perfect for 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.
Why com.google.gwt.dev.DevMode doesn't recognize the argument -style?
Hi folks, I'm experiencing a little bit problem. I would like to launch my application in development mode (known also as Hosted mode). My current GWT version is 2.3.0. For debug reasons, I want to inspect the generated JavaScript in my browser but the default format is a non-human readable (obfuscated). So, I'm trying to pass the argument -style PRETTY in my launch configuration and I got this: Unknown argument: -style Google Web Toolkit 2.3.0 DevMode [-noserver] [-port port-number | auto] [-whitelist whitelist- string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | auto] [-server servletContainerLauncher[:args]] [- startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] module[s] where -noserverPrevents the embedded web server from running -portSpecifies the TCP port for the embedded web server (defaults to ) -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated) -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated) -logdir Logs to a file in the given directory, as well as graphically -logLevelThe level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL -gen Debugging: causes normally-transient generated types to be saved in the specified directory -bindAddress Specifies the bind address for the code server and web server (defaults to 127.0.0.1) -codeServerPort Specifies the TCP port for the code server (defaults to 9997) -server Specify a different embedded web server to run (must implement ServletContainerLauncher) -startupUrl Automatically launches the specified URL -war The directory into which deployable output files will be written (defaults to 'war') -deploy The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar) -extra The directory into which extra files, not intended for deployment, will be written -workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir) and module[s]Specifies the name(s) of the module(s) to host After searching on GWT repository [1], I figured out that the last support for the argument -style was in GWT 1.6 when you were using GwtShell. For the new classes, HostedMode and DevMode (class to use instead), this argument isn't longer supported. Why? So, it's possible to launch an application in development mode and get a pretty Javascript generated (passing style argument to DevMode)? Regards, Hallmit [1] Last time the -style was supported : === http://code.google.com/p/google-web-toolkit/source/diff?spec=svn4262r=4262format=sidepath=/releases/1.6/dev/core/src/com/google/gwt/dev/GWTShell.java [2] Same problem here but no resolution? === http://groups.google.com/group/google-web-toolkit/browse_thread/thread/c1a258f3ba97dc86/d9c32090c78cebbe === http://groups.google.com/group/google-web-toolkit/browse_thread/thread/6e1d54bc856ec233/4948babf7e8de3b8 -- 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-RCharts Released (An interactive client side Charting Library with 3D CHARTS)
Hi Saurabh, this looks great! I am going to try it out. Maximilian Oh man! How long did I fuzzle around with embedded Flash Animations throwing data into them with JavaScript -- 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: Unowned relationships on unsaved data objects.
Hi, additionally, I need to use and reference unsaved objects by id, but before being saved, they have null Id, how can I handle it? Help, please. -- 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: Motion Chart - line and background color
Has anyone ever been able to do this, or looked into doing it? Thanks! On Dec 19, 3:53 pm, llefler lakota.lef...@gmail.com wrote: Hello, I am working on fixing up the GWT -MotionChartand wanted to know if anyone knows a good way of approaching an implementation for changing or regulate the line/bubble/bar colors of the charts/graphs and also the background color of the entirechartas a whole. I see that many of the other GWT visualization tools already have these features available so any information on this subject would be greatly appreciated, thank you! Sincerely, Lakota -- 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.
popuppanel always has an offsetwidth of 10 and offsetheight of 0
i use: popup.showRelativeTo(widget...) in my debugger i can see that during the callback: public final void showRelativeTo(final UIObject target) { // Set the position of the popup right before it is shown. setPopupPositionAndShow(new PositionCallback() { public void setPosition(int offsetWidth, int offsetHeight) { position(target, offsetWidth, offsetHeight); } }); } offsetWidth and height are wrong (too small). this seems to have been a problem since at least 2006 (google found some old stuff) and causes the popup to be rendered to the lower right into non existing space instead of to the left or top where it might still fit. is it fixable? if yes, what can i do? i tried different browsers (firefox crhome), but the error is the same. -- 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: Caused by: java.lang.IllegalArgumentException: Cannot fetch unpersisted entity
On Monday, December 19, 2011 10:59:16 PM UTC+1, tzhotmail wrote: Hi, I have a base Entity class with subclasses as shown below. I can view and update my entities but I get the exception java.lang.IllegalArgumentException: Cannot fetch unpersisted entity whenever I try to save /persist a new entity. What does throw this exception? (I suppose Hibernate, Datanucleus or whichever JPA implementation you're using) And when? (which method, and what's the stack-trace?) Does request factory support inheritance ? Yes. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/D2rYkMDhZHYJ. 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-RCharts Released (An interactive client side Charting Library with 3D CHARTS)
Like it a lot, neat and seems very simple to use. Good work! On Tue, Dec 20, 2011 at 6:28 AM, saurabh saurabh saurabh.bl...@gmail.comwrote: Oops!! I forgot to mention the links, here they are : http://code.google.com/p/gwt-rcharts/ and http://www.gwt-charts.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. -- Alfredo Quiroga-Villamil AOL/Yahoo/Gmail/MSN IM: lawwton -- 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: Why com.google.gwt.dev.DevMode doesn't recognize the argument -style?
On Tuesday, December 20, 2011 12:05:14 PM UTC+1, hallmit wrote: Hi folks, I'm experiencing a little bit problem. I would like to launch my application in development mode (known also as Hosted mode). My current GWT version is 2.3.0. For debug reasons, I want to inspect the generated JavaScript in my browser but the default format is a non-human readable (obfuscated). So, I'm trying to pass the argument -style PRETTY in my launch configuration and I got this: Unknown argument: -style Google Web Toolkit 2.3.0 [...] After searching on GWT repository [1], I figured out that the last support for the argument -style was in GWT 1.6 when you were using GwtShell. For the new classes, HostedMode and DevMode (class to use instead), this argument isn't longer supported. Why? Because DevMode doesn't generate JavaScript *at all* (well, except for a the *.nocache.js if you don't have it already, but it doesn't contain anything related to your Java code). The -style argument was there because you could call the Compiler from within the DevMode (by the click of a button); and because this has been removed, there's no reason to keep the -style argument. So, it's possible to launch an application in development mode and get a pretty Javascript generated (passing style argument to DevMode)? No, because as I said, DevMode doesn't generate any JS at all. Either you run in DevMode, and your Java code runs in a JVM, only minimal JS involved (but not much things to debug); or you compile to JS (possibly passing -style PRETTY) and run in what's known as production mode (pure JS, no plugin in the browser, no Java involved). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/BSI3UuOb6IsJ. 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: Non-Cloud development with GWT
On Tuesday, December 20, 2011 2:07:01 PM UTC+1, MagusDrk wrote: Thanks for your quick answers, guys. I suppose its easy to find info about how to use my own server, datastorage, etc. in order to develop non-cloud apps with GWT. GWT is mostly about client code; on the server it's only involved for specific RPC protocols (GWT-RPC or RequestFactory). These are standard servlets that can run in any servlet container (Tomcat, Jetty, etc.); and along with them you can use any server-side library you want (Spring, Guice, Hibernate, Datanucleus, Morphia, etc.), storing data in whatever storage (MySQL, Postgres, MongoDB, SQLite, HSQLDB, Cassandra, or the file system). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/JYwrK5jEFqwJ. 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: Entry Point
I do the following: It's not a very elegant solution and you still have only one entry point. You mainly dispatch depending on the action found in the url. I would definitely get ride of the refresh action which causes an extra server-client round trip. Round trips should be minimized as much as possible as they are costly. In your case they aren't needed. Examples: You use Tomcat, so use a dynamic hosting page that uses a servlet that set some properties in the html page that will be used by the dispatcher. Works very fast. See: http://code.google.com/webtoolkit/articles/dynamic_host_page.html Or if you use a front-end web server (in front of your tomcat) let the web server do the redirection. etc pick one.. - Ed On Tue, Dec 20, 2011 at 9:53 AM, Maximilian Eberl meb...@gmail.com wrote: I do the following: Create an application in a war named ROOT.war - when deployed to Tomcat this reacts to www.myserver.com/index.html Let us assume You want three entry points / - (the main application - public) /membersonly - login secured area /admin - the admin area So create two folders in /war /war/admin /war/members In these folders create an HTML page like !DOCTYPE html html head meta http-equiv=refresh content=0; URL=/index.html?admin /head body /body /html So any call to www.myserver.com/admin will be redirected to www.myserver.com/index.html?admin Now create a Main.java as real entry point: public void onModuleLoad() { String url = Window.Location.getHref(); if ( url.indexOf(?admin)-1 ) { Admin admin = new Admin(); RootPanel.get().add(admin); } else if ( url.indexOf(?member)-1 ) { Member member = new Member(); RootPanel.get().add(member); } else { Application app = new Application(); RootPanel.get().add(app); } } Any of these (Admin.java, Member.java, Application.java) is the base of its own GWT client app. They share all services, libs and shared classes and resources. Works perfect for 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. -- 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: Unowned relationships on unsaved data objects.
Which widgets are you using ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/TjJYrGJPTxIJ. 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 POPUP Z AXiS Order and after Keypress data change handler
1- I add an eventhandler to text box Sounds like a css issue. Use Firebug to solve this. Probably the z-index isn't correct. 2 - i add keypress event handler to text box See the Event class for the possible events that you can use. For example: Event.ONCHANGE -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Ue_qNbVHyKQJ. 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: Poor quality code produced by uiBinder when using CSSResources
That isn't the case, I can tell a measurable difference. This change was introduced when uiBinder switched to use SafeHTMLTemplates. You can use the following to disable its use set-configuration-property name=UiBinder.useSafeHtmlTemplates value=false/ In a more extreme example, I was using a SafeHTMLTemplates to build a complex list and just the class names resulted in 1000 extra string concatenations. This resulted in easily a second delay. When you are trying to build web apps that are as responsive as native apps this is unacceptable. The fix was to abandon the template and build the string myself and just escape the fields that contained data from the server. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/uXKKN2H90Y4J. 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 set a Presenter in a composite Widget?
Hello All, I have a GWT 2.4 app using MVP, clientFactory, activities, places, and uiBinder. I have a composite widget that I created as a standalone object with it's own ui.xml file. I reference that class and insert it into the main viewImpl.ui.xml file. The composite widget receives some data from the backend and I need to get it back to the activity so it can be displayed in a table. I'm using the presenter that is associated with the view to get to the activity. Here is the code: In the View interface: public interface NameView extends IsWidget { void setPresenter(Presenter presenter); ... public interface Presenter{ void goTo(Place place); void setRowDataList(ListData rowData); } In my Activity I implement the View.Presenter as in: Activity extends AbstractActivity implements NameView.Presenter and in the start method for the activity I use: NameView nameView = clientFactory.getNameView();//NameView is just an example. nameView.setPresenter(this); ... to setup the presenter and instantiate it. My problem is, in the widget I need this: presenter.setRowDataList(rowData); but I'm not sure how to reference the instantiated Presenter from the widget? I know GIN would do it, but I'm not using that in the app as I've never setup GIN with GWT. Any ideas as to the correct way to do this? -- 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.
Clientbundle mearges all images into one and displays the mearged image
Hi, GWT 2.4 I have a client bundle and generates images and background images as follows, Document.get().getElementById(hbhtopbar2).getStyle(). setBackgroundImage(url(+HomePageClientBundle.INSTANCE.topbar2().getSafeUri().asString()+)); Image hbtopbar3 = Image.wrap(Document.get().getElementById(hbtopbar3)); hbtopbar3.setUrl(HomePageClientBundle.INSTANCE.topbar3().getSafeUri().asString()); But the problem is, clientbundle combines all clientbundle imgae into a single image and that combined image is displayed in place of all single images. Can someone pls let me know the solution. Thanks Deepak Singh -- 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.
UiBinder use ImageResource height and width to specify a elements height and width
I'm trying to convert one of my Widgets to a UiBinder in GWT 2.4. The current Widget uses the width from an ImageResource to size a parent TD element. The parent TD has to be the exact same size as the image or the overall Widget will not look right. I do not want to hard code the value... I have the resource defined as follows: ui:with field='res' type='package.PanelName.DefaultImages'/ When I try the following ways I get the error Returns int, can't be used as class java.lang.String: td width={res.refreshButton.getWidth}.../td td style='width:{res.refreshButton.getWidth}'.../td I tried a few other things that resulted in the same error. I don't understand why the UiBinder does not like width=22 when this is valid HTML. Is there some other way to do what I am trying to do? Thanks, Pat -- 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: Clientbundle mearges all images into one and displays the mearged image
Take a look at image sprites. On Dec 20, 1:44 pm, Deepak Singh deepaksingh...@gmail.com wrote: Hi, GWT 2.4 I have a client bundle and generates images and background images as follows, Document.get().getElementById(hbhtopbar2).getStyle(). setBackgroundImage(url(+HomePageClientBundle.INSTANCE.topbar2().getSafeUri().asString()+)); Image hbtopbar3 = Image.wrap(Document.get().getElementById(hbtopbar3)); hbtopbar3.setUrl(HomePageClientBundle.INSTANCE.topbar3().getSafeUri().asString()); But the problem is, clientbundle combines all clientbundle imgae into a single image and that combined image is displayed in place of all single images. Can someone pls let me know the solution. Thanks Deepak Singh -- 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.
RequestFactory ValidationTool
Hi I'm trying to learn how to use RequestFactory. I created a new App Engine Connected Android project. In the shared MyRequestFactory class I then add RequestString getSomethingElse(); to the code below, just before the closing curly bracket. @ServiceName(com.mikebreytenbach.android.orbit.server.HelloWorldService) public interface HelloWorldRequest extends RequestContext { /** Retrieve a Hello, World message from the server. */ RequestString getMessage(); } I immediately get an Eclipse error under getSomethingElse() saying Could not find domain method similar to java.lang.String getSomethingElse(). I've followed the instructions on http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation for Eclipse setup, but annotation processing was already configured correctly for the project (I think if it had not been, I would not get the Eclipse error). Now, when the client code calls the original getMessage(), there's a runtime server error saying that the ValidationTool must be run. I've tried deleting all the class files that come with the example as well as cleaning and rebuilding. Is this the right way to add a new server method? Can I fix this problem by installing Maven for GWT or by manually running the ValidationTool? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Can't deploy to appengine with Eclipse Google Plugin 2.5 (using maven)
Hello, I'm developping a gwt/gae project on eclipse indigo. It's a maven project. I'm using the google plugin, and the m2e plugin to manage the project. The project has a maven webapp folder : src/main/webapp When using the develop server, all is put by the maven plugin in the folder target/m2e-wtp/web-resources Since I upgraded to the version 2.5 of the google plugin, deploying to appengine isn't working anymore. The GWT compilation is now built in the folder target/xx-1.0-SNAPSHOT (created from the project info of the pom.xml) But data from src/main/webapp are not copied to that folder, so deploying failed telling me it cannot find appengine-web.xml. I fixed it by puting a symbolic link from target/xx-1.0-SNAPSHOT to target/m2e-wtp/web-resources , but it would be nice to fix this. Regards, Mathieu -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/PdBiRuGkJRMJ. 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.
Remote Logging
I have Remote Logging enabled, and any data logged in my GWT client code only shows up in my Tomcat console. I have logback configured and correctly logging data to log files for server code. Does anyone know how I can configure GWT remote logging so that my client log data gets directed to my logback files on the server? -- 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-RCharts Released (An interactive client side Charting Library with 3D CHARTS)
Nice! I added this to a GXT LayoutContainer with a FitLayout. Any idea how to allow dynamic sizing? Doing this in the onRender() function seems to work only for the initial size. Once I add it into the container though, if I try to resize, the chart stays the same size and just clips if the container gets too small. Any ideas? Is there a refresh() function or something? chart.setHeight(getHeight() - 40); chart.setWidth(getWidth() - 40); chart.setSize(getWidth() - 40, getHeight() - 40); On Dec 20, 6:28 am, saurabh saurabh saurabh.bl...@gmail.com wrote: Oops!! I forgot to mention the links, here they are : http://code.google.com/p/gwt-rcharts/ andhttp://www.gwt-charts.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: GWT2.4 RequestFactory and Hibernate validator 4.2 problem
I just wanted to say that I'm having the same issue. Any help is greatly appreciated. Thanks. On Dec 10, 9:39 am, Ruben Leal rusol...@gmail.com wrote: Hello guys, I'm trying to test gwt2.4 RequestFactory technology with Hibernate validator 4.2. After adding libs to my WEB-INF/lib I have this exception when I try to call persist of a simple object in the client side. I have this exception executing in local mode: java.lang.NoSuchMethodError: org.slf4j.Logger.isTraceEnabled()Z Deploying to app engine servers I have this exception: java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory I search on google about similar errors and people speak about slf4j library versions. I tried to use different old versions with same hibernate validator version and same errors. Please some solution to my problem? this is the list of files in my WEB-INF/lib folder: /identidad/war/WEB-INF/lib/appengine-api-1.0-sdk-1.6.0.jar /identidad/war/WEB-INF/lib/appengine-api-labs-1.6.0.jar /identidad/war/WEB-INF/lib/appengine-jsr107cache-1.6.0.jar /identidad/war/WEB-INF/lib/apps-marketplace.jar /identidad/war/WEB-INF/lib/datanucleus-appengine-1.0.10.final.jar /identidad/war/WEB-INF/lib/datanucleus-core-1.1.5.jar /identidad/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar /identidad/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar /identidad/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar /identidad/war/WEB-INF/lib/gwt-servlet-deps.jar /identidad/war/WEB-INF/lib/gwt-servlet.jar /identidad/war/WEB-INF/lib/hibernate-validator-4.2.0.Final.jar /identidad/war/WEB-INF/lib/jdo2-api-2.3-eb.jar /identidad/war/WEB-INF/lib/joda-time-1.6.jar /identidad/war/WEB-INF/lib/jsoup-1.5.2.jar /identidad/war/WEB-INF/lib/jsr107cache-1.1.jar /identidad/war/WEB-INF/lib/log4j-1.2.16.jar /identidad/war/WEB-INF/lib/requestfactory-server.jar /identidad/war/WEB-INF/lib/slf4j-api-1.6.1.jar /identidad/war/WEB-INF/lib/slf4j-log4j12-1.6.1.jar /identidad/war/WEB-INF/lib/validation-api-1.0.0.GA.jar -- 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: GWT2.4 RequestFactory and Hibernate validator 4.2 problem
I was able to fix this issue in my environment but I'm not 100% sure why. Basically all I did was to remove the hibernate jar out of the WEB-INF/lib but made sure it was still part of the projects build path. Contents of WEB-INF/lib appengine-api-1.0-sdk-1.6.0.jar appengine-api-labs-1.6.0.jar appengine-jsr107cache-1.6.0.jar apps-marketplace.jar datanucleus-appengine-1.0.10.final.jar datanucleus-core-1.1.5.jar datanucleus-jpa-1.1.5.jar geronimo-jpa_3.0_spec-1.1.1.jar geronimo-jta_1.1_spec-1.1.1.jar gwt-servlet-deps.jar gwt-servlet.jar jdo2-api-2.3-eb.jar jsr107cache-1.1.jar objectify-3.1.jar requestfactory-apt.jar requestfactory-server.jar slf4j-api-1.6.1.jar slf4j-log4j12-1.6.1.jar validation-api-1.0.0.GA.jar I hope this helps. On Dec 10, 9:39 am, Ruben Leal rusol...@gmail.com wrote: Hello guys, I'm trying to test gwt2.4 RequestFactory technology with Hibernate validator 4.2. After adding libs to my WEB-INF/lib I have this exception when I try to call persist of a simple object in the client side. I have this exception executing in local mode: java.lang.NoSuchMethodError: org.slf4j.Logger.isTraceEnabled()Z Deploying to app engine servers I have this exception: java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory I search on google about similar errors and people speak about slf4j library versions. I tried to use different old versions with same hibernate validator version and same errors. Please some solution to my problem? this is the list of files in my WEB-INF/lib folder: /identidad/war/WEB-INF/lib/appengine-api-1.0-sdk-1.6.0.jar /identidad/war/WEB-INF/lib/appengine-api-labs-1.6.0.jar /identidad/war/WEB-INF/lib/appengine-jsr107cache-1.6.0.jar /identidad/war/WEB-INF/lib/apps-marketplace.jar /identidad/war/WEB-INF/lib/datanucleus-appengine-1.0.10.final.jar /identidad/war/WEB-INF/lib/datanucleus-core-1.1.5.jar /identidad/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar /identidad/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar /identidad/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar /identidad/war/WEB-INF/lib/gwt-servlet-deps.jar /identidad/war/WEB-INF/lib/gwt-servlet.jar /identidad/war/WEB-INF/lib/hibernate-validator-4.2.0.Final.jar /identidad/war/WEB-INF/lib/jdo2-api-2.3-eb.jar /identidad/war/WEB-INF/lib/joda-time-1.6.jar /identidad/war/WEB-INF/lib/jsoup-1.5.2.jar /identidad/war/WEB-INF/lib/jsr107cache-1.1.jar /identidad/war/WEB-INF/lib/log4j-1.2.16.jar /identidad/war/WEB-INF/lib/requestfactory-server.jar /identidad/war/WEB-INF/lib/slf4j-api-1.6.1.jar /identidad/war/WEB-INF/lib/slf4j-log4j12-1.6.1.jar /identidad/war/WEB-INF/lib/validation-api-1.0.0.GA.jar -- 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.
Remote Logging
GWT only uses java.util.logging, so you have to configure the Slf4j bridge to redirect the logs to logback. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/TmM_illgupgJ. 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.
Clientbundle mearges all images into one and displays the mearged image
Use @sprite in a CssRessource so it sets the appropriate background position. If you have an Image widget, pass the ImageRessource to setRessource. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/5Gw_FSzFv6EJ. 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-RCharts Released (An interactive client side Charting Library with 3D CHARTS)
Hi Erez, nice question, actually its going to be an issue to attend, Thanks for drawing attention over this. Anyway work around solution could be like : making and adding a new chart instance with new dimension and removing the old chart. -- 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: Unowned relationships on unsaved data objects.
Sorry, I don't understand widgets, I'm refering to Data (DAO) classes and JDO persistence. On 20 dic, 10:18, Ed post2edb...@gmail.com wrote: Which widgets are you using ? -- 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: Unowned relationships on unsaved data objects.
Sorry, I don't understand widgets, Exactly my point... I think you posted your message in the wrong forum. On Tue, Dec 20, 2011 at 11:34 PM, MagusDrk magus@googlemail.com wrote: Sorry, I don't understand widgets, I'm refering to Data (DAO) classes and JDO persistence. On 20 dic, 10:18, Ed post2edb...@gmail.com wrote: Which widgets are you using ? -- 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: UiBinder use ImageResource height and width to specify a elements height and width
Try 22px BTW: I these day's I would build my widgets tabless as much as possible -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/HogMhVzLBmYJ. 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: Validation framework fails to compile due to ScriptAssertValidator
I found it... I started out with GWTVF (Gwt validation framework, another library. That one required this JVM setting : -Dgwt.validation.excluded.ValidatorClassesRegexp=^org.hibernate.* which was still set. Removing it fixed my issue. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/FmgtIA68H90J. 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 POPUP Z AXiS Order and after Keypress data change handler
2 - i add keypress event handler to text box this eventhandler is called before the data changes inside the textbox so i recall keypress handler twice to get the data change after every key press. this is a work around, how can i handle the data change after a keypress Use the KeyUpEvent/Handler if you want the already updated data via textBox.getText(). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/GoS-8dSoQQIJ. 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 Date Formatting
I have a customized GWT Date -Time widget which is a combination of two text boxes, one to hold the date and one to hold time. When I enter the date 04/09/1956 12:00 AM (in the Date widget), internally in the ValueChangeHandler for my widget I run it through the GWT's DateTimeFormat class' format() method which takes in the date and time zone information and gives me a formatted Date String that is User friendly when displayed and then based on the date in that widget, I set the time in the Time part of it. The issue is when I put in dates not too old (my observation was dates not older than those in the year 1981), there seems to be no problem at all. When I put in dates older than that say 1956 in my case, there is some weird Daylight savings logic that messes my format of my string by adjusting it back by 1 hour and gives me 04/08/1956 11:00 PM instead of 04/09/1956 12:00 AM. This is issue is reproducible only when I run the app in production mode. When I run it locally on my machine in the hosted mode, I do not see this problem at all. That is the worst part. I understand that GWT reads from a javascript file called noCache.js when we run in production mode as opposed to the Web-INF/lib folder in hosted mode. Also, I run the java.util.Date object through GWT's formatter in several other places where I have a date in hand but never have this issue. It comes when I run it in a ValueChangeHandler. Did any one encounter this weird behavior before? -- 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.1 cell table paging bug?
This behavior deviates from widespread usage of pagination across the web so I don't see how it's desirable to do something unexpected by users unless it's clearly superior. When I navigate from one page to another it's because I want to see the next set of results/data and I expect the stuff at the top to be different than what was on the previous page I was on. If it overlaps, then I have to scan down and figure out where to start looking. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/NM5Yzzq160MJ. 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 adjust height of richtextbox dynamically based on inner content?
public class AutoResizeBox extends RichTextArea { public AutoResizeBox() { set(getElement()); } public static native void set(Element f) /*-{ console.log(f.tagName) ; // console.log(f.document.body.scrollHeight + 'px'); }-*/; } RichTextBox is based on iframe,I tried to use JSNI.For above code,console.log(f.tagName) will print out IFRAME,but console.log(f.document.body.scrollHeight + 'px'); will preduce a compilation error: com.google.gwt.core.client.JavaScriptException: (TypeError): f.document is undefined, can anybody tell me reasons? -- 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 preferable for large scale projects similar to FB?
If speed is critical for your application then there are 2 things to consider: 1. Speed after the application is loaded. 2. Speed in which the application loads up. If you are concerned about latter, then you have to either use code splitting or consider moving to jsp. Because in a large application the code size could easily cross 1.5 MB which might take a long time to load. If the former is of importance(which actually makes the app interactive) then GWT is definitely the way to go. -sowdri- -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/XrqHJ8falFQJ. 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: I could use some Guru recommendations on MapV3 API Event bindings model?
So far this is what I have and seems to be working good. I'll stick with this for now I think and change it if something better comes up. public class MapHandlerRegistration { /** * create a handler for eventName * @param w * @param eventName * @param handler * @return */ public static HandlerRegistration addHandler(MapWidget w, String eventName, MapHandler? handler) { final JavaScriptObject listener = addHandlerImpl(w, eventName, handler); HandlerRegistration registration = new HandlerRegistration() { public void removeHandler() { removeHandlerImpl(listener); } }; return registration; } /** * maps v3 event observation * @param w * @param eventName * @param handler * @return */ private static native JavaScriptObject addHandlerImpl(MapWidget w, String eventName, MapHandler? handler) /*-{ var jso = w...@com.gonevertical.apis.googlemaps.client.MapWidget::getJso()(); var callback = function(event) { @com.gonevertical.apis.googlemaps.client.events.MapHandlerRegistration::onCallback(Lcom/gonevertical/apis/googlemaps/client/events/MapHandler;Lcom/google/gwt/ajaxloader/client/Properties;)(handler, event); }; return $wnd.google.maps.event.addListener(jso, eventName, callback) }-*/; /** * HandlerRegistration call when finished * @param listener */ private static native void removeHandlerImpl(JavaScriptObject listener) /*-{ $wnd.google.maps.MapsEventListener.addListener(listener); }-*/; /** * Process event and next step is to format it into an event that extends format handler * @param handler * @param properties */ @SuppressWarnings(unused) protected static void onCallback(final MapHandler? handler, final Properties properties) { try { formatEvent(handler, properties); } catch (Throwable x) { GWT.getUncaughtExceptionHandler().onUncaughtException(x); } } /** * format the event and tell the handler so parent can then work with it * @param handler * @param properties */ private static void formatEvent(MapHandler? handler, Properties properties) { if (handler instanceof ClickMapHandler) { System.out.println(tes2); } else { System.out.println(test3); } } } Brandon http://c.gwt-examples.com -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/DyxMz9E0qioJ. 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: I could use some Guru recommendations on MapV3 API Event bindings model?
And using it in MapWidget: public HandlerRegistration addClickHandler(ClickMapHandler handler) { return MapHandlerRegistration.addHandler(this, click, handler); } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/kSt_cv-mfBEJ. 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.
STS Dynamic web project vs GWT project
Hi , I am using Spring STS to build GWT and Spring web application. I created dynamic project and added GWT to it. when i am compile i am getting below error. Please help, if i am missing anything. Compiling module com.base.HelloWorld [ERROR] Unexpected internal compiler error java.lang.NoSuchFieldError: warningThreshold at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:413) at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.init(JdtCompiler.java:228) at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:700) at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:235) at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:447) at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:370) at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:360) at com.google.gwt.dev.Precompile.precompile(Precompile.java:252) at com.google.gwt.dev.Precompile.precompile(Precompile.java:233) at com.google.gwt.dev.Precompile.precompile(Precompile.java:145) at com.google.gwt.dev.Compiler.run(Compiler.java:232) at com.google.gwt.dev.Compiler.run(Compiler.java:198) at com.google.gwt.dev.Compiler$1.run(Compiler.java:170) at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88) at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82) at com.google.gwt.dev.Compiler.main(Compiler.java:177) Thanks, Sai -- 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.
Showing loading image in cell table
Hi friends, I am using ListDataProvider to load the data into the celltable. I have also set an EmptyTableWidget using setEmptyTableWidget which shows an HTML panel when the table is empty. I want to know if there are any ways to get the loading symbol by removing the empty table widget while the data is being loaded into the table using ListDataProvider. (NOT ASYNCDATAPROVIDER). Thank you. -- 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: Properly encode request parameters that use Collections when in JSON-RPC mode. (issue1618806)
Starting to add unit tests for JsonRpc support in RF would be great (though not easy, as GWT doesn't provide any server-side utility). Otherwise, LGTM (but see comments below). http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode269 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:269: assert (obj instanceof Collection); How about casting 'obj' to a Collection at the call site instead? (and thus declare the argument here of type Collection) http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode274 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:274: sb.append(nonCollectionEncode(it.next())); Using encode() here would pave the way for supporting collections of collections (see issue 5974). You'd then turn the RuntimeException in nonCollectionEncode into a simple 'assert'. I mean, in the case of JsonRpc, GWT doesn't provide the backend, so there's theoretically no reason to disallow collections of collections, except for parity with the standard RF protocol. http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode291 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:291: if (obj.getClass().isEnum() getAutoBeanFactory() instanceof EnumMap) { Hmm, looks like there's the same issue as was fixed some time ago in ValueCodex re. enum values with their own body, or when the enum has a constructor with arguments: in this case, their class is an anonymous subclass of the enum class, one for which isEnum() returns false. Using obj instanceof Enum instead of obj.getClass().isEnum() would fix it. See issue 6504. http://gwt-code-reviews.appspot.com/1618806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ProvidesKey support to ValuePicker (issue1614807)
I'm not keen on the proposed changes to setAcceptableValues and setValue. ValuePicker is supposed to be usable as a thin wrapper around a CellList, without even calling setAcceptableValues. With your proposed changes, setValue would break the list as soon as you use pagination (getVisibleItems() wouldn't returned the whole list of acceptable values, only the visible ones). The fix for issue 5478 is limited to the added constructor (Renderer,ProvidesKey) and constructing the SingleSelectionModel with an explicit ProvidesKey. I'm fine with the change using setRowData(List) rather than setRowData(int,List) though; it was IMO a bug in the original implementation. http://gwt-code-reviews.appspot.com/1614807/diff/1/user/src/com/google/gwt/user/client/ui/ValuePicker.java File user/src/com/google/gwt/user/client/ui/ValuePicker.java (right): http://gwt-code-reviews.appspot.com/1614807/diff/1/user/src/com/google/gwt/user/client/ui/ValuePicker.java#newcode50 user/src/com/google/gwt/user/client/ui/ValuePicker.java:50: public ValuePicker(CellListT cellList, ProvidesKeyT keyProvider) { What if one passes a different key provider as the one used to create the CellList? Shouldn't the fix rather be to ask the CellList for its key provider? I.e. smodel = new SingleSelectionModelT(cellList.getKeyProvider()); http://gwt-code-reviews.appspot.com/1614807/diff/1/user/src/com/google/gwt/user/client/ui/ValuePicker.java#newcode70 user/src/com/google/gwt/user/client/ui/ValuePicker.java:70: public ValuePicker(RendererT renderer, ProvidesKeyT keyProvider) { I suppose keyProvider was meant to be passed to the CellList ctor? http://gwt-code-reviews.appspot.com/1614807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Reducing the unsafe URI log warning to an info. If you use a String in a URI context, we sanitiz... (issue1616804)
committed as r10804 http://gwt-code-reviews.appspot.com/1616804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Properly encode request parameters that use Collections when in JSON-RPC mode. (issue1618806)
http://gwt-code-reviews.appspot.com/1618806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Properly encode request parameters that use Collections when in JSON-RPC mode. (issue1618806)
Thanks very much for the review! Your point is taken on tests; I'm currently in the process of writing some rudimentary tests for JSON-RPC in RequestFactory. As you mention, these tests will not be integration-level tests at first, as there is no RF server side in the testing infrastructure (as yet), but this will be a start. Expect another patch with tests shortly. http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode269 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:269: assert (obj instanceof Collection); On 2011/12/20 10:51:18, tbroyer wrote: How about casting 'obj' to a Collection at the call site instead? (and thus declare the argument here of type Collection) Good idea, done. http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode274 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:274: sb.append(nonCollectionEncode(it.next())); On 2011/12/20 10:51:18, tbroyer wrote: Using encode() here would pave the way for supporting collections of collections (see issue 5974). You'd then turn the RuntimeException in nonCollectionEncode into a simple 'assert'. I mean, in the case of JsonRpc, GWT doesn't provide the backend, so there's theoretically no reason to disallow collections of collections, except for parity with the standard RF protocol. Agreed, but I'd rather put a TODO here and then fix 5974 on both sides - is that ok with you? http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode291 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:291: if (obj.getClass().isEnum() getAutoBeanFactory() instanceof EnumMap) { On 2011/12/20 10:51:18, tbroyer wrote: Hmm, looks like there's the same issue as was fixed some time ago in ValueCodex re. enum values with their own body, or when the enum has a constructor with arguments: in this case, their class is an anonymous subclass of the enum class, one for which isEnum() returns false. Using obj instanceof Enum instead of obj.getClass().isEnum() would fix it. See issue 6504. Good catch. Fixed. http://gwt-code-reviews.appspot.com/1618806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Properly encode request parameters that use Collections when in JSON-RPC mode. (issue1618806)
(to be clear, the patch with test will be part of a separate issue). http://gwt-code-reviews.appspot.com/1618806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ProvidesKey support to ValuePicker (issue1614807)
I'm not keen on the proposed changes to setAcceptableValues and setValue. Okay, I'll back off of that then; I was thinking, albeit naively, that behaving as much as like ValueListBox as possible would be a good thing. But good point on the paging. Thanks for the review! http://gwt-code-reviews.appspot.com/1614807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ProvidesKey support to ValuePicker (issue1614807)
http://gwt-code-reviews.appspot.com/1614807/diff/1/user/src/com/google/gwt/user/client/ui/ValuePicker.java File user/src/com/google/gwt/user/client/ui/ValuePicker.java (right): http://gwt-code-reviews.appspot.com/1614807/diff/1/user/src/com/google/gwt/user/client/ui/ValuePicker.java#newcode50 user/src/com/google/gwt/user/client/ui/ValuePicker.java:50: public ValuePicker(CellListT cellList, ProvidesKeyT keyProvider) { Shouldn't the fix rather be to ask the CellList for its key provider? Well, that seems logical; note that previously this cstr was already implicitly creating a separate SingleSelectionModel in the smodel field's initializer. So...perhaps we could use the CellList's selection model if it was an instance of SingleSelectionModel? But otherwise, yes, I've changed this cstr to not take a ProvidesKey but to ask the CellList for it. http://gwt-code-reviews.appspot.com/1614807/diff/1/user/src/com/google/gwt/user/client/ui/ValuePicker.java#newcode70 user/src/com/google/gwt/user/client/ui/ValuePicker.java:70: public ValuePicker(RendererT renderer, ProvidesKeyT keyProvider) { I suppose keyProvider was meant to be passed to the CellList ctor? Yes, good point. http://gwt-code-reviews.appspot.com/1614807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Properly encode request parameters that use Collections when in JSON-RPC mode. (issue1618806)
LGTM http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1618806/diff/2001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode274 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:274: sb.append(nonCollectionEncode(it.next())); On 2011/12/20 15:55:56, rdayal wrote: On 2011/12/20 10:51:18, tbroyer wrote: Using encode() here would pave the way for supporting collections of collections (see issue 5974). You'd then turn the RuntimeException in nonCollectionEncode into a simple 'assert'. I mean, in the case of JsonRpc, GWT doesn't provide the backend, so there's theoretically no reason to disallow collections of collections, except for parity with the standard RF protocol. Agreed, but I'd rather put a TODO here and then fix 5974 on both sides - is that ok with you? Yep. http://gwt-code-reviews.appspot.com/1618806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ProvidesKey support to ValuePicker (issue1614807)
http://gwt-code-reviews.appspot.com/1614807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ProvidesKey support to ValuePicker (issue1614807)
Not sure about the test details (documenting the differences with ValueListBox which are another issue –that might need to be addressed too, but independently as this one) but overall LGTM. Be sure to see my comment on getValue() though. http://gwt-code-reviews.appspot.com/1614807/diff/6001/user/src/com/google/gwt/user/client/ui/ValuePicker.java File user/src/com/google/gwt/user/client/ui/ValuePicker.java (right): http://gwt-code-reviews.appspot.com/1614807/diff/6001/user/src/com/google/gwt/user/client/ui/ValuePicker.java#newcode116 user/src/com/google/gwt/user/client/ui/ValuePicker.java:116: if ((current == value) || (current != null current.equals(value))) { Hmm, there might be a need to use the key provider here instead of equals() (which kind-of assumes a SimpleKeyProvider). We're actually mimicking the SingleSelectionModel, with the exception of the deferred SelectionChangeEvent. Note that we could also probably get rid of the 'value' field and use smodel.getSelectedObject(). But I don't think this change is worth the possible bugs it could also introduce ;-) http://gwt-code-reviews.appspot.com/1614807/diff/6001/user/test/com/google/gwt/user/client/ui/ValuePickerTest.java File user/test/com/google/gwt/user/client/ui/ValuePickerTest.java (right): http://gwt-code-reviews.appspot.com/1614807/diff/6001/user/test/com/google/gwt/user/client/ui/ValuePickerTest.java#newcode57 user/test/com/google/gwt/user/client/ui/ValuePickerTest.java:57: return item.value; Handle null value? http://gwt-code-reviews.appspot.com/1614807/diff/6001/user/test/com/google/gwt/user/client/ui/ValuePickerTest.java#newcode173 user/test/com/google/gwt/user/client/ui/ValuePickerTest.java:173: assertEquals(keyProvider.getKey(value), keyProvider.getKey(subject.getValue())); There shouldn't be a need for the KeyProvider here: why not simply assertEquals(value, subject.getValue())? (or if you use the key provider, use it for the smodel.getSelectedObject() too) http://gwt-code-reviews.appspot.com/1614807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding an option to change the debug id property and prefix. Some users prefer to use a random a... (issue1618804)
On 2011/12/16 17:38:57, jlabanca wrote: LGTM http://gwt-code-reviews.appspot.com/1618804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] 2.4 Uibinder code inefficiency
I use a lot of HTML panels so I can use native html for as much layout and styling as possible for performance reasons. I try and minimize the number of widgets I use which is especially helpful on mobile devices. As a result, I use quite a lot of css class references to either local uibinder styles or styles defined in a global application css resource. The problem is that it results in JS code such as the following: f_HTMLPanel1 = new HTMLPanel_0((sb_2 = new StringBuilder_0 , sb_2.impl.string += span id=' , $append_6(sb_2, htmlEscape(domId0)) , sb_2.impl.string += '\/span div class=' , $append_6(sb_2, htmlEscape('GKOWVOJDGN')) , sb_2.impl.string += ' div class=' , $append_6(sb_2, htmlEscape('GKOWVOJDHN')) , sb_2.impl.string += ' span id=' , $append_6(sb_2, htmlEscape(domId1)) , sb_2.impl.string += '\/span span id=' , $append_6(sb_2, htmlEscap The obfuscated class names are clearly static and known at compile time and I would expect them to be inlined in the strings e.g. \/span div class=''GKOWVOJDGN' One of the proposed benefits of using a css resource is shorter class names, However, In reality I would be better of using styles directly loaded in my startup page. The net result is that there are far to many string concatenations and code bloat. This really adds up on a large project and especially hurts when building things like iPad applications. For now I am disabling SafeHTMLTemplates with the following set-configuration-property name=UiBinder.useSafeHtmlTemplates value=false/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Properly encode request parameters that use Collections when in JSON-RPC mode. (issue1618806)
On 2011/12/20 20:21:45, skybrian wrote: http://gwt-code-reviews.appspot.com/1618806/diff/1003/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1618806/diff/1003/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode262 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:262: } else if (obj instanceof Collection) { This seems too broad if we're only going to allow List and Set? Yes, you're right; I imagine that the encoding of a Map wouldn't be handled correctly, even though this is a collection. I'll tighten this up. http://gwt-code-reviews.appspot.com/1618806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Properly encode request parameters that use Collections when in JSON-RPC mode. (issue1618806)
On 2011/12/20 22:31:52, rdayal wrote: On 2011/12/20 20:21:45, skybrian wrote: http://gwt-code-reviews.appspot.com/1618806/diff/1003/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1618806/diff/1003/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode262 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:262: } else if (obj instanceof Collection) { This seems too broad if we're only going to allow List and Set? Yes, you're right; I imagine that the encoding of a Map wouldn't be handled correctly, even though this is a collection. I'll tighten this up. Actually wait, that's totally wrong - Map isn't a Collection :). On second thought, even though List and Set are the two that are technically allowed, there's really no problem with JSON-RPC and the encoding of a Collection, as its done in the exact same way regardless of the collection; I don't think it hurts us to be a bit loose here. What do you think? http://gwt-code-reviews.appspot.com/1618806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Properly encode request parameters that use Collections when in JSON-RPC mode. (issue1618806)
On Tue, Dec 20, 2011 at 2:36 PM, rda...@google.com wrote: On second thought, even though List and Set are the two that are technically allowed, there's really no problem with JSON-RPC and the encoding of a Collection, as its done in the exact same way regardless of the collection; I don't think it hurts us to be a bit loose here. What do you think? I'm leaning towards being more restrictive until someone asks for it, since it's easier to relax a restriction than to tighten it up. Most of the time people will be writing AutoBeans interfaces from scratch and they should probably stick to using maps and lists since that's what JSON and JavaScript support directly, so it will be the most efficient in GWT. But I haven't figured out this code and this isn't a public method. Do we check for this somewhere else? Maybe some unit tests would make it more clear. - Brian -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ProvidesKey support to ValuePicker (issue1614807)
http://gwt-code-reviews.appspot.com/1614807/diff/6001/user/src/com/google/gwt/user/client/ui/ValuePicker.java File user/src/com/google/gwt/user/client/ui/ValuePicker.java (right): http://gwt-code-reviews.appspot.com/1614807/diff/6001/user/src/com/google/gwt/user/client/ui/ValuePicker.java#newcode116 user/src/com/google/gwt/user/client/ui/ValuePicker.java:116: if ((current == value) || (current != null current.equals(value))) { Hmm, there might be a need to use the key provider here instead of equals() If I fix this to use the keys, then the current test actually fails because: setValue(Foo@123[value=able]) setValue(Foo@456[value=able]) Does not accept the new Foo@456 value, but keeps the existing Foo@123 value, as it considers them equal, and so doesn't fire a change. I suppose this makes sense? I ask only because I copy/pasted the ValuePickerTest assertions that expect the Foo@456 set to change the value from ValueListBoxTest. And ValueListBox#setValue has a similar value-not-key check; do you think that's a bug? http://gwt-code-reviews.appspot.com/1614807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add null check to ValueListBox.updateListBox (issue1619803)
http://gwt-code-reviews.appspot.com/1619803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors