Re: need more abstract AsyncCallback class
that doesn't work either :-|. I need something that works on all collections. Do i need a ? somewhere probably? On 11 Apr., 16:52, Magno Machado magn...@gmail.com wrote: Try this: class LoadMapsE, T extends CollectionE implements AsyncCallbackT { On Mon, Apr 11, 2011 at 11:43 AM, tanteanni tantea...@hotmail.com wrote: meanwhile i tried your suggestions but i am struggling at getting the right signature: so i want a callback working of all kinds of collections and adding the result to the given collection: at the moment i got this: private class LoadMapsT extends Collection implements AsyncCallbackT { private T target; protected LoadMaps(T whereTo) { target = whereTo; } @Override public void onFailure(Throwable caught) { Window.alert(caught.getMessage()); } @Override public void onSuccess(T result) { target.addAll(result); } } the only problem is now: i can't call the constructor: MapString, ListString myMap = new HashMapString, ListString(); LoadMaps loadMaps = new LoadMaps(myMap); --The constructor AdminUnits.LoadMaps(TaskDoneEvent, MapString,ListString) is undefined besides this i get Type safety: The method addAll(Collection) belongs to the raw type Collection. References to generic type CollectionE should be parameterized in LoadMaps-onSuccess-target.addAll(result) so how to fix this On 11 Apr., 14:00, tanteanni tantea...@hotmail.com wrote: i am fairly new to gwt and struggling some how on correct/nice RPC implementation (it is working but code becomes ugly). On my first GWT based apps i often load some lists/data from db into front end. (Lists to be used in combo boxes for instance). so if i have a widget that needs 3 different lists (probably ListString or MapString, String) i specify a service-method for each list. the problem is to load all those lists, i have to implement one class (...implements AsyncCallback) for each list. but the only difference between this implementations is that they load the result in different lists: public void onSuccess(){ list1 = result } so how to implement an abstract callback class that could load its result into a given list/object (- a field of mother class) (if call by reference would exist in java i would giv list1 as an parameter for constructor and onSucces would load the result into this reference?!) an optimal implementation would be if the result type could be a generic type: A class lie this: class GeneralCallbackT implements AsyncCallbackT{ public GeneralCallback(T target){ ... } public onSuccess(T result){ target = result; } } is it possible to get such an abstract callback class? -- 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. -- Magno Machado Paulohttp://blog.magnomachado.com.brhttp://code.google.com/p/emballo/ -- 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: need more abstract AsyncCallback class
ok my fault - i tried to use a map - and map isn't a collection. stupid me On 12 Apr., 08:05, tanteanni tantea...@hotmail.com wrote: that doesn't work either :-|. I need something that works on all collections. Do i need a ? somewhere probably? On 11 Apr., 16:52, Magno Machado magn...@gmail.com wrote: Try this: class LoadMapsE, T extends CollectionE implements AsyncCallbackT { On Mon, Apr 11, 2011 at 11:43 AM, tanteanni tantea...@hotmail.com wrote: meanwhile i tried your suggestions but i am struggling at getting the right signature: so i want a callback working of all kinds of collections and adding the result to the given collection: at the moment i got this: private class LoadMapsT extends Collection implements AsyncCallbackT { private T target; protected LoadMaps(T whereTo) { target = whereTo; } @Override public void onFailure(Throwable caught) { Window.alert(caught.getMessage()); } @Override public void onSuccess(T result) { target.addAll(result); } } the only problem is now: i can't call the constructor: MapString, ListString myMap = new HashMapString, ListString(); LoadMaps loadMaps = new LoadMaps(myMap); --The constructor AdminUnits.LoadMaps(TaskDoneEvent, MapString,ListString) is undefined besides this i get Type safety: The method addAll(Collection) belongs to the raw type Collection. References to generic type CollectionE should be parameterized in LoadMaps-onSuccess-target.addAll(result) so how to fix this On 11 Apr., 14:00, tanteanni tantea...@hotmail.com wrote: i am fairly new to gwt and struggling some how on correct/nice RPC implementation (it is working but code becomes ugly). On my first GWT based apps i often load some lists/data from db into front end. (Lists to be used in combo boxes for instance). so if i have a widget that needs 3 different lists (probably ListString or MapString, String) i specify a service-method for each list. the problem is to load all those lists, i have to implement one class (...implements AsyncCallback) for each list. but the only difference between this implementations is that they load the result in different lists: public void onSuccess(){ list1 = result } so how to implement an abstract callback class that could load its result into a given list/object (- a field of mother class) (if call by reference would exist in java i would giv list1 as an parameter for constructor and onSucces would load the result into this reference?!) an optimal implementation would be if the result type could be a generic type: A class lie this: class GeneralCallbackT implements AsyncCallbackT{ public GeneralCallback(T target){ ... } public onSuccess(T result){ target = result; } } is it possible to get such an abstract callback class? -- 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. -- Magno Machado Paulohttp://blog.magnomachado.com.brhttp://code.google.com/p/emballo/ -- 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: need more abstract AsyncCallback class
now it is working nearly perfect - only some raw type warnings remain - how to get rid of them? my signature look now like this: private class LoadMapsT extends Map implements AsyncCallbackT i get 2 raw type warnings - one in signature. this one i can eliminate by adding Map?,? but then target.putAll(result) isn't working anymore. so how to distribute ? correctly? On 11 Apr., 14:00, tanteanni tantea...@hotmail.com wrote: i am fairly new to gwt and struggling some how on correct/nice RPC implementation (it is working but code becomes ugly). On my first GWT based apps i often load some lists/data from db into front end. (Lists to be used in combo boxes for instance). so if i have a widget that needs 3 different lists (probably ListString or MapString, String) i specify a service-method for each list. the problem is to load all those lists, i have to implement one class (...implements AsyncCallback) for each list. but the only difference between this implementations is that they load the result in different lists: public void onSuccess(){ list1 = result } so how to implement an abstract callback class that could load its result into a given list/object (- a field of mother class) (if call by reference would exist in java i would giv list1 as an parameter for constructor and onSucces would load the result into this reference?!) an optimal implementation would be if the result type could be a generic type: A class lie this: class GeneralCallbackT implements AsyncCallbackT{ public GeneralCallback(T target){ ... } public onSuccess(T result){ target = result; } } is it possible to get such an abstract callback class? -- 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: DockLayoutPanel -- Get Width/Height of center panel
Hi, You can retrieve the container element of your center and then get height and width. Widget centerWidget = ... ; // the widget at center Element container = myDockLayoutPanel.getWidgetContainerElement(centerWidget); int width = container.getOffsetWidth(); int height = container.getOffsetHeight(); Alexandre. 2011/4/12 Matthew Hill matt2...@gmail.com Hi. I need to make a canvas element within the center panel of a DockLayoutPanel. However, to make a canvas, I must know the width and height which it will occupy. How can I obtain the width and height of the center area of a DockLayoutPanel? -- 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: Deploying on Apache
If only life was that simple, I think it's to do with the servlet mappings(well by the errors on Apache startup thats obvious). What kind of tweaking is needed here? SEVERE: Parse error in application web.xml file at jndi:/localhost/war/WEB-INF/web.xml java.lang.IllegalArgumentException: Invalid url-pattern routeplanner/login_service in servlet mapping On Tue, Apr 12, 2011 at 12:21 AM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: You simple paste war file in webapps. Don't create any folder 2011/4/11 John Doran john.do...@hotmail.com Yes, Tomcat Apache.That is a servlet container as far as I know. On Mon, Apr 11, 2011 at 9:48 PM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Are you mean Tomcat Apache? Because if you use GWT-RPC communication you need a Servlet Container. 2011/4/11 John Doran john.do...@hotmail.com Hi all, I'm just trying to deploy my application for the first time, I want to do it through Apache, there's a lot of stuff online about it, but some instructions are a bit confusing, can anyone point me in the right direction or give some advice? My application is using RPC and serverside I'm using Hibernate which is linked to a mySQL db. I preformed the GWT compile on my project, the in Apache I created a folder called project-name in the webapps folder then pasted the war output from my GWT compile into it. Then ran the server and did localhist:8080/project-name/war/entrypoint.html this brought me to my home page but the center of layout panel was missing. Regards, John. -- 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. -- 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: Deploying on Apache
try /routeplanner/login_service instead On Tue, Apr 12, 2011 at 9:58 AM, John Doran john.do...@hotmail.com wrote: If only life was that simple, I think it's to do with the servlet mappings(well by the errors on Apache startup thats obvious). What kind of tweaking is needed here? SEVERE: Parse error in application web.xml file at jndi:/localhost/war/WEB-INF/web.xml java.lang.IllegalArgumentException: Invalid url-pattern routeplanner/login_service in servlet mapping On Tue, Apr 12, 2011 at 12:21 AM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: You simple paste war file in webapps. Don't create any folder 2011/4/11 John Doran john.do...@hotmail.com Yes, Tomcat Apache.That is a servlet container as far as I know. On Mon, Apr 11, 2011 at 9:48 PM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Are you mean Tomcat Apache? Because if you use GWT-RPC communication you need a Servlet Container. 2011/4/11 John Doran john.do...@hotmail.com Hi all, I'm just trying to deploy my application for the first time, I want to do it through Apache, there's a lot of stuff online about it, but some instructions are a bit confusing, can anyone point me in the right direction or give some advice? My application is using RPC and serverside I'm using Hibernate which is linked to a mySQL db. I preformed the GWT compile on my project, the in Apache I created a folder called project-name in the webapps folder then pasted the war output from my GWT compile into it. Then ran the server and did localhist:8080/project-name/war/entrypoint.html this brought me to my home page but the center of layout panel was missing. Regards, John. -- 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. -- 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.
customize CellTable css style
Hi, I tried to customize gwt CellTable with no success. Am I missing something? Here is what i did: 1) create custom resource interface: public interface CellTableResource extends Resources { public CellTable.Resources INSTANCE = GWT.create(CellTableResource.class); /** * The styles used in this widget. */ @NotStrict @Source(com/company/public/com/company/gbb/css/CellTable.css) CellTable.Style cellTableStyle(); } 2) create css file in src/main/resources/com/cayetano/public/com/cayetano/gbb/css/CellTable.css (note: there are no images for gwt-image attribute, but still compiles with no errors). .cellTable { border: none; } .firstColumn { } @sprite .footer { gwt-image: 'cellTableFooterBackground'; background-color: #fffbd6; border: none; text-align: center; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma; } @sprite .header { gwt-image: 'cellTableHeaderBackground'; background-color: #fffbd6; border: none; padding: 0px 10px; text-align: center; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma; } .cell { background-color: #fffbd6; padding: 4px 10px; border: none; text-align: center; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma; } .firstColumnFooter { border-left: 0px; } .firstColumnHeader { border-left: 0px; } .evenRow { background-color: #fffbd6; } .oddRow { background-color: black; } .hoveredRow { background-color: #fffbd6; } @sprite .selectedRow { gwt-image: 'cellTableSelectedBackground'; background-color: #fffbd6; border: none; text-align: center; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma; } .cellTableLastColumnHeader{} .cellTableHeader{} .cellTableLoading{} .cellTableSortedHeaderDescending{} .cellTableFirstColumn{} .cellTableFirstColumnHeader{} .cellTableFooter{} .cellTableKeyboardSelectedRowCell{} .cellTableWidget{} .cellTableSelectedRow{} .cellTableLastColumn{} .cellTableLastColumnFooter{} .cellTableSortableHeader{} .cellTableKeyboardSelectedRow{} .cellTableKeyboardSelectedCell{} .cellTableHoveredRowCell{} .cellTableCell{} .cellTableEvenRowCell{} .cellTableFirstColumnFooter{} .cellTableOddRow{} .cellTableEvenRow{} .cellTableSelectedRowCell{} .cellTableSortedHeaderAscending{} .cellTableOddRowCell{} .cellTableHoveredRow{} 3) create cell table with overridden resources CellTableTick historyTable = new CellTableUpDownBetView.Tick(5, CellTableResource.INSTANCE); Result: Default css style is not shown, in fact no style is shown. Could you help please? 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.
Re: Is there a way to generate i18n property from Constants?
When you compile your project, pass the -extra argument with a folder path (e.g. -extra extras), GWT will generate the *.properties there. You might have to add a few annotations to your interface though, such as @ Generatehttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/i18n/client/LocalizableResource.Generate.html . See also http://code.google.com/webtoolkit/doc/latest/DevGuideI18n.html#DevGuideAnnotations -- 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: Deploying on Apache
Sorry but I don't understand what you mean try /routeplanner/login_service instead. Is there any configuration needed between the Apache web.xml file in the conf folder and the web.xml which I configure when setting up RPC? On Tue, Apr 12, 2011 at 8:04 AM, khiem nguyen khi...@googlemail.com wrote: try /routeplanner/login_service instead On Tue, Apr 12, 2011 at 9:58 AM, John Doran john.do...@hotmail.comwrote: If only life was that simple, I think it's to do with the servlet mappings(well by the errors on Apache startup thats obvious). What kind of tweaking is needed here? SEVERE: Parse error in application web.xml file at jndi:/localhost/war/WEB-INF/web.xml java.lang.IllegalArgumentException: Invalid url-pattern routeplanner/login_service in servlet mapping On Tue, Apr 12, 2011 at 12:21 AM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: You simple paste war file in webapps. Don't create any folder 2011/4/11 John Doran john.do...@hotmail.com Yes, Tomcat Apache.That is a servlet container as far as I know. On Mon, Apr 11, 2011 at 9:48 PM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Are you mean Tomcat Apache? Because if you use GWT-RPC communication you need a Servlet Container. 2011/4/11 John Doran john.do...@hotmail.com Hi all, I'm just trying to deploy my application for the first time, I want to do it through Apache, there's a lot of stuff online about it, but some instructions are a bit confusing, can anyone point me in the right direction or give some advice? My application is using RPC and serverside I'm using Hibernate which is linked to a mySQL db. I preformed the GWT compile on my project, the in Apache I created a folder called project-name in the webapps folder then pasted the war output from my GWT compile into it. Then ran the server and did localhist:8080/project-name/war/entrypoint.html this brought me to my home page but the center of layout panel was missing. Regards, John. -- 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. -- 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. -- 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.
Editor doesn't display chained Entity
Hello I have a working Editor ( Loading and saving Entity ) the problem is that a chained Entity ( handled by ValueListBox ) is not showed on loading though it can be selected and saved , it is blanc on loading I must miss something as usual ! thanks Patrick -- 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: onKeyDown getting incorrect keyCode
key code != char code. Different keys have different (key) codes, even if they produce the same chars. You should only have to handle the KeyPress event (so, use a KeyPressHandler instead of the deprecated KeyboardListener). Note that you'd have to take special care to a few chars too: '0' (because Firefox fires KeyPress events even for keys that don't produce chars, such as the shift key) and '\t' (otherwise you'll prevent tabbing out of the field) at least, maybe '\n' too. I believe it's best to just sanitize the value on the ChangeEvent of the field (because the user could paste anything it wants into the field, for example), but YMMV (the rest of our team, and our client, disagree with me, so we're using a KeyPressHandler to filter keys upfront; but you still need to sanitize the value somewhere –ChangeEvent or getValue– to handle the paste use case) -- 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.
SuggestBox in Editor
I'd like to have a ValueSuggestBox to be used like ValueLisBox inside an Editor Could it be done ? How ? Thanks Patrick -- 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: SuggestBox in Editor
It's hard to use a SuggestBox for anything else than a String value (believe me, we're struggling with it for weeks, regularly stumbling on a new edge case –well, we're asking our server for suggestions, and we need to dispatch ValueChangeEvents, so maybe it's a special use case–). If you can synchronously convert the String value into the type of value you need (and you don't need accurate value change events), then it should be quite easy: wrap the SuggestBox in a Composite, similarly to how ValueListBox wraps a ListBox. -- 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: Deploying on Apache
the exception comes from here: SEVERE: Parse error in application web.xml file at jndi:/localhost/war/WEB-INF/web.xml java.lang.IllegalArgumentException: Invalid url-pattern routeplanner/login_service in servlet mapping so u should edit the web.xml of your webapp , change url-pattern routeplanner/login_service /url-patern to url-pattern /routeplanner/login_service /url-patern On Tue, Apr 12, 2011 at 10:28 AM, John Doran john.do...@hotmail.com wrote: Sorry but I don't understand what you mean try /routeplanner/login_service instead. Is there any configuration needed between the Apache web.xml file in the conf folder and the web.xml which I configure when setting up RPC? On Tue, Apr 12, 2011 at 8:04 AM, khiem nguyen khi...@googlemail.comwrote: try /routeplanner/login_service instead On Tue, Apr 12, 2011 at 9:58 AM, John Doran john.do...@hotmail.comwrote: If only life was that simple, I think it's to do with the servlet mappings(well by the errors on Apache startup thats obvious). What kind of tweaking is needed here? SEVERE: Parse error in application web.xml file at jndi:/localhost/war/WEB-INF/web.xml java.lang.IllegalArgumentException: Invalid url-pattern routeplanner/login_service in servlet mapping On Tue, Apr 12, 2011 at 12:21 AM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: You simple paste war file in webapps. Don't create any folder 2011/4/11 John Doran john.do...@hotmail.com Yes, Tomcat Apache.That is a servlet container as far as I know. On Mon, Apr 11, 2011 at 9:48 PM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Are you mean Tomcat Apache? Because if you use GWT-RPC communication you need a Servlet Container. 2011/4/11 John Doran john.do...@hotmail.com Hi all, I'm just trying to deploy my application for the first time, I want to do it through Apache, there's a lot of stuff online about it, but some instructions are a bit confusing, can anyone point me in the right direction or give some advice? My application is using RPC and serverside I'm using Hibernate which is linked to a mySQL db. I preformed the GWT compile on my project, the in Apache I created a folder called project-name in the webapps folder then pasted the war output from my GWT compile into it. Then ran the server and did localhist:8080/project-name/war/entrypoint.html this brought me to my home page but the center of layout panel was missing. Regards, John. -- 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. -- 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. -- 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
Re: Deploying on Apache
Yes, brilliant thanks for your help! Finally have my project up and running, very exciting! On Tue, Apr 12, 2011 at 9:00 AM, khiem nguyen khi...@googlemail.com wrote: the exception comes from here: SEVERE: Parse error in application web.xml file at jndi:/localhost/war/WEB-INF/web.xml java.lang.IllegalArgumentException: Invalid url-pattern routeplanner/login_service in servlet mapping so u should edit the web.xml of your webapp , change url-pattern routeplanner/login_service /url-patern to url-pattern /routeplanner/login_service /url-patern On Tue, Apr 12, 2011 at 10:28 AM, John Doran john.do...@hotmail.comwrote: Sorry but I don't understand what you mean try /routeplanner/login_service instead. Is there any configuration needed between the Apache web.xml file in the conf folder and the web.xml which I configure when setting up RPC? On Tue, Apr 12, 2011 at 8:04 AM, khiem nguyen khi...@googlemail.comwrote: try /routeplanner/login_service instead On Tue, Apr 12, 2011 at 9:58 AM, John Doran john.do...@hotmail.comwrote: If only life was that simple, I think it's to do with the servlet mappings(well by the errors on Apache startup thats obvious). What kind of tweaking is needed here? SEVERE: Parse error in application web.xml file at jndi:/localhost/war/WEB-INF/web.xml java.lang.IllegalArgumentException: Invalid url-pattern routeplanner/login_service in servlet mapping On Tue, Apr 12, 2011 at 12:21 AM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: You simple paste war file in webapps. Don't create any folder 2011/4/11 John Doran john.do...@hotmail.com Yes, Tomcat Apache.That is a servlet container as far as I know. On Mon, Apr 11, 2011 at 9:48 PM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Are you mean Tomcat Apache? Because if you use GWT-RPC communication you need a Servlet Container. 2011/4/11 John Doran john.do...@hotmail.com Hi all, I'm just trying to deploy my application for the first time, I want to do it through Apache, there's a lot of stuff online about it, but some instructions are a bit confusing, can anyone point me in the right direction or give some advice? My application is using RPC and serverside I'm using Hibernate which is linked to a mySQL db. I preformed the GWT compile on my project, the in Apache I created a folder called project-name in the webapps folder then pasted the war output from my GWT compile into it. Then ran the server and did localhist:8080/project-name/war/entrypoint.html this brought me to my home page but the center of layout panel was missing. Regards, John. -- 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. -- 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. -- You received this message because you are subscribed to the Google Groups
Login security question
Hi According to article LoginSecurityFAQ, http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ , I have a point that I really want someone to make it clear for me. From the article, Your server will then validate this login, and return a sessionID to your GWT app. The GWT app will store this sessionID in a static field. For every further request your GWT app makes to your server, include this sessionID in the payload of the request. (Either in the JSON data or the object you are transferring using GWT-RPC). I assume the server returns the sessionId by RPC to the client after validation. How can I include this sessionID in the payload of the request using GWT-RPC? How can I tell the sessionID is in the payload of the request or not in the payload? Thanks Ming -- 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: need more abstract AsyncCallback class
i got it - it is similar with collections: private static class LoadMapsK,V implements AsyncCallbackMapK,V { private MapK,V target; protected LoadMaps(TaskDoneEvent ev, MapK,V whereTo) { target = whereTo; } @Override public void onFailure(Throwable caught) { Window.alert(caught.getMessage()); } @Override public void onSuccess(MapK,V result) { target.putAll(result); } } thx to both of you! On 11 Apr., 14:00, tanteanni tantea...@hotmail.com wrote: i am fairly new to gwt and struggling some how on correct/nice RPC implementation (it is working but code becomes ugly). On my first GWT based apps i often load some lists/data from db into front end. (Lists to be used in combo boxes for instance). so if i have a widget that needs 3 different lists (probably ListString or MapString, String) i specify a service-method for each list. the problem is to load all those lists, i have to implement one class (...implements AsyncCallback) for each list. but the only difference between this implementations is that they load the result in different lists: public void onSuccess(){ list1 = result } so how to implement an abstract callback class that could load its result into a given list/object (- a field of mother class) (if call by reference would exist in java i would giv list1 as an parameter for constructor and onSucces would load the result into this reference?!) an optimal implementation would be if the result type could be a generic type: A class lie this: class GeneralCallbackT implements AsyncCallbackT{ public GeneralCallback(T target){ ... } public onSuccess(T result){ target = result; } } is it possible to get such an abstract callback class? -- 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: UIField NullPointerException
Yes, the declaration of your UiBinder interface is important for understanding the problem. Make sure the 2nd type parameter is your view implementation class and not, for example, an interface that your view implements. I've seen NullPointerExceptions like you describe when a view interface is used there by mistake. -Brian On Tue, Apr 12, 2011 at 12:25 AM, Y2i yur...@gmail.com wrote: I've never had a NullPointerException. Why do you need to cast the result of uiBinder.createAndBindUi()? How is uiBinder declared? -- 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. -- -- Brian -- 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.
suggestionBox backed with pairs value-text (id-ambiguous name)
i need a way to get a suggestion box that suggests from an ambiguous list of strings, but every string has an unique id. if a suggestion is chosen / selected i need the id of this selected item. how implement this? (at the moment i use ListBox, i guess there i would use addItem(name,id)?) -- 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: suggestionBox backed with pairs value-text (id-ambiguous name)
Each suggestion can give a display text (what will be displayed in the suggestion list, would be the name+id probably in your case) and a replacement text (what will be used as the value, and displayed in the text box upon selection in the list of suggestions). For this, you have to provide your own SuggestOracle. If you don't want to implement your own matching logic, then you can delegate to a MultiwordSuggestOracle, where you'll put the display text, and then convert the returned suggestions to your owns, by matching the display text back to the replacement text (and yes, this means having no duplicate display text, but that's a given if you want your user to pick the right suggestion). In other words: - build a MapString,Suggestion from the display text to the suggestion (with the same display text, and the ID as the replacement text) - put all the keys from this map in a MultiwordSuggestOracle - delegate the call to your oracle to the MultiwordSuggestOracle, wrapping the callback to transform the result back to your suggestions; by looking up the text into the map you previously built and building a new response with the result. -- 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: UIField NullPointerException
That did it! Changing interface MainViewImplUiBinder extends UiBinderDockLayoutPanel, MainView { } to interface MainViewImplUiBinder extends UiBinderDockLayoutPanel, MainViewImpl { } fixed it :) Thanks for your help. -- 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.
GWT custom tree with styling.
Hi all Struggling a bit with styling a gwt tree to fit a design I got handed by some people who actually know this stuff. Posted a question on Stackoverflow: http://stackoverflow.com/questions/5623097/gwt-tree-styling For instance, how do I get the leaf images on the right side instead of the left side. And how do I make the leafs react to mouseover. It seems when you look at the HTML code generated by the GWT there's a lot of table elements and divs that you can access and style. Do I have to make my own renderer to get complete control of the tree layout If I get this working I will write a small tutorial about it since lots of people seem to struggle with styling and GWT. /x -- 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: suggestionBox backed with pairs value-text (id-ambiguous name)
don't know if i understood your suggestion. ...would be the name+id probably in your case that isn't right. i only want the ambiguous names to be displayed. and on selection of a displayed text i have to know its id. my data source is an mapid-name. the names represent the suggestion list but the link to their ids must remain intact. is this possible if i implement my own oracle? are the any examples for such an usecase? (i guess this is not a very special one, isn't it?) (like in listbox where i add this pairs as items) On 12 Apr., 12:57, Thomas Broyer t.bro...@gmail.com wrote: Each suggestion can give a display text (what will be displayed in the suggestion list, would be the name+id probably in your case) and a replacement text (what will be used as the value, and displayed in the text box upon selection in the list of suggestions). For this, you have to provide your own SuggestOracle. If you don't want to implement your own matching logic, then you can delegate to a MultiwordSuggestOracle, where you'll put the display text, and then convert the returned suggestions to your owns, by matching the display text back to the replacement text (and yes, this means having no duplicate display text, but that's a given if you want your user to pick the right suggestion). In other words: - build a MapString,Suggestion from the display text to the suggestion (with the same display text, and the ID as the replacement text) - put all the keys from this map in a MultiwordSuggestOracle - delegate the call to your oracle to the MultiwordSuggestOracle, wrapping the callback to transform the result back to your suggestions; by looking up the text into the map you previously built and building a new response with the result. -- 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.
Cell List: add non-data rows
I need to add the following functionallity to a Cell List: - Grouping. Add a header for each group of rows. - Drop indicator. Add a placeholder to indicate that the drop is valid. My initial thought was to create a custom CellList and add extra rows (divs) for the group headers and drop placeholders as needed. The problem is that AbstractHasData works on a 1 to 1 relation between data items and rows. Adding extra divs for headers or placeholders messes-up the HasDataPresenter. I would like to know if someone has tryed to do something similar or has any recommendation on how I can achieve this. Many 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: customize CellTable css style
I think you need to create your implementation of CellTable.Style. Something similar to: interface MyCellTableResources extends Resources { @Source(MyCellTableStyle.STYLE) MyCellTableStyle cellListStyle(); } interface MyCellTableStyle extends CellTable.Style { String STYLE = cell-table-style.css; ... } On 12 abr, 10:06, mariyan nenchev nenchev.mari...@gmail.com wrote: Hi, I tried to customize gwt CellTable with no success. Am I missing something? Here is what i did: 1) create custom resource interface: public interface CellTableResource extends Resources { public CellTable.Resources INSTANCE = GWT.create(CellTableResource.class); /** * The styles used in this widget. */ @NotStrict @Source(com/company/public/com/company/gbb/css/CellTable.css) CellTable.Style cellTableStyle(); } 2) create css file in src/main/resources/com/cayetano/public/com/cayetano/gbb/css/CellTable.css (note: there are no images for gwt-image attribute, but still compiles with no errors). .cellTable { border: none; } .firstColumn { } @sprite .footer { gwt-image: 'cellTableFooterBackground'; background-color: #fffbd6; border: none; text-align: center; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma; } @sprite .header { gwt-image: 'cellTableHeaderBackground'; background-color: #fffbd6; border: none; padding: 0px 10px; text-align: center; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma; } .cell { background-color: #fffbd6; padding: 4px 10px; border: none; text-align: center; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma; } .firstColumnFooter { border-left: 0px; } .firstColumnHeader { border-left: 0px; } .evenRow { background-color: #fffbd6; } .oddRow { background-color: black; } .hoveredRow { background-color: #fffbd6; } @sprite .selectedRow { gwt-image: 'cellTableSelectedBackground'; background-color: #fffbd6; border: none; text-align: center; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma; } .cellTableLastColumnHeader{} .cellTableHeader{} .cellTableLoading{} .cellTableSortedHeaderDescending{} .cellTableFirstColumn{} .cellTableFirstColumnHeader{} .cellTableFooter{} .cellTableKeyboardSelectedRowCell{} .cellTableWidget{} .cellTableSelectedRow{} .cellTableLastColumn{} .cellTableLastColumnFooter{} .cellTableSortableHeader{} .cellTableKeyboardSelectedRow{} .cellTableKeyboardSelectedCell{} .cellTableHoveredRowCell{} .cellTableCell{} .cellTableEvenRowCell{} .cellTableFirstColumnFooter{} .cellTableOddRow{} .cellTableEvenRow{} .cellTableSelectedRowCell{} .cellTableSortedHeaderAscending{} .cellTableOddRowCell{} .cellTableHoveredRow{} 3) create cell table with overridden resources CellTableTick historyTable = new CellTableUpDownBetView.Tick(5, CellTableResource.INSTANCE); Result: Default css style is not shown, in fact no style is shown. Could you help please? 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.
Re: SuggestBox in Editor
In fact in is an Entity but the SuggestBox should display a String from (unique) so I'll have a try from what I've seen so far the widget must provide an asEditor method as well as getValue an setValue and internally must be able to return an entity from the string suggestion anything else ? Patrick - Original Message - From: Thomas Broyer To: google-web-toolkit@googlegroups.com Sent: Tuesday, April 12, 2011 10:55 AM Subject: Re: SuggestBox in Editor It's hard to use a SuggestBox for anything else than a String value (believe me, we're struggling with it for weeks, regularly stumbling on a new edge case –well, we're asking our server for suggestions, and we need to dispatch ValueChangeEvents, so maybe it's a special use case–). If you can synchronously convert the String value into the type of value you need (and you don't need accurate value change events), then it should be quite easy: wrap the SuggestBox in a Composite, similarly to how ValueListBox wraps a ListBox. -- 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. -- -- Aucun virus trouvé dans ce message. Analyse effectuée par AVG - www.avg.fr Version: 10.0.1209 / Base de données virale: 1500/3567 - Date: 11/04/2011 -- 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: Is there a way to generate i18n property from Constants?
I used the -extra extras when I compile gwt project but it does not generate the properties file for me. The only properties generated was UI binding properties. I think I don't quite understand how I use the @generate annotation. I try to use @Generate as following code but it fail compile. Thanks @Generate(format = com.google.gwt.i18n.rebind.format.Properties) on public interface ExampleConstants extends ConstantsWithLookup { @DefaultStringValue(Address Line 2) String addressLine2(); } On Apr 12, 4:24 am, Thomas Broyer t.bro...@gmail.com wrote: When you compile your project, pass the -extra argument with a folder path (e.g. -extra extras), GWT will generate the *.properties there. You might have to add a few annotations to your interface though, such as @ Generatehttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/googl... . See alsohttp://code.google.com/webtoolkit/doc/latest/DevGuideI18n.html#DevGui... -- 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: SuggestBox in Editor
On Tuesday, April 12, 2011 3:08:25 PM UTC+2, coelho wrote: In fact in is an Entity but the SuggestBox should display a String from (unique) so I'll have a try from what I've seen so far the widget must provide an asEditor method as well as getValue an setValue Actually, it has to implement LeafValueEditorYourEntity or IsEditorLeafValueEditorYourEntity (with the LeafValueEditor probably being a TakesValueEditor, your widget then implementing TakesValue) and internally must be able to return an entity from the string suggestion anything else ? No, it really is that easy! -- 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: Login security question
On Tue, Apr 12, 2011 at 12:30 PM, Leung leung1_2...@yahoo.com wrote: Hi According to article LoginSecurityFAQ, http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ , I have a point that I really want someone to make it clear for me. From the article, Your server will then validate this login, and return a sessionID to your GWT app. The GWT app will store this sessionID in a static field. For every further request your GWT app makes to your server, include this sessionID in the payload of the request. (Either in the JSON data or the object you are transferring using GWT-RPC). I assume the server returns the sessionId by RPC to the client after validation. How can I include this sessionID in the payload of the request using GWT-RPC? How can I tell the sessionID is in the payload of the request or not in the payload? First part: The session is always sent in the header if it is a cookie set by your server. It's a http thing. Second part: Sending the session id via RCP must be done via a separate String in your RPC interface. So manually add a String to your RPC. Validating: Your server can then compare those two values. As only a friendly script can access the cookie of your domain your server can validate if the request is ok... Otherwise rise a security exception... Best, Raphael Thanks Ming -- 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: Login security question
Hi Leung, if you're realizing the log in and log out functionality within your GWT app and not with other mechanism (e.g. container based authentication), you just need to make sure that the log-in RPC call to the server returns an unique sessionID to your client. For the generation of the sessionID on the server you can use the UUID class and then just send uuid.toString() to the client. This token/sessionId needs to be send to the server with each RPC call to ensure the server-side check if the session is valid, so you also need to store it in your client app, as long as the user is signed in. On the server side you just need to keep track of all currently valid sessionId's. HTH, Lukasz On Apr 12, 12:30 pm, Leung leung1_2...@yahoo.com wrote: Hi According to article LoginSecurityFAQ,http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecur..., I have a point that I really want someone to make it clear for me. From the article, Your server will then validate this login, and return a sessionID to your GWT app. The GWT app will store this sessionID in a static field. For every further request your GWT app makes to your server, include this sessionID in the payload of the request. (Either in the JSON data or the object you are transferring using GWT-RPC). I assume the server returns the sessionId by RPC to the client after validation. How can I include this sessionID in the payload of the request using GWT-RPC? How can I tell the sessionID is in the payload of the request or not in the payload? Thanks Ming -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How can I tell if my GWT application currently has focus?
Is there a way to know if the user's browser is currently focused on the page where my application is located? -- 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.
TextBox - Prevent delete/backspace
GWT'ers, I have a textbox that I do not want to prevent the user from typing into entirely, but I do want to prevent the user from removing characters; i.e., I want the existing format to remain the same, and the user only be allowed to update each character in the textbox value individually. Do I simply need to override the keyPressHandler and do nothing when the backspace/delete character is detected? Thank you. -- 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: CellTable with only div's?
That is true. We are avoiding Vertical/HorizontalPanel. In fact, our idea behind using CellList is for the ability of use float:left (overriding CellList.Style) in even and odd cell styles. We couldn't to this with elements in CellTable because they are TDs (float:left and td are not very good friends) By the way, CellList with cells in float:left is an excellent way to create an Image Gallery for hundreds of images. -- 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.
passing onClicks text to a java function
I have a piece of code HTML link = new HTML(a href=\'javascript:;\' onClick= \'doSomething(\'sometext\')\'MyLink/a); when MyLink is clicked I want the text 'sometext' inside my java function. How can this be performed? Thanks Sunny -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How does my servlet cleanly throw an exception
I'm trying to throw an exception from my servlet back to the client without breaking anything along the way, and having no success. First I was throwing an InvocationException, but this created an error it was an unrecognized exception. So I threw a ServletException. This is acceptable on the Servlet side, because doPost is specified to throw ServletException. But on the Client side it creates a problem, because ServletException is not IsSerializable. And I can't create a Shared Exception that IsSerializable and inherits from ServletException, because ServletException is not defined on the Client side. So, how DOES my RPC code pass an exception back to the client without generating any errors for the servlet code? TIA, Greg -- 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.
CellTable Dynatable SimplePager last Button
I've a CellTable using the example code in DynaTable but as in DynaTable the last () Button of th Pager is disabled in my case , as I know the row count , is there anyway to enable the button thanks Patrick -- 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: CellTable Dynatable SimplePager last Button
The is a fast forward button that defaults to 1000 rows. Use the overloaded SimplePager constructor to specify that you want to use a last page button instead of a fast forward button. Thanks, John LaBanca jlaba...@google.com On Tue, Apr 12, 2011 at 11:41 AM, Metronome Basic metronome.ba...@worldonline.fr wrote: I've a CellTable using the example code in DynaTable but as in DynaTable the last () Button of th Pager is disabled in my case , as I know the row count , is there anyway to enable the button thanks Patrick -- 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: GWT In Eclipse Debug Mode All Of A Sudden is Super Slow
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-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.
two questions about SuggestBox and formPanel
Hi Dear Google Web Toolkit members, I'm new in http://groups.google.com. And I have two questions please help me with that questions. Question number one: I'm using suggestion box for search. And I have an ValueChangeHandler on that SuggestBox. And I'm making an RPC call on each value have change and want to get from database several entities which current property value has substring of the word i typed. For example if I have an entity (companies) and my entity has a property called (name) and when I type app and also I've got Entity which property(name) value is Apple I want my query to return that entity. But as I can't send such query for example in RDB (Mysql) I was sending such query SELECT * FROM companies WHERE name LIKE '%app%'; So please suggest how can I make that google like suggestionBox And the second question: Why do we need using form instead of simple datasending to server using RPC I'm creating registration form and think.. what is the difference of sending data to the server using FormPanel or using RPC call. I noticed that for form I don't need to organize RPC and create two more classes But I think maybe there is more reason of using Form instead RPC Calls please tell me what other reason could be of using form. Мaybe it's because that with form we also can send some files ? Using FileUpload? Best Regards, Manvel Saroyan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to show a HTML table
Good Morning. I need show some data that i get from a data base and show it in a HTML table in some place that i defined, how can i do it? 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.
How to Start with HTML5 and GWT
Hi All, I am MS.NET developer, recently started exploring GWT. I am trying to develop Mobile/Smart Device based application, that should : 1. work on every mobile/tablet/ and should work seamlessly with Android/iOS/BlackBerry . 2. Should have capability to work in offline mode and data can be stored\edited locally while user is offline. 3. capable of Mapping functionality Query : 1. What should I use: gwt-mobile-webkit OR smartGWT?what is the differences between these two? 2. Any guide/resource to learn HTML5 based offline database storage using GWT (gwt-mobile-webkit OR smartGWT)? Any help is appreciated. Thanks a ton! -- 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.
GWT Eclipse Plugin and Unit Tests
Hi, I'm following the MVP pattern and I'm writing many unit tests for the presenters. In order to also test the methods that are protected or have only package visibility I'm placing the unit tests in the same package as the presenters, however they are located in a different folder. I.e. I have the following folders: src/main/java/com/playground/client src/test/java/com/playground/client I'm using EasyMock 2.5 for my tests and Eclipse complains about the usage of the Capture class: org.easymock.Capture can not be found in source packages. Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly. Even if I explicitly remove the test classes from my GWT module ( source path='client' excludes=**/*Test.java/ ) Eclipse does not care about it. GWT compile works fine and I can start the application in the development mode, however, I do not get rid of the red error markers in Eclipse. Is there any possibility to tell the GWT Eclipse plugin (GWT version 2.1.1) that it shall ignore the src/test/java path? Thanks in advance, Joern -- 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.
create a hierarchical structure
Hi, i need to create a hierarchical structure of folders where each each folder can contain different folders and different files inside. I was thinking to use CellTree but i understood that cellTree need different node types so it can identify it and turn the NodeInfo for tha node type. To create the hierarchy i need to have only 2 node types(folder and file) and with them create the hierarchy. Any idea of how to do this, can CellTree used to do this? 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: MVP vs PureMVC
We've been using PureMVC at organization for many years, and when I created our first GWT project, I decided to keep things consistent. So far, it's been smooth sailing, however I haven't done any memory profiling. Overall though if you've used PureMVC before, then you'll be able to dive right in and start building your project. GWT projects being no different than any of the other platforms PureMVC has been ported for. On Apr 10, 3:55 pm, Y2i yur...@gmail.com wrote: I use MVP as described herehttp://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAnd... together with RFhttp://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.htmland editorshttp://code.google.com/webtoolkit/doc/latest/DevGuideUiEditors.html So far there are no major complaints. Activities and places are nicely integrated with the browser history. I also like the fact that MVP support does not exist in GWT but can be easily created as described in the first link. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to hide a Cell in a Cell List (com.google.gwt.user.cellview.client.CellList)
Hi ! I try to hide elements who's not matching with a search. And unhide all elements when the search's Text Box is empty. I use Cell List like in the ShowCase http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTree It is possible to hide a cell in a cell list? And if it's possible, how? Thank in advance for your help! -- 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.
GWT and CSS3 Gradient
Hi! I'm quite new to GWT (I'm a PHP developer assigned to do the front- end of a Java application because of my CSS knowledge) and what I'm trying to do is use CSS3 Gradient using a stylesheet imported via ui:style src=main.css On main.css I have .custom-buttom { background: -moz-linear-gradient(top, white, #72C6E4 4%, #0C5FA5); background:-webkit-gradient(linear, left top, left bottom, from(white), to(#0C5FA5), color-stop(0.03, #72C6E4)); } But when I try to view via the Google Chrome plugin, it collapses the whitespace within the parenthesis leaving me with .custom-buttom { background: -moz-linear-gradient(top, white, #72C6E44%, #0C5FA5); background:-webkit-gradient(linear, lefttop, leftbottom, from(white), to(#0C5FA5), color-stop(0.03, #72C6E4)); } which breaks it, hence preventing the rendering of the gradient. Is there another way to do this or maybe a way to prevent the whitespace from collapsing. 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: Installing GWT to eclipse 3.6 (helios)
I am getting the exact same error. Did you resolve this issue? If so, can you let us know how? Thanks... On Mar 10, 3:40 am, Rajeshwar Mitra mitra.rajesh...@gmail.com wrote: Even for GWT designer Full version same thing is happening. The following error stack I'm getting. An error occurred while collecting items to be installed session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Problems downloading artifact: osgi.bundle,com.google.gdt.eclipse.designer.GWTExt, 2.2.0.r36x20110255. Downloaded stream not a valid archive. Check the server. Problems downloading artifact: osgi.bundle,com.google.gdt.eclipse.designer.doc.user, 2.2.0.r36x20110255. Downloaded stream not a valid archive. Check the server. Problems downloading artifact: osgi.bundle,org.eclipse.wb.doc.user, 0.9.0.r36x20110232. Downloaded stream not a valid archive. Check the server. Probably if we don't get things right we ay have to abondne this technolgy and choose something else. On Mar 10, 12:37 am, gina ginanebl...@google.com wrote: What's the update site you're trying to install from? On Mar 9, 2:42 am, Rajeshwar Mitra mitra.rajesh...@gmail.com wrote: I'm trying install GWT SDK and GWT designer. The installation getting aborted in between. Approximately after downloading about 50% of the contents. I'm exactly following the steps provided in the GWT site. I tried downloading the archive file and installing through that. In that case as well it is informing that some file are missing. Is there any one who can help me?- Hide quoted text - - Show quoted text - -- 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.
GWT front end + Drools Expert in the business layer - anybody using it?
Hello, I have a problem that I need help on. I have a simple drools application that exposes a business method that takes in parameters and returns a value after invoking a some rules expressed as .drl files. When I execute a junit test case for the above business method, I get the expected values but if I put the relevant business class in a web container (I tried Jetty supplied with GWT 1.7.1) and pass the params received from a GWT app and call the same business method from the remote service implementing class, the return values at the server side from the drl rules file are null. It appeared as if the rules hadn't fired at all. I have had no errors with respect to finding the relevant classes/rule files as I have made sure that the correct files (Drools binaries, .drl files) are available at the runtime classpath while testing this in the hosted mode. I can share the source code if you think that will help, but just wanted to throw up this scenario to check if there's something too obvious that I am missing with respect to setting up drools with GWT. My config: Eclipse Helios running on Win XP. GWT 1.7.1. many 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.
Celltable with stacked (multiline) header and rows
Hi, I trying to create a celltable with multilne rows, like this: (Header) FirstNameLastName BirthDate Address (DataRows) JohnTravolta 11.11.1950 Fakstreet JohnDoe 12.12.1944 Fakstreet ... How can i realize that? 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.
Doubt on google analytics integration with gwt app
Hi, I am trying to implement google analytics tracker for GWT based webapp and using the following code snippet, do i need to add any js file to support this code. If so where can i get that js file. http://code.google.com/p/gwt-examples/wiki/project_UrchinTracker I am passing the title of my page as the parameter, got this code from the above mentioned. Please help me in this regard. public static native void trackGoogleAnalytics(String title) /*-{ try { // setup tracking object with account var pageTracker = $wnd._gat._getTracker(UA-22115116-1); pageTracker._setRemoteServerMode(); // turn on anchor observing pageTracker._setAllowAnchor(true) // send event to google server pageTracker._trackPageview(title); } catch(err) { // debug alert('FAILURE: to send in event to google analytics: ' + err); } -- Thanks and regards, Raghavan.K.L http://shareyourware.blogspot.com/ -- 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.
Tree like widget in CellTable
Hi, I am using GWT 2.2 and am very much happy with the data presentation widgets. But now a requirement has come to have a tree like widget in a celltable and so far I haven't found anything that works seamlessly. So, I was evaluating celltree. As most of my functionality is ready with celltable and as tree like requirement has come very late into the development I want to incorporate it somehow in the celltable itself rather than re-writing the whole UI again. Is it possible to do with celltable? -- 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.
Creating cellTree with different datatypes in a leaf
Hi, i have to create a tree of folders where each folder can have other child folders and files. I want to organize this using a CellTree and the problem is that until now i could not organize in the same node different dataTypes, i could put only folders or files. Is there a way to do this. 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.
How show data from database in a html table
Hi, That are that i need, how i show some data that i get from a database in a simple html table? and how i do tu put it in some place that i defined? Thanks PD: Excuse my English. -- 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.
Help with / Tutorial for Styling for GWT Beginners
Hi everyone! I am new to GWT and am having a hard time finding any good tutorials focused especially on teaching styling with GWT. The few examples I've found provided by Google are rather paltry, and don't really explain much. Some things I'm trying to do would be: - Change the global font style - Change existing widgets' styling, such as the background color of a selected item in a CellTree - Replace a button's text with an image instead - Remove borders of text fields - the list goes on I've been searching and searching, and am not finding anything particularly helpful with styling, so any advice/direction would be greatly appreciated! Thank you! -- 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.
Transfer DataTable object from server to client
Can someone tell me which is best pratice to transfer DataTable (data for visualization) with GWT RPC. Cause DataTable is not serializable, and I have a lot of data. I want to use GWT RPC cause I use Java on the server side. I know that just sending the raw data to the client and formatting there can be done, but this is very slow and there should be a better way to do this. Any help would be appreciated. -- 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.
Enable/disable gwt-logging at runtime
How to enable/disable gwt-logging at runtime -- 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 show a HTML table
Thanks for your question. if i get: ResultSet rs = stmt.executeQuery( SELECT * FROM MyTable ); i can set: flexTable.setWidget(0,0, rs) ?? 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: CellTable Dynatable SimplePager last Button
It was already constructed that way ! but () is disabled and (| ) is hidden may be you somehow have to tell the pager what is the last page ? thanks Patrick - Original Message - From: John LaBanca To: google-web-toolkit@googlegroups.com Sent: Tuesday, April 12, 2011 5:45 PM Subject: Re: CellTable Dynatable SimplePager last Button The is a fast forward button that defaults to 1000 rows. Use the overloaded SimplePager constructor to specify that you want to use a last page button instead of a fast forward button. Thanks, John LaBanca jlaba...@google.com On Tue, Apr 12, 2011 at 11:41 AM, Metronome Basic metronome.ba...@worldonline.fr wrote: I've a CellTable using the example code in DynaTable but as in DynaTable the last () Button of th Pager is disabled in my case , as I know the row count , is there anyway to enable the button thanks Patrick -- 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. -- -- Aucun virus trouvé dans ce message. Analyse effectuée par AVG - www.avg.fr Version: 10.0.1209 / Base de données virale: 1500/3568 - Date: 12/04/2011 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to use a ValueListBox with RequestFactory Editor?
I can't seem to find a single example of how to integrate a ListBox or ValueListBox with an Editor. I've put an VLB in my editor, and it sets the value, but if I add any values to the VLB, it just tacks them onto the end (So I'll have two of the same items in the list, one added by the editor, and the other added by me when I add the VLB's acceptableValues.) A UI has a list of MyProxy (which is a Thing), when a user clicks on a thing, the editor is shown (via the workflow). The item is retrieved and shown in the editor. The editor needs to load the list of MySubProxy (SubThings) and set the selected item as provided by the MyProxy (Thing) object. Instead, the edit correctly sets all teh values, but appends the acceptable values (ListMySubProxy) to the list which already contains the value set by the MyProxy object. Does anyone have an example of this working that they can share, or can you point out what I'm doing wrong (code below)? eg: (obviously, I've changes the names of the things to protect my organization's model.. and added ... where code exists but is not needed for the example) *MyEditor.ui.xml* ui:UiBinder ... g:TextBox ui:Field=name/ g:ValueListBox ui:field=mylist/ /ui:UiBinder *MyEditor.java* public class MyEditor extends Composite implements EditorIMyProxy { interface Binder extends UiBinderWidget, MyEditor { } @UiField public TextBox name; @UiField(provided=true) public ValueListBoxIMySubProxy listBox = new ValueListBoxIMySubProxy( new ProxyRendererIMySubProxy(null) { @Override public String render(IMySubProxy object) { return object == null ? null : object.getName(); } }); public MyEditor () { initWidget(GWT.Binder create(Binder.class).createAndBindUi(this)); MyApp.getRequestFactory().myRequest().listThings(0, 10).fire(new ReceiverListIMySubProxy() { @Override public void onSuccess(ListIMySubProxy response) { listBox.setAcceptableValues(response); } }); } } *IMyProxy.java* @ProxyFor(value = Thing.class, locator = MyThingGwtAdapter.class) public interface IMyProxy extends EntityProxy { abstract Long getKey(); abstract String getName(); abstract IMySubProxy getSubThing(); } *IMySubProxy.java* @ProxyFor(value = SubThing.class, locator = MySubThingGwtAdapter.class) public interface IMySubProxy extends EntityProxy { abstract Long getKey(); abstract String getName(); } *MyWorkflow.java* public class MyWorkflow { interface Binder extends UiBinderDialogBox, MyWorkflow { Binder BINDER = GWT.create(Binder.class); } interface Driver extends RequestFactoryEditorDriverIMyProxy, MyEditor { } public static void register(ECMEventBus eventBus, final MyRequestFactory requestFactory) { eventBus.addHandler(MyEditEvent.TYPE, new MyEditEvent.Handler() { public void startEdit(IMyProxy proxy, RequestContext requestContext) { new MyWorkflow(requestFactory, proxy).edit(requestContext); } }); } @UiField DialogBox dialog; @UiField(provided = true) MyEditor editor; private Driver driver; private IMyProxy proxy; private final MyRequestFactory requestFactory; private MyWorkflow(MyRequestFactory requestFactory, IMyProxy proxy) { this.requestFactory = requestFactory; this.proxy = proxy; editor = new MyEditor(); Binder.BINDER.createAndBindUi(this); } @UiHandler(cancel) void onCancel(ClickEvent event) { dialog.hide(); } @UiHandler(save) void onSave(ClickEvent event) { RequestContext context = driver.flush(); if (driver.hasErrors()) { dialog.setText(Errors detected locally); return; } context.fire(new ReceiverVoid() { ... }); } private void edit(RequestContext requestContext) { driver = GWT.create(Driver.class); driver.initialize(requestFactory, editor); if (requestContext == null) { fetchAndEdit(); return; } driver.edit(proxy, requestContext); } private void fetchAndEdit() { RequestIMyProxy fetchRequest = requestFactory.find(proxy.stableId()); fetchRequest.with(driver.getPaths()); fetchRequest.to(new ReceiverIMyProxy() { @Override public void onSuccess(IMyProxy proxy) { MyWorkflow.this.proxy = proxy; IThingRequest context = requestFactory.thingRequest(); edit(context); context.saveThing(proxy); } }).fire(); } } *MyWorkflow.ui.xml* ui:UiBinder ... g:DialogBox ui:field=dialog modal=true g:captiona caption/g:caption g:HTMLPanel ui:field=contents dt:MyEditor ui:field=editor / div g:Button ui:field=cancelCancel/g:Button g:Button ui:field=saveSave/g:Button /div /g:HTMLPanel /g:DialogBox /ui:UiBinder -- You received this message because you are subscribed to the Google Groups
Re: Creating cellTree with different datatypes in a leaf
Use Object and then instanceof Folder / instanceof File everywhere? (isLeaf(Object obj) { return obj instance File; }, and in cells, etc.) -- 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 does my servlet cleanly throw an exception
I created an exception that my app uses (eg: MyAppException) that extends serializable. Then when I need to throw an exception, I catch any other exceptions and throw MyAppException instead, passing in the message from the caught exception(s). Make sense? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT and CSS3 Gradient
Not sure if this is the best solution, but a quick fix is to wrap it in literal(), so: background-image: literal(-webkit-gradient(...)); -- 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: Editor doesn't display chained Entity
did you call request.with(*paths*)? Where *paths *is a list of strings containing the names of sub objects to parse??? calling driver.getPaths()will return all the possible child paths i think?? eg: RequestIMyProxy fetchRequest = requestFactory.find(proxy.stableId()); fetchRequest.with(driver.getPaths()); fetchRequest.to(new ReceiverIMyProxy() { ... }); -- 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: MyEclipse GWT code gen
If you have a large DB (like we do) with lots of tables foreign key relationships, it will generate a BUCKET LOAD of code. You'll probably spend more time removing unneeded code then you would if you started from scratch. Plus it adds in jars to your pom/project that are used by MyEclipse, etc. (at least it did for me). You also get forced into doing things the MyEclipse way, which may not be compatible with your dev groups code style as it generates all the code, etc for you. It will generate queries/hql/sql for every conceivable field. (eg: getMyClassByFieldA, getMyClassByFieldB, etc...) I found it good to get an idea of how Editors Request Factory works since the docs from Google are so sparse. If you have a relatively small DB and tables with few relationships, it is probably a good way to jump-start. Just my opinion. -- 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.
TextInputCell and escaping of apostrophes
Hi - anyone know is there a way to avoid TextInputCells within CellTables from escaping their input when being rendered? I'm having issues with author names having apostrophes in their names escaped. 2.3 M1 Beta Thanks Will -- 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: TextInputCell and escaping of apostrophes
See http://code.google.com/p/google-web-toolkit/issues/detail?id=5993 It was fixed a few days ago (and will be in 2.3: http://code.google.com/p/google-web-toolkit/source/detail?r=9956 ) -- 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: TextInputCell and escaping of apostrophes
Good news - 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: How to hide a Cell in a Cell List (com.google.gwt.user.cellview.client.CellList)
Hi, You probably have to update data in the cellList (with #setRowData) to show only items matching your filter. Moreover, hiding some elements in list could lead to differences between the number of visible items and result of methods like #getRowCount() . Alexandre. 2011/4/11 waldo2188 waldo2...@gmail.com Hi ! I try to hide elements who's not matching with a search. And unhide all elements when the search's Text Box is empty. I use Cell List like in the ShowCase http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTree It is possible to hide a cell in a cell list? And if it's possible, how? Thank in advance for your help! -- 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: Transfer DataTable object from server to client
Have you look at ValueProxy with RequestFactory ? http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#valueProxies Your proxyfied object doesn't need to implement Serializable. Alexandre 2011/4/10 Phalgun Guduthur phalgun.gudut...@gmail.com Can someone tell me which is best pratice to transfer DataTable (data for visualization) with GWT RPC. Cause DataTable is not serializable, and I have a lot of data. I want to use GWT RPC cause I use Java on the server side. I know that just sending the raw data to the client and formatting there can be done, but this is very slow and there should be a better way to do this. Any help would be appreciated. -- 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: GWT and CSS3 Gradient
That's what I did. -- 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: RemoteServiceServlet.processCall
I'll try this. Thanks a lot Paul! On 10 abr, 03:28, Paul Stockley pstockl...@gmail.com wrote: This is what I do from within processCall to wrap exceptions with a specific exception: try { return super.processCall(payload); }catch(Exception e) { String errorMsg =Check server log; try { errorMsg = SERVER EXCEPTION:\r\n + getExceptionCallStack(e); }catch(IOException ioe) { return RPC.encodeResponseForFailure(null, new RemoteCommandException(An unexpected error occurred on the server, see log for details)); } return RPC.encodeResponseForFailure(null, new RemoteCommandException(errorMsg)); } You could do something similar to throw an authentication exception. -- 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.
Edit multiple properties of an object
Hello, I want to edit multiple properties of my object in a second class (it is messy otherwise). I saw the following in the documentation: class HasBagOfStateEditor implements EditorHasBagOfState { @Editor.Path(state) BagOfStateBiographicalEditor bio; @Editor.Path(state) BagOfStateUserPreferencesEditor prefs; } But it looks like it is editing multiple properties of a the sub element state of the object, not on multiple properties of the object itself. How can I edit multiple properties of the top object being edited ? That would be something like that: @Editor.Path(this) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
SimpleEventBus not firing event after creation
this.eventBus.addHandler(SomeEvent.TYPE, new SomeEventHandler() { @Override public void onSome(SomeEvent event) { Window.alert(Hi); } }); this.eventBus.fireEvent(new SomeEvent()); Why doesn't this work? When I debug and step through this code, I see that the handlers list is empty when fireEvent is called. How can I add the handler immediately, so that I can fire it straight after? -- 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: SimpleEventBus not firing event after creation
On Tue, Apr 12, 2011 at 3:43 PM, Matthew Hill matt2...@gmail.com wrote: this.eventBus.addHandler(SomeEvent.TYPE, new SomeEventHandler() { @Override public void onSome(SomeEvent event) { Window.alert(Hi); } }); this.eventBus.fireEvent(new SomeEvent()); Why doesn't this work? When I debug and step through this code, I see that the handlers list is empty when fireEvent is called. How can I add the handler immediately, so that I can fire it straight after? What's the context of the code sample? For example, are you already in an event context? The use of this. also raises flags. -- 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.
Getting Request Factory to work on the GWT-Eclipse environment
Hello! I'm trying to make Request Factory work on GWT plug-in (2.2.1) for Eclipse 3.6 and I've run into a dilemma. While I got most of the coding required done, not an easy task given that I had to go through a lot of references and head scratching, my real troubles began when I put persistence code which is supposed to be server-side only on my service/locator classes. I use the same persistence code framework that I normally use for RPC style services. Obviously, GWT would refuse to compile when code like that is present in the client or shared package. However, if I move the offending class to the server package, the GWT editor reports an impending build error because the class referenced by the @Service annotation in other classes is no longer included in the client/shared package. How can I resolve this? I've tried other sample code before but I have no idea how the others got them to work without getting past this. - Owen -- 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.
Which method of HandlerManager is ClickListenerCollection.fireClick(widget w) similar with ?
In gwt 1.5, I used ClickListenerCollection to manage listeners. But in gwt 1.6 It has been deprecated, so I used HandlerManager. public void onBrowserEvent(Event event) { switch (DOM.eventGetType(event)) { case Event.ONCLICK: if(clickListeners != null){ clickListeners.fireClick(this); } break; } } ClickListenerCollection = use method: fireClick(Widget w) HandlerManager = which method is similar with fireClick? fireEvent ? - And How to use thanks so much -- 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.
[gwt-contrib] Re: Addresses ClassNotFoundException problems when the data structures serialized in (issue1412801)
Now handles both ClassNotFoundException and IOException. The unit test is more straightforward and maintainable too. http://gwt-code-reviews.appspot.com/1412801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Comment on TroubleshootingOOPHM in google-web-toolkit
Comment by flavio.e...@gmail.com: Can somebody please update http://code.google.com/webtoolkit/usingeclipse.html with this instructions or a link? Particularly the way to start the application is a little misrepresented there... For more information: http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Escape single characters in SafeHtmlBuilder/SafeHtmlUtils (external issue 6222) (issue1413802)
Reviewers: pdr, xtof, Description: Escape single characters in SafeHtmlBuilder/SafeHtmlUtils (external issue 6222) Please review this at http://gwt-code-reviews.appspot.com/1413802/ Affected files: M user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java M user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java M user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlBuilderTest.java M user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlUtilsTest.java Index: user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java === --- user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java (revision 9973) +++ user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java (working copy) @@ -80,9 +80,10 @@ * * @param c the character whose string representation to append * @return a reference to this object + * @see SafeHtmlUtils#htmlEscape(char) */ public SafeHtmlBuilder append(char c) { -sb.append(c); +sb.append(SafeHtmlUtils.htmlEscape(c)); return this; } @@ -147,6 +148,7 @@ * * @param text the string to append * @return a reference to this object + * @see SafeHtmlUtils#htmlEscape(String) */ public SafeHtmlBuilder appendEscaped(String text) { sb.append(SafeHtmlUtils.htmlEscape(text)); @@ -156,10 +158,11 @@ /** * Appends a string consisting of several newline-separated lines after * HTML-escaping it. Newlines in the original string are converted to {@code - * br}. + * br} tags. * * @param text the string to append * @return a reference to this object + * @see SafeHtmlUtils#htmlEscape(String) */ public SafeHtmlBuilder appendEscapedLines(String text) { sb.append(SafeHtmlUtils.htmlEscape(text).replaceAll(\n, br)); Index: user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java === --- user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java (revision 9973) +++ user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java (working copy) @@ -37,7 +37,7 @@ private static final RegExp QUOT_RE = RegExp.compile(\, g); /** - * Returns a SafeHtml constructed from a safe string, i.e., without escaping + * Returns a {@link SafeHtml} constructed from a safe string, i.e., without escaping * the string. * * p @@ -85,7 +85,7 @@ * Returns a {@link SafeHtml} containing the escaped string. * * @param s the input String - * @return a SafeHtml instance + * @return a {@link SafeHtml} instance */ public static SafeHtml fromString(String s) { return new SafeHtmlString(htmlEscape(s)); @@ -94,24 +94,59 @@ /** * Returns a {@link SafeHtml} constructed from a trusted string, i.e., without * escaping the string. No checks are performed. The calling code should be - * carefully reviewed to ensure the argument meets the SafeHtml contract. + * carefully reviewed to ensure the argument meets the {@link SafeHtml} contract. * * @param s the input String - * @return a SafeHtml instance + * @return a {@link SafeHtml} instance */ public static SafeHtml fromTrustedString(String s) { return new SafeHtmlString(s); } /** + * HTML-escapes a character. HTML meta characters + * will be escaped as follows: + * + * pre + * amp; - amp;amp; + * lt; - amp;lt; + * gt; - amp;gt; + * quot; - amp;quot; + * #39; - amp;#39; + * /pre + * + * @param c the character to be escaped + * @return a string containing either the input character + * or an equivalent HTML Entity Reference + */ + public static String htmlEscape(char c) { +switch (c) { + case '': +return amp;; + case '': +return lt;; + case '': +return gt;; + case '': +return quot;; + case '\'': +return #39;; + default: +return + c; +} + } + + /** * HTML-escapes a string. * * Note: The following variants of this function were profiled on FF36, * Chrome6, IE8: - * #1) for each case, check indexOf, then use s.replace(regex, string) - * #2) for each case, check indexOf, then use s.replaceAll() - * #3) check if any metachar is present using a regex, then use #1 - * #4) for each case, use s.replace(regex, string) + * ol + * liFor each case, check indexOf, then use s.replace(regex, string)/li + * liFor each case, check indexOf, then use s.replaceAll()/li + * liCheck if any metachar is present using a regex, then use #1/li + * liFor each case, use s.replace(regex, string)/li + * /ol * * #1 was found to be the fastest, and is used below. * Index: user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlBuilderTest.java === --- user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlBuilderTest.java (revision 9973) +++
[gwt-contrib] Re: Addresses ClassNotFoundException problems when the data structures serialized in (issue1412801)
http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java File dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java (right): http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode491 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:491: logger.log(TreeLogger.TRACE, Igorning and deleting cache log Typo Igorning http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode495 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:495: logger.log(TreeLogger.TRACE, Igorning and deleting cache log And here too. Would be nice if we had JDK 7's multi-catch blocks. http://gwt-code-reviews.appspot.com/1412801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Addresses ClassNotFoundException problems when the data structures serialized in (issue1412801)
http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java File dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java (right): http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode490 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:490: cacheFile.delete(); Is this actually going to work on Windows? You haven't closed fis yet. Maybe you could kill two birds with one stone by setting a boolean and moving this code after the finally block. http://gwt-code-reviews.appspot.com/1412801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding a new annotation SafeHtmlTemplates.SafeForCss to specify that a parameter is known to be ... (issue1384801)
committed as r9976 http://gwt-code-reviews.appspot.com/1384801/diff/8025/user/src/com/google/gwt/safecss/shared/SafeStyles.java File user/src/com/google/gwt/safecss/shared/SafeStyles.java (right): http://gwt-code-reviews.appspot.com/1384801/diff/8025/user/src/com/google/gwt/safecss/shared/SafeStyles.java#newcode75 user/src/com/google/gwt/safecss/shared/SafeStyles.java:75: * liwidth: 1em;/li On 2011/04/11 23:48:34, xtof wrote: Should these be {@code}? Fixed in all occurrences. http://gwt-code-reviews.appspot.com/1384801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Addresses ClassNotFoundException problems when the data structures serialized in (issue1412801)
http://gwt-code-reviews.appspot.com/1412801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Addresses ClassNotFoundException problems when the data structures serialized in (issue1412801)
LGTM http://gwt-code-reviews.appspot.com/1412801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Addresses ClassNotFoundException problems when the data structures serialized in (issue1412801)
http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java File dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java (right): http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode490 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:490: cacheFile.delete(); On 2011/04/12 15:46:14, scottb wrote: Is this actually going to work on Windows? You haven't closed fis yet. Maybe you could kill two birds with one stone by setting a boolean and moving this code after the finally block. Done. I left the error message in the catch block because they are slightly different. http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode491 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:491: logger.log(TreeLogger.TRACE, Igorning and deleting cache log On 2011/04/12 15:35:56, tobyr wrote: Typo Igorning Done. http://gwt-code-reviews.appspot.com/1412801/diff/3003/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode495 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:495: logger.log(TreeLogger.TRACE, Igorning and deleting cache log On 2011/04/12 15:35:56, tobyr wrote: And here too. Would be nice if we had JDK 7's multi-catch blocks. Yes it would. Done. http://gwt-code-reviews.appspot.com/1412801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9977 committed - Addresses ClassNotFoundException problems when the data structures ser...
Revision: 9977 Author: zun...@google.com Date: Tue Apr 12 07:43:39 2011 Log: Addresses ClassNotFoundException problems when the data structures serialized in the unit cache log files no longer matches due to changes in GWT. Review at http://gwt-code-reviews.appspot.com/1412801 http://code.google.com/p/google-web-toolkit/source/detail?r=9977 Modified: /trunk/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java /trunk/dev/core/test/com/google/gwt/dev/javac/PersistentUnitCacheTest.java === --- /trunk/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java Thu Mar 31 08:40:20 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java Tue Apr 12 07:43:39 2011 @@ -266,7 +266,7 @@ */ static final String UNIT_CACHE_PREFIX = gwt-unitCache; - static final String CACHE_PREFIX = UNIT_CACHE_PREFIX + -; + static final String CACHE_FILE_PREFIX = UNIT_CACHE_PREFIX + -; /** * If there are more than this many files in the cache, clean up the old @@ -310,7 +310,7 @@ long timestamp = System.currentTimeMillis(); do { currentCacheFile = - new File(cacheDirectory, CACHE_PREFIX + String.format(%016X, timestamp++)); + new File(cacheDirectory, CACHE_FILE_PREFIX + String.format(%016X, timestamp++)); } while (currentCacheFile.exists()); // this isn't 100% reliable if multiple processes are in contention @@ -424,7 +424,7 @@ File[] files = cacheDirectory.listFiles(); ListFile cacheFiles = new ArrayListFile(); for (File file : files) { -if (file.getName().startsWith(CACHE_PREFIX)) { +if (file.getName().startsWith(CACHE_FILE_PREFIX)) { cacheFiles.add(file); } } @@ -460,6 +460,7 @@ if (cacheFile.equals(currentCacheFile)) { continue; } + boolean deleteCacheFile = false; try { fis = new FileInputStream(cacheFile); bis = new BufferedInputStream(fis); @@ -487,15 +488,21 @@ } catch (EOFException ex) { // Go on to the next file. } catch (IOException ex) { -logger.log(TreeLogger.WARN, Error reading cache file: + cacheFile.getAbsolutePath(), -ex); +deleteCacheFile = true; +logger.log(TreeLogger.TRACE, Ignoring and deleting cache log ++ cacheFile.getAbsolutePath() + due to read error., ex); } catch (ClassNotFoundException ex) { -logger.log(TreeLogger.ERROR, Error deserializing CompilationUnit in -+ cacheFile.getAbsolutePath(), ex); +deleteCacheFile = true; +logger.log(TreeLogger.TRACE, Ignoring and deleting cache log ++ cacheFile.getAbsolutePath() + due to deserialization error., ex); } finally { Utility.close(inputStream); Utility.close(bis); Utility.close(fis); + } + if (deleteCacheFile) { +cacheFile.delete(); + } else { logger.log(TreeLogger.TRACE, cacheFile.getName() + : Load complete); } } === --- /trunk/dev/core/test/com/google/gwt/dev/javac/PersistentUnitCacheTest.java Thu Mar 31 08:40:20 2011 +++ /trunk/dev/core/test/com/google/gwt/dev/javac/PersistentUnitCacheTest.java Tue Apr 12 07:43:39 2011 @@ -22,13 +22,32 @@ import junit.framework.TestCase; import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; /** * Unit test for {@link PersistentUnitCache}. */ public class PersistentUnitCacheTest extends TestCase { + private static class ThrowsClassNotFoundException implements Serializable { +@SuppressWarnings(unused) +private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + throw new ClassNotFoundException(); +} + } + + private static class ThrowsIOException implements Serializable { +@SuppressWarnings(unused) +private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + throw new IOException(); +} + } + File lastCacheDir = null; public void tearDown() { @@ -39,22 +58,17 @@ } /** - * The cache should recursively create the directories it needs. + * When a cache file encounters a serialization error, the logic should assume + * the cache log is stale and remove it. */ - public void testNewDir() throws IOException, UnableToCompleteException { -TreeLogger logger = TreeLogger.NULL; -File baseDir = File.createTempFile(PersistentUnitTest-newDir, ); -assertNotNull(baseDir); -assertTrue(baseDir.exists()); -assertTrue(baseDir.delete()); -File
[gwt-contrib] Re: Trying to address issue 6234 (Support RequestFactory service inheritance on the client) (issue1411802)
Thanks for taking a look at this. - Let me address your second point first as it is much easier for me to talk to it (I hope I understood it correctly): You are correct. The generator needs to be changed. I forgot that in my little test app, I overwrote the RequestFactoryGenerator to acommodate for this. But it should be only a minor change to make the 'protocol' send the name of the inheriting interface (if there is one) instead of the declaring class. The change should be in RequestMethod, line 78. I am going to add a new patch with that change (again untested, had no time today to get a local GWT environment set up). - Your first point is much harder to address, since I am not sure what 'these' refers to in your sentence? The generic super request contexts or the inheriting request context? Why do they need an annotation and why should they not extend RequestContext? - Overall, I think I understand your hesitation to get this fixed in this naive way, since you indeed have a use case where this current behavior is beneficial. In my opinion (as someone who is just learning GWT) the current behavior is a little bit weird and not very intuitive. It also doesn't allow for generic Request Contexts which would be very useful for code reduction and avoidance of copy and paste. I was mostly just hoping that an easy fix could still make the 2.3 release. Thanks again. On 2011/04/10 09:46:39, tbroyer wrote: See my comments here http://gwt-code-reviews.appspot.com/1384802/ and here http://code.google.com/p/google-web-toolkit/issues/detail?id=5807#c3 In brief: - there has to be an annotation added to these specific RequestContext interfaces (also, they might not extend RequestContext and they don't need a @Service/@ServiceName interface –and it would IMO be an error–) - the protocol sends the name of the interface the method was declared in, so the generator has to be changed Also, the RequestFactoryInterfaceValidator might have to be updated as well to account for this change. http://gwt-code-reviews.appspot.com/1411802/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Escape single characters in SafeHtmlBuilder/SafeHtmlUtils (external issue 6222) (issue1413802)
LGTM. http://gwt-code-reviews.appspot.com/1413802/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Escape single characters in SafeHtmlBuilder/SafeHtmlUtils (external issue 6222) (issue1413802)
On 2011/04/12 18:35:43, xtof wrote: LGTM. LGTM2 http://gwt-code-reviews.appspot.com/1413802/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9979 committed - Escape single characters in SafeHtmlBuilder/SafeHtmlUtils (external is...
Revision: 9979 Author: r...@google.com Date: Tue Apr 12 09:34:50 2011 Log: Escape single characters in SafeHtmlBuilder/SafeHtmlUtils (external issue 6222) Review at http://gwt-code-reviews.appspot.com/1413802 http://code.google.com/p/google-web-toolkit/source/detail?r=9979 Modified: /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java /trunk/user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlBuilderTest.java /trunk/user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlUtilsTest.java === --- /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java Thu Dec 16 11:33:51 2010 +++ /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java Tue Apr 12 09:34:50 2011 @@ -80,9 +80,10 @@ * * @param c the character whose string representation to append * @return a reference to this object + * @see SafeHtmlUtils#htmlEscape(char) */ public SafeHtmlBuilder append(char c) { -sb.append(c); +sb.append(SafeHtmlUtils.htmlEscape(c)); return this; } @@ -147,6 +148,7 @@ * * @param text the string to append * @return a reference to this object + * @see SafeHtmlUtils#htmlEscape(String) */ public SafeHtmlBuilder appendEscaped(String text) { sb.append(SafeHtmlUtils.htmlEscape(text)); @@ -156,10 +158,11 @@ /** * Appends a string consisting of several newline-separated lines after * HTML-escaping it. Newlines in the original string are converted to {@code - * br}. + * br} tags. * * @param text the string to append * @return a reference to this object + * @see SafeHtmlUtils#htmlEscape(String) */ public SafeHtmlBuilder appendEscapedLines(String text) { sb.append(SafeHtmlUtils.htmlEscape(text).replaceAll(\n, br)); === --- /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java Thu Dec 16 11:33:51 2010 +++ /trunk/user/src/com/google/gwt/safehtml/shared/SafeHtmlUtils.java Tue Apr 12 09:34:50 2011 @@ -37,7 +37,7 @@ private static final RegExp QUOT_RE = RegExp.compile(\, g); /** - * Returns a SafeHtml constructed from a safe string, i.e., without escaping + * Returns a {@link SafeHtml} constructed from a safe string, i.e., without escaping * the string. * * p @@ -85,7 +85,7 @@ * Returns a {@link SafeHtml} containing the escaped string. * * @param s the input String - * @return a SafeHtml instance + * @return a {@link SafeHtml} instance */ public static SafeHtml fromString(String s) { return new SafeHtmlString(htmlEscape(s)); @@ -94,24 +94,59 @@ /** * Returns a {@link SafeHtml} constructed from a trusted string, i.e., without * escaping the string. No checks are performed. The calling code should be - * carefully reviewed to ensure the argument meets the SafeHtml contract. + * carefully reviewed to ensure the argument meets the {@link SafeHtml} contract. * * @param s the input String - * @return a SafeHtml instance + * @return a {@link SafeHtml} instance */ public static SafeHtml fromTrustedString(String s) { return new SafeHtmlString(s); } + + /** + * HTML-escapes a character. HTML meta characters + * will be escaped as follows: + * + * pre + * amp; - amp;amp; + * lt; - amp;lt; + * gt; - amp;gt; + * quot; - amp;quot; + * #39; - amp;#39; + * /pre + * + * @param c the character to be escaped + * @return a string containing either the input character + * or an equivalent HTML Entity Reference + */ + public static String htmlEscape(char c) { +switch (c) { + case '': +return amp;; + case '': +return lt;; + case '': +return gt;; + case '': +return quot;; + case '\'': +return #39;; + default: +return + c; +} + } /** * HTML-escapes a string. * * Note: The following variants of this function were profiled on FF36, * Chrome6, IE8: - * #1) for each case, check indexOf, then use s.replace(regex, string) - * #2) for each case, check indexOf, then use s.replaceAll() - * #3) check if any metachar is present using a regex, then use #1 - * #4) for each case, use s.replace(regex, string) + * ol + * liFor each case, check indexOf, then use s.replace(regex, string)/li + * liFor each case, check indexOf, then use s.replaceAll()/li + * liCheck if any metachar is present using a regex, then use #1/li + * liFor each case, use s.replace(regex, string)/li + * /ol * * #1 was found to be the fastest, and is used below. * === --- /trunk/user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlBuilderTest.java Mon Sep 20 07:10:58 2010 +++ /trunk/user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlBuilderTest.java Tue Apr 12 09:34:50
[gwt-contrib] Improving TouchScroller to allow native document level scrolling when appropriate. If the scroll... (issue1410803)
Reviewers: pdr, Description: Improving TouchScroller to allow native document level scrolling when appropriate. If the scrollable widget is scrolled as far as it can go in a direction, and the user tries to scroll in that direction, then we defer to document level scrolling. For example, in the Showcase app (which is not a mobile specific app), if you scroll the menu bar to the bottom, then scrolling it again allows the document to scroll down, revealing the rest of the page. It isn't perfect because we cannot disable native scrolling in one direction (as in, allow native horizontal but disable native vertical), but its a drastic improvement and make Showcase usable on mobile. This change also fixes a bug in TouchScroller where it always busts the next click, even if Momentum has finished. The next click should only be busted if the user interupts momentum to stop it. Also, we cancel momentum on WindowResize (and by extension, orientation change) to account for the fact that resizing the scrollable widget will cause the contents to reflow, and the old scroll positions become stale. Please review this at http://gwt-code-reviews.appspot.com/1410803/ Affected files: M user/src/com/google/gwt/touch/client/TouchScroller.java M user/test/com/google/gwt/touch/client/TouchScrollTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Delete partially implemented HtmlElementFactory feature. (issue1412802)
Reviewers: rchandia, Description: Delete partially implemented HtmlElementFactory feature. Please review this at http://gwt-code-reviews.appspot.com/1412802/ Affected files: M user/src/com/google/gwt/uibinder/UiBinder.gwt.xml D user/src/com/google/gwt/uibinder/rebind/GwtDomHtmlElementFactory.java D user/src/com/google/gwt/uibinder/rebind/HtmlElementFactory.java M user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java M user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java M user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Delete partially implemented HtmlElementFactory feature. (issue1412802)
LGTM http://gwt-code-reviews.appspot.com/1412802/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Comment on CodeSplitting in google-web-toolkit
Comment by mohanam...@gmail.com: I believe GWT Team deserves a lot of credit for their contributions to the AJAX toolset. When we standardized on GWT, my vision/hope was that GWT would emerge as the #1 (top) toolset for AJAX development. Are we there yet? We designed our own frameworks on top of GWT for modular development and dynamic registration at onModuleLoad. But the initial download and the login screen takes about 40 seconds depending on the network bandwidth. Unless we supply some toys to play with, this is not acceptable performance. We have been looking for ways to optimize the initialization. The code spliting feature did sound promising, iniitally. I went through its documentation and examples for several times. I could be missing something here. But something does not look right. The GWT code splitting feature does not easily work our modular design. Too invasive - requiring insertion of GWT.runAsync calls in the code. (Hacking?) In my experience, well-designed features are highly intutive and extremely flexible. Unfortunately, the GWT Code Splitting is not even close. For example, can I simply designate an EntryPoint in module.gwt.xml to be loaded on demand? A simple onDemand=true/false in the entry-point tag could have been very elegant solution. Some people believe in simplicity. Any thoughts please? For more information: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] update EntityProxyChange javadoc (issue1414801)
Reviewers: drfibonacci, Description: update EntityProxyChange javadoc Please review this at http://gwt-code-reviews.appspot.com/1414801/ Affected files: M user/src/com/google/web/bindery/requestfactory/shared/EntityProxyChange.java M user/src/com/google/web/bindery/requestfactory/shared/WriteOperation.java Index: user/src/com/google/web/bindery/requestfactory/shared/EntityProxyChange.java === --- user/src/com/google/web/bindery/requestfactory/shared/EntityProxyChange.java (revision 9979) +++ user/src/com/google/web/bindery/requestfactory/shared/EntityProxyChange.java (working copy) @@ -21,17 +21,19 @@ import com.google.gwt.event.shared.HandlerRegistration; /** - * Abstract base class for an event announcing changes to an - * {@link EntityProxy}. + * Event posted by a {@link RequestFactory} when changes to an entity are + * detected. Provides a {@link WriteOperation} value describing the change, and + * the {@link EntityProxyId} of the entity in question. * p - * Note that this event includes an unpopulated copy of the changed proxy - * mdash; all properties are undefined except it's id. That is, the event - * includes only enough information for receivers to issue requests to get - * themselves fresh copies of the proxy. - * p - * TODO: use ProxyId rather than an empty proxy - * + * EntityProxyChange events are posted with the relevant EntityProxy + * Class as their source, allowing handlers to register for changes only + * of the type they care about via + * {@link #registerForProxyType(EventBus, Class, Handler)}. + * * @param P the type of the proxy + * + * @see RequestFactory#initialize(EventBus) + * @see RequestFactory#find(EntityProxyId) */ public class EntityProxyChangeP extends EntityProxy extends GwtEventEntityProxyChange.HandlerP { Index: user/src/com/google/web/bindery/requestfactory/shared/WriteOperation.java === --- user/src/com/google/web/bindery/requestfactory/shared/WriteOperation.java (revision 9979) +++ user/src/com/google/web/bindery/requestfactory/shared/WriteOperation.java (working copy) @@ -16,15 +16,24 @@ package com.google.web.bindery.requestfactory.shared; /** - * The enum used in {@link EntityProxyChange}. - * ul - * liA PERSIST event is fired after a proxy that was created on the client has - * been persisted on the server. - * liAn UPDATE event is fired whenever a client encounters a proxy for the - * first time, or encounters a proxy whose version number has changed. - * liA DELETE event is fired after a proxy that was deleted on the client is - * deleted on the server as well. - * /ul + * The values returned by {@link EntityProxyChange#getWriteOperation()} to + * describe the type of change being announced. + * + * dl + * dtPERSIST + * ddAn {@link EntityProxy} that was created on the client has been persisted + * on the server + * + * dtUPDATE + * ddAn {@link EntityProxy} has been encountered by the client for the first + * time, or its version value has changed + * + * dtDELETE + * ddThe server has confirmed the success of a client request to delete an + * {@link EntityProxy}. + * /dl + * + * @see EntityProxyChange#getWriteOperation() */ public enum WriteOperation { PERSIST(PERSIST), UPDATE(UPDATE), DELETE(DELETE); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: GWT Private/Protected Members
I understand the cautiousness regarding what is public, but I also believe that protected methods already have the protection necessary, assuming that developers who are extending a class usually knows what they are doing, and the source code is available so developers can check, and maintain compatibility. Even methods that are strict for infrastructure could have a suffix ( or prefix ) that indicates developer to use it with caution, and that this method is not guaranteed to exist in future releases: E.g: //The current implementation for the private setNewSelection() method, could be as follows public class SuggestBox ... { protected void setNewSelectionImpl(Suggestion curSuggestion) { //code } } This way gives developers a great flexibility to extend GWT classes, and even introduce temporary bug fixes. In a future release, GWt decides to expose this method as a concrete implementation and could change to: public class SuggestBox ... { protected void setNewSelection(Suggestion curSuggestion) { setNewSelectionImpl(curSuggestion); // this will maintain compatibility, but is not required at all. } } However, the method setNewSelectionImpl can completely disappear as it is an draft and not part of the final API, therefore developers will be using it with caution. Anyways, just bouncing ideas. I also understand that if the standard is overused, and never brought back to the GWT team so it can make part of the API, it could create chaos among GWT developers. Cheers! -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9980 committed - Delete partially implemented HtmlElementFactory feature....
Revision: 9980 Author: rj...@google.com Date: Tue Apr 12 12:31:13 2011 Log: Delete partially implemented HtmlElementFactory feature. Review at http://gwt-code-reviews.appspot.com/1412802 Review by: rchan...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9980 Deleted: /trunk/user/src/com/google/gwt/uibinder/rebind/GwtDomHtmlElementFactory.java /trunk/user/src/com/google/gwt/uibinder/rebind/HtmlElementFactory.java Modified: /trunk/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java /trunk/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java /trunk/user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java === --- /trunk/user/src/com/google/gwt/uibinder/rebind/GwtDomHtmlElementFactory.java Wed Feb 9 13:31:48 2011 +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the License); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.google.gwt.uibinder.rebind; - -import com.google.gwt.core.ext.typeinfo.JClassType; -import com.google.gwt.core.ext.typeinfo.TypeOracle; -import com.google.gwt.dom.client.TagName; - -/** - * Looks up implementation of DOM elements via @TagName interface in GWT DOM - * package. - */ -public class GwtDomHtmlElementFactory implements HtmlElementFactory { - - public JClassType findElementTypeForTag(String htmlTag, TypeOracle oracle) { -JClassType elementClass = oracle.findType(com.google.gwt.dom.client.Element); -JClassType[] types = elementClass.getSubtypes(); -for (JClassType type : types) { - TagName annotation = type.getAnnotation(TagName.class); - if (annotation != null) { -for (String annotationTag : annotation.value()) { - if (annotationTag.equals(htmlTag)) { -return type; - } -} - } -} -return elementClass; - } -} === --- /trunk/user/src/com/google/gwt/uibinder/rebind/HtmlElementFactory.java Wed Feb 9 13:31:48 2011 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the License); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.google.gwt.uibinder.rebind; - -import com.google.gwt.core.ext.typeinfo.JClassType; -import com.google.gwt.core.ext.typeinfo.TypeOracle; - -/** - * Looks up html tag names and returns corresponding type used to represent - * its bindings. - */ -public interface HtmlElementFactory { - JClassType findElementTypeForTag(String htmlTag, TypeOracle oracle); -} === --- /trunk/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml Wed Apr 6 03:31:11 2011 +++ /trunk/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml Tue Apr 12 12:31:13 2011 @@ -19,10 +19,6 @@ source path=client/ source path=resources/ - !-- Pluggable factory for creating field types for HTML elements -- - define-configuration-property name=uibinder.html.elementfactory is-multi-valued=false/ - set-configuration-property name=uibinder.html.elementfactory value=com.google.gwt.uibinder.rebind.GwtDomHtmlElementFactory/ - !-- By default UiBinder implementations are generated to use SafeHtmlTemplates to help protect against the introduction of cross-site scripting (XSS) attacks. This deprecated property can be used to disable that integration while the === --- /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java Wed Apr 6 03:31:11 2011 +++ /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java Tue Apr 12 12:31:13 2011 @@ -16,7 +16,6 @@ package com.google.gwt.uibinder.rebind; import com.google.gwt.core.ext.BadPropertyValueException; -import com.google.gwt.core.ext.ConfigurationProperty; import
[gwt-contrib] Re: Delete partially implemented HtmlElementFactory feature. (issue1412802)
r9980 http://gwt-code-reviews.appspot.com/1412802/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9981 committed - Cherry pick r9912 and r9914 to releases/2.3 (add...
Revision: 9981 Author: rj...@google.com Date: Tue Apr 12 13:37:16 2011 Log: Cherry pick r9912 and r9914 to releases/2.3 (add CSS_ATTRIBUTE_START to HtmlTemplateParser, and fix things it broke). Someone didn't run the smoke tests on the relase branch, ahem. http://code.google.com/p/google-web-toolkit/source/detail?r=9981 Modified: /releases/2.3/user/src/com/google/gwt/safehtml/rebind/HtmlTemplateParser.java /releases/2.3/user/src/com/google/gwt/safehtml/rebind/ParsedHtmlTemplate.java /releases/2.3/user/src/com/google/gwt/safehtml/rebind/SafeHtmlTemplatesImplMethodCreator.java /releases/2.3/user/test/com/google/gwt/safehtml/client/SafeHtmlTemplatesTest.java /releases/2.3/user/test/com/google/gwt/safehtml/rebind/HtmlTemplateParserTest.java === --- /releases/2.3/user/src/com/google/gwt/safehtml/rebind/HtmlTemplateParser.java Thu Dec 9 08:34:53 2010 +++ /releases/2.3/user/src/com/google/gwt/safehtml/rebind/HtmlTemplateParser.java Tue Apr 12 13:37:16 2011 @@ -74,10 +74,14 @@ * ddThis context corresponds to a parameter that appears at the very start of * a URL-valued HTML attribute's value; in the above example this applies to * parameter #1. + * dt{@link HtmlContext.Type#CSS_ATTRIBUTE_START} + * ddThis context corresponds to a parameter that appears at the very + * beginning of a {@code style} attribute's value; in the above example this + * applies to parameter #0. * dt{@link HtmlContext.Type#CSS_ATTRIBUTE} * ddThis context corresponds to a parameter that appears in the context of a - * {@code style} attribute; in the above example this applies to - * parameter #0. + * {@code style} attribute, except at the very beginning of the attribute's + * value. * dt{@link HtmlContext.Type#ATTRIBUTE_VALUE} * ddThis context corresponds to a parameter that appears within an attribute * and is not in one of the more specific in-attribute contexts above. In @@ -210,7 +214,11 @@ */ private HtmlContext getHtmlContextFromParseState() throws UnableToCompleteException { - +// TODO(xtof): Consider refactoring such that state related to the position +// of the template variable in an attribute is exposed separately (as +// HtmlContext#isAttributeStart(), etc). In doing so, consider trade off +// between combinatorial explosion of possible states vs. complexity of +// client code. if (streamHtmlParser.getState().equals(HtmlParser.STATE_ERROR)) { logger.log(TreeLogger.ERROR, Parsing template resulted in parse error: @@ -250,7 +258,11 @@ if (streamHtmlParser.isUrlStart()) { return new HtmlContext(HtmlContext.Type.URL_START, tag, attribute); } else if (streamHtmlParser.inCss()) { -return new HtmlContext(HtmlContext.Type.CSS_ATTRIBUTE, tag, attribute); +if (streamHtmlParser.getValueIndex() == 0) { + return new HtmlContext(HtmlContext.Type.CSS_ATTRIBUTE_START, tag, attribute); +} else { + return new HtmlContext(HtmlContext.Type.CSS_ATTRIBUTE, tag, attribute); +} } else { return new HtmlContext( HtmlContext.Type.ATTRIBUTE_VALUE, tag, attribute); === --- /releases/2.3/user/src/com/google/gwt/safehtml/rebind/ParsedHtmlTemplate.java Thu Dec 9 08:34:53 2010 +++ /releases/2.3/user/src/com/google/gwt/safehtml/rebind/ParsedHtmlTemplate.java Tue Apr 12 13:37:16 2011 @@ -64,7 +64,11 @@ /** * CSS (style) attribute context. */ - CSS_ATTRIBUTE + CSS_ATTRIBUTE, + /** + * At the very start of a CSS (style) attribute context. + */ + CSS_ATTRIBUTE_START } private final Type type; === --- /releases/2.3/user/src/com/google/gwt/safehtml/rebind/SafeHtmlTemplatesImplMethodCreator.java Tue Apr 12 08:34:05 2011 +++ /releases/2.3/user/src/com/google/gwt/safehtml/rebind/SafeHtmlTemplatesImplMethodCreator.java Tue Apr 12 13:37:16 2011 @@ -307,6 +307,7 @@ break; case CSS_ATTRIBUTE: + case CSS_ATTRIBUTE_START: /* * We already checked if the user tried to use SafeStyles in an invalid * (non-CSS_ATTRIBUTE) context, but now we check if the user could have === --- /releases/2.3/user/test/com/google/gwt/safehtml/client/SafeHtmlTemplatesTest.java Tue Apr 12 08:34:05 2011 +++ /releases/2.3/user/test/com/google/gwt/safehtml/client/SafeHtmlTemplatesTest.java Tue Apr 12 13:37:16 2011 @@ -71,6 +71,9 @@ @Template(spanimg src=\{0}/{1}\//span) SafeHtml templateWithTwoPartUriAttribute(String baseUrl, String urlPart); + +@Template(span style='{0}; color: green;'/span) +SafeHtml templateWithStyleAttribute(String style); } public void testSimpleTemplate() { @@ -130,4 +133,10 @@
Re: [gwt-contrib] Re: GWT Private/Protected Members
We've tried to get better about that kind of thing over the years. The widgets you listed are among our oldest. The new widget family described at http://code.google.com/p/google-web-toolkit/wiki/CellBackedWIdgets should be better on this score. Re: Tree in particular, you might consider trying CellTree instead. When you bump into a particular spot that is thwarting you and see a way to open it up without breaking existing apps, we're always eager to receive patches: http://code.google.com/webtoolkit/makinggwtbetter.html On Tue, Apr 12, 2011 at 3:36 PM, Clécio Varjão cleciovar...@gmail.comwrote: I understand the cautiousness regarding what is public, but I also believe that protected methods already have the protection necessary, assuming that developers who are extending a class usually knows what they are doing, and the source code is available so developers can check, and maintain compatibility. Even methods that are strict for infrastructure could have a suffix ( or prefix ) that indicates developer to use it with caution, and that this method is not guaranteed to exist in future releases: E.g: //The current implementation for the private setNewSelection() method, could be as follows public class SuggestBox ... { protected void setNewSelectionImpl(Suggestion curSuggestion) { //code } } This way gives developers a great flexibility to extend GWT classes, and even introduce temporary bug fixes. In a future release, GWt decides to expose this method as a concrete implementation and could change to: public class SuggestBox ... { protected void setNewSelection(Suggestion curSuggestion) { setNewSelectionImpl(curSuggestion); // this will maintain compatibility, but is not required at all. } } However, the method setNewSelectionImpl can completely disappear as it is an draft and not part of the final API, therefore developers will be using it with caution. Anyways, just bouncing ideas. I also understand that if the standard is overused, and never brought back to the GWT team so it can make part of the API, it could create chaos among GWT developers. Cheers! -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors