Re: LocalStorage not working in HTML5 app
You can test and look how to use HTML5 in : www.html5bydemo.com Le mardi 13 mars 2012 02:49:59 UTC+1, stymie a écrit : I am using phonegap to wrap a HTML5 app. I am using GWT's localstorage mechanism. When I add this to my project I just get a blank page. But if I remove the localstorage code it works. It does work just fine in my desktop browser however, but once I put it on the phone Blank Page. Is there some problems with GWT local storage on Mobile? Le mardi 13 mars 2012 02:49:59 UTC+1, stymie a écrit : I am using phonegap to wrap a HTML5 app. I am using GWT's localstorage mechanism. When I add this to my project I just get a blank page. But if I remove the localstorage code it works. It does work just fine in my desktop browser however, but once I put it on the phone Blank Page. Is there some problems with GWT local storage on Mobile? -- 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/-/miqvw_k4iRYJ. 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: ff11 gwt dev plugin
thanx alot On Tue, Mar 20, 2012 at 5:38 PM, Trevor Skaife tska...@gmail.com wrote: Thanks a lot, it's now working on my mac. -Trevor -- 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/-/WbMUOCB6mL4J. 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: JavaScriptObject generate a json with a Integer field
Thanks ! Exactly. Sandro Munda munda.san...@gmail.com On Tue, Mar 20, 2012 at 2:28 PM, Thomas Broyer t.bro...@gmail.com wrote: On Tuesday, March 20, 2012 12:49:10 PM UTC+1, Sandro Munda wrote: Hello everybody ! I have a subclass of a JavaScriptObject with a generic type T. public class FooT extends JavaScriptObject { // ... } In this class, I have a getValue() method that returns a T value. private final native T getValue() /*-{ return this.value; }-*/; In my situation, T is an Integer. When I running the code I have the following exception : Caused by: java.lang.ClassCastException: Cannot cast java.lang.Integer to com.google.gwt.core.client.JavaScriptObject Is the value is a 'int', it works well. But not the Integer. How can I fix the problem ? Any workarrounds ? You cannot use Integer as a generic parameter in this case; you have to code specifically for the integer or other primitive wrapper) case; something like: public final Integer getValue() { return hasValue() ? Integer.valueOf(getValueInt()) : null; } private final native boolean hasValue() /*-{ return this.value == null; }-*/; private final native int getValueInt() /*-{ return Number(this.value); }-*/; -- 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/-/nrBiWtOwQqcJ. 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.
Debugging with Xcode
Hello, Has anyone ever been able to run a GWT project in devmode using Xcode on the Mac and use the debugger? Maybe using Xcode 3 instead of 4? That would really handy. Cheers, Olivier -- 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.
Adding Grid with margin to a LayoutPanel
Hey all, When I add a grid with 100% height to a layout panel and set a margin on it, the bottom margin is not honoured: *public* *void* *onModuleLoad*() { Grid grid = *new* Grid(1,1); grid.setHeight(100%); grid.getElement().getStyle().setBackgroundColor(yellow); grid.getElement().getStyle().setMargin(10, Unit.PX); LayoutPanel lp = *new* LayoutPanel(); lp.add( grid ); RootLayoutPanel.*get*().add( lp ); } How can I fix this? 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/-/d-kWujoDMdUJ. 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: ff11 gwt dev plugin
Thanks. How soon until it is available via http://gwt.google.com/missing-plugin/MissingPlugin.html ? On Friday, 16 March 2012 19:58:34 UTC, Alan Leung wrote: Wow! I didn't know it was released already. Some how I thought I had more time until FF11. I'll get on it. thanks for the reminder. -Alan On Fri, Mar 16, 2012 at 7:08 AM, Olivier Scherler oliv...@gasser-media.ch wrote: I’m wondering, how long until Mozilla releases new version of Firefox faster than the GWT community can recompile the plugin? On 16 March 2012 14:25, Fabricio Pizzichillo fpizzichi...@gmail.comwrote: Hello Alan. Can you compile the plugin for FF11? regards -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/sJ1YtVlRlCcJ. 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 share classes between two different modules with two different pages
It sounds like you just need two separate gwt.xml files within the same project. There is no reason why you can't use the same inherits within both. On Tuesday, 20 March 2012 21:22:58 UTC, Deepak Singh wrote: Hi All, I have a GWT project with 2 modules. ModuleA and ModuleB Both are having their own html page. i.e. tow seperate html pages so seperate Rootpanel for both of them. So i cant inherit one into another. How can i use the same class(in shared package) in both the modules ? Thanks Deepak Singh -- 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/-/2pEfxrUOUdQJ. 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: Debugging with Xcode
xcode with for java/gwt ??? it'd be much (IMHO) easier for you to switch to eclipse/netbeans/ . On Wed, Mar 21, 2012 at 11:41 AM, Olivier Scherler oliv...@gasser-media.chwrote: Hello, Has anyone ever been able to run a GWT project in devmode using Xcode on the Mac and use the debugger? Maybe using Xcode 3 instead of 4? That would really handy. Cheers, Olivier -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Change DatePicker language
Hi everyone, How can I change the display language of the DatePicker object? My app is internationalized on a GWT level, but enabling more than 1 language in module.gwt.xml generates a war too big to be deployed on Appengine, therefore I am stuck with the default which I assume is english. Is there a way to change only the locale of the DatePicker or to change the default locale? Thanks, Cristian. -- 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/-/ZfVD0z_bFOIJ. 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.
Custom cell with table causes event problem in cellTable
Hello, I've a problem using a custom cell in a cellTable. My custom renderer renders the data with templates and includes a table. On mouseOver the main cellTable highlights the row, but on mouseOver on the included table, the highlight of the row gets lost. How can I get the row highlighted even if I hover the internal table? Thanks for help. Here's a small example: Playground.java (implementing EntryPoint): -- package com.heiler.playground.client; import com.google.gwt.cell.client.TextCell; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.cellview.client.CellTable; import com.google.gwt.user.cellview.client.Column; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.view.client.ListDataProvider; import com.heiler.playground.shared.MainObject; public class Playground implements EntryPoint { @Override public void onModuleLoad() { ListDataProviderMainObject dataProvider = new ListDataProviderMainObject(); for (int i = 0; i 5; i++) { dataProvider.getList().add(new MainObject(i)); } CellTableMainObject mainTable = new CellTableMainObject(); ColumnMainObject, String idColumn = new ColumnMainObject, String( new TextCell()) { @Override public String getValue(MainObject object) { return Integer.toString(object.getId()); } }; ColumnMainObject, MainObject subColumn = new ColumnMainObject, MainObject( new CustomCell()) { @Override public MainObject getValue(MainObject object) { return object; } }; mainTable.addColumn(idColumn, ID); mainTable.addColumn(subColumn, Sub); dataProvider.addDataDisplay(mainTable); mainTable.setWidth(800px); RootPanel.get().add(mainTable); } } --- CustomCell.java: --- package com.heiler.playground.client; import java.util.List; import com.google.gwt.cell.client.AbstractCell; import com.google.gwt.cell.client.Cell; import com.google.gwt.cell.client.ValueUpdater; import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.EventTarget; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.safehtml.client.SafeHtmlTemplates; import com.google.gwt.safehtml.client.SafeHtmlTemplates.Template; import com.google.gwt.safehtml.shared.SafeHtml; import com.google.gwt.safehtml.shared.SafeHtmlBuilder; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Event; import com.heiler.playground.shared.MainObject; import com.heiler.playground.shared.SubObject; public class CustomCell extends AbstractCellMainObject { interface Template extends SafeHtmlTemplates { @Template(div cellspacing=\0\ cellpadding=\0\) SafeHtml stockInfoTableBegin(); @Template(/div) SafeHtml stockInfoTableEnd(); @Template(div) SafeHtml stockInfoRowBegin(); @Template(/div) SafeHtml stockInfoRowEnd(); @Template(div class=\itemsTableWidget-StockInfoHeaderColumn\{0} /div) SafeHtml stockInfoColumn(String columnName); @Template(div class=\itemsTableWidget-StockInfoDataColumn\{0}/ div) SafeHtml stockInfoBodyData(String data); @Template(div class=\itemsTableWidget-clearLayout\/div) SafeHtml clearStockInfoLayout(); } private static Template template = GWT.create(Template.class); /** * Creates and initializes new instance of this class. */ public CustomCell() { super(click, mouseover, mouseout); } @Override public void render(Cell.Context context, MainObject value, SafeHtmlBuilder sb) { if (value != null) { renderStockInfo(context, value, sb); } } private void renderStockInfo(Cell.Context context, MainObject value, SafeHtmlBuilder sb) { SubObject itemStockInfo = value.getSub(); ListString columnNameList = value.getColumnNames(); // stockinfo row start // table start sb.append(template.stockInfoTableBegin()); // header start sb.append(template.stockInfoRowBegin()); for (String columnName : columnNameList) {
GWT Chat Widget with Jetty
Hi, I want to add a very simple chat window to my GWT web application with Jetty 6 on the server side. Can anybody recommend me a good OS project for that? I checked atmosphere so far but I am sure there are many others. -- 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/-/XJIU80LosuQJ. 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.
Gwt4Touch, Gwt4Titanium
Hi! Does anybody have some experience with Gwt4Touch, Gwt4Titanium? thx, Lehel -- 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: Exception adding Items to ListBox in IE8
Thanks alot for the hint! Indeed I'm using html5shim but would have never thought that its causing the problem! It's working now when I remove html5shim. You made my day : ) Am Dienstag, 20. März 2012 15:30:32 UTC+1 schrieb Freddi Hinz: I had exactly the same problem. In my case it was due to the twitter bootstrap template, which includes the html5shim: !--[if lt IE 9] script src=http://html5shim.googlecode.com/svn/trunk/html5.js;/script ![endif]-- Seemed to be an issue related to the handling of select/option elements in html5.js. -- 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/-/Scg7B7t51OQJ. 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: HTML-safety best practices
I have a few questions about this. If I change to: interface Template extends SafeHtmlTemplates { @Template(img src=\{0}\/) SafeHtml img(SafeUri safeUri); } 1. How does the template know to call asString() on the safeUri instance? 2. With this change I now have the same problem but in the SafeUri implementation. How do I take a URL variable and sanitize it so it's safe? Or because these URL's come from the server can I just declare them safe by convention. 3. How do I get rid of the compiler warning? Once I've manually made these safe is there a way to annotate the @Template usage so the compiler knows it's safe? Thanks, -Dave On Mar 20, 2:53 pm, Jens jens.nehlme...@gmail.com wrote: You should use GWT's UriUtils to construct a SafeUri and your template method should then take a SafeUri as parameter instead of a string. -- J. Am Dienstag, 20. März 2012 20:22:59 UTC+1 schrieb dhoffer: I get the following error: [INFO] Generating method body for img() [INFO] [WARN] Template with variable in URL attribute context: The template code generator cannot guarantee HTML-safety of the template -- please inspect manually or use SafeUri to specify arguments in a URL attribute context Using this code template interface Template extends SafeHtmlTemplates { @Template(img src=\{0}\/) SafeHtml img(String url); } What's the right way to make this HTML safe? The url string is provided by the application not end users of the application. However I'd like to not have build warnings of this type. -Dave -- 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 share classes between two different modules with two different pages
Yes i have two seperate *.gwt.xml for both the modules. And i inherit ModuleB into moduleA as follows: ModuleA.gwt.xml inherits com.pdstechi.modulenameB.ModuleB And then i use com.pdstechi.modulenameB.shared.AbcDto into com.pdstechi.modulenameA.client package, it fails compilation with message 'Source code for com.pdstechi.modulenameB.shared.AbcDto is not available'. Thanks Deepak On Wed, Mar 21, 2012 at 6:21 PM, Andrew Scully andrewscu...@gmail.comwrote: It sounds like you just need two separate gwt.xml files within the same project. There is no reason why you can't use the same inherits within both. On Tuesday, 20 March 2012 21:22:58 UTC, Deepak Singh wrote: Hi All, I have a GWT project with 2 modules. ModuleA and ModuleB Both are having their own html page. i.e. tow seperate html pages so seperate Rootpanel for both of them. So i cant inherit one into another. How can i use the same class(in shared package) in both the modules ? Thanks Deepak Singh -- 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/-/2pEfxrUOUdQJ. 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. -- Deepak Singh -- 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: Gwt4Touch, Gwt4Titanium
Feel free to post questions, ask for feedback, etc... also in the forum. http://www.emitrom.com/forum Best regards, Alfredo On Wed, Mar 21, 2012 at 11:02 AM, Lehel sipos.le...@gmail.com wrote: Hi! Does anybody have some experience with Gwt4Touch, Gwt4Titanium? thx, Lehel -- 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. -- Alfredo Quiroga-Villamil AOL/Yahoo/Gmail/MSN IM: lawwton -- 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: Change DatePicker language
On Wednesday, March 21, 2012 2:02:27 PM UTC+1, nicanor.babula wrote: Hi everyone, How can I change the display language of the DatePicker object? My app is internationalized on a GWT level, but enabling more than 1 language in module.gwt.xml generates a war too big to be deployed on Appengine, Could it be because of the WEB-INF/deploy? If so, pass -deploy to the compiler to redirect these files to another folder outside your WAR. therefore I am stuck with the default which I assume is english. Is there a way to change only the locale of the DatePicker or to change the default locale? You can change the default locale with the following in your gwt.xml: extend-property name=locale value=fr / set-property-default name=locale value=fr / set-property name=locale value=fr / -- 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/-/NMT8ZWQR7eYJ. 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: Custom cell with table causes event problem in cellTable
Known issue, fixed in trunk: http://code.google.com/p/google-web-toolkit/issues/detail?id=5714q=cell%20table%20event On Wednesday, March 21, 2012 3:22:04 PM UTC+1, Musicman75 wrote: Hello, I've a problem using a custom cell in a cellTable. My custom renderer renders the data with templates and includes a table. On mouseOver the main cellTable highlights the row, but on mouseOver on the included table, the highlight of the row gets lost. How can I get the row highlighted even if I hover the internal table? Thanks for help. Here's a small example: Playground.java (implementing EntryPoint): -- package com.heiler.playground.client; import com.google.gwt.cell.client.TextCell; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.cellview.client.CellTable; import com.google.gwt.user.cellview.client.Column; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.view.client.ListDataProvider; import com.heiler.playground.shared.MainObject; public class Playground implements EntryPoint { @Override public void onModuleLoad() { ListDataProviderMainObject dataProvider = new ListDataProviderMainObject(); for (int i = 0; i 5; i++) { dataProvider.getList().add(new MainObject(i)); } CellTableMainObject mainTable = new CellTableMainObject(); ColumnMainObject, String idColumn = new ColumnMainObject, String( new TextCell()) { @Override public String getValue(MainObject object) { return Integer.toString(object.getId()); } }; ColumnMainObject, MainObject subColumn = new ColumnMainObject, MainObject( new CustomCell()) { @Override public MainObject getValue(MainObject object) { return object; } }; mainTable.addColumn(idColumn, ID); mainTable.addColumn(subColumn, Sub); dataProvider.addDataDisplay(mainTable); mainTable.setWidth(800px); RootPanel.get().add(mainTable); } } --- CustomCell.java: --- package com.heiler.playground.client; import java.util.List; import com.google.gwt.cell.client.AbstractCell; import com.google.gwt.cell.client.Cell; import com.google.gwt.cell.client.ValueUpdater; import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.EventTarget; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.safehtml.client.SafeHtmlTemplates; import com.google.gwt.safehtml.client.SafeHtmlTemplates.Template; import com.google.gwt.safehtml.shared.SafeHtml; import com.google.gwt.safehtml.shared.SafeHtmlBuilder; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Event; import com.heiler.playground.shared.MainObject; import com.heiler.playground.shared.SubObject; public class CustomCell extends AbstractCellMainObject { interface Template extends SafeHtmlTemplates { @Template(div cellspacing=\0\ cellpadding=\0\) SafeHtml stockInfoTableBegin(); @Template(/div) SafeHtml stockInfoTableEnd(); @Template(div) SafeHtml stockInfoRowBegin(); @Template(/div) SafeHtml stockInfoRowEnd(); @Template(div class=\itemsTableWidget-StockInfoHeaderColumn\{0} /div) SafeHtml stockInfoColumn(String columnName); @Template(div class=\itemsTableWidget-StockInfoDataColumn\{0}/ div) SafeHtml stockInfoBodyData(String data); @Template(div class=\itemsTableWidget-clearLayout\/div) SafeHtml clearStockInfoLayout(); } private static Template template = GWT.create(Template.class); /** * Creates and initializes new instance of this class. */ public CustomCell() { super(click, mouseover, mouseout); } @Override public void render(Cell.Context context, MainObject value, SafeHtmlBuilder sb) { if (value != null) { renderStockInfo(context, value, sb); } } private void renderStockInfo(Cell.Context context, MainObject value, SafeHtmlBuilder sb) { SubObject itemStockInfo = value.getSub();
Re: HTML-safety best practices
On Wednesday, March 21, 2012 4:15:10 PM UTC+1, dhoffer wrote: I have a few questions about this. If I change to: interface Template extends SafeHtmlTemplates { @Template(img src=\{0}\/) SafeHtml img(SafeUri safeUri); } 1. How does the template know to call asString() on the safeUri instance? SafeHtmlTemplates knows about SafeUri (remember the warning it outputs when you use String? ;-) ) 2. With this change I now have the same problem but in the SafeUri implementation. How do I take a URL variable and sanitize it so it's safe? UriUtils.fromString() http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/safehtml/shared/UriUtils.html#fromString(java.lang.String) Or because these URL's come from the server can I just declare them safe by convention. No. Only those URLs that are hard-coded in your client-side app can be trusted. 3. How do I get rid of the compiler warning? Once I've manually made these safe is there a way to annotate the @Template usage so the compiler knows it's safe? The only way to shut the generator up is to use SafeUri and SafeStyles when it tells you to do so. -- 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/-/8E8nxGqHyNAJ. 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 FileUpload - Servlet options and handling response
Hi Ashish. Even i wan t to upload file on server and send back to client. I found the follwing link which is working fine. http://stackoverflow.com/a/606/780393 Regards On Tue, Mar 20, 2012 at 4:39 PM, kim young ill khi...@googlemail.comwrote: On Fri, Mar 16, 2012 at 10:27 PM, Ashish testysi...@gmail.com wrote: I am new to GWT and am trying to implement a file upload functionality. Found some implementation help over the internet and used that as reference. But have some questions related to that: The actual upload or writing the contents of file on server(or disk) will be done by a servlet. Is it necessary that this servlet (say MyFileUploadServlet) extends HttpServlet? OR I can use RemoteServiceServlet or any other servlet or implement any other interface? If yes, which method do I need to implement/override? In my servlet, after everything is done, I need to return back the response back to the client. I think form.addSubmitCompleteHandler() can be used to achieve that. From servlet, I could return text/html (or String type object) and then use SubmitCompleteEvent.getResults() to get the result. Question is that can I use my custom object instead of String (lets say MyFileUploadResult), populate the results in it and then pass it back to client? or can I get back JSON object? Currently, after getting back the response and using SubmitCompleteEvent.getResults(), I am getting some HTML tags added to the actual response such as : pre Image upload successfully /pre . Is there a way to get rid of that? yes, set response-type to text/html would help Thanks a lot in advance! Regards, Ashish -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- 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: Defining a Jetty realm in hosted mode
Create a jetty-web.xml file under your war/WEB-INF folder Mine is defined as follows ?xml version=1.0? !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN http://jetty.mortbay.org/configure.dtd; Configure class=org.mortbay.jetty.webapp.WebAppContext Get name=securityHandler Set name=userRealm New class=org.mortbay.jetty.security.HashUserRealm Set name=namedefault/Set Set name=configc:\ocs\jettyusers.properties/Set /New /Set /Get /Configure my jettyusers.properties file contains the username, password and roles for each user e.g. pstockley: test, nirvana_tester -- 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/-/hWgPbLWhDPMJ. 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 share classes between two different modules with two different pages
I would create a base module from which A and B inherit. Or you can try in moduleB.gwt.xml source path=../moduleA/client / El miércoles 21 de marzo de 2012 16:16:46 UTC+1, Deepak Singh escribió: Yes i have two seperate *.gwt.xml for both the modules. And i inherit ModuleB into moduleA as follows: ModuleA.gwt.xml inherits com.pdstechi.modulenameB.ModuleB And then i use com.pdstechi.modulenameB.shared.AbcDto into com.pdstechi.modulenameA.client package, it fails compilation with message 'Source code for com.pdstechi.modulenameB.shared.AbcDto is not available'. Thanks Deepak -- 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/-/Pchfn1wJN08J. 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.
GIN 1.5 and GUICE 3.0 Integration Error
In my build path I have this jars lib aopalliance.jar gin-1.5-post-gwt-2.2.jar guice-3.0.jar guice-assistedinject-3.0.jar guice-servlet-3.0 javax.inject.jar And got this error. java.lang.NoSuchMethodError: com.google.inject.Scopes.isSingleton(Lcom/google/inject/Binding;)Z at com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:103) at com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82) at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:102) at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:172) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:191) at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146) at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811) at com.google.gwt.dev.DevMode.main(DevMode.java:311) I'm also using GWT 2.4 and GAE 1.6.3 TIA -- 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/-/J5DrlfRMJLgJ. 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: Deprecating TreeItem.addItem/insertItem(String html) in favor of methods that take SafeHtml. Th... (issue1666803)
committed as r10920 http://gwt-code-reviews.appspot.com/1666803/diff/1/user/test/com/google/gwt/user/client/ui/TreeTest.java File user/test/com/google/gwt/user/client/ui/TreeTest.java (right): http://gwt-code-reviews.appspot.com/1666803/diff/1/user/test/com/google/gwt/user/client/ui/TreeTest.java#newcode187 user/test/com/google/gwt/user/client/ui/TreeTest.java:187: // Normalize the html for ancient safari 3 On 2012/03/20 16:32:36, jat wrote: Could this comment be clearer, like Safari 3 leaves in the HTML. Done. http://gwt-code-reviews.appspot.com/1666803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] FF11 Devmode Plugin (issue1667803)
Reviewers: conroy, Description: FF11 Devmode Plugin Please review this at http://gwt-code-reviews.appspot.com/1667803/ Affected files: M plugins/xpcom/Makefile A plugins/xpcom/VisualStudio/ff110-xpcom.vcproj M plugins/xpcom/install-template.rdf M plugins/xpcom/prebuilt/extension/chrome.manifest M plugins/xpcom/prebuilt/update.rdf -- http://groups.google.com/group/Google-Web-Toolkit-Contributors