Re: How to define AutoBeanFactory?
Have you read http://code.google.com/p/google-web-toolkit/wiki/AutoBean ? I think this can help to get you started. On Thursday, October 18, 2012 10:46:32 PM UTC+2, dhoffer wrote: I'm trying to figure out how to use AutoBeanFactory to decode a JSONString, e.g. AutoBeanIPayload autoBean = AutoBeanCodex.decode(myAutoBeanFactory, IPayload.class, jsonValue.stringValue()); IPayload payload = autoBean.as(); What I'm not clear on is how to define myAutoBeanFactory? I understand that's an interface passed to GWT.create(MyAutoBeanFactory.class), but what methods does MyAutoBeanFactory need? My IPayload and its content is defined as: public interface IPayload extends Serializable { IGWTMessage[] getMessages(); void setMessages(IGWTMessage[] messages); } public interface IGWTMessage extends IGWTMessage { IUUIDReference getMessageId(); void setMessageId(IUUIDReference id); } Then there are about a dozen derived interfaces that extend IGWTMessage and then each of those has its concrete implementation class. How can I handle this with AutoBeanFactory/JSON? Btw, this used to be just Serialized and marshaled that way but now I'm trying to use a different approach that requires JSON. Also, if there was a way to just do a regular Java binary serialization that would be fine too as I could then turn that into a Base64 encoded string and send just that via JSON...then do the reverse on the server. (But I haven't yet seen a way to do Java binary serialization in the GWT client.) Thanks, -Dave -- 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/-/pc_zKSdHe9YJ. 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: CellTable tab not working after change event
I am facing same problem, did u find any solution for this issue? On Monday, 12 December 2011 21:43:58 UTC+5:30, sean tunlaw wrote: From the CellTableExample in the API: http://google-web-toolkit.googlecode.com/svn/javadoc/latest/index.html?overview-summary.html I customized it slightly to implement tab order. However, tabbing does not work because table.redraw in nameColumn.setFieldUpdater steals focus away. If I don't edit the field and just click on the TextInputCell, tabbing works. If i comment out the table.redraw, tabbing works after I have edited a field but my other fields don't update. After editing a field , a change event is fired in onBrowser method. This eventually calls finishediting which then calls the update method in the column.fieldUpdater. In the update method is where the table.redraw is located I have also tried keeping my list of objects in the ListDataProvider and calling ListDataProvider.refresh but I have the same issue. Question) How can I implement tab order and allow tabbing after editing but still be able to refresh the Celltable grid. I need to redraw/ refresh the grid because after tabbing I need to update data in the other columns. The customization that i needed to do was : 1) Extend TextInputCell and override render methods so that I can set a tabindex by customizing template.input (see below code) 2) In CellTableExample, I disabled KeyboardSelectionPolicy table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED); == inheriting TextInputCell === public class EditableTextCell extends TextInputCell { private static final Logger logger = Logger.getLogger(EditableTextCell.class.getName()); private SimpleTemplate template; protected SafeHtmlRendererString renderer; private boolean inline; interface SimpleTemplate extends SafeHtmlTemplates { @Template(input value=\{0}\ tabindex=\{1}\/ input) SafeHtml input( String value,int tabindex); } public EditableTextCell(EventBus eventBus, SafeHtmlRendererString renderer, boolean inline) { super(renderer); this.renderer = renderer; template = GWT.create(SimpleTemplate.class); } public EditableTextCell() { } @Override public void render(Context context, String value, SafeHtmlBuilder sb) { Contact key = (Contact) context .getKey(); String name = key.getName(); // Get the view data. ViewData viewData = getViewData(key); if (viewData != null viewData.getCurrentValue().equals(value)) { clearViewData(key); viewData = null; } String s = (viewData != null) ? viewData.getCurrentValue() : value; if (s != null ) { String style = ; SafeHtml html = renderer.render(s); // Note: template will not treat SafeHtml specially sb.append(template.input( html.asString(), key.getId() )); } else { sb.appendHtmlConstant(input type=\text\ tabindex=\-1\/ input); } } @Override public void onBrowserEvent(Context context, Element parent, String value, NativeEvent event, ValueUpdaterString valueUpdater){ String eventType = event.getType(); logger.fine(onBrowserEvent...+ eventType); super.onBrowserEvent(context,parent, value, event, valueUpdater); } -- 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/-/3HIRLkZ6T_sJ. 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: CellTable tab not working after change event
I have implemented same things and I am facing same problem. Did you find any solution for it yet? Tab is working fine in celltable, but when I am changing any value in EditableTextCell and then press tab, it will start from first cell. Thanks in Advance On Monday, 12 December 2011 21:43:58 UTC+5:30, sean tunlaw wrote: From the CellTableExample in the API: http://google-web-toolkit.googlecode.com/svn/javadoc/latest/index.html?overview-summary.html I customized it slightly to implement tab order. However, tabbing does not work because table.redraw in nameColumn.setFieldUpdater steals focus away. If I don't edit the field and just click on the TextInputCell, tabbing works. If i comment out the table.redraw, tabbing works after I have edited a field but my other fields don't update. After editing a field , a change event is fired in onBrowser method. This eventually calls finishediting which then calls the update method in the column.fieldUpdater. In the update method is where the table.redraw is located I have also tried keeping my list of objects in the ListDataProvider and calling ListDataProvider.refresh but I have the same issue. Question) How can I implement tab order and allow tabbing after editing but still be able to refresh the Celltable grid. I need to redraw/ refresh the grid because after tabbing I need to update data in the other columns. The customization that i needed to do was : 1) Extend TextInputCell and override render methods so that I can set a tabindex by customizing template.input (see below code) 2) In CellTableExample, I disabled KeyboardSelectionPolicy table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED); == inheriting TextInputCell === public class EditableTextCell extends TextInputCell { private static final Logger logger = Logger.getLogger(EditableTextCell.class.getName()); private SimpleTemplate template; protected SafeHtmlRendererString renderer; private boolean inline; interface SimpleTemplate extends SafeHtmlTemplates { @Template(input value=\{0}\ tabindex=\{1}\/ input) SafeHtml input( String value,int tabindex); } public EditableTextCell(EventBus eventBus, SafeHtmlRendererString renderer, boolean inline) { super(renderer); this.renderer = renderer; template = GWT.create(SimpleTemplate.class); } public EditableTextCell() { } @Override public void render(Context context, String value, SafeHtmlBuilder sb) { Contact key = (Contact) context .getKey(); String name = key.getName(); // Get the view data. ViewData viewData = getViewData(key); if (viewData != null viewData.getCurrentValue().equals(value)) { clearViewData(key); viewData = null; } String s = (viewData != null) ? viewData.getCurrentValue() : value; if (s != null ) { String style = ; SafeHtml html = renderer.render(s); // Note: template will not treat SafeHtml specially sb.append(template.input( html.asString(), key.getId() )); } else { sb.appendHtmlConstant(input type=\text\ tabindex=\-1\/ input); } } @Override public void onBrowserEvent(Context context, Element parent, String value, NativeEvent event, ValueUpdaterString valueUpdater){ String eventType = event.getType(); logger.fine(onBrowserEvent...+ eventType); super.onBrowserEvent(context,parent, value, event, valueUpdater); } -- 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/-/L3tBWZr7GB0J. 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: Polymorphic requestfactory example wanted
Maps are not supported yet ( http://code.google.com/p/google-web-toolkit/issues/detail?id=5524). Tough there is a patch under code review (https://codereview.appspot.com/6132056/) On Thursday, October 18, 2012 11:43:00 PM UTC+2, zam...@gmail.com wrote: Hi All, I need a requestfactory, which can transports a MapString, ? extends BaseObject objects. Is there any example to help me to understanding, how can I do it? thx Zamek -- 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/-/6pENpLKdB2AJ. 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: CellTable with AsyncDataProvider - load performance issue
I would debug it using Chrome Developer Tools. You can check the HTTP request and see where most of the time is spent. I guess there must be an issue with the backend. Do you also get the slowdowns in production mode? On Wednesday, October 17, 2012 1:16:53 PM UTC+2, Magnus wrote: Hello, I changed all the simple lists of my application into CellTables with an AsyncDataProvider. Before the change, I always loaded the whole list via RPC and also showed the whole list in the GUI. After the change, I always load a portion according to the page size and always show one page only. However, it sometimes lasts very long, up to 10 sec, to fetch the data. During this time the CellTable shows its loading animation. This does not happen most of the time, but when it happens it looks like a problem to the user. How can it be that fetching the whole list has a good constant performance, while fetching the small portions with AsyncDataProvider is that slow *sometimes*? See below how I create the AsyncDataProvider. Thanks Magnus - protected void createDataProvider () { pvd = new AsyncDataProviderT() { @Override protected void onRangeChanged(HasDataT display) { Range r = display.getVisibleRange(); int start = r.getStart() + 1; int end = start + r.getLength() - 1; onRangeChange (start,end); } }; } public void onRangeChange (int i0,int i1) { // load list and record count via RPC call } -- 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/-/cASy2mqw1tMJ. 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: Polymorphic requestfactory example wanted
Maps are currently not supported as of http://code.google.com/p/google-web-toolkit/issues/detail?id=5524 a patch has been submitted but apparently it is blocked by http://code.google.com/p/google-web-toolkit/issues/detail?id=5974 so I guess you have to review your transportable type (maybe using a bean wrapper with 'string key' + 'BaseObject value' as suggested in the first issue). When in doubt check the issue list and poke around tests in the gwt suite. For instance: http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/test/com/google/web/bindery/requestfactory/gwt/client/RequestFactoryPolymorphicTest.java On Thursday, October 18, 2012 11:43:00 PM UTC+2, zam...@gmail.com wrote: Hi All, I need a requestfactory, which can transports a MapString, ? extends BaseObject objects. Is there any example to help me to understanding, how can I do it? thx Zamek -- 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/-/X4x5MW3DA0sJ. 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.
JavaEE anottation in a POJO and compile dose pojo to JS objects
HI all, I have one question: I like to use JPA EJB(actually its already done) backend and now to create a JS UI with gwt. The problem comes when I want to use the domain pojo-s as a dto-s for the RPC because of the javax.persistance.* annottaions in the pojo-s, the compiler asks for the source code when compailing to JS objects. What would be the best solution to this? 1. I can create a new plain pojos from the old jpa domain pojos with exactly the same fields. Will alwasy work, but this looks like a overwork for noting, also in the project Ill send a list of 5-6000 pojos to the frontend, so Ill lose a O(n) time to recriate the new DTO-s. 2. If try to include the source code for javax.persistance.* will this work? Has someone tried this? I think most of them are having RETENTION=RUNTIME so the compiler shoud totaly dont care about them..but.. Any idea or expiriance on this? Tnx, Blaze -- 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/-/NaQAaEJZamsJ. 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: TextInputCell: Tab not working properly in IE9
Thanks for Reply, Yes, I have already applied this to table, but still tabbing is not working as expected, Earlier problem which I am facing it is solved by removing tab index property from input tag. This is working properly in all the browser. Now I am facing a problem like if I do any update in NTGridEditTextCell and then press the tab, it will set a focus to first row and first column instead of next element of updated cell. On Monday, 15 October 2012 21:52:06 UTC+5:30, Andrei wrote: Try setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED) -- 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/-/DdyvzvhGN1cJ. 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: Issue with TabLayoutPanel in 2.5.0 RC1 RC2
Looks like it's a regression in 2.5. See http://code.google.com/p/google-web-toolkit/issues/detail?id=7740 On Tuesday, October 16, 2012 6:04:43 PM UTC+2, manoj kumar wrote: We have code that uses TabLayoutPanel in UIBinders and selects the tab programatically. This code was working fine in 2.3, but we are getting Exceptions since 2.5.0 RC1 ( RC2). Has anybody seen this before or solved this. Caused by: java.lang.AssertionError: Index out of bounds at com.google.gwt.user.client.ui.TabLayoutPanel.checkIndex(TabLayoutPanel.java:720) at com.google.gwt.user.client.ui.TabLayoutPanel.selectTab(TabLayoutPanel.java:597) at com.google.gwt.user.client.ui.TabLayoutPanel.selectTab(TabLayoutPanel.java:587) The following is the code. UIBinder.ui.xml: gwt:TabLayoutPanel barHeight=10 barUnit=CM ui:field=tabPanel_ gwt:tab gwt:headerTab1 /gwt:header gwt:HTMLTab1 Contents/gwt:HTML /gwt:tab gwt:tab gwt:headerTab2 /gwt:header gwt:HTMLTab2 Contents/gwt:HTML /gwt:tab Following is the java code in the widget. public class TestPage { @UiField (provided = true) protected TabLayoutPanel tabPanel_; public TestPage() { tabPanel_ = new TabLayoutPanel(); } @Override public Widget render(MapString, String parameters) { tabPanel_.selectTab(0); } } -- 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/-/WIDLhWiCzM4J. 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: JavaEE anottation in a POJO and compile dose pojo to JS objects
Simply add the annotations to the classpath of GWT compiler and it should work. They won't compile to JS but the compiler needs them to load you client side classes. Also I guess you need everything on classpath that your annotations reference. The real issue you may have is that JPA providers enhance your server JPA pojos and that can break serialization (e.g. a java.util.List will become a jpa.provider.LazyList after enhancement and GWT does not know LazyList). -- 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/-/GwZRCcLHqK0J. 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: JavaEE anottation in a POJO and compile dose pojo to JS objects
Hi Jens, Thank for the replay first! My queston was more on the part dose this would be compiled if I add the source code for the anottation. For the Lazy classes this is normal. Ill have to use the real lists not the Lazy. But I dont think Ill transfare that big trees of objects. Ill give it a try...so will se what happens..:) B Am Freitag, 19. Oktober 2012 12:15:28 UTC+2 schrieb Jens: Simply add the annotations to the classpath of GWT compiler and it should work. They won't compile to JS but the compiler needs them to load you client side classes. Also I guess you need everything on classpath that your annotations reference. The real issue you may have is that JPA providers enhance your server JPA pojos and that can break serialization (e.g. a java.util.List will become a jpa.provider.LazyList after enhancement and GWT does not know LazyList). -- 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/-/b_Oo8PBrPrgJ. 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: chrome - prompting me to install gwt plugin but already installed
Yes there is Open chrome settings extentions drag and drop .crx file into there and it is installed! Op vrijdag 19 oktober 2012 02:11:21 UTC+2 schreef Guray Alsac het volgende: I started seeing this today as well. However, it seems with the new version of chrome you are not allowed to install extensions unless its through the chrome web store ( http://support.google.com/chrome_webstore/bin/answer.py?hl=enanswer=2664769p=crx_warning). But I couldn't find the plugin there! https://chrome.google.com/webstore/search/GWT?hl=en-US Is there another way to get the gwt-dev-plugin.crx to install? On Tuesday, September 18, 2012 8:10:58 PM UTC-7, otosaat wrote: Hi Xavier, I've also encountered the same problem. Would you please share if you have you figured out a solution? Thanks, Otosaat. On Friday, April 27, 2012 3:25:40 AM UTC-4, Xavophonic wrote: Hi, Here is my configuration Google Web Toolkit 2.0.4 on my server Jetty. Chrome version 18.0.1025.162 m Windows XP PS3. Google Web Toolkit Developer Plugin version 1.0.9738. After installed the plugin, I restart Chrome. I come back to my development page. I still have got the message : Development Mode requires the Google Web Toolkit Developer Plugin. I tried the former URLs to an old version of the plugin, but they are broken. Publishing the old version of the plugin in the extention gallery would be helpfull. Could someone help me ? Best regards, Xavier -- 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/-/YlD5JxwJwIgJ. 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.
Compile report
In my compile report I get a lot of packageX.ClassZ$1 packageX.ClassZ$2 packageX.ClassZ$3 etc... for some classes I can have up to 30 x the $number ending. If I add up it can make quite a large size of code for one class. I (google) checked but the only thing I found on these is code splitting, which I don't (yet) do. Can anybody explain what they are for? Thanks, Thomas -- 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: Compile report
These are Java's anonymous classes. Activities/Presenters typically have quite a few of them because of Callback implementations. class MyActivity { doStuff() { service.call(new AsyncCallback() { //implement }); } } will result in Activity$1 because of anonymous AsyncCallback implementation. -- 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/-/S_rqj1V9MUIJ. 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: Compile report
Makes perfect sense! Thanks for the quick reply. On Friday, 19 October 2012 13:46:21 UTC+2, Jens wrote: These are Java's anonymous classes. Activities/Presenters typically have quite a few of them because of Callback implementations. class MyActivity { doStuff() { service.call(new AsyncCallback() { //implement }); } } will result in Activity$1 because of anonymous AsyncCallback implementation. -- 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/-/1c7Zt7cu2ccJ. 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 make ValueBoxEditorDecorator error message positionate to the right?
Copy/paste (i.e. fork) ValueBoxEditorDecorator into your own project. See http://code.google.com/p/google-web-toolkit/issues/detail?id=5465 On Friday, October 19, 2012 12:24:52 AM UTC+2, vehdra music wrote: I would like to get [ text box ] Error message. But I am getting this: Error message [ text box ] This is my ui.xml: tr tdui:msg description=EmailEmail/ui:msg/td td e:ValueBoxEditorDecorator ui:field=email e:valuebox g:TextBox styleName={resources.style.editField}/ /e:valuebox /e:ValueBoxEditorDecorator /td /tr And this in my style: .editField { display: inline; width: fieldWidth; } .rightAlign { text-align: right; } And I've tried playing with CSS to make the error message positionate to the right of the text box, but I can't figure how can I do it. Is there any way to positionate the error message to the right of the text box? -- 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/-/cUxDopS-f6YJ. 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 define AutoBeanFactory?
I did find that but it doesn't explain much at all. Regarding the AutoBeanFactory it just says: interface MyFactory extends AutoBeanFactory { // Factory method for a simple AutoBean AutoBeanPerson person(); // Factory method for a non-simple type or to wrap an existing instance AutoBeanPerson person(Person toWrap); } There is no explanation of what person() is even in this overly simplified case. Am I to assume that person() refers to getPerson() and setPerson(Person) java bean methods on another object? If so, does AutoBeanFactory require strict java beans naming conventions? In my case I don't have Java beans, I just have a serailizable POJO with an interface. E.g. getMessages() returns an IGWTMessage. How can I configure AutoBeanFactory to handle this? -Dave On Fri, Oct 19, 2012 at 2:40 AM, Andrea Boscolo andrew...@gmail.com wrote: Have you read http://code.google.com/p/google-web-toolkit/wiki/AutoBean ? I think this can help to get you started. On Thursday, October 18, 2012 10:46:32 PM UTC+2, dhoffer wrote: I'm trying to figure out how to use AutoBeanFactory to decode a JSONString, e.g. AutoBeanIPayload autoBean = AutoBeanCodex.decode(myAutoBeanFactory, IPayload.class, jsonValue.stringValue()); IPayload payload = autoBean.as(); What I'm not clear on is how to define myAutoBeanFactory? I understand that's an interface passed to GWT.create(MyAutoBeanFactory.class), but what methods does MyAutoBeanFactory need? My IPayload and its content is defined as: public interface IPayload extends Serializable { IGWTMessage[] getMessages(); void setMessages(IGWTMessage[] messages); } public interface IGWTMessage extends IGWTMessage { IUUIDReference getMessageId(); void setMessageId(IUUIDReference id); } Then there are about a dozen derived interfaces that extend IGWTMessage and then each of those has its concrete implementation class. How can I handle this with AutoBeanFactory/JSON? Btw, this used to be just Serialized and marshaled that way but now I'm trying to use a different approach that requires JSON. Also, if there was a way to just do a regular Java binary serialization that would be fine too as I could then turn that into a Base64 encoded string and send just that via JSON...then do the reverse on the server. (But I haven't yet seen a way to do Java binary serialization in the GWT client.) Thanks, -Dave -- 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/-/pc_zKSdHe9YJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to define AutoBeanFactory?
On Friday, October 19, 2012 3:42:35 PM UTC+2, dhoffer wrote: I did find that but it doesn't explain much at all. Regarding the AutoBeanFactory it just says: interface MyFactory extends AutoBeanFactory { // Factory method for a simple AutoBean AutoBeanPerson person(); // Factory method for a non-simple type or to wrap an existing instance AutoBeanPerson person(Person toWrap); } There is no explanation of what person() is even in this overly simplified case. Am I to assume that person() refers to getPerson() and setPerson(Person) java bean methods on another object? Not at all. It's a factory method for an AutoBeanPerson, the implementation will be generated by the call to GWT.create() or AutoBeanFactorySource.create(). Person itself is an interface with property accessors (getters and setters). Yet again, the implementation of that interface will be generated; when you generate the AutoBeanFactory that has a method referencing it (when creating the AutoBeanFactory above, it needs an implementation of Person, so it'll generate it at the same time as the implementation of the AutoBeanFactory). Actually, you don't have to actually call those factory methods, they can be there only so that the AutoBeanFactory *knows* the interface to be treated as an AutoBean, so that it'll generate an implementation for it and you'll be able to deserialize it from JSON. If so, does AutoBeanFactory require strict java beans naming conventions? In my case I don't have Java beans, I just have a serailizable POJO with an interface. E.g. getMessages() returns an IGWTMessage. How can I configure AutoBeanFactory to handle this? interface MyAutoBeanFactory extends AutoBeanFactory { AutoBeanIPayload payload(); } But in your case that won't work: AutoBeans don't support arrays (IGWTMessage[]), only lists, sets and maps (e.g. ListIGWTMessage) -- 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/-/JZKJikktXlIJ. 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 define AutoBeanFactory?
Thanks that really helps. Is just defining the top level interface enough, e.g. interface MyAutoBeanFactory extends AutoBeanFactory { AutoBeanIPayload payload(); } Or would I need to include factory methods for all nested interfaces contained/referenced by IPayload? E.g. interface MyAutoBeanFactory extends AutoBeanFactory { AutoBeanIPayload payload(); AutoBeanIGWTMessage message(); AutoBeanIGWTInitializationMessage initializationMessage(); AutoBeanIGWTViewInstruction viewInstruction(); AutoBeanIGWTViewReference viewReference(); AutoBeanIGWTViewInstructionParameter viewInstructionParameter(); AutoBeanIGWTViewInstructionResult viewInstructionResult(); } Regarding AutoBeans not supporting arrays, if I can get it to support my data structure types, I can convert the logic to use a List instead of the array. Thanks, -Dave On Thursday, October 18, 2012 2:46:32 PM UTC-6, dhoffer wrote: I'm trying to figure out how to use AutoBeanFactory to decode a JSONString, e.g. AutoBeanIPayload autoBean = AutoBeanCodex.decode(myAutoBeanFactory, IPayload.class, jsonValue.stringValue()); IPayload payload = autoBean.as(); What I'm not clear on is how to define myAutoBeanFactory? I understand that's an interface passed to GWT.create(MyAutoBeanFactory.class), but what methods does MyAutoBeanFactory need? My IPayload and its content is defined as: public interface IPayload extends Serializable { IGWTMessage[] getMessages(); void setMessages(IGWTMessage[] messages); } public interface IGWTMessage extends IGWTMessage { IUUIDReference getMessageId(); void setMessageId(IUUIDReference id); } Then there are about a dozen derived interfaces that extend IGWTMessage and then each of those has its concrete implementation class. How can I handle this with AutoBeanFactory/JSON? Btw, this used to be just Serialized and marshaled that way but now I'm trying to use a different approach that requires JSON. Also, if there was a way to just do a regular Java binary serialization that would be fine too as I could then turn that into a Base64 encoded string and send just that via JSON...then do the reverse on the server. (But I haven't yet seen a way to do Java binary serialization in the GWT client.) Thanks, -Dave -- 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/-/8_NSood-2GAJ. 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: SuperDevoMode and Source Maps
Hi there Adolfo! Did you find a solution to this problem? I seem to have encountered a similar issue.. However I am developing on a Mac OSX (lion) Best regards! Smithimage On Wednesday, August 8, 2012 9:42:57 AM UTC+2, apanizo wrote: Hi all, I am trying to user SuperDevMode with SourceMaps but I think I am doing something wrong. I succeeded running the code server as a Java process (I have the bookmarks Dev mode on and Dev mode off in my browser's tab), also I have running the app without problems and even if I make click on Dev mode on tab, the app's compilation works perfect. But it's impossible for me find the .java files in the Developer Tools's Scripts. In the classpath's tab I've added the src folder of my app (when I created the Java app in order to serve to the browser the non optimized JS). Further info: If I go to localhost:9087/myApp, I can see the nomal files that you obtain when you compile the app (many files XXX.gwt.rpc and the common myapp.noche.js, myap.devmode.js), and this files also appear in the Developer Tools's Scripts instead of the .java files. So, what I am missing? Thank you in advance. Adolfo. -- El precio es lo que pagas. El valor es lo que recibes. Warren Buffet -- 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/-/D5V1Ej_C0ugJ. 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 define AutoBeanFactory?
On Friday, October 19, 2012 4:20:58 PM UTC+2, dhoffer wrote: Thanks that really helps. Is just defining the top level interface enough, e.g. interface MyAutoBeanFactory extends AutoBeanFactory { AutoBeanIPayload payload(); } Or would I need to include factory methods for all nested interfaces contained/referenced by IPayload? AutoBeans cannot decode a IPayload if it doesn't know how to decode a IGWTMessage, so obviously dependencies are resolved transitively, and it's enough to just reference IPayload here. -- 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/-/c6WFdJ4odH0J. 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 BasicPlace still available?
Yeah, I was confused by this unclear doc too. Maybe this sentence in docs should be slightly changed not to confuse users anymore? -- 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/-/Shdpt8dpysEJ. 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 unit test Canvas getCoordinateSpaceWidth()
public class CanvasTest extends GWTTestCase { public String getModuleName() { return com.MyModule } public void testCanvas() { Canvas c = Canvas.createIfSupported(); c.setCoordinateSpaceWidth(199); c.setCoordinateSpaceHeight(199); int value = c.getCoordinateSpaceWidth(); //FAILED } } gwt unit test failed while getting canvas coordinatespacewidth also, public class AsyncRequestTest extends GWTTestCase { public String getModuleName() { return com.MyModule } public void testAsyncRequest() { request(http://localhost:8080/myservice;); //FAILIED } public static native String request(String url) { var AJAX = new $wnd.XMLHttpRequest(); AJAX.open('GET',url,false); AJAX.send(null); return AJAX.responseText; } } this code is work at project but it is failed at gwt unit test.I guess this fails is because of gwt unit tests uses firefox 3 . Application is drawing canvas application and this errors stops me :( -- 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/-/ey8I3upIl9kJ. 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 Dev Plugin for Google Chrome
This is not working.Added that on the shortcut target, got the exact same error. Pretty lame, a plugin made by google doesn't work with their own browser. Everybody knows the solution, wright? Switch to mozilla. Always worked for me. On Saturday, August 18, 2012 5:02:02 PM UTC+3, mukarev wrote: Thanks J. I finally made it with adding --enable-easy-off-store-extension-install to the shortcut of Chrome. Best regards, mukarev -- 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/-/PGnpICP5exgJ. 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 for GWT app development. Is it worth it?
I am thinking about moving away from Eclipse (IMHO 4.2 feels really sluggish) and switching to Intellij IDEA 12 when its released. Is anybody here that has used both Eclipse + GPE and Intellij + GWT Plugin and can share his/her experience? Having Jetbrains joining the GWT steering group I guess GWT support in Intellij will never fall behind. So is it worth its money? I already tested Intellij 11 and it seems ok, but having some opinions from people that have used Eclipse and Intellij for a longer period of time would be nice. For example I quickly noticed this: http://stackoverflow.com/questions/9763801/why-intellij-idea-prefers-not-to-extend-composite-when-use-gwt-uibinder and wonder whats the rational behind it (UiBinder plays better with Widget instead of IsWidget) and if there are other differences that have the potential of being annoying. Thanks in advance -- 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/-/Uyg_HEyWDawJ. 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 Dev Plugin for Google Chrome
Yep, I'm seeing the same thing here. Using that startup flag provides no relief, the plugin is install but will not run. On Friday, 19 October 2012 10:51:41 UTC+1, Stamate Cristian wrote: This is not working.Added that on the shortcut target, got the exact same error. Pretty lame, a plugin made by google doesn't work with their own browser. Everybody knows the solution, wright? Switch to mozilla. Always worked for me. On Saturday, August 18, 2012 5:02:02 PM UTC+3, mukarev wrote: Thanks J. I finally made it with adding --enable-easy-off-store-extension-install to the shortcut of Chrome. Best regards, mukarev -- 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/-/Qn8xv_5qTUIJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: RPC call from server to client
Hi Andrea! Am Donnerstag, 18. Oktober 2012 21:33:53 UTC+2 schrieb Andrea Boscolo: Anyway I'd give atmosphere a try. Ok, but where can I get the right jar file? Just googeling around and choosing some jar, e. g. this one? http://www.java2s.com/Code/Jar/a/Downloadatmosphereruntime082011070314051041jar.htm How do I know if it's the latest, the rignt one? (I've seen somewhere that there are different atmosphere modules/jars for different comet techniques...) Magnus -- 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/-/ZYm3iq3Ro58J. 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 In Eclipse Debug Mode All Of A Sudden is Super Slow
I get this from time to time... it is so slow all of a sudden and it usually happens when I am debugging away using FireFox as the browser... (we only use FF as the browser to debug). When restarting after a code change - there it is - slow as heck FF eventually allows me into the app - but Chrome tells me to kill the page over and over since it times out. I try to build, rebuild, rebuild again restart the box, clear out cache, run mvn clean untill I'm blue in the face. don't know what is going on... Then - all of a sudden - it's ok again... If I connect directly to the tomcat server (production mode) then everything is smooth and quick as it normally is - if I then switch over to starting the app in eclipse - then attach to the eclipsed debugger - it is slow as heck. Any ideas? On Monday, August 27, 2012 1:42:00 PM UTC-7, Adam Sas wrote: Hi, Recently I experienced the same problem. Have you figured out how to solve it? Best regards W dniu poniedziałek, 11 kwietnia 2011 15:54:44 UTC+2 użytkownik innusius napisał: No breakpoints and it is slow as hell. This is some code issue as I see that after each reload of debug , it takes longer and longer to reload application or maybe it depends of how long it runs... On Apr 7, 6:27 pm, Chris Conroy con...@google.com wrote: Eclipse's debug hooks can sometimes cause pathological slowdowns if you have a breakpoint set on a method entry point. This can happen for regular java (read: non-GWT) programs as well. Try removing any breakpoints you have set (or at least, removing any on the method entry--you can set them just fine on the first line of the function instead) On Wed, Apr 6, 2011 at 3:15 PM, PTJ pjuckiew...@gmail.com wrote: Recently I was running my GWT application in devmode via the Eclipse plugin in the Google Chrome Browser. Chrome stopped responding and my browser completely crashed, requiring me to restart my computer. I restarted my computer and tried to run my GWT application again, but this time it was SUPER slow. Devmode has always been a little slow, but now it's at the point where it is not even usable anymore. The weird part is that it is only when running in debug mode via the Eclipse plugin, standard run (not debug) via eclipse, the devmode Ant target, and production depoyment (WAR) work fine. I have tried to run other GWT applications and now they are all running unbearably slow now as well. I uninstalled/reinstalled the Google Plugin, upgraded to Eclipse Helios (was using Galileo), upgraded to GWT 2.2.0 (was using 2.0.3), etc and nothing has worked. I am the only one on my team having this issue and we are all running the EXACT same codebase. Has anyone encountered this issue before? Any help would be greatly appreciated. I have spent ~2 days straight trying to figure out this out! Environment (at this point I have tried a number of different versions of the below libraries, all produced the same issue of being too slow in devmode debugging via Eclipse): -GWT 2.2.0 -Eclipse Helios w/ Google Plugin for Eclipse 3.6 GWT SDK 2.2.0 -Google Chrome 10.0.648.204 -GXT 2.2.3 (for GWT 2.2) Regards, Paul 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-we...@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 view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/t6xPaftaZiMJ. 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: Polymorphic requestfactory example wanted
Hello, Thx a lot I'll check it. -- 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/-/jX-WM_9ITkcJ. 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 In Eclipse Debug Mode All Of A Sudden is Super Slow
Ok - I just think I figured it out: I had 6 break points set in eclipse - these break points would not be hit at all during launch - but once I removed them all (right click - remove all) then FF + Chrome launches at 'normal' development speed. Thanks!!! On Friday, October 19, 2012 9:43:55 AM UTC-7, Jorn Nordahl wrote: I get this from time to time... it is so slow all of a sudden and it usually happens when I am debugging away using FireFox as the browser... (we only use FF as the browser to debug). When restarting after a code change - there it is - slow as heck FF eventually allows me into the app - but Chrome tells me to kill the page over and over since it times out. I try to build, rebuild, rebuild again restart the box, clear out cache, run mvn clean untill I'm blue in the face. don't know what is going on... Then - all of a sudden - it's ok again... If I connect directly to the tomcat server (production mode) then everything is smooth and quick as it normally is - if I then switch over to starting the app in eclipse - then attach to the eclipsed debugger - it is slow as heck. Any ideas? On Monday, August 27, 2012 1:42:00 PM UTC-7, Adam Sas wrote: Hi, Recently I experienced the same problem. Have you figured out how to solve it? Best regards W dniu poniedziałek, 11 kwietnia 2011 15:54:44 UTC+2 użytkownik innusius napisał: No breakpoints and it is slow as hell. This is some code issue as I see that after each reload of debug , it takes longer and longer to reload application or maybe it depends of how long it runs... On Apr 7, 6:27 pm, Chris Conroy con...@google.com wrote: Eclipse's debug hooks can sometimes cause pathological slowdowns if you have a breakpoint set on a method entry point. This can happen for regular java (read: non-GWT) programs as well. Try removing any breakpoints you have set (or at least, removing any on the method entry--you can set them just fine on the first line of the function instead) On Wed, Apr 6, 2011 at 3:15 PM, PTJ pjuckiew...@gmail.com wrote: Recently I was running my GWT application in devmode via the Eclipse plugin in the Google Chrome Browser. Chrome stopped responding and my browser completely crashed, requiring me to restart my computer. I restarted my computer and tried to run my GWT application again, but this time it was SUPER slow. Devmode has always been a little slow, but now it's at the point where it is not even usable anymore. The weird part is that it is only when running in debug mode via the Eclipse plugin, standard run (not debug) via eclipse, the devmode Ant target, and production depoyment (WAR) work fine. I have tried to run other GWT applications and now they are all running unbearably slow now as well. I uninstalled/reinstalled the Google Plugin, upgraded to Eclipse Helios (was using Galileo), upgraded to GWT 2.2.0 (was using 2.0.3), etc and nothing has worked. I am the only one on my team having this issue and we are all running the EXACT same codebase. Has anyone encountered this issue before? Any help would be greatly appreciated. I have spent ~2 days straight trying to figure out this out! Environment (at this point I have tried a number of different versions of the below libraries, all produced the same issue of being too slow in devmode debugging via Eclipse): -GWT 2.2.0 -Eclipse Helios w/ Google Plugin for Eclipse 3.6 GWT SDK 2.2.0 -Google Chrome 10.0.648.204 -GXT 2.2.3 (for GWT 2.2) Regards, Paul 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-we...@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 view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/RNQA3Q2gGNgJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: RPC call from server to client
Hello, I found some jar somewhere, but I don't know if it's ok. I found that there are many different aptmosphere jars. There is even a special GWT version: http://code.google.com/p/atmosphere-gwt-comet/ This is hard to understand for me: Why a special GWT version? There also seem to be different atmosphere APIs... Then, all the examples on the atmosphere homepage include only one java file. I expected atmosphere code to be on both the client and server side. However, I still need some help to pick the richt jar/api, and I need a minimal example... Magnus -- 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/-/N1sqc3wwIRcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: RPC call from server to client
Take a look at: https://github.com/Atmosphere/atmosphere https://github.com/Atmosphere/atmosphere/wiki *https://github.com/Atmosphere/atmosphere/wiki/Getting-started-with-GWT* For downloading latest binary version: http://search.maven.org/#search%7Cga%7C1%7Corg.atmosphere There are also plenty of examples (incl. GWT examples): http://search.maven.org/#search%7Cga%7C1%7Corg.atmosphere.samples -- 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/-/zPmLlNHxeegJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: RPC call from server to client
Hi Jens! Am Freitag, 19. Oktober 2012 19:25:09 UTC+2 schrieb Jens: For downloading latest binary version: http://search.maven.org/#search%7Cga%7C1%7Corg.atmosphere Which one (which ArtifactId)? The one with the ArtifactId atmosphere-gwt only has a pom file, which I cannot handle... There are also plenty of examples (incl. GWT examples): http://search.maven.org/#search%7Cga%7C1%7Corg.atmosphere.samples I fetched the example atmosphere-gwt-chat, which includes imports like this: import org.atmosphere.gwt.server.AtmosphereGwtHandler; This import contains gwt and it is not found within the atmosphere jar I currently have. Magnus -- 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/-/U9ikk3pAnIIJ. 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.
List all the strings and ints in a class?
I am looking to make a little debugging widget for my (rather complex) app. It would be helpfull if I could construct something that would look at a class and display all its data. I can handle the GUI side of it easily enough..but Java wise I don't know where to start or if its even possible to navigate a arbitrary class in this way. Ideally Id want to get a list of variable names and their values. I assume Id need to compile as pretty or detailed for the variable names to even be there - thats fine. 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/-/Fvr_teDRFKsJ. 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 and MVP
Thanks all yours responses. Le jeudi 18 octobre 2012 17:25:14 UTC+2, Thad a écrit : On Wednesday, October 17, 2012 5:28:16 PM UTC-4, furious_panda wrote: Hi, I need some help, I did not found examples or forums discussions about these subjects. I want to try to do a GWT application using MVP pattern. But I have some difficulties. In MVP, Presenter have to contain Display interface that specifie what the View must implements and return. *I have two problems when I apply this pattern:* 1 - The View must not have to manipulate Model. Or, how it is possible for a collections of objects? For example, I have model object Person as follows: *public class Person{* *private String firstname;* *private String lastname;* *private Integer age;* *.. * *}* The View must display a collection of Person in Table (Flextable for example) whithout manipulating Model. How it is possible ? This is my presenter, and what I do now: *public class PersonListPresenter extends WidgetPresenterPersonListPresenter .Display { * * public interface Display extends WidgetDisplay{* * public void setData(ListPerson data);* *}* ** *protected void onBind() {* * display.setData(data);* *}* *}* This is my view, and what I do now: *public class SongsView implements PersonListPresenter .Display {* *..* *public void setData(ListPerson data) { * * if(data!=null data.size() 0){* * for (Person person: data) {* * // I display all information about each Person in one row of table * * * * }* *}* *}* *.* *}* *How can I do in MVP for this case ?* I have not been hard and fast about hiding POJOs from my my views. After all, a view has to know what to display and I find oodles of getFoo() are a lot work for the return. However I put all updating of my POJOs in my activities. Each time the view need to display something, it gets it from the activity. The activity handles setDirty(true|false). This seem easiest for my mind to grasp. 2 - My second problem, is each row of this table must be clickable ? How I can do ? How can I get from display click event for each row ? *public class PersonListPresenter extends WidgetPresenterPersonListPresenter .Display { * * public interface Display extends WidgetDisplay{* * public void setData(ListPerson data);* *}* ** *protected void onBind() {* * display.setData(data);* * // I have to implement the same information for each row but the source information is different.* * // I have to fire an Event containing the Person information that is clicked* * display.get ? * * * * .addClickHandler(new ClickHandler() {* * public void onClick(ClickEvent event) {* * * *}* * }* *}* *}* Thanks in advance. If your using a FlexTable, look at samples/Mail for how this is done. I've implemented something akin to this *many* times (though now I'm moving larger data sets to cells). -- 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/-/xortaej27p4J. 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 define AutoBeanFactory?
With the factory created I'm not getting any json data decoded. The decoded type is something like ipt.tas.app.ui.gwt.client.IPayloadAutoBean$2@2dbb24d0 instead of the expected IPayload. I'm not sure what this is ...but all of the data that IPayload's methods should have contained is null. However that was with, on the server, the data being encoded into JSON using Gson, e.g. Gson gson = new Gson(); String asJson = gson.toJson(str); I figured that maybe the AutoBeans framework requires that it be used to encode the data if its being used to decode the data so I replaced the server code with: AutoBeanIPayload bean = AutoBeanUtils.getAutoBean(payload); String asJson = AutoBeanCodex.encode(bean).getPayload(); However bean is always null so this doesn't work either. I don't see a way to specify the same factory when encoding (like used when decoding). So I'm at a lost how to use AutoBean, there are no compile time errors or warnings just doesn't work at runtime with no obvious reason. It seems AutoBean can't encode or decode my domain objects. I'm at a loss on how to convert my domain objects into JSON using GWT. -Dave On Friday, October 19, 2012 8:54:24 AM UTC-6, Thomas Broyer wrote: On Friday, October 19, 2012 4:20:58 PM UTC+2, dhoffer wrote: Thanks that really helps. Is just defining the top level interface enough, e.g. interface MyAutoBeanFactory extends AutoBeanFactory { AutoBeanIPayload payload(); } Or would I need to include factory methods for all nested interfaces contained/referenced by IPayload? AutoBeans cannot decode a IPayload if it doesn't know how to decode a IGWTMessage, so obviously dependencies are resolved transitively, and it's enough to just reference IPayload here. -- 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/-/pxDOf90Jp-sJ. 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 client side Java object serialization
I'm really having a hard time finding something that will work here. Regarding your suggestions: - Json Overlay Types (This one I have not implemented yet...I was not sure how to do this) - AutoBeans I can't get this to work properly, there are no errors reported just doesn't work at runtime. When using it on the server to encode I get a null bean. When using it on the client I get what looks like a mock instance (random derived type) of the right type but it has no data. - Frameworks like Piriti (http://code.google.com/p/piriti/) This one almost worked...it generated code but because some of types I marshal are parameterized (pass data of type T)...it generated code that returned T but the class itself was not typed so java could not compile the code. Seems it just does not handle parameterized types. - maybe you can borrow you some code from resty-gwt ( http://restygwt.fusesource.org/documentation/restygwt-user-guide.html#JSON_Encoder_Decoders ) I had tried this one first...ran into a problem here too...just don't recall the details. - you can roll your own solution using GWT's generators at compile time. (Not sure how to do this either) Also...I found the gwt-streamer library it's purpose is to convert POJO to JSON and/or XML and the reverse. This seemed ideal as then I could just pass the resulting string as a single item JSON map but it didn't work because the library contains code references that are not implemented in the GWT JRE emulation library. So although it was advertised for client side GWT apps I don't see how that is possible. Any other suggestions? Know of any good Json Overlay Types examples? Thanks, -Dave On Thursday, October 18, 2012 3:04:00 PM UTC-6, dhoffer wrote: I have some rather complex data objects that currently get marshaled from client to server and server to client (comet communication). Btw, not complex in quantity of data, or data relationships, but data is arrays of lots of different derived interface/class types. The data used to be just serialized but now it needs to be sent via JSON. Is it possible to perform regular Java object serialization in the GWT client? If so, I could solve this by converting that binary output into Base64 encoded string and send that via the new JSON API and then just reverse that on the server. Is it even possible to do this in GWT? Of course the other approach is to convert the Java object into a full JSON object but given it's complexity I haven't found a way to do that yet (I posted separate newsgroup message on that approach). Either approach would be fine for me, I can worry about performance differences later. -Dave -- 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/-/Is_r8rhJH4wJ. 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 an empty row in Celltable
I need to add an empty row in celltable. Please help -- 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/-/BNJWkED3dUQJ. 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: List all the strings and ints in a class?
I've never used it, but you might give GWT Reflection a try. http://gwtreflection.sourceforge.net/ On Friday, October 19, 2012 12:58:40 PM UTC-7, darkflame wrote: I am looking to make a little debugging widget for my (rather complex) app. It would be helpfull if I could construct something that would look at a class and display all its data. I can handle the GUI side of it easily enough..but Java wise I don't know where to start or if its even possible to navigate a arbitrary class in this way. Ideally Id want to get a list of variable names and their values. I assume Id need to compile as pretty or detailed for the variable names to even be there - thats fine. 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/-/BexDoKsQIEAJ. 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 define AutoBeanFactory?
AutoBeanUtils.getAutoBean(payload); will only return an AutoBeanIPayload instance if the method parameter already belongs to an AutoBean (see JavaDoc). So things would look like the following (from memory, hopefully its correct): //GWT client side MyAutoBeanFactory factory = GWT.create(MyAutoBeanFactory.class); //JVM = server side MyAutoBeanFactory factory = AutoBeanFactorySource.create(MyAutoBeanFactory.class); // now following code is the same on GWT client side and JVM/server side // creates a new empty AutoBean AutoBeanIPayload payloadAutoBean = factory.getPayload(); // creates a new AutoBean that contains the same data as the provided parameter AutoBeanIPayload payloadAutoBean = factory.getPayload(yourPayloadPojoThatImplementsIPayload); // Optional: Modify / get data from your bean IPayload payload = payloadAutoBean.as(); payload.setData(...); // serialize // If you still have access to payloadAutoBean then use it String json = AutoBeanCodex.encode(payloadAutoBean).getPayload(); // If you dont have access to payloadAutoBean but only to IPayload (maybe you are in a different method) // and you know 'payload' comes from an AutoBean AutoBeanIPayload bean = AutoBeanUtils.getAutoBean(payload); String json = AutoBeanCodex.encode(bean).getPayload(); // deserialize AutoBeanIPayload deserializedAutoBean = AutoBeanCodex.decode(factory, IPayload.class, json); IPayload deserializedPayload = deserializedAutoBean.as(); I hope that helps. -- 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/-/9Q1MicpiDeYJ. 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: Chrome 15, GWT DMP Plugin crashes
Same issue on Chrome 22.0.1229.94 -- 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/-/rpaRjSFWymwJ. 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 client side Java object serialization
Please see www.DataStoreGwt.com. It helps you to have a single object model for driving UI and for saving. It serializes an arbitrarily complex object graph at the client side and persists. J.Ganesan On Saturday, October 20, 2012 2:00:14 AM UTC+5:30, dhoffer wrote: I'm really having a hard time finding something that will work here. Regarding your suggestions: - Json Overlay Types (This one I have not implemented yet...I was not sure how to do this) - AutoBeans I can't get this to work properly, there are no errors reported just doesn't work at runtime. When using it on the server to encode I get a null bean. When using it on the client I get what looks like a mock instance (random derived type) of the right type but it has no data. - Frameworks like Piriti (http://code.google.com/p/piriti/) This one almost worked...it generated code but because some of types I marshal are parameterized (pass data of type T)...it generated code that returned T but the class itself was not typed so java could not compile the code. Seems it just does not handle parameterized types. - maybe you can borrow you some code from resty-gwt ( http://restygwt.fusesource.org/documentation/restygwt-user-guide.html#JSON_Encoder_Decoders ) I had tried this one first...ran into a problem here too...just don't recall the details. - you can roll your own solution using GWT's generators at compile time. (Not sure how to do this either) Also...I found the gwt-streamer library it's purpose is to convert POJO to JSON and/or XML and the reverse. This seemed ideal as then I could just pass the resulting string as a single item JSON map but it didn't work because the library contains code references that are not implemented in the GWT JRE emulation library. So although it was advertised for client side GWT apps I don't see how that is possible. Any other suggestions? Know of any good Json Overlay Types examples? Thanks, -Dave On Thursday, October 18, 2012 3:04:00 PM UTC-6, dhoffer wrote: I have some rather complex data objects that currently get marshaled from client to server and server to client (comet communication). Btw, not complex in quantity of data, or data relationships, but data is arrays of lots of different derived interface/class types. The data used to be just serialized but now it needs to be sent via JSON. Is it possible to perform regular Java object serialization in the GWT client? If so, I could solve this by converting that binary output into Base64 encoded string and send that via the new JSON API and then just reverse that on the server. Is it even possible to do this in GWT? Of course the other approach is to convert the Java object into a full JSON object but given it's complexity I haven't found a way to do that yet (I posted separate newsgroup message on that approach). Either approach would be fine for me, I can worry about performance differences later. -Dave -- 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/-/KAKNDUxmNUAJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: RPC call from server to client
Hi, I fetched the jars atmosphere-gwt-server and atmosphere-gwt-client, but I still have unresolved dependencies with the example atmosphere-gwt-chat: - AtmosphereGwtHandler (cannot be resolved, indirectly referenced by required class file) - Broadcaster - logger Magnus -- 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/-/byIz_S8xmcQJ. 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: Replace instances of element.setInnerHTML(safeHtml.asString()) (issue1857803)
D'oh, where was I when Element#setInnerSafeHtml was added? Didn't know it even existed! LGTM++ Except you missed one that spans 2 lines in ImageLoadingCell. (caught using grep -R -A 1 'setInnerHTML' user/src/com/google/gwt/ |grep asString |grep -v setInnerHTML ;-) ) http://gwt-code-reviews.appspot.com/1857803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace instances of element.setInnerHTML(safeHtml.asString()) (issue1857803)
On 2012/10/19 12:50:40, tbroyer wrote: Except you missed one that spans 2 lines in ImageLoadingCell. (caught using grep -R -A 1 'setInnerHTML' user/src/com/google/gwt/ |grep asString |grep -v setInnerHTML ;-) ) Ah, missed it in the patch; you already caught it, great! http://gwt-code-reviews.appspot.com/1857803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace instances of element.setInnerHTML(safeHtml.asString()) (issue1857803)
LGTM Can we deprecate Element.setInnerHTML in favor of setInnerSafeHtml? Ideally, we would be able to remove the unsafe versions before long. http://gwt-code-reviews.appspot.com/1857803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace instances of element.setInnerHTML(safeHtml.asString()) (issue1857803)
On Fri, Oct 19, 2012 at 5:50 AM, t.bro...@gmail.com wrote: D'oh, where was I when Element#setInnerSafeHtml was added? Didn't know it even existed! Yep, I added it last December. Just finally getting around to cleaning up the old code though. :) Except you missed one that spans 2 lines in ImageLoadingCell. (caught using grep -R -A 1 'setInnerHTML' user/src/com/google/gwt/ |grep asString |grep -v setInnerHTML ;-) ) FWIW, I used Error Prone[1] to do this refactoring. Not as clumsy or random as a regex; an elegant tool, for a more civilized age. :) [1] http://code.google.com/p/error-prone/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace instances of element.setInnerHTML(safeHtml.asString()) (issue1857803)
On Fri, Oct 19, 2012 at 7:00 AM, j...@jaet.org wrote: Can we deprecate Element.setInnerHTML in favor of setInnerSafeHtml? Ideally, we would be able to remove the unsafe versions before long. I'm certainly in favor of encouraging people to use setInnerSafeHtml() or setInnerText() instead of setInnerHTML(). If deprecation's the best way to do that, then I'd support that, but I suspect we'll need to do some more cleanup work still. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace instances of element.setInnerHTML(safeHtml.asString()) (issue1857803)
On Fri, Oct 19, 2012 at 6:12 PM, Matthew Dempsky mdemp...@google.com wrote: On Fri, Oct 19, 2012 at 5:50 AM, t.bro...@gmail.com wrote: Except you missed one that spans 2 lines in ImageLoadingCell. (caught using grep -R -A 1 'setInnerHTML' user/src/com/google/gwt/ |grep asString |grep -v setInnerHTML ;-) ) FWIW, I used Error Prone[1] to do this refactoring. Not as clumsy or random as a regex; an elegant tool, for a more civilized age. :) [1] http://code.google.com/p/error-prone/ Oh, so you did develop a specific bug pattern, right? (you learn a new thing every day! thanks for the pointer, didn't know about that project –one day, I should really go through the whole list of projects tagged with google on Google Code Hosting ;-) ) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors