Re: Session Tracking
Write a service on Server side which extends RemoteServiceServlet. Create an object of type HttpSession as a member. Write methods to serAttribute and getAttribute. On client side. Inject the service and call setAttribute and getAttribute methods wherever you want to add data to session or read data from session. Refer sample code below: SessionService ( On server side) import java.awt.List; import javax.servlet.http.HttpSession; import com.google.gwt.user.server.rpc.RemoteServiceServlet; @SuppressWarnings("serial") public class SessionImpl extends RemoteServiceServlet implements ISession { public static HttpSession httpSession; @Override public String getStrAttribue(String attribute) { httpSession = getThreadLocalRequest().getSession(true); return (String) httpSession.getAttribute(attribute); } @Override public void setAttribue(String attribute, String attValue) { httpSession = getThreadLocalRequest().getSession(true); httpSession.setAttribute(attribute, attValue); } } To use session (on client side) @Inject public ISessionAsync session; session.setAttribue("User","Sujit",new AsyncCallback() { @Override public void onSuccess(Void result) { //some event } @Override public void onFailure(Throwable caught) { // TODO Auto-generated method stub } }); -- 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.
Session Tracking
Hi I am working on gwt. I want to know how to handle sessions(Session Tracking like in servlets). Can anyone help 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.
Proguard Causes "The RequestFactory ValidationTool must be run" Error
Title pretty much says it, when I have proguard enabled I get the error, when I disable it (or run in debug mode) everything is fine. Any help would be appreciated. *Stack Trace:* 02-29 17:24:04.195: E/AndroidRuntime(18174): FATAL EXCEPTION: IntentService[at email] 02-29 17:24:04.195: E/AndroidRuntime(18174): java.lang.RuntimeException: The RequestFactory ValidationTool must be run for the com.project.mms.a.a RequestFactory type 02-29 17:24:04.195: E/AndroidRuntime(18174): at com.google.e.a.c.b.a.b.a(Unknown Source) 02-29 17:24:04.195: E/AndroidRuntime(18174): at com.google.e.a.c.b.e.(Unknown Source) 02-29 17:24:04.195: E/AndroidRuntime(18174): at com.google.e.a.c.b.h.a(Unknown Source) 02-29 17:24:04.195: E/AndroidRuntime(18174): at com.project.mms.w.a(Unknown Source) 02-29 17:24:04.195: E/AndroidRuntime(18174): at com.project.mms.o.a(Unknown Source) 02-29 17:24:04.195: E/AndroidRuntime(18174): at com.project.mms.C2DMReceiver.a(Unknown Source) 02-29 17:24:04.195: E/AndroidRuntime(18174): at com.google.android.c2dm.C2DMBaseReceiver.onHandleIntent(Unknown Source) 02-29 17:24:04.195: E/AndroidRuntime(18174): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59) 02-29 17:24:04.195: E/AndroidRuntime(18174): at android.os.Handler.dispatchMessage(Handler.java:99) 02-29 17:24:04.195: E/AndroidRuntime(18174): at android.os.Looper.loop(Looper.java:143) 02-29 17:24:04.195: E/AndroidRuntime(18174): at android.os.HandlerThread.run(HandlerThread.java:60) *Proguard file:* -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class com.android.vending.licensing.ILicensingService -keep class info.guardianproject.database.** {*;} -keep class info.guardianproject.database.sqlcipher.** {*;} -keep class com.project.mms.ui.* {*;} -libraryjars /libs/guava-r09.jar -libraryjars /libs/commons-codec.jar -libraryjars /libs/sqlcipher.jar -libraryjars /libs/jsr305-1.3.9.jar -libraryjars c:/android-sdk-windows/platforms/android-8/android.jar -verbose -dontwarn sun.misc.Unsafe -keepclasseswithmembers class * { native ; } -keepclasseswithmembers class * { native ; } -keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet, int); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } # Needed by google-api-client to keep generic types and @Key annotations accessed via reflection -keepclassmembers class * { @com.google.api.client.util.Key ; } -keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault # Needed by Guava -dontwarn sun.misc.Unsafe -- 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/-/xQhQHWhbSXkJ. 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.
Windows 8
Wrapping the Windows 8 JS API in GWT Anyone looking at 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.
String to Object Structure in GWT
Hi All, I am relatively new to GWT. I have input as a string and i want to convert it into object structure. I was wondering how it can be done in GWT. Example String - *(node1(node2(node3) (node4)) (node5))* "node1" has 2 children "node2" and "node5" "node2" has 2 children "node3" and "node4" More like converting a string into binary tree object. Thanks, Nikhil -- 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/-/thVuBBnRbvIJ. 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
Hi to all, I'm very new on GWT. I have to rebuild an old web app that use GWT (maybe 1.x) beacuse it can be accessed by last browsers. I need some advice! What is the best practice to do this? What can I do to achive my gol? Thanks very muych. -- 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 application freezes when new version is deployed while using it
Joe, We've done something similar. Rather than show a pretty dialog, we embedded some JSNI code in the onAsyncCallFail call. This shows a standard "window.confirm" dialog, then calls $wnd.location.href = href (I seem to recall window.location.reload didn't work). We also deploy in the wee weekend hours as well. I'm liking a lot of the suggestions here, particularly the one about a heartbeat call. The problem I've been wrestling with is: Whenever we want the user to use the new version, we have to wait until they actual do something (i.e. make an RPC call or hit a code-split point). Which means they're trying to get something done and we're interrupting them. A heartbeat mitigates this a little. And assuming we structure things properly, we could notify the user of the new version without actually forcing them to reload. Maybe with a message at the top. I believe Google Groups does this now, yesno? That's the theory anyway... On Wed, Feb 29, 2012 at 8:55 PM, Joseph Lust wrote: > Kyle, > > Can you hardcode the onclick="window.location.reload();" method in the > "OK" button, so it should still work even if the GWT frontend is > hosed? > > Sincerely, > Joe > > On Jan 11, 8:56 am, Kyle Baley wrote: > > We've gone Thomas's original suggest route of informing the user. But in > > our original pass at this, we threw up a dialog with an OK button on it. > It > > said something to the effect of "There's a new version. Please log in > > again". Clicking OK is intended to log the user out and forcibly refresh > > the page. > > > > What we're finding is that for the code-splitting case, the dialog does > > indeed come up but the whole page becomes unresponsive afterward. That > is, > > you can't click the OK button. I've verified that this happens regardless > > of whether we put a dialog up or not. Nothing on the page is clickable at > > all. Wondering if this is what others see as well and if so, if there's a > > way around it. > > -- > 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.
about css style in gwt
in gwt developer guilde http://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html complex style section: .gwt-MenuBar { >/* properties applying to the menu bar itself */ >} >.gwt-MenuBar .gwt-MenuItem { >/* properties applying to the menu bar's menu items */ >} >.gwt-MenuBar .gwt-MenuItem-selected { >/* properties applying to the menu bar's selected menu items */ >} > > I cannout underatand, why the css rule is .gwt-MenuBar .gwt-MenuItem but not .gwt-MenuItem ? I am not good in css, is .gwt-MenuBar .gwt-MenuItem is equal to just one css class? not any special meaning for the prefix .gwt-MenuBar, that is we can rename it as .gwt-MenuBargwt-MenuItem will not any different? -- 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/-/6i_kAKsfeLYJ. 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: the output of DialogBox is very strange
I don't think setSize is really supported for the content area of the DialogBox since setSize is inherited from UIObject. I believe the size you're setting is the actual dialog box's outer dimensions (ie. the DecoratorPanel's table) and not your content's dimensions. What you'll really want to do is have your dialog box's main content widget sized how you want it and let dialog box size itself based on that - as RKP Pisters suggested. On Feb 28, 8:21 pm, tong123123 wrote: > thanks for the reply. > I found the problem seems related to Dialogbox.setsize(), if call this > method, the dialogBox will be very strange, just try the following to > simulate: > > public class GWTTest1 implements EntryPoint, ClickHandler { > > private static class MyDialog extends DialogBox { > > public MyDialog() { > // Set the dialog box's caption. > setText("My First Dialog"); > > // Enable animation. > setAnimationEnabled(true); > > // Enable glass background. > setGlassEnabled(true); > > // DialogBox is a SimplePanel, so you have to set its widget > property to > // whatever you want its contents to be. > ScrollPanel scrollPanel1 = new ScrollPanel(); > //scrollPanel1.setSize("1800px", "500px"); > setWidget(scrollPanel1); > Button ok = new Button("OK"); > > ok.addClickHandler(new ClickHandler() { > @Override > public void onClick(ClickEvent event) { > MyDialog.this.hide(); > } > }); > scrollPanel1.add(ok); > > } > } > > public void onModuleLoad() { > Button b = new Button("Click me"); > b.addClickHandler(this); > > RootPanel.get().add(b); > } > > public void onClick(ClickEvent event) { > // Instantiate the dialog box and show it. > MyDialog myDialog1 = new MyDialog(); > // if myDialog1.setSize(), will throw very strange result!! > myDialog1.setSize("1800px", "500px"); > myDialog1.show(); > } > } > > if comment out the statement "myDialog1.setSize("1800px", "500px");" > and uncomment the statement //scrollPanel1.setSize("1800px", "500px"); > everything is ok. > so I think the DialogBox.setSize() has some problem. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
how to look the widget's html code generated by gwt
as captioned, any method to know what html is generated for a widget by gwt? I see many post can create a subclass of widget and override the render() method, but seem they know what is the original html generated by the widget, how could they got this information? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to load an external JS-file without calling a function in there
newnoise, I thought you could just place the tag in your manifest file and that external library would be loaded into the page. Perhaps you've already tried this, but I did not see it mentioned above. i.e....