Re: How to validate TextBox fields?
I was not aware of the editor framework. This looks very promising! -- 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/-/9qGf8hGJ1ZwJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem with parser from XML to String on GWT
Thanks for your answer, Do you know any way of write a file XML to String in GWT? I know make it in java with XMLSerializer, StringWriter, OutputFormat but I look for as make it and I don´t find it. If you know make it, I thanks you for explain me. Postscript: I sorry for my english. Thanks. El jueves, 20 de diciembre de 2012 23:24:00 UTC+1, jchimene escribió: On 12/20/2012 09:32 AM, Crease wrote: Hi, I have a problem when I try parser from XML to String on GWT. In other application that it�s not GWT, I don�t have problem and I make correctly. I�m reading but I don�t find any solution. The next code work well, but It don�t work on GWT. These classes (XMLSerializer, StringWriter, OutputFormat) aren't supported by GWT. Did you check the documentation? https://developers.google.com/web-toolkit/doc/latest/RefJreEmulation --- //Construction of the XML file on DOM ... XMLSerializer xmlSerializer = new XMLSerializer(); StringWriter strWriter = new StringWriter(); OutputFormat outFormat = new OutputFormat(); outFormat.setEncoding(UTF-8); //outFormat.setEncoding(ISO-8859-1); outFormat.setVersion(1.0); outFormat.setIndenting(true); outFormat.setIndent(4); //outFormat.setIndent(2); outFormat.setOmitXMLDeclaration(false); outFormat.setMethod(xml); xmlSerializer.setOutputCharStream(strWriter); xmlSerializer.setOutputFormat(outFormat1); //xmlDoc es el Documento (Document) XML xmlSerializer.serialize(xmlDoc); strWriter.close(); //And strWriter.toString() have the xml document convert to string --- In GWT give me a mistake because I cann�t import its librery. It show the next message of mistake: Exclude name my class.java from App Engine validation Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/zRLptuwIwrkJ. To post to this group, send email to google-we...@googlegroups.comjavascript:. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com javascript:. 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 view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/hgUtky9v57YJ. To post to 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.
Run GWT app by demand + xs linker
Hello: I'm using GWT 2.3 I want to run a GWT application by demand, i.e, clicking an external HTML button ( I mean, this button doesn't belong to GWT application ) I can do that when I use std linker (iframe bootstrap mechanism). I do it by modifying DOM with Javascript But now I need to use *xs linker* and this way to start my application doesn't work Does anyone know how do it ? Did anyone do sometime ? Thanks Regards -- 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/-/sZBQFxB1ngsJ. To post to 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 add ValueChangeHandler to Tree?
Hi, as far as I can see a GWT Tree has no ValueChangeHandler by default (for modifying elements in the tree). Therefore I'm trying to extend the Tree and add a ValueChangeHandlermy myself. But it never get's called: class MyTree extends Tree implements ValueChangeHandlerString { //never gets called @Override public void onValueChange(ValueChangeEventString event) { System.out.println(value changed); } } What's wrong here? I'm changing the trees' content with: @UiBinder TextBox box; @UiBinder Button save; @UiHandler(save) { void onSave(ClickEvent evt) { tree.getSelectedItem().setText(box.getText()); } From debugging I can see that the value in the tree items is already changed by this! But it is not reflected in the tree in GUI. So I probably have to write something in the onChangeHandler to update the tree visually. But as I said, onValueChange never gets called... -- 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/-/BCnqEs-BkRUJ. To post to 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: help to understand uiRenderer
I have this code in Contact_cell.ui.xml div span ui:field='nameSpan' ui:text from={name} / /span /div I think that [object Object] comes from ui:text, but I do not understand what ui:text is for (when I should use ui:text ?) ? Thx, -- 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/-/azsGeO3YVS4J. To post to 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: Code Splitting Simple Example Still getting Thrown into Left Overs
Jens, thanks for the input. If you don't mind me asking, - Do you link Activities directly to specific places: ActivityP extends Place ? - Somewhat related, do you set an actual place (constructor/setter) or just a particular param (DTO/other object/variable)? - Do you have a lot of ActivityWithPlaceProxy boiler plate? - Do you show any loading on the ActivityWithPlaceProxy.start() prior to the actual start of the desired activity? - I Assume by proxy complete mappers you mean: build a proxy mapper delivered via AsyncProvider which will pull all activities in that mapper at once?? - It would appear there is a situation when using activities provided via RunAsync that the default ActivityMapper behavior is not desired: --- In non-RunAsync, if a new Activity starts AND sets the display widget/panel prior to the activity which preceded it (user navigates before current activity can set display), clear/kill current activity and proceed with next However, this is not the same when RunAsync is involved as Activity A can be called and downloaded. Prior to A being downloaded, Activity B is started and downloads or loads faster than A So A will set the display panel AFTER Activity B - The default ActivityManager will give control to A and kill of B even though we probably want to give B the control and display since A took longer loading and setting the display... I am not sure if my logic fits reality, but I have extended Saeed's asyncMapper/Manager example to use the Place to determine what activity gets control (That last place fired gets control. So if an activity loads but is linked - pass the Place as params through the async calls - to a different place, kill it) * I have included some links to this process below incase anyone wants to do verify or reference: https://github.com/ashtonthomas/gwt-async-mvp-gin/tree/act-async-mapper (Branch: act-async-mapper) Using Place to determine start order (or ignoring of previous/stale activities due): https://github.com/ashtonthomas/gwt-async-mvp-gin/blob/act-async-mapper/src/io/ashton/async/client/app/activity/async/AsyncActivityManager.java#L113 Saeed's Original: https://github.com/zarinfam/hello-mvp-async On Monday, January 7, 2013 12:27:26 PM UTC-5, Jens wrote: Currently using http://code.google.com/p/google-web-toolkit/issues/detail?id=5129#c18 and so far I haven't seen an issue with it. I also proxy complete ActivityMappers so I can freely decide if I want to code split a single activity or a group of activities because it does not buy you anything if you make a split point for a very small activity just because its an activity. But today, GWT 2.5 negates that a bit as it allows you to automatically merge split points (although you dont have any control) -- 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/-/JyBH8YR94RcJ. To post to 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 preserve session state with a canvas?
First you need to get the data from the canvas so you can save that. Use this method: http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/gwt/canvas/client/Canvas.html#toDataUrl%28%29 Now for session you have 2 options: 1) You can transmit this data to your server in an http call, and then save that into a database or file - cookie will not work, as the image data will be too large for a cookie. 2) You can save the data in HTML5 local storage: https://developers.google.com/web-toolkit/doc/latest/DevGuideHtml5Storage On Monday, January 7, 2013 4:57:27 PM UTC+2, membersound wrote: Hi, I'm creating a canvas where the user can draw some elements himself. Is it possible with GWT to preserve the user session somehow? And if he refreshes the browser, all his drawings should be still there / beeing recreated? Coming from JSF I'd just use @SessionScoped, but how can this be done gwt, if ever? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/vluEHgKNfSkJ. To post to 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 only allow digits to be entered in a textbox?
Grab this code from stackoverflow, should do what you want http://stackoverflow.com/questions/2865647/solution-for-numeric-text-field-in-gwt On Monday, January 7, 2013 4:55:44 PM UTC+2, membersound wrote: Hi, I have a textbox where I want to user to only enter digits. Moreover I want to prevent him entering other characters. This is what I tried but it does not work: @UiHandler(textbox) void onInputsKeyPress(KeyPressEvent event) { if (!Character.isDigit(event.getCharCode())) { ((IntegerBox) event.getSource()).cancelKey(); } } Any hints? -- 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/-/EnUl7quza6MJ. To post to 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.
In MVP is there a difference between declaring the 'binding' interface in the presenter versus the view?
I saw a lot of sample code, most of them use the following way of creating MVP: public interface ContactsViewT { public interface PresenterT { void onAddButtonClicked(); void onDeleteButtonClicked(); void onItemClicked(T clickedItem); void onItemSelected(T selectedItem); } void setPresenter(PresenterT presenter); void setColumnDefinitions(ListColumnDefinitionT columnDefinitions); void setRowData(ListT rowData); Widget asWidget(); } Then let the presenter implement ContactsView.PresenterContact. However some do the following: public class ContactsPresenter implements Presenter { public interface Display { HasClickHandlers getAddButton(); HasClickHandlers getDeleteButton(); HasClickHandlers getList(); void setData(ListString data); int getClickedRow(ClickEvent event); ListInteger getSelectedRows(); Widget asWidget(); } //. } Then let the view implement the ContactsPresenter.Display. Are there any good points for doing either methods, maybe one is better suited for UiBinder? 2- Another question, is the view not suppose to directly communicate with the model at all. For instance, if I've got a ListBox that should be populated from an Enum class that sits in the model, should that be done through the presenter? -- 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/-/MCtXV5RXLckJ. To post to 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: help to understand uiRenderer
ok, I close this topic, my error was the importance to use the same parameter name Contact in the render method. void render(SafeHtmlBuilder sb, Contact *contact*); ui:with field='*contact*' type='com.MS.client.core.MODEL.admin.Contact_database.Contact' / -- 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/-/73VBufqjBKIJ. To post to 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: Some of my images arnt being turned into image strips :?
Still no luck. If it helps diagnose I can supply sample images. On Saturday, December 29, 2012 11:31:06 PM UTC+1, darkflame wrote: ...and thus are rather flickery when animating between them. (they are frames in a animated sprite). What baffles me is they are defined the same way as others that do seem to work. eg. I have a file like: public interface MemDayImages extends ClientBundle { ... @Source(/MemorableDayIcons/MEDIUM/magrietbag0.png) ImageResource MEDmagrietbag0(); @Source(/MemorableDayIcons/MEDIUM/magrietbag1.png) ImageResource MEDmagrietbag1(); @Source(/MemorableDayIcons/MEDIUM/magrietbag2.png) ImageResource MEDmagrietbag2(); ... Which makes a lovely image strip that animates really smoothly. I have another group of sprites however: public interface NoirInternalSprites extends ClientBundle { @Source(com/darkflame/client/JargScene/firelopp/fireloop0050.png) ImageResource fireloop0050(); @Source(com/darkflame/client/JargScene/firelopp/fireloop0051.png) ImageResource fireloop0051(); @Source(com/darkflame/client/JargScene/firelopp/fireloop0052.png) ImageResource fireloop0052(); @Source(com/darkflame/client/JargScene/firelopp/fireloop0053.png) ImageResource fireloop0053(); ... Which does not. These pngs instead turn into dozens of separate files - not a image strip at all. So what gives :? What determines when images are combined and when they are not ? For reference, I use set-property name=ClientBundle.enableInlining value=false / in my gwt.xml to stop data urls being formed. Thanks for any pointers, -Thomas -- 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/-/gHkrY39r_B4J. To post to 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 - Crawlable (SEO)
I can only comment how I did it; Googles bot will read any url in the form: #!key1=value1key2=value2 As: ?_escaped_fragment_=key1=value1%26key2=value2 Thus I built a php version of my site that delivered the same content without the need for JavaScript. By using escape fragments the same request data is avaliable to the server as the client, so you should be able to pull up the same contents as the client. (for example, from a mysql database). So effectively the javascript and php versions of my site mirror eachother in terms of content, and the bot has access to the php one via the ?_escaped_fragment_ url standard. On Wednesday, December 26, 2012 1:55:11 AM UTC+1, Jan wrote: Hi, i like to make my gwt-app searchable by google. I found this article, that describes how to do it: https://developers.google.com/webmasters/ajax-crawling/ But it does not really make sense to me: If i use a servlet filter to present a special view to the google bot: This can not really work on the client side. If i change the view with the activties and places pattern, this only affects the client side an there is no servlet involved - servlet filter does nothing. Does some one has an explanation, example or even better a tutorial for me? Thanks and best regards Jan -- 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/-/JbqfwYRuz4YJ. To post to 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: In MVP is there a difference between declaring the 'binding' interface in the presenter versus the view?
On Tuesday, January 8, 2013 3:52:32 PM UTC+1, MAQ wrote: I saw a lot of sample code, most of them use the following way of creating MVP: public interface ContactsViewT { public interface PresenterT { void onAddButtonClicked(); void onDeleteButtonClicked(); void onItemClicked(T clickedItem); void onItemSelected(T selectedItem); } void setPresenter(PresenterT presenter); void setColumnDefinitions(ListColumnDefinitionT columnDefinitions); void setRowData(ListT rowData); Widget asWidget(); } Then let the presenter implement ContactsView.PresenterContact. However some do the following: public class ContactsPresenter implements Presenter { public interface Display { HasClickHandlers getAddButton(); HasClickHandlers getDeleteButton(); HasClickHandlers getList(); void setData(ListString data); int getClickedRow(ClickEvent event); ListInteger getSelectedRows(); Widget asWidget(); } //. } Then let the view implement the ContactsPresenter.Display. Are there any good points for doing either methods, maybe one is better suited for UiBinder? See https://developers.google.com/web-toolkit/articles/mvp-architecture vs. https://developers.google.com/web-toolkit/articles/mvp-architecture-2 See also http://www.google.com/events/io/2010/sessions/gwt-continuous-build-testing.html In brief: the former makes it way easier to mock the view to unit-test your presenter. And if you don't put getters in your view, the source of truth will be your presenter, and your view will only be considered a… view, of the same data. 2- Another question, is the view not suppose to directly communicate with the model at all. For instance, if I've got a ListBox that should be populated from an Enum class that sits in the model, should that be done through the presenter? I don't think any purist would tell you your view shouldn't *know* about the model. What you should not do is a) pull data from the view, b) update the model from the view, or c) listen to model changes in the view; everything should go through the presenter: it holds data *to* the view, the view asks the presenter to modify the model, and the presenter possibly observes model changes and reflects them in the view. -- 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/-/O6VEBPBh3XEJ. To post to 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.
Elegant handling of user experience when new GWT application is deployed.
Is there an elegant solution to handle when a new release is deployed while you are in the GWT app? E.g. we want the application to notice a new version of itself and automatically do a full page refresh? Ideas? -- 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/-/yKvYd8guTZwJ. To post to 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: Elegant handling of user experience when new GWT application is deployed.
On Tuesday, January 8, 2013 6:16:54 PM UTC+1, DrG wrote: Is there an elegant solution to handle when a new release is deployed while you are in the GWT app? E.g. we want the application to notice a new version of itself and automatically do a full page refresh? Ideas? The way Google apps (Groups and Reader at least, and I believe GMail too) work is they detect the new version the next time they talk to the server (IncompatibleRemoteServiceException for GWT-RPC for instance, which is used here in Groups, or other means) and display a notification in the app containing a reload link. Wrt UX, I would consider automatically reloading the app a bad practice. It could be done in browsers that let you detect when the app is in the background, but you'd still have to be sure that I don't have any unsaved data and for best UX restore the exact same screen: same scrolling position, same open/closed items, same focused widget and element in list, etc. In the end, just let the user reload, it way much easier and he knows there'll be side effects. -- 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/-/opRGpmIAa20J. To post to 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 and Adsense
Hi All, Has anyone found the way to integrate the Google AdSense code into the Java GWT code? Thanks, JC -- 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/-/n0ByID7BnxgJ. To post to 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: Elegant handling of user experience when new GWT application is deployed.
On Tuesday, January 8, 2013 12:16:54 PM UTC-5, DrG wrote: Is there an elegant solution to handle when a new release is deployed while you are in the GWT app? E.g. we want the application to notice a new version of itself and automatically do a full page refresh? Ideas? In the project I am working on: If new version is detected, store the state of the application locally in browser as cookies before refreshing the page. When the page is refreshed, read the cookies and restore the state of the application, and then delete those cookies. -- 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/-/1g1bI1BxwUwJ. To post to 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: Elegant handling of user experience when new GWT application is deployed.
Is there an elegant solution to handle when a new release is deployed while you are in the GWT app? I thought through some of this awhile ago: http://draconianoverlord.com/2010/07/07/gwt-seamless-upgrades.html IncompatibleRemoteServiceException for GWT-RPC for instance, which is used here in Groups, or other means) Interesting. It looks like Groups doesn't use type name elision? I see some FQCNs like java.util.List, but not as many FQCNs as in our non-type-name-elided messages. Makes me wonder if Google shares serialization policy files cross builds? This seemed kinda tricky to setup in an intelligent way (would want to ignore CI/non-production serilalization files, wouldn't want to keep them forever, etc.), so currently I don't share policy files across builds. Which means I can't use type name elision (well, without more forced refreshes, vs. when-they-feel-like-it refreshes). - Stephen -- 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 preserve session state with a canvas?
Thanks I think local store will fit best 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-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.
Firefox 18 GWT plugin
It looks like the Google dev team has already started working on the GWT plugin for Firefox 18 (which was released today). GWT Bug: https://code.google.com/p/google-web-toolkit/issues/detail?id=7877 Firefox release notes: http://www.mozilla.org/en-US/firefox/18.0/releasenotes/ -- 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/-/5-Gn9zCSi80J. To post to 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: Code Splitting Simple Example Still getting Thrown into Left Overs
If you don't mind me asking, - Do you link Activities directly to specific places: ActivityP extends Place ? - Somewhat related, do you set an actual place (constructor/setter) or just a particular param (DTO/other object/variable)? Yes I do. Its like interface CustomActivity extends ActivityP extends Place { void setPlace(P place); } Along with an abstract CustomActivityBase class that implements this interface and adds some protected isActive logic: the activity is considered inactive if cancel/stop is called so that any RPC call and its onSuccess() code will be disabled in the activities start() method (user navigates away before RPC returns): onSuccess(..) { if(isActive()) { ...//proceed } } - Do you have a lot of ActivityWithPlaceProxy boiler plate? Its more or less the usual if-construct to instantiate the correct activity for a given place in the ActivityMapper. There is a bit additional code because of the complete mappers I code split (see below). - Do you show any loading on the ActivityWithPlaceProxy.start() prior to the actual start of the desired activity? Not yet. Depending on how you want to notify your users you could: 1.) Implement a custom AcceptsOneWidget/SimplePanel/SimpleLayoutPanel that shows a loading text/icon in the display area when no child widget is set (on construction and on setWidget(null)). 2.) Fire a custom event on the event bus and let a global notification mechanism listen for it. - I Assume by proxy complete mappers you mean: build a proxy mapper delivered via AsyncProvider which will pull all activities in that mapper at once?? Its a normal ActivityMapper having Gin ProviderConcreteActivity as fields and the usual dispatch code in getActivity(Place). You then have a slightly different implementation of your AsyncActivityWithPlaceProxy that does not use an AsyncProviderCustomActivity but an AsyncProviderActivityMapper and loads the mapper in the proxy's start() method. When the mapper is loaded you get the correct Activity from the mapper using the place that has been set to the proxy through the ActivityMapper that is assigned to the ActivityManager and finally start the activity. Obviously the ActivityMapper assigned to the ActivityManager has to catch all possible places for that async mapper hidden in the activity proxy: getActivity(Place place) { if(place instanceof ConcretePlace1 || place instanceof ConcretePlace2 || ...) { AsyncActivityWithPlaceAndMapperProxy activity = //... activity.setPlace(place) // the internal mapper will dispatch the place to the correct activity. } } You could mitigate that by introducing a common super class (or marker interface) for places that are handled by the same async ActivityMapper. - It would appear there is a situation when using activities provided via RunAsync that the default ActivityMapper behavior is not desired: --- In non-RunAsync, if a new Activity starts AND sets the display widget/panel prior to the activity which preceded it (user navigates before current activity can set display), clear/kill current activity and proceed with next However, this is not the same when RunAsync is involved as Activity A can be called and downloaded. Prior to A being downloaded, Activity B is started and downloads or loads faster than A So A will set the display panel AFTER Activity B - The default ActivityManager will give control to A and kill of B even though we probably want to give B the control and display since A took longer loading and setting the display... I am not sure if my logic fits reality, but I have extended Saeed's asyncMapper/Manager example to use the Place to determine what activity gets control (That last place fired gets control. So if an activity loads but is linked - pass the Place as params through the async calls - to a different place, kill it) The activity that is active is your AsyncActivityProxy. The start() method (maybe) does an async RPC call like most ordinary Activities probably also do to load some data. So your AsyncActivityProxy should also have the same isActive logic like an ordinary activity. So in onSuccess() of GWT.runAsync() you do: if(isActive()) { //false if cancel/stop has been called on the proxy while activity is downloaded activity.setPlace(place); activity.start(panel, eventbus); } Only the activity that is currently active in the ActivityManager will win because the previous one will not proceed if the download completes to late (isActive() is false). Am I missing something? Speaking in menu items I use the async ActivityMapper to generate a single split point that contains all the sub menu items of a single main menu item. As soon as an Activity for a given sub menu item gets too large I remove it from the async ActivityMapper and code split it separately. Feel free to ask more :-) -- J. -- You received this
opera deserialization problem
Hi, I've got an interesting problem I can reproduce only in opera browser (12.12). Chrome, Firefox, IE looks ok. On rpc call (pretty much any RPC call with custom classes or collections) I see the following exception on client side: https://lh4.googleusercontent.com/-EdzZSzDwYfs/UOwOwXXCYGI/Amw/ehJv4lcO0xo/s1600/rpc-error.jpg I'm running gwt 2.5 and smartgwt 3.1 (don't think smartgwt is anyhow involved though). Behaviour was exactly the same on gwt 2.4. Simplified class looks like this - sorry for bad formatting: public class UserSessionInfo implements IsSerializable { private String userName; private PlannerRole role = PlannerRole.ADMINISTRATOR; public PlannerRole getRole() { return role; } public void setRole(PlannerRole role) { this.role = role; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public boolean hasAdminRole(){ return false; } Where PlannerRole is enum: public enum PlannerRole implements IsSerializable { ADMINISTRATOR, OPERATOR, USER; } -- 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/-/KD6gzwM2ArcJ. To post to 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.
IntelliJ IDEA and the The RequestFactory ValidationTool must be run issue. Any help appreciated!
Just wondering if anyone else is getting this issue or has run into this issue (re: The RequestFactory ValidationTool must be run) while using IntelliJ IDEA (ver 12, ultimate). We are currently exploring moving from Eclipse to IntelliJ and this is our last stumbling block. Run Configuration: https://lh6.googleusercontent.com/-hyN3dWmrMvE/UOw4q3G6k8I/ALc/IpYJ0a-WTZ4/s1600/Capture1.PNG Artifiact Settings in Module Config https://lh5.googleusercontent.com/-WUxFluViwyA/UOw5Eq0CihI/ALk/IVlrtIZ2MhY/s1600/Capture2.PNG Annotation Processor settings: https://lh4.googleusercontent.com/-1m6mgsS8e94/UOw5jokBb6I/ALs/mQKGAyY17lg/s1600/Capture3.PNG Let me know if there are any specific config items you wish to see that aren't included above... We've been stuck on this for a couple days now. PS: Please don't ask WHY the move from Eclipse to IDEA, we can have that discussion in another forum. -- 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/-/sU9EeiTkxQ0J. To post to 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 on Websphere
Hello, I'm developing an application GWT on Websphere 7 and I'm using the GWT SDK version 2.4 and jdk 1.6_23. To make asynchronous calls would use requestfactory but I am having problems at the time the call is made. In particular, I get the following error: Error 404: javax.servlet.UnavailableException: SRVE0203E: Servlet [requestFactoryServlet]: com.google.web.bindery.requestfactory.server.RequestFactoryServlet was found, but is missing another required class. SRVE0206E: This error implies, in general, that the servlet was originally compiled with classes that the server is able to identify. SRVE0187E: Check your classpath and make sure that you have all the required classes from servlet.SRVE0210I: The problem can be solved by recompiling the servlet using only the classes in the classpath runtime application SRVE0234I: Application Classpath = [C: \ Program files (x86) \ IBM \ SDP \ runtimes \ base_v7 \ java \ lib; How can I know where is the problem?! thanks Andrea -- 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/-/k6HykKy3w0UJ. To post to 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: DataGrid on a hidden tab
Same issue here using gwt 2.4 Dňa nedeľa, 21. augusta 2011 22:13:02 UTC+2 P.G.Taboada napísal(-a): Am I the only one with the problem? I have 2 or more tabs, on each tab a data grid. only the one initially visible gets rendered, all the other stay hidden, not visible, not rendered, whatever even after the tab gets selected.# brgds, Papick On 15 Aug., 12:39, P.G.Taboada pgtabo...@googlemail.com wrote: Well, not really, as I am not using lazy panels. But that is not the point: the should get rendered once the tab gets selected. To work around it, I did add the grid to a split panel in the tab. Now I have to move the slider to make the grid appear. Ok, it is not a workaround. ;) Btw, split panels don't do whell on an iPad... ;) On Aug 15, 12:26 pm, J.Ganesan j.gane...@datastoregwt.com wrote: Is this not the expected behaviour of TabLayouPanel, the content of a hidden tab should not be rendered ? J.Ganesanwww.DataStoreGwt.com On Aug 15, 3:32 am, P.G.Taboada pgtabo...@googlemail.com wrote: Hi, I am using a DataGrid on a TabLayouPanel. As long as the the DataGrid is on the viewable tab it gets rendered. As soon as it is on the hidden tab it does not. What am I doing wrong? brgds, Papick -- 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/-/QCz2oUwBKakJ. To post to 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: Using EMF Model in GWT Client Side
Hi Soeren Did you find a solution to this issue? Thanks On Thursday, March 8, 2012 8:12:58 AM UTC+1, Soeren B wrote: Hi, I'm currently working with EMF and GWT. I created my own EMF Model and generated the model code (Runtime Platform: GWT is set). This Project got exported as JAR File and imported into my GWT Project. The Building Path configuration was made. Now I am trying to use this model on server- and client-side of my GWT Application. Therefore I included into my .gwt.xml file the following inherit: inherits name='deploymentdesignmodel.Deploymentdesignmodel'/ This file got generated by my EMF Model generation. In this file, there is a reference to the following: inherits name=org.eclipse.emf.ecore.Ecore / But the problem is, this file does not exist and was not generated by emf. So I am getting the following error message by running my application: Loading inherited module 'org.eclipse.emf.ecore.Ecore' - [ERROR] Unable to find 'org/eclipse/emf/ecore/Ecore.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? Did anyone of you already us an own emf model on client-side in gwt? How did you solve this issue? Did you have any emf library which us useable for gwt on client side?` Thanks in advance! -- 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/-/NnQyEzNGk_kJ. To post to 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 does GWT implement Runnable?
Hi, I've searched the group and I can't seem to find an explanation. I'm porting a pure Swing app to GWT and I need to know how GWT implements Runnable. Thanks, Charles Nelson -- 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/-/6d-45cqT-agJ. To post to 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: XMLHttpRequest getResponse instead of getResponseText to get arraybuffer data
Sorry for resurrecting dead post, but every time I'm looking how to implement something gwt'ish I find your answer Thomas, and it always helpful! Thank you. On Monday, June 4, 2012 3:59:35 PM UTC+2, Thomas Broyer wrote: On Monday, June 4, 2012 2:53:28 PM UTC+2, Magallo wrote: Hi, I tried to use your solution. Looking at Google I/O on youtube ( http://www.youtube.com/watch?v=NNmoEOpGJdk) I saw this but I wasn't able to do it. I tried creating this: public class BinaryXMLHttpRequest extends XMLHttpRequest { public native JavaScriptObject getResponse() /*- { return this.response; } -*/; //Set to arraybuffer or blob for binary response public native void setResponseType(String value) /*- { this.responseType = value; } -*/; } then I used this class this way: BinaryXMLHttpRequest binxhr = (BinaryXMLHttpRequest)BinaryXMLHttpRequest.create(); binxhr.open(GET, myservlet_url); binxhr.setResponseType(arraybuffer); binxhr.setOnReadyStateChange(new ReadyStateChangeHandler() { @Override public void onReadyStateChange(XMLHttpRequest xhr) { BinaryXMLHttpRequest binxhr = (BinaryXMLHttpRequest)xhr; if( binxhr.getReadyState() == XMLHttpRequest.DONE ) { binxhr.clearOnReadyStateChange(); binxhr.getResponse(); = what can I do with this? } } }); If you look, at the end I have a binxhr.getResponse(); But this function returna a JavaScriptObject type. What can I do now with this? This is not a byte[] or whatever, so, I don't know in GWT how to manipulate it. Do you have an idea? It will be an ArrayBuffer, so you'd have to build a JSO overlay type representing ArrayBuffer and cast() the JSO to your ArrayBuffer. But honestly, it'd be easier to compile GWT from trunk and use the API that's already in there. When 2.5 will be out the doors, simply replace your home-built pre-2.5 GWT with the official 2.5. -- 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/-/D1twPUQTxEMJ. To post to 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 integrate Jsoup in GWT
Can you tell me how to implement the jSoup on the server-side? That is, what to do with jSoup jar file downloaded from the official site so that I can use it in the server side script to scrape web pages? On Saturday, January 5, 2013 12:06:40 AM UTC+5:30, Andy King wrote: It appears that Jsoup may be intended for use on the server-side of the application, and yet you are using it on the client side. If you want to use it in the client then you'll have to make the source code available to the GWT compiler, and the source is in the jsoup-1.7.1-sources.jarhttp://jsoup.org/packages/jsoup-1.7.1-sources.jar file. Are you sure you want to execute the Jsoup routines from the client? I would probably run Jsoup on the server and communicate with it from the client using GWT RPC. On Friday, January 4, 2013 4:20:51 AM UTC-7, Kaustav Mukherjee wrote: I am trying to develop a simple app with *Jsoup*. For that, I have replaced the default code in the *StockWatcher.java* file from GWT with my code, which requires *Jsoup*. I have downloaded the *Jsoup* *jar*file from http://jsoup.org/download (the first link), and placed it in the * StockWatcher/war/WEB-INF/lib* folder. After this, the *Jsoup* classes are imported into the class all right (there is no red colored cross sign on those import lines), but while trying to run the app, I am getting an error as shown in the figure. Can anyone give me a step by step help on what to do now? I am new to GWT. -- 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/-/HTqRaJy7ssIJ. To post to 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: adding scroll panel to popup panel
It's fairly simple. Do as expected. Put a ScrollPanel inside a popup. Set the width and height of the ScrollPanel to that of the Popup width and height. Put something (another panel) in the ScrollPanel and set its width and height independently. Here is an example with an HTMLPanel inside ScrollPanel. Done with uibinder. *Main:* public class Tpopscroll implements EntryPoint { interface Binder extends UiBinderWidget, Tpopscroll { } private static final Binder binder = GWT.create( Binder.class ); @UiField SimplePanel mainPanel; @UiField Button button; /** * This is the entry point method. */ public void onModuleLoad() { binder.createAndBindUi( this ); RootLayoutPanel.get().add( mainPanel ); } @UiHandler(button) void onButtonClick( ClickEvent event ) { ThePopup popup = new ThePopup(); popup.show(); } } *Main's uibinder:* ?xml version=1.0 encoding=UTF-8? !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' g:SimplePanel ui:field=mainPanel g:Button ui:field=buttonHey/g:Button /g:SimplePanel /ui:UiBinder *A popup class:* public class ThePopup extends PopupPanel { private static final Binder binder = GWT.create( Binder.class ); @UiField ScrollPanel scrollPanel; @UiField HTMLPanel htmlPanel; interface Binder extends UiBinderWidget, ThePopup { } public ThePopup() { super( true ); setWidget( binder.createAndBindUi( this ) ); HTML html = new HTML(); html.setHTML( s ); htmlPanel.add( html ); } static String s = Here is somebr/HTML in an HTML Panel.br/br/ + This hypertext markup sample can get very wide...so wide that it extends outside the viewable area.; } *Popup uibinder:* ?xml version=1.0 encoding=UTF-8? !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' g:ScrollPanel ui:field=scrollPanel width=450px height=300px g:HTMLPanel width=600px height=400px ui:field=htmlPanel/ /g:ScrollPanel /ui:UiBinder On Monday, January 7, 2013 10:09:08 PM UTC-8, sreenivas wrote: Hi, I have a popup panel which opens on a button click event. Popup panel height should be fixed and if contents of popup panel exceeds the height of popup panel, then a vertical scroll bar needs to be attached to it, and i should be able to scroll it to see the contents. How to achieve this? Can any body please help? Thanks, Sreenivas -- 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/-/jqmbRILxANIJ. To post to 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.