Re: Setting Up A Login Page To Use SSL
Nick, On Tuesday, May 24, 2011 11:56:57 PM UTC+2, Nick Apperley wrote: Max - With regards to point 1 I did consider it but it isn't feasible to use SSL for the entire website when large amounts of data is being sent to/from the server. Most of the data being received from the server is in JSON format, which although it is less verbose than XML it does include other pieces of data that hasn't been requested from the website (client). All of the received data comes from a DB as row(s). If a row contains a foreign key then the referred row (by the key) is automatically included instead of the key in a JSON file. This is automatically done by the server, no changes were made to do this. You can imagine just how much data is included if there is more than one foreign key, and this automatically scales up recursively if the included row also contains a foreign key. I'm sorry, but how is this an argument against TLS, again? Cheers! Max -- 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: Please send some sample code in detail for Gwt server side method unit test cases.
Hi Rupesh, I don't think this has anything to do with GWT. Perhaps you'll have more luck asking the folks on the EasyMock mailing list at http://tech.groups.yahoo.com/group/easymock/ or read the Spring docs at http://www.springsource.org/documentation. You should consider posting some more code so that it's possible to understand your problem in detail. HTH Max -- 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: Setting Up A Login Page To Use SSL
Nick, two points: 1. Have you considered using TLS/SSL for your complete application? Without that a MITM would still be able to sniff the session cookie and act on behalf of the user, sniff users' data, modify data on the way between server and client and so on. 2. If you really really want to use TLS only for login purposes I recommend you redirect users to a simple login page using https and after logging in redirecting them back to the http version fo your app. HTH Max -- 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 URL from Facebook doesn't load on Chrome, but does on other browsers.
Hi erebrus, without some code it'll be difficult to help you. Please post the code snippet which creates your Image. HTH Max -- 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.
Prototypical implementation of Desktop Notifications
Hi, (this is a re-post of my original posting to the GWT Contributors list. Due to suspected lack of interest there I post it here now) I'm a huge fan of Web Notifications (or Desktop Notifications as called by Webkit/Chrome, see http://www.w3.org/TR/notifications/) so I started to hack away a very rudimentary implementation of them in GWT. My implementation consists basically of four components: A Notification class acting as a wrapper around a NativeNotification class which extends JavaScriptObject. For handling the display event (which is called show in the W3C spec) I created a class DisplayEvent extending DomEventDisplayHandler. For creating a Notification I borrowed the mechanism used in the experimental Storage API of GWT 2.3: final Notification popup = Notification.createIfSupported(, Title, Body); This creates a Notification object wrapping a NativeNotification object. Since I'm not THAT firm with DOM events and stuff I would like you to comment on my implementation and if it is somewhat usable or leaking memory or sth. The code is in prototype status and currently works in Chrome only. Please find attached my implementation. Cheers! Max -- 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. package de.maxwerner.gwtplayground.client; import com.google.gwt.event.dom.client.DomEvent; /** * Represents a native display event. * * @author Max Jonas Werner max.jonas.wer...@justsoftwareag.com */ public class DisplayEvent extends DomEventDisplayHandler { /** * Event type for display events. Represents the meta-data associated with * this event. */ private static final com.google.gwt.event.dom.client.DomEvent.TypeDisplayHandler TYPE = new com.google.gwt.event.dom.client.DomEvent.TypeDisplayHandler( display, new DisplayEvent()); /** * Gets the event type associated with display events. * * @return the handler type */ public static TypeDisplayHandler getType() { return TYPE; } /** * Protected constructor, use * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} * to fire display events. */ protected DisplayEvent() { } @Override public final TypeDisplayHandler getAssociatedType() { return TYPE; } @Override protected void dispatch(DisplayHandler handler) { handler.onDisplay(this); } } package de.maxwerner.gwtplayground.client; import com.google.gwt.event.shared.EventHandler; /** * @author Max Jonas Werner max.jonas.wer...@justsoftwareag.com */ public interface DisplayHandler extends EventHandler { public void onDisplay(DisplayEvent event); } package de.maxwerner.gwtplayground.client; import com.google.gwt.core.client.JavaScriptObject; /** * Instances of this type represent a single notification window which can be * displayed to the user and closed programatically. Use * {@link Notification#createIfSupported(String, String, String)} to create an * instance of this class. * * @author Max Jonas Werner max.jonas.wer...@justsoftwareag.com */ public class NativeNotification extends JavaScriptObject { protected NativeNotification() { } public final native void show() /*-{ this.show(); }-*/; public final native void cancel() /*-{ this.cancel(); }-*/; } package de.maxwerner.gwtplayground.client; import java.util.ArrayList; import java.util.List; import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT.UncaughtExceptionHandler; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.event.shared.HandlerRegistration; /** * Implementation of W3C's Web Notifications specification. Obtain a * Notification object by invoking * {@link #createIfSupported(String, String, String)} and then show it using the * {@link #show()} method. * * @see a href=http://www.w3.org/TR/notifications/;W3C Web Notifications/a * * @author Max Jonas Werner max.jonas.wer...@justsoftwareag.com */ public class Notification { private NativeNotification _nativePopup; private ListDisplayHandler _displayEventHandlers; // this handler actually calls the attached GWT handlers when a 'display' // event is fired by the notification window. protected JavaScriptObject jsHandler; public static Notification createIfSupported(final String icon, final String title, final String body) { return new Notification(icon, title, body); }; public void show() { _nativePopup.show(); } public void cancel() { _nativePopup.cancel
[gwt-contrib] Rudimentary implementation of Web Notifications
Hi, I'm a huge fan of Web Notifications (or Desktop Notifications as called by Webkit/Chrome, see http://www.w3.org/TR/notifications/) so I started to hack away a very rudimentary implementation of them in GWT. My implementation consists basically of four components: A Notification class acting as a wrapper around a NativeNotification class which extends JavaScriptObject. For handling the display event (which is called show in the W3C spec) I created a class DisplayEvent extending DomEventDisplayHandler. For creating a Notification I borrowed the mechanism used in the experimental Storage API of GWT 2.3: final Notification popup = Notification.createIfSupported(, Title, Body); This creates a Notification object wrapping a NativeNotification object. Since I'm not THAT firm with DOM events and stuff I would like you to comment on my implementation and if it is somewhat usable or leaking memory or sth. Perhaps some day it's valid for inclusion into GWT itself since I've not found any implementation on the web or in GWT's SVN trunk. Please find attached my implementation. Cheers! Max -- http://groups.google.com/group/Google-Web-Toolkit-Contributors/** * Created at 17 May 2011 19:33:39 * Created by Max Jonas Werner max.jonas.wer...@justsoftwareag.com * * (c) Copyright 2011 Just Software AG * * This file contains unpublished, proprietary trade secret information of * just software AG. Use, transcription, duplication and * modification are strictly prohibited without prior written consent of * just software AG. */ package de.maxwerner.gwtplayground.client; import com.google.gwt.event.dom.client.DomEvent; /** * Represents a native display event. */ public class DisplayEvent extends DomEventDisplayHandler { /** * Event type for display events. Represents the meta-data associated with * this event. */ private static final com.google.gwt.event.dom.client.DomEvent.TypeDisplayHandler TYPE = new com.google.gwt.event.dom.client.DomEvent.TypeDisplayHandler( display, new DisplayEvent()); /** * Gets the event type associated with display events. * * @return the handler type */ public static TypeDisplayHandler getType() { return TYPE; } /** * Protected constructor, use * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} * to fire change events. */ protected DisplayEvent() { } @Override public final TypeDisplayHandler getAssociatedType() { return TYPE; } @Override protected void dispatch(DisplayHandler handler) { handler.onDisplay(this); } } /** * Created at 17 May 2011 19:34:01 * Created by Max Jonas Werner max.jonas.wer...@justsoftwareag.com * * (c) Copyright 2011 Just Software AG * * This file contains unpublished, proprietary trade secret information of * just software AG. Use, transcription, duplication and * modification are strictly prohibited without prior written consent of * just software AG. */ package de.maxwerner.gwtplayground.client; import com.google.gwt.event.shared.EventHandler; /** * * * @author Max Jonas Werner max.jonas.wer...@justsoftwareag.com */ public interface DisplayHandler extends EventHandler { public void onDisplay(DisplayEvent event); } /** * Created at 17 May 2011 18:42:11 * Created by Max Jonas Werner max.jonas.wer...@justsoftwareag.com * * (c) Copyright 2011 Just Software AG * * This file contains unpublished, proprietary trade secret information of * just software AG. Use, transcription, duplication and * modification are strictly prohibited without prior written consent of * just software AG. */ package de.maxwerner.gwtplayground.client; import com.google.gwt.core.client.JavaScriptObject; /** * * * @author Max Jonas Werner max.jonas.wer...@justsoftwareag.com */ public class NativeNotification extends JavaScriptObject { protected NativeNotification() { } public final native void show() /*-{ this.show(); }-*/; public final native void cancel() /*-{ this.cancel(); }-*/; } /** * Created at 17 May 2011 18:18:28 * Created by Max Jonas Werner max.jonas.wer...@justsoftwareag.com * * (c) Copyright 2011 Just Software AG * * This file contains unpublished, proprietary trade secret information of * just software AG. Use, transcription, duplication and * modification are strictly prohibited without prior written consent of * just software AG. */ package de.maxwerner.gwtplayground.client; import java.util.ArrayList; import java.util.List; import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT.UncaughtExceptionHandler; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.event.shared.HandlerRegistration; public class Notification { private NativeNotification _nativePopup; private ListDisplayHandler
Re: KeyPressEvent doesn't capture Enter
Hi julio, there's also an open issue in the issue tracker for GWT: http://code.google.com/p/google-web-toolkit/issues/detail?id=5558 It is increasingly annoying that the docs in http://code.google.com/webtoolkit/doc/latest/tutorial/manageevents.html are not updated to reflect this issue. HTH Max -- 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: textbox water mark
Why has this topic been deleted from Groups? On 20 December 2010 21:03, Max Jonas Werner m...@maxwerner.de wrote: You're a lucky guy that you can use this feature. ;-) Cheers! Max -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: textbox water mark
This is weird. I can't search for this topic and it doesn't show up in my or in pieceovcake's activity log but the direct link still works. What am I missing here? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: textbox water mark
Hi pieceovcake, yes, we're using sth. like you've mentioned a lot in our application. It looks sth. like this: ... private TextArea _ta; ... _ta.setText(placeholder); _ta.setStyleName(textarea-placeholder); _ta.addFocusHandler(new FocusHandler() { @Override public void onFocus(final FocusEvent event) { if (_isBlank) { _ta.setText(); } _ta.setStyleName(textarea-text); _submitText.setVisible(true); // a submit button } }); _ta.addBlurHandler(new BlurHandler() { @Override public void onBlur(final BlurEvent event) { if (ClientStringUtil.isBlank(_ta.getText().trim())) { _isBlank = true; } else { _isBlank = false; } blurTextArea(); } }); ... private void blurTextArea() { if (_isBlank) { _submitText.setVisible(false); // hide the submit button _ta.setStyleName(textarea-placeholder); _commentText.setText(placeholder); } } We're using the _isBlank field to indicate that the user has typed sth. into the text area and we don't replace this with the placeholder text if he exists the area. But that's a matter of taste and requirements. HTH Max -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: textbox water mark
You're a lucky guy that you can use this feature. ;-) Cheers! Max -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Repeating Timer and onUnload()
Hi ep, yeah, that's what I meant with putting the cancel() call in onUnload(). Max On Nov 24, 11:08 am, ep eplisc...@googlemail.com wrote: subclass a timer to your custom, which binds on a widget it works with. when the widget is detached your timer can cancel himself - kinda selfdestruction :) On 23 Nov., 17:26, Max Jonas Werner m...@maxwerner.de wrote: Hi, I have built a widget for my GWT application that shows the latest actions users of the application have performed. To refresh this widget automatically I use a Timer and its schedule() method like this: private final Timer t = new Timer() { @Override public void run() { // perform RPC call here to refresh the list of activities schedule(1); } }; ... t.schedule(1); I'm using schedule() here since scheduleRepeating() could lead to shorter intervalls which I don't want to. However, I could also have used scheduleRepeating() here, that's not the actual problem. My problem/question is rather: When this widget is removed from the DOM I'll have to cancel() the timer, so I override onUnload() and call t.cancel() in there. Is this the method you would recommend or is there some other fancy way of cancelling timers automatically when widgets are unloaded/detached? Thanks Max -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Repeating Timer and onUnload()
Hi, I have built a widget for my GWT application that shows the latest actions users of the application have performed. To refresh this widget automatically I use a Timer and its schedule() method like this: private final Timer t = new Timer() { @Override public void run() { // perform RPC call here to refresh the list of activities schedule(1); } }; ... t.schedule(1); I'm using schedule() here since scheduleRepeating() could lead to shorter intervalls which I don't want to. However, I could also have used scheduleRepeating() here, that's not the actual problem. My problem/question is rather: When this widget is removed from the DOM I'll have to cancel() the timer, so I override onUnload() and call t.cancel() in there. Is this the method you would recommend or is there some other fancy way of cancelling timers automatically when widgets are unloaded/detached? Thanks Max -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.