Re: How to retrieve client's date in Short format as configured on client machine
Thanks Shades, Yes I tried using DateTimeFormat but here problem is that it never picks up changes done on Short format in Windows setting, it always displays short date in -mm-dd format. BTW I used: DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT).format(today) If there is any other option which I can try, do let me know. Regards, Sachin On Thursday, 13 December 2012 21:56:06 UTC+5:30, Shades wrote: Sachin, Have you seen the *com.google.gwt.i18n.client.DateTimeFormat *class? This class has many options to work on the date and time. Let me know if you have any issue with this class. On Thu, Dec 13, 2012 at 12:15 PM, Sachin chauhan...@gmail.comjavascript: wrote: Hi All, I would like to retrieve client's date in short format. Short format can be configured in windows from Control Panel-Date Time Settings option, there I can define format for short date like dd/mm/ or dd/mmm/yy etc. Currently I am using JsDate and tried to use *toLocaleDateString*http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/core/client/JsDate.html#toLocaleDateString()(), *toLocaleString*http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/core/client/JsDate.html#toLocaleString()() etc, but all of them are returning date in Long format. Can anyone suggest me solution for this. Thanks Regards, Sachin -- 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/-/TCX406jiu_gJ. 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. -- Thanks and Regards, Shades Software Craftsman -- 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/-/Wxqu0F7Po7IJ. 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: Editor setConstraintViloations does not propagate
On Thursday, December 13, 2012 12:30:09 AM UTC+1, Milan Cvejic wrote: Hello, I am trying to implement Bean validation and integrate it with Editors. I have following code base: *DomainConfigComponent.java* import com.github.gwtbootstrap.client.ui.ValueListBox; import com.google.gwt.editor.client.HasEditorErrors; import com.google.gwt.editor.client.IsEditor; import com.google.gwt.editor.ui.client.adapters.ValueBoxEditor; import com.google.gwt.user.client.ui.IsWidget; import com.hat.weevify.client.domain.DomainConfig; public interface DomainConfigComponent extends IsWidget, HasEditorErrorsDomainConfig { void setPresenter(Presenter presenter); public interface Presenter { } @Path(id) IsEditorValueBoxEditorInteger getId(); @Path(textDirection) ValueListBoxString getTextDirectionEditor(); @Path(name) IsEditorValueBoxEditorString getSiteNameEditor(); @Path(siteEmail) IsEditorValueBoxEditorString getSiteEmailEditor(); @Path(contactEmail) IsEditorValueBoxEditorString getContactEmailEditor(); @Path(favicon) IsEditorValueBoxEditorString getFaviconEditor(); @Path(host) IsEditorValueBoxEditorString getHostEditor(); @Path(landingPage) IsEditorValueBoxEditorString getLandingPage(); @Path(defaultLanguageId) public ValueListBoxInteger getDefaultLanguageEditor(); public void reset(); public Boolean save(); } *DomainConfigComponentImpl.java* import java.io.IOException; import java.util.List; import com.github.gwtbootstrap.client.ui.FluidRow; import com.github.gwtbootstrap.client.ui.Form; import com.github.gwtbootstrap.client.ui.IntegerBox; import com.github.gwtbootstrap.client.ui.TextBox; import com.github.gwtbootstrap.client.ui.ValueListBox; import com.google.gwt.core.client.GWT; import com.google.gwt.editor.client.EditorError; import com.google.gwt.editor.client.IsEditor; import com.google.gwt.editor.ui.client.ValueBoxEditorDecorator; import com.google.gwt.editor.ui.client.adapters.ValueBoxEditor; import com.google.gwt.text.shared.Renderer; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Widget; import com.hat.weevify.client.domain.Language; import com.hat.weevify.client.system.SystemData; public class DomainConfigComponentImpl implements DomainConfigComponent { interface DomainConfigComponentImplUiBinder extends UiBinderFluidRow, DomainConfigComponentImpl { } private static DomainConfigComponentImplUiBinderuiBinder= GWT.create(DomainConfigComponentImplUiBinder.class); private Presenterpresenter; private final FluidRow settingsContainer; @UiField FormsiteConfigForm; @UiField IntegerBoxid; @UiField(provided = true) ValueListBoxStringtextDirection; @UiField(provided = true) ValueListBoxIntegerdefaultLanguage; @UiField TextBoxsiteName; @UiField TextBoxhost; @UiField TextBoxsiteEmail; @UiField TextBoxcontactEmail; @UiField ValueBoxEditorDecoratorStringfavicon; @UiField TextBoxlandingPage; public DomainConfigComponentImpl() { textDirection = new ValueListBoxString(new RendererString() { public void render(String object, Appendable appendable) throws IOException { appendable.append(render(object)); } public String render(String object) { return object; } }); defaultLanguage = new ValueListBoxInteger(new RendererInteger() { public String render(Integer object) { for (Language lang : SystemData.getInstance().getLanguageList()) { if (lang.getId() == object) { return lang.getName(); } } return null; } public void render(Integer object, Appendable appendable) throws IOException { String s = render(object); appendable.append(s); } }); settingsContainer = uiBinder.createAndBindUi(this); } public Widget asWidget() { return settingsContainer; } public void setPresenter(Presenter presenter) {
Re: Styling Cell individually in CellTable
Have a look at Column#getCellStyleNameshttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/cellview/client/Column.html#getCellStyleNames(com.google.gwt.cell.client.Cell.Context, T), override it as needed in your column. On Thursday, December 13, 2012 9:17:25 PM UTC+1, Alex opn wrote: I know this is pretty old but I face the same issue for a few hours now. Anybody found a solution or has an idea? I even tried crazy GQuery stuff but there is no event which indicates that the table/grid has been redrawn/drawn and so my tricks all didn't work sadly! Am Mittwoch, 23. März 2011 18:49:06 UTC+1 schrieb Raphaël Brugier: Hi, I've got a use case with the CellTable where a cell should be rendered with a different background color depending on the cell content. I've also some TD with a rowspan 1. I've implemented an AbstractCell to set a style depending on the status (short version) : public class StatusCell extends AbstractCellStatus { @Override public void render(final Status status, final Object key, final SafeHtmlBuilder sb) { String cellStyle; if (status == Status.OK) { cellStyle = greenCell; } else { cellStyle = redCell; } sb.appendHtmlConstant(div class=\ + cellStyle + \); sb.appendEscaped(status.toString()); sb.appendHtmlConstant(/div); } } Here is the result : table class=cellTableWidget GA3XJ-DDEM thead tr th class=cellTableHeader GA3XJ-DDIC colspan=1Product/th th class=cellTableHeader colspan=1Status/th /tr /thead colgroup/colgroup tbody style= tr class=GA3XJ-DDEC onclick= td class=cellTableCell cellTableEvenRowCell cellTableFirstColumn div tabindex=0 style=outline: medium none;car/div /td td class=cellTableCell cellTableEvenRowCell rowspan=2 div style=outline: medium none; div class=greenCellOK/div /div /td /tr tr class=GA3XJ-DDEC onclick= td class=cellTableCell cellTableEvenRowCell cellTableFirstColumn div tabindex=0 style=outline: medium none;car/div /td /tr tr class=GA3XJ-DDEC onclick= td class=cellTableCell cellTableEvenRowCell cellTableFirstColumn div tabindex=0 style=outline: medium none;car/div /td td class=cellTableCell cellTableEvenRowCell div style=outline: medium none; div class=redCellKO/div /div /td /tr /tbody /table But the point is that when the cell is rendered by the CellTable view, it encapsulates it inside an other DIV and then put it in the TD. Then my Div where I have applied a style will not have the max height of the TD so the background color will not be fully applied to the TD. (The green of the OK cell does not extend to the TD) I got two ideas : 1/ Use css to extends the DIV to be the height of the TD. But setting height: 100% did not work. 2/ Find a way to set manually a style to the TD. But there is nothing on the CellTable api to access the TD after they have been rendered. Is anybody have encountered this use case or have a solution please ? 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/-/qy4Sg1R9zWIJ. 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: Exceptions when compiling obfuscated; pretty is fine
On Thursday, December 13, 2012 10:45:02 AM UTC+1, BDT wrote: Suddenly I am getting all kinds of runtime exceptions when compile obfuscated. If I compile set to pretty, everything is fine. This is not new code and I did not just update my tools. I have tried completely cleaning everything out and rebuilding, reverting to old known good code, etc to no avail. I am using GWT 2.5 + Eclipse Juno on a Mac. I am running on the assumption that I must have changed something in the environment but I don't know what. The most common exception is an UnsupportedOperationException from ValueCode.java:339 when making RequestFactory calls (.fire). What's the message associated with the exception? -- 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/-/XVHH6EpGaR4J. 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: can not get multiple matches using regex
On Friday, December 14, 2012 2:08:30 AM UTC+1, bhomass wrote: I am using GWT Regex RegExp regExp = RegExp.compile(\\b + searchWord + \\b, gi); MatchResult matcher = regExp.exec(input); this only returns the first match. why is that? I already set the global option. any one knows how to get multiple match return? Call exec() again with the same 'input'. See the bottom of https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/exec -- 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/-/AiuvvBaF9wEJ. 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: Styling Cell individually in CellTable
I can't belive I haven't seen the setCellStyleNames method! : ) Thanks for pointing me in the right direction again! Am Freitag, 14. Dezember 2012 14:36:55 UTC+1 schrieb Thomas Broyer: Have a look at Column#getCellStyleNameshttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/cellview/client/Column.html#getCellStyleNames%28com.google.gwt.cell.client.Cell.Context,+T%29, override it as needed in your column. On Thursday, December 13, 2012 9:17:25 PM UTC+1, Alex opn wrote: I know this is pretty old but I face the same issue for a few hours now. Anybody found a solution or has an idea? I even tried crazy GQuery stuff but there is no event which indicates that the table/grid has been redrawn/drawn and so my tricks all didn't work sadly! Am Mittwoch, 23. März 2011 18:49:06 UTC+1 schrieb Raphaël Brugier: Hi, I've got a use case with the CellTable where a cell should be rendered with a different background color depending on the cell content. I've also some TD with a rowspan 1. I've implemented an AbstractCell to set a style depending on the status (short version) : public class StatusCell extends AbstractCellStatus { @Override public void render(final Status status, final Object key, final SafeHtmlBuilder sb) { String cellStyle; if (status == Status.OK) { cellStyle = greenCell; } else { cellStyle = redCell; } sb.appendHtmlConstant(div class=\ + cellStyle + \); sb.appendEscaped(status.toString()); sb.appendHtmlConstant(/div); } } Here is the result : table class=cellTableWidget GA3XJ-DDEM thead tr th class=cellTableHeader GA3XJ-DDIC colspan=1Product/th th class=cellTableHeader colspan=1Status/th /tr /thead colgroup/colgroup tbody style= tr class=GA3XJ-DDEC onclick= td class=cellTableCell cellTableEvenRowCell cellTableFirstColumn div tabindex=0 style=outline: medium none;car/div /td td class=cellTableCell cellTableEvenRowCell rowspan=2 div style=outline: medium none; div class=greenCellOK/div /div /td /tr tr class=GA3XJ-DDEC onclick= td class=cellTableCell cellTableEvenRowCell cellTableFirstColumn div tabindex=0 style=outline: medium none;car/div /td /tr tr class=GA3XJ-DDEC onclick= td class=cellTableCell cellTableEvenRowCell cellTableFirstColumn div tabindex=0 style=outline: medium none;car/div /td td class=cellTableCell cellTableEvenRowCell div style=outline: medium none; div class=redCellKO/div /div /td /tr /tbody /table But the point is that when the cell is rendered by the CellTable view, it encapsulates it inside an other DIV and then put it in the TD. Then my Div where I have applied a style will not have the max height of the TD so the background color will not be fully applied to the TD. (The green of the OK cell does not extend to the TD) I got two ideas : 1/ Use css to extends the DIV to be the height of the TD. But setting height: 100% did not work. 2/ Find a way to set manually a style to the TD. But there is nothing on the CellTable api to access the TD after they have been rendered. Is anybody have encountered this use case or have a solution please ? 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/-/iH5TW089cbMJ. 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: Wishlist - What GWT developers want for Christmas
Just to report back. We were able to fix the issue and vaadin.com is no longer asking access to contacts when you signing in with your Google account. - Joonas On Thursday, December 13, 2012 12:03:47 PM UTC+2, Joonas Lehtinen wrote: Looks like our login form is using wrong scope from OAuth API. We'll fix this asap. We are definitely not using contacts (only stored information is persons own email-address). The wishlist page is quite simple and there is no admin inferface, so there is no be easy way to edit the contents. I think that better than trying to remove duplicates (and for that matter split comments with multiple proposals), you might like to analyze the most important stuff (both by seeing votes and number of similar entries) and publish a blog post about the analysis. This would probably clarify the results. On Wednesday, December 12, 2012 6:53:09 PM UTC+2, V.B. wrote: Hello Joonas, Thanks for your work on the report and for posting the wishlist. While I agree with the previous post that the majority of the 2,600 wishlist items are duplicates, there are several other valid items buried in the middle or near bottom of the list, which were not covered in the report. At the moment, these are not getting much attention because most voters stop looking after the first 50 or so items. For example, I found comments from a number of members about bugs that don't get fixed (e.g. some are even 2-3 years old), and patches that don't get accepted. I also saw some very important comments about how GWT needs to be better marketed/publicized in order to attract more developers. I suspect that issues like these would get much more up-voting if they were more visible. Perhaps a member of the community (me, for example) could volunteer to remove duplicates, or perhaps the list could be randomized every time it's viewed. Anything to make sure *all* the important issues get attention. On a separate note, I think even more members might log in and vote if not for the Access-to-Contacts requirement. Thanks again. -- 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/-/12WofnPODK8J. 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: Wishlist - What GWT developers want for Christmas
Hi, I'm the author of the piece of code that allows you logging in via various external services to vaadin.com, so all this is kind of my fault. Let me try to explain the situation. The first time you try to log in with, say, Google, we don't have any records of you. So we ask that service provider (Google in this case) for some information (I'll come back to the Contacts issue in a while). We are interested in the following data: user id, first name, last name, something suitable for a screen name and email. Then the user is redirected back to our server, with a form to give a bit more information about themselves, with as much as the service told about you pre-filled for you. Once the form is submitted, a Liferay user is created with the information given, and we link the user id given by the service Liferay user that was created. So, basically, we actually only use the service provider's user id. Everything else is just gravy; if the service says your name is John, we pre-fill your name as John to the register form. But if you change your name to Jack, you will be known as Jack to us, and no trace of the original John will be saved to our databases. Now, back to the Contacts issue. At the time of implementation, I tried to search a suitable API from Google to give what we needed. Unlike Twitter and Facebook (them being singular services,) Google is a mass of disparate services. I was unable to find anything generic - I needed to pick an OAuth (OpenID was out of the question, unfortunately) service both gave us the information we needed (basically an id - additional personal data would only be for the user's own convenience). But we also needed to be sure that every Google user would have that service enabled. So, the most suitable service that I found was Contacts. The fact that Google warns you that we get access to all your contacts is unfortunate in the sense that we are not interested in your contacts. There is no way for us to communicate to Google that we only need your user id from that service. That being said, I have now found https://developers.google.com/accounts/docs/OAuth2Login and am in the process of converting the login to use that in the future. This is a service specifically built to serve this kind of information: basic profile information. All of the above applies also to Twitter and Facebook - we are only interested in the user id that links a particular person to a user in our databases. Facebook seems to have changed the way their API works, and has started to provide too much information that we do nothing with. Once I'm done converting the Google bit, I'm going to fiddle around the Facebook settings to make sure that we ask for as little as needed. On Tuesday, December 11, 2012 9:33:34 PM UTC+2, maticpetek wrote: Dear Joonas, We have couple discussion in this forum about given email address to access survey result. Some people see this as interference between commercial interest of Vaadin and community. I don't think so and I also express my opinion. If some company invest their time resources to prepare survey and present results - this is good for all community and you can have my email to send me product updates. Ok, I also think you have cool product and I want information from your company. But could you please explain me why you need access to my Google Contacts information if I login with my Google Account? Or to my friends lists from Facebook if I login with Facebook connect? What will list of my personal friends, family members and business partners have to do with GWT wishes voting system? Frankly speaking, I think this si very bad sign for feature customers (like I am) for you company product services. And as I say - you have cool product and I really wish you all the best. Regards, Matic -- GWT stuff twitter - http://twitter.com/#!/gwtstuff On Tuesday, December 11, 2012 7:45:59 PM UTC+1, Joonas Lehtinen wrote: We just published all of the 2600+ wishes you guys added to the Future of GWT survey on most important things needed in GWT. Take a look: https://vaadin.com/gwt/report-2012/wishlist -- 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/-/ABEUnq5MkDwJ. 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.
Undefined attachEvent method in IE 8 using the GWT
We have developed a fairly complex business application using the Google Web Toolkit for the front-end rendering. Our application is working correctly on all modern browsers (Chrome, Firefox, Safari and IE9). In order to use standards mode we have put !DOCTYPE html in the GWT bootstrap. The problems arise when trying to use earlier IE versions and the application stops loading at the initial splash screen. After investigating, it seems that the GWT deferred binding correctly (1http://stackoverflow.com/questions/9769868/addeventlistener-not-working-in-ie8 , 2https://developer.mozilla.org/en-US/docs/DOM/element.addEventListener#Legacy_Internet_Explorer_and_attachEvent) callsattachEvent for IE 9 and addEventListener for IE 9. However, IE 8 throws a TypeErrorexception of type undefined_method for the attachEvent call. Note that this happens whenever GWT calls attachEvent and not just for a specific event. We can confirm because when we override the deferred binding for a specific class the problem appears at the next attachEvent call. Trying to override everything seems like a way to overcome the problem but it isn't optimal, especially keeping in mind that IE 9 is supposed to have the attachEvent method according to the specification. Does anyone know something about getting to the root of this problem? -- 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/-/HZH6lJQYxh4J. 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: SuggestBox in a CellTable
Hello Craig! Been struggling awhile to accomplish this functionality and managed to do it following this post! Thanks for the suggestion! Did you manage to find out something else about this meanwhile? Best regards, Ionut -- 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/-/Bxm-5ooVFIkJ. 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: celltree indentation
Looking at CellTreeNodeView.java, I can see this is pretty buried in the implementation. On Wednesday, December 12, 2012 9:01:48 PM UTC-6, Joel wrote: I'd like to get rid of the indentation at least for the first set of children, but I still want the arrow icon images for open close (same as Outlook). The reason is that the root nodes look like dividers (for each category). How can I do that? J On Monday, January 24, 2011 9:41:56 PM UTC-6, John LaBanca wrote: Its based on the width of the open/close image icon. You can provide your own images by extending CellTree.Resources and passing the resources into the constructor. Use narrower images for less padding. For more padding, add transparent padding to the left (or right) of the icon image. Thanks, John LaBanca jlab...@google.com On Mon, Jan 24, 2011 at 10:29 PM, Torgeir torgei...@gmail.com wrote: Am looking for a way to change the tree node indentation of a cell tree, but can't find any method, nor any css resource that seems to specify this, it's always fixed at 16px. Does anyone have a way of specifying this? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-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/-/782_4Y5TVRcJ. 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.
reports
Hi, all help me, I need to create reports in gwt some example or tutorial that can guide me. thanks -- 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: reports
Create them on server (e.g. using a library like JasperReports). Let the GWT application open an URL pointing to the generated PDF. -- J. Am Freitag, 14. Dezember 2012 18:10:02 UTC+1 schrieb Spartacus: Hi, all help me, I need to create reports in gwt some example or tutorial that can guide me. 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/-/rNshzZphBV4J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.4.0+ RequestFactory EntityProxy Validation
I have found out a few more details relating to this problem. I have an Editor that implements LeafValueEditorListPhoneProxy. When a user wants to add a new PhoneProxy to my editor I call context.create(). Sometimes the user cancels the process. When the user cancels the process the PhoneProxy created remains in the list of beans that are sent to the server for constraint validation. This always fails because the PhoneProxy has been cleared out by the cancel operation. It seems like there may be a bug here. The canceled ProxyPhone bean shows up in the list to be validated but when I override the ServiceLayerDecorator.validate method bypassing validation it is removed prior to the persist() method. Also, Is there a way for me to tell the context to discard the canceled PhoneProxy? Thanks! Steve On Monday, November 12, 2012 1:44:15 PM UTC-7, Steven Jardine wrote: When trying to save a complex EntityProxy I receive validation errors on empty entities that should not be there. When I inspect the entity to be sent to the server I see a total of 6 entities to be saved but when I inspect the IdToEntityMap that is used for validation I see a total of 9 entities to be validated. The 3 additional entities are just empty entities. If I disable validation through my ServiceLayerDecorator the empty entities do not show up on the server, just the entities I submitted. Here is the entities I see when validate is called: {1@1...@com.mjnservices.lms.core.shared.model.proxy.EmailProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@42538425, 2@1...@com.mjnservices.lms.core.shared.model.proxy.PhoneProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@33d2158c, 3@1...@com.mjnservices.lms.core.shared.model.proxy.AddressProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@58d48756, 5@0...@com.mjnservices.lms.core.shared.model.proxy.PhoneProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@69014ca9, 1@0...@com.mjnservices.lms.core.shared.model.proxy.EmailProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@5450211a, 1@0...@com.mjnservices.lms.core.shared.model.proxy.AddressProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@35ca01cb, 3@0...@com.mjnservices.lms.core.shared.model.proxy.PhoneProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@58ad5d34, 3@0...@com.mjnservices.lms.core.shared.model.proxy.ContactProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@78b8f5f5, 3@0...@com.mjnservices.lms.core.shared.model.proxy.RegisteredUserProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@f62b12d} The first 3 are the empty ones and the last 6 are the ones I submitted. Does anyone have any ideas why I would have additional entities present for validation? Thanks! Steve -- 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/-/mwOF13XSJIwJ. 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.
Lienzo is now GA and it's Pixel Perfect!
All: Just a quick announcement letting everyone know that Lienzo is now GA! If you are looking to do anything canvas based, games, animations, new unthinkable widgets for either mobile or web based apps, I think you will find that Lienzo covers in this, its 1.0 version the vast majority of the things you will need. We have invested a great deal of time to make sure the library is as solid as it can be. However, nothing beats community feedback and new ideas. There are a handful of things that we plan on adding to the toolkit in the next release, but if you have any suggestions, please feel free to drop us a line. Lienzo is an Apache 2 library and its creation is the result of our own needs so we are not only producers but also consumers of the package. As part of this release we put a lot of effort into creating not only the software itself but also good resources to help you in your journey to create literally anything you can think of. That's how powerful canvas and GWT together we think can be. As usual, none, none of this would have been possible without GWT. We extend our gratitude to those that continue to make GWT better and hope that this latest addition helps others create things that were only possible in our imagination before, at least creating them in a much easier fashion. *Community: * https://plus.google.com/u/0/communities/111441257302891144143 *Lienzo User Guide:* http://wiki.emitrom.com/wiki/index.php/Lienzo_User_Manual *Lienzo Explorer:* http://www.emitrom-lienzo.appspot.com/ *Lienzo Download:* http://www.emitrom.com/lienzo/download The Emitrom Team -- 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. attachment: lienzo_banner.png
Re: GWT 2.4.0+ RequestFactory EntityProxy Validation
Thats a known quirk. Take a look at: https://groups.google.com/d/topic/google-web-toolkit/d9gZMff7RlI/discussion -- 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/-/cl6a6utMBkcJ. 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: Multiple GWT sessions possible?
All good points from Jens. But, perhaps I'm missing something, but on most servers (Apache with mod_php, Tomcat) set a session token in the cookie on the first request you make to the server. Once the user logs in, you associate this session with that user by persisting their data data in $_SESSION or a session scoped bean. To that end, if you had your app open in one window, or 10 windows, they should all be on the same session because they are all passing the same session id cookie. Assuming that you're doing that, then a mechanism like Spring Security that would allow you to secure a context like **/secure/* to a given role (i.e. User) would be all you needed to do to protect your services/RPC's The one catch is application timeout. To get around this I return an HTTP error code (i.e. forbidden) and then have that caught in the failure handler for the RPC's. I extended the typical callback handler so all RPC's can handle session termination in a consistent, graceful way, prompting them to login again. With Spring Security you can even setup the request to us remember me cookies (if user selected that on login). In that case the server will cache the request, log the user back in, and forward the request, making the session timeout/relogin invisible to the user. Hope that helps. Sincerely, Joseph -- 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/-/-ecQuV6hrFQJ. 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: Multiple GWT sessions possible?
But, perhaps I'm missing something, but on most servers (Apache with mod_php, Tomcat) set a session token in the cookie on the first request you make to the server. Once the user logs in, you associate this session with that user by persisting their data data in $_SESSION or a session scoped bean. To that end, if you had your app open in one window, or 10 windows, they should all be on the same session because they are all passing the same session id cookie. Thats exactly what I mean with one active session on the client. Only a single user is authenticated in all browser windows/tabs because you only have a single cookie with a single session id. You must log out or delete cookies if a second user should see the login screen again on the same browser (or you need a session timeout on server). The one catch is application timeout. To get around this I return an HTTP error code (i.e. forbidden) and then have that caught in the failure handler for the RPC's. I extended the typical callback handler so all RPC's can handle session termination in a consistent, graceful way, prompting them to login again. Its always a good idea to use a custom base class for RPC callbacks and/or use a custom RequestTransport/RpcRequestBuilder to handle these server responses. Its not only common HTTP error codes but also common exceptions like SerializationException/IncompatibleRemoteServiceException (GWT-RPC) that would indicate an application update that occurred while the user was idle in the app. -- 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/-/hujl3ZQPzlUJ. 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: SuggestBox in a CellTable
Can't remember, it was over a year ago. I will see if I can dig out the code and have a look. Craig On Friday, December 14, 2012, wrote: Hello Craig! Been struggling awhile to accomplish this functionality and managed to do it following this post! Thanks for the suggestion! Did you manage to find out something else about this meanwhile? Best regards, Ionut -- 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/-/Bxm-5ooVFIkJ. To post to this group, send email to google-web-toolkit@googlegroups.comjavascript:_e({}, 'cvml', 'google-web-toolkit@googlegroups.com'); . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'google-web-toolkit%2bunsubscr...@googlegroups.com');. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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.
Errors passing javascript variables to GWT
I'm following the example given here https://developers.google.com/web-toolkit/articles/dynamic_host_page of passing a global info javascript variable back to the GWT app when it loads. E.g. // In GwtHostingServlet's doGet() method... writer.append(htmlhead); writer.append(script type=\text/javascript\ src=\sample/sample.nocache.js\/script); // Open a second script tag where we will define some extra data writer.append(script type=\text/javascript\); // Define a global JSON object called info which can contain some simple key/value pairs writer.append(var info = { ); // Include the user's email with the key email writer.append(\email\ : \ + userService.getCurrentUser().getEmail() + \); // End the JSON object definition writer.append( };); // End the script tag writer.append(/script); writer.append(/headbodyHello, world!/body/html); Then in my GWT app's EntryPoint class I have: public static native String getEmail() /*-{ return $wnd.info['email']; }-*/; However when the app runs I get an exception saying: $wnd.info is undefined I've tried $doc but got the same error. I also tried window and document but then it says document.info is undefined. What am I doing wrong? -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/-/y9lEftpPeUcJ. 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: GWT does not normalize IE mangling from http 204 code to 1223 (Issue 5031) (issue1875803)
And +1 to everything Matthew already said. http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImpl.java File user/src/com/google/gwt/http/client/RequestImpl.java (right): http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImpl.java#newcode22 user/src/com/google/gwt/http/client/RequestImpl.java:22: public class RequestImpl { All methods are package-protected, so maybe the class should be package-protected too? Alternatively, make everything public and move the class to an impl subpackage. http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImpl.java#newcode75 user/src/com/google/gwt/http/client/RequestImpl.java:75: Header[] getHeaders(XMLHttpRequest xmlHttp) { Why did you create getHeaders and isResponseReady if they're not going to be overridden? http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImplIE69.java File user/src/com/google/gwt/http/client/RequestImplIE69.java (right): http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImplIE69.java#newcode24 user/src/com/google/gwt/http/client/RequestImplIE69.java:24: public class RequestImplIE69 extends RequestImpl { Does that mean this is no longer an issue in IE10? I'm not found of the IE69 naming scheme. AFAICT we've never used such a rule. I'd rather name the class IE, even if IE10+ doesn't need it. http://gwt-code-reviews.appspot.com/1875803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: GWT does not normalize IE mangling from http 204 code to 1223 (Issue 5031) (issue1875803)
Thanks for the feedback! On 2012/12/13 19:36:01, mdempsky wrote: Thanks for the patch. If you don't mind, could you try uploading the next revision to Gerrit insead? See instructions at: https://groups.google.com/d/msg/google-web-toolkit-contributors/fmHDlsnfdEQ/fc6lvNdxROQJ If that proves to be too much work though, you can continue using Rietveld. I will upload the next to Gerrit. http://gwt-code-reviews.appspot.com/1875803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Another approach to DevMode: taking advantage of browsers' remote debugging protocol
On Thursday, December 13, 2012 5:31:28 AM UTC+1, Ray Cromwell wrote: How would you deal with re-entrancy though, e.g. Java - JS - Java - JS If you simulate a synchronous call from JS to Java by breaking, what happens when Java calls back into JS? Everytime I thought about doing this, it basically boils down to emulating continuations with CPS transform, and that is quite onerous. IIRC, ('cause I haven't looked at the code recently), it'd work the same as today. The idea is: - implement a DevMode client in Java, equivalent to the C++ browser plugins; this is easy, you just have to implement ClientBrowserChannel et al. - sending messages from the browser is done by setting a couple variables and reaching a breakpoint, where the Java code then reads the variables and sends the corresponding message to the DevMode server. - sending a message to the browser is always done as a response, so we're already stopped at the breakpoint, we can then set the variables and resume execution, and the JS code will read the variables and do what's appropriate (eval() code to load jsni methods, call a named function on an identified object, etc.) Unless the message is a return, the JS code loops over and reaches back to the breakpoint. See https://code.google.com/p/gwt-in-the-air/source/browse/branches/oophm/src/net/ltgt/gwt/air/tools/shell/Oophm.as That was almost 3 years ago though, so I might have missed something obvious at that time, and I must say I haven't wrapped my head back around it nowadays. The Chrome on Windows 8 doesn't support NPAPI issue reminded me about it recently. It seems much simpler to get the IDEs to support SourceMaps. For example, IntelliJ already supports attaching to Firefox and Chrome JS debuggers, once it supports SourceMaps, you should be able to have a Java-debugger like experience with SDM. Some things don't behave the same though (inspecting variables to begin with, IIRC). SuperDevMode is great when you have a lot of JSNI because you can step into JSNI methods, but it won't ever give you the same experience as debugging Java code running in a JVM. One big advantage of SuperDevMode is that you run the code in JS so you're sure that's how it'll behave in production and nothing will be lost in translation (as it's *already* translated), but sometimes you might prefer to trade this off for a more integrated debugging (at least that's what the initial reactions to SuperDevMode implied); and there's also the issue with GWT-RPC serialization policies that make using SuperDevMode tricky (apparently, I don't use RPC). I'm all for continuing investing in SuperDevMode *as a priority*. I just wanted to know a) if you thought about that alternative and b) suggest it as an alternative that someone could volunteer to pursue (as a side project). -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: GWT does not normalize IE mangling from http 204 code to 1223 (Issue 5031) (issue1875803)
Thanks for the feedback. http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/HTTP.gwt.xml File user/src/com/google/gwt/http/HTTP.gwt.xml (right): http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/HTTP.gwt.xml#newcode31 user/src/com/google/gwt/http/HTTP.gwt.xml:31: when-property-is This is a style I got used too. I'll fix that. http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImpl.java File user/src/com/google/gwt/http/client/RequestImpl.java (right): http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImpl.java#newcode22 user/src/com/google/gwt/http/client/RequestImpl.java:22: public class RequestImpl { I'll do the 'impl' package-way because it is done this ways in many places. http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImpl.java#newcode75 user/src/com/google/gwt/http/client/RequestImpl.java:75: Header[] getHeaders(XMLHttpRequest xmlHttp) { I thought it's a good style to move out all the special implementation logic which is not bound to a Response instance. http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImplIE69.java File user/src/com/google/gwt/http/client/RequestImplIE69.java (right): http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImplIE69.java#newcode24 user/src/com/google/gwt/http/client/RequestImplIE69.java:24: public class RequestImplIE69 extends RequestImpl { Yes, the issue is fixed in IE10 (http://blogs.msdn.com/b/ieinternals/archive/2012/03/01/ie10-beta-consumer-preview-minor-changes-changelist.aspx) I'll rename the class. http://gwt-code-reviews.appspot.com/1875803/diff/1/user/src/com/google/gwt/http/client/RequestImplIE69.java#newcode28 user/src/com/google/gwt/http/client/RequestImplIE69.java:28: final Response original = super.createResponse(xmlHttpRequest); Good idea. I'll do that. http://gwt-code-reviews.appspot.com/1875803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Another approach to DevMode: taking advantage of browsers' remote debugging protocol
On 14/12/12 11:24, Thomas Broyer wrote: and there's also the issue with GWT-RPC serialization policies that make using SuperDevMode tricky (apparently, I don't use RPC). Tricky is too strong a word for it. It only takes a small amount of code, so that the RPC servlet's doGetSerializationPolicy(...) can fetch the serialization policy file from the code server. Once that's done, it just works. I never have to think about it or actively do anything to make SuperDevMode work with RPC. Paul -- http://groups.google.com/group/Google-Web-Toolkit-Contributors