[gwt-contrib] 1.3.1 gwt-maven-plugin in 2.1.0 M1 ??
Hi I'm the maintainer of codehaus-mojo gwt-maven-plugin and I wonder the plugin is deployed with a 1.3.1.google version at http://google-web-toolkit.googlecode.com/svn/2.1.0.M1/gwt/maven/ Is it a internal release of the codehaus trunk to get a fixed version, or a custom build with some fixes ? Do you plan to add support for Maven as a standard GWT feature ? I'd be pleased to contribute and deprecate the mojo plugin in such case. Nicolas -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: 1.3.1 gwt-maven-plugin in 2.1.0 M1 ??
I also notice the POM used to publish GWT artifacts is limited to required data, but does not include what is expected for a valid artifact to be deployed on maven central (license, SCM url, mailing lists...) and can be used by various tools (including m2eclipse) to help developers. Maybe they have just been generated using a mvn deploy:deploy-file ? Cheers, Nicolas 2010/5/18 nicolas de loof nicolas.del...@gmail.com Hi I'm the maintainer of codehaus-mojo gwt-maven-plugin and I wonder the plugin is deployed with a 1.3.1.google version at http://google-web-toolkit.googlecode.com/svn/2.1.0.M1/gwt/maven/ Is it a internal release of the codehaus trunk to get a fixed version, or a custom build with some fixes ? Do you plan to add support for Maven as a standard GWT feature ? I'd be pleased to contribute and deprecate the mojo plugin in such case. Nicolas -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: 1.3.1 gwt-maven-plugin in 2.1.0 M1 ??
On 18 mai, 14:14, nicolas de loof nicolas.del...@gmail.com wrote: I also notice the POM used to publish GWT artifacts is limited to required data, but does not include what is expected for a valid artifact to be deployed on maven central (license, SCM url, mailing lists...) and can be used by various tools (including m2eclipse) to help developers. Maybe they have just been generated using a mvn deploy:deploy-file ? I don't know Maven, but I'd say they've been generated using mvn install:install-file from this script: http://code.google.com/p/google-web-toolkit/source/browse/branches/2.1/bikeshed/scripts/maven_script.sh -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8174 committed - Use cursors for expense report list search queries...
Revision: 8174 Author: r...@google.com Date: Tue May 18 06:37:32 2010 Log: Use cursors for expense report list search queries Fix checkstyle warnings http://code.google.com/p/google-web-toolkit/source/detail?r=8174 Added: /branches/2.1/user/src/com/google/gwt/user/cellview/client/simplePagerFastForward.png /branches/2.1/user/src/com/google/gwt/user/cellview/client/simplePagerFastForwardDisabled.png Modified: /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/Touch.java /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/TouchEvent.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpenseList.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Scaffold.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/server/ReportGenerator.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/server/domain/Report.java /branches/2.1/user/src/com/google/gwt/cell/client/Cell.java /branches/2.1/user/src/com/google/gwt/user/cellview/client/AbstractPager.java /branches/2.1/user/src/com/google/gwt/user/cellview/client/SimplePager.java === --- /dev/null +++ /branches/2.1/user/src/com/google/gwt/user/cellview/client/simplePagerFastForward.png Tue May 18 06:37:32 2010 Binary file, no diff available. === --- /dev/null +++ /branches/2.1/user/src/com/google/gwt/user/cellview/client/simplePagerFastForwardDisabled.png Tue May 18 06:37:32 2010 @@ -0,0 +1,14 @@ +â°PNG + + +IHDR rP6ÃgAMA ÃÃÃOX2tEXtSoftware Adobe ImageReadyqÃe IDATxìTÃJÃP ¤ ¤ º Q *¨ A7â¢HðSô ü ¿Ã_p +¢â÷¢è®øÃîÃ4M çÃiäºñââºÃ´Ã srfîÃâ¢\ÃÂ¥ ½ÃêõúZµZuÃå²[*â¢Ã kÃ{ñHâ!IaâB«Ã*ZâEÃf3 Ãd2âÃf)â¢J Ã¥r¹§0â¢ÃÂ¥FgâbÂ¥R ⺠uOÃY!à þa| D Ãa Ã...@9+£| /à â! ¦iÅ 0Å Ão1ðÃûW,\ø çà 2ä +1 î®éôü: ~¼¿¥«âºÃ»NHž¯mà !«Ãjâº0¦Ãév2ù÷ùñJ{à ¹bö} ½ÃáÃI â ?D q¼k|â±ÃÃZ +vvv©Ã°©å¶ÆhËUÃ7 jXmEà ³{Hž⡠OÃ. ¨csèøè0â â½ø +Yâ U â çQW MQ5Ãu=Å;#L¶ ø +ÃéT4à ÃaZÃW â¢ââ +aë ¢å¥ aÆ?N xâCPÃÃ.HdPcâS3416 ¨à ŸÅ¦ÃèpðA +š¦i i'T3Ãà +,Ã!M n£iââIGË ÂªÂªÃ«L¶ ëMVvÃâ³8îú û +à +âºKìMl°Ã¶¢(ä7º «à 5ìø ü|¢Ãà à +ÅÃÃë#Ã¡Æ Ã Ã¤â à =¯ â{Âà ÿïH$û¯ñ#à ÃÃSh »ÃÃIEND®B`â === --- /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/Touch.java Fri May 14 08:28:05 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/Touch.java Tue May 18 06:37:32 2010 @@ -19,7 +19,7 @@ import com.google.gwt.dom.client.EventTarget; /** - * TODO: doc + * TODO: doc. */ public class Touch extends JavaScriptObject { === --- /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/TouchEvent.java Fri May 14 08:28:05 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/TouchEvent.java Tue May 18 06:37:32 2010 @@ -19,7 +19,7 @@ import com.google.gwt.dom.client.NativeEvent; /** - * TODO: doc + * TODO: doc. */ public class TouchEvent extends NativeEvent { === --- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpenseList.java Thu May 13 11:35:58 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpenseList.java Tue May 18 06:37:32 2010 @@ -441,6 +441,9 @@ } searchBox.resetDefaultText(); searchRegExp = null; + +// Go to the first page of the newly-sorted results +pager.firstPage(); requestReports(false); } }); @@ -601,6 +604,7 @@ refreshTimer.schedule(REFRESH_INTERVAL); } }; + requestFactory.reportRequest().findReportEntriesBySearch(employeeId, dept, startsWith, orderBy, range.getStart(), range.getLength()).forProperties( reportColumns).to(lastDataReceiver).fire(); === --- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Scaffold.java Fri May 14 13:11:53 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Scaffold.java Tue May 18 06:37:32 2010 @@ -40,7 +40,6 @@ import java.util.Collections; import java.util.List; - /** * Application for browsing the entities of the Expenses app. */ @@ -55,7 +54,6 @@ final PlaceControllerScaffoldPlace placeController = new PlaceControllerScaffoldPlace( eventBus); - /* Top level UI */ final ScaffoldShell shell = new ScaffoldShell(); === --- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/server/ReportGenerator.java Fri May 14 13:11:53 2010 +++
[gwt-contrib] Re: Adds a mobile-friendly drag-scroll implementation. (issue530801)
We should definitely consider how we're going to bring gesture/touch events into the existing event framework. I went ahead and wrote this the simple way because it will only ever need to work on mobile webkit browsers, which all safely support addEventListener() and don't leak memory. Le 14 mai 2010 15:07, cromwell...@gmail.com a écrit : Joel, I think post I/O perhaps we should add touch events support to dispatchEvent() rather than call addEventListener directly, so you'd be able to invoke sinkEvents(Event.TOUCH_EVENTS);. I did this for my apps and have working code. http://gwt-code-reviews.appspot.com/530801/diff/1/9 File /bikeshed/src/com/google/gwt/mobile/client/TouchHandler.java (right): http://gwt-code-reviews.appspot.com/530801/diff/1/9#newcode57 /bikeshed/src/com/google/gwt/mobile/client/TouchHandler.java:57: }, capture); Memory leak? http://gwt-code-reviews.appspot.com/530801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix issue 3415 and other Date/Time parsing issues. (issue534801)
Will the test run if it is not in a test suite (I18NSuite, perhaps)? http://gwt-code-reviews.appspot.com/534801/diff/1/2 File user/src/com/google/gwt/i18n/client/impl/DateRecord.java (right): http://gwt-code-reviews.appspot.com/534801/diff/1/2#newcode102 user/src/com/google/gwt/i18n/client/impl/DateRecord.java:102: Date defaultCenturyStart = new Date(); Adding an overridable protected getCurrentDate() (or something like that) to allow mocking the current date may help testing this part of the code. http://gwt-code-reviews.appspot.com/534801/diff/1/2#newcode221 user/src/com/google/gwt/i18n/client/impl/DateRecord.java:221: // HBJ date.setTime(date.getTime() + this.tzOffset * 60 * 1000); Remove comment http://gwt-code-reviews.appspot.com/534801/diff/1/3 File user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java (right): http://gwt-code-reviews.appspot.com/534801/diff/1/3#newcode38 user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java:38: Date date = new Date(); Good thing we will not be around in 2040!... well, may be we will. Can we make these tests independent from the current date? http://gwt-code-reviews.appspot.com/534801/diff/1/3#newcode41 user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java:41: assertEquals(60, date.getYear()); Add tests for the corner cases (+19, +20, -80 and -81) http://gwt-code-reviews.appspot.com/534801/diff/1/3#newcode63 user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java:63: Date date = new Date(); See above. http://gwt-code-reviews.appspot.com/534801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix issue 3415 and other Date/Time parsing issues. (issue534801)
I18NSuite is updated, but that file is included in another change so it isn't listed here. All it does is add an entry for DateRecordTest. http://gwt-code-reviews.appspot.com/534801/diff/1/2 File user/src/com/google/gwt/i18n/client/impl/DateRecord.java (right): http://gwt-code-reviews.appspot.com/534801/diff/1/2#newcode102 user/src/com/google/gwt/i18n/client/impl/DateRecord.java:102: Date defaultCenturyStart = new Date(); On 2010/05/18 18:22:34, rchandia wrote: Adding an overridable protected getCurrentDate() (or something like that) to allow mocking the current date may help testing this part of the code. Done. http://gwt-code-reviews.appspot.com/534801/diff/1/2#newcode221 user/src/com/google/gwt/i18n/client/impl/DateRecord.java:221: // HBJ date.setTime(date.getTime() + this.tzOffset * 60 * 1000); On 2010/05/18 18:22:34, rchandia wrote: Remove comment Done. http://gwt-code-reviews.appspot.com/534801/diff/1/3 File user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java (right): http://gwt-code-reviews.appspot.com/534801/diff/1/3#newcode38 user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java:38: Date date = new Date(); On 2010/05/18 18:22:34, rchandia wrote: Good thing we will not be around in 2040!... well, may be we will. Can we make these tests independent from the current date? Done. http://gwt-code-reviews.appspot.com/534801/diff/1/3#newcode41 user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java:41: assertEquals(60, date.getYear()); On 2010/05/18 18:22:34, rchandia wrote: Add tests for the corner cases (+19, +20, -80 and -81) Done. http://gwt-code-reviews.appspot.com/534801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix issue 3415 and other Date/Time parsing issues. (issue534801)
http://gwt-code-reviews.appspot.com/534801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix issue 3415 and other Date/Time parsing issues. (issue534801)
http://gwt-code-reviews.appspot.com/534801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8175 committed - Add package.html files for cellview packages and fix a tag error...
Revision: 8175 Author: r...@google.com Date: Tue May 18 09:17:42 2010 Log: Add package.html files for cellview packages and fix a tag error Review by: j...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8175 Added: /branches/2.1/user/src/com/google/gwt/cell/client/package.html /branches/2.1/user/src/com/google/gwt/user/cellview/client/package.html /branches/2.1/user/src/com/google/gwt/view/client/package.html Modified: /branches/2.1/user/src/com/google/gwt/user/cellview/client/CellTable.java === --- /dev/null +++ /branches/2.1/user/src/com/google/gwt/cell/client/package.html Tue May 18 09:17:42 2010 @@ -0,0 +1,38 @@ +html +body +pStandard {...@link com.google.gwt.cell.client.Cell} subclasses used by the +...@link com.google.gwt.user.cellview.client cellview} widgets. The available +cell types are: +ul +li{...@link com.google.gwt.cell.client.Cell Cell} - the main interfaceli +li{...@link com.google.gwt.cell.client.AbstractCell AbstractCell} - a convenience implementation for subclassing/li +li{...@link com.google.gwt.cell.client.ActionCell ActionCell} - a Button that responds to mouse clicks via a +...@link com.google.gwt.cell.client.ActionCell.Delegate Delegate} interface/li +li{...@link com.google.gwt.cell.client.ButtonCell ButtonCell} - a cell that displays a button with custom text/li +li{...@link com.google.gwt.cell.client.CheckboxCell CheckboxCell} - a cell that display sa checkbox/li +li{...@link com.google.gwt.cell.client.ClickableTextCell ClickableTextCell} - HTML text that responds to mouse clicks/li +li{...@link com.google.gwt.cell.client.CompositeCell CompositeCell} - a cell that wraps other cells/li +li{...@link com.google.gwt.cell.client.CurrencyCell CurrencyCell} - a cell that displays a currency value (NOTE: does not + currently perform any localization)/li +li{...@link com.google.gwt.cell.client.DateCell DateCell} - a cell displays a date (NOTE: does not currently perform +any localization)/li +li{...@link com.google.gwt.cell.client.DatePickerCell DatePickerCell} - a cell that displays a date and allows editing +using a {...@link com.google.gwt.user.datepicker.client.DatePicker DatePicker} +widget/li +li{...@link com.google.gwt.cell.client.IconCellDecorator IconCellDecorator} - a cell that adds an icon to another cell/li +li{...@link com.google.gwt.cell.client.EditTextCell EditTextCell} - a cell that displays editable text/li +li{...@link com.google.gwt.cell.client.SelectionCell SelectionCell} - a cell that displays a drop-down list/li +li{...@link com.google.gwt.cell.client.TextCell TextCell} - a cell that displays HTML text/li +li{...@link com.google.gwt.cell.client.TextInputCell TextInputCell} - a cell that provides text input/li +ul +/p + +pIn addition to cells, this package provides the following interfaces: +ul +li{...@link com.google.gwt.cell.client.HasCell HasCell}/li +li{...@link com.google.gwt.cell.client.ValueUpdater ValueUpdater}/li +li{...@link com.google.gwt.cell.client.FieldUpdater FieldUpdater}/li +/ul +/p +/body +/html === --- /dev/null +++ /branches/2.1/user/src/com/google/gwt/user/cellview/client/package.html Tue May 18 09:17:42 2010 @@ -0,0 +1,25 @@ +html +body +pThe cellview widget set. The current widgets include: + +ul +li{...@link com.google.gwt.user.cellview.client.CellList CellList} - a simple vertical list of items, rendered by a common +...@link com.google.gwt.cell.client.Cell Cell}/li +li{...@link com.google.gwt.user.cellview.client.CellTable CellTable} - a table in which each {...@link com.google.gwt.user.cellview.client.Column Column} is rendered by a +common Cell. The table may have headers and footers defined by the +...@link com.google.gwt.user.cellview.client.Header Header} class. The {...@link com.google.gwt.user.cellview.client.IdentityColumn IdentityColumn}, {...@link com.google.gwt.user.cellview.client.TextColumn TextColumn}, and +...@link com.google.gwt.user.cellview.client.TextHeader TextHeader} classes are provided for convenience./li +li{...@link com.google.gwt.user.cellview.client.CellTree CellTree} - a tree in which all the children of a node are rendered +by a common cell./li +li{...@link com.google.gwt.user.cellview.client.CellBrowser CellBrowser} - a tree in which tree levels are displayed +horizontally, with only a single node per level open at a time./li +/ul +/p +p +CellTable supports the notion of paging, which may be controlled by a +...@link com.google.gwt.view.client.PagingListView.Pager Pager} such as +...@link com.google.gwt.user.cellview.client.SimplePager SimplePager}, {...@link com.google.gwt.user.cellview.client.PageSizePager PageSizePager}, or a user-defined subclass of +...@link com.google.gwt.user.cellview.client.AbstractPager AbstractPager}. +/p +/body +/html === --- /dev/null +++
[gwt-contrib] [google-web-toolkit] r8176 committed - Add package javadoc for c.g.g.logging.client....
Revision: 8176 Author: j...@google.com Date: Tue May 18 09:22:38 2010 Log: Add package javadoc for c.g.g.logging.client. Patch by: jat Review by: rice http://code.google.com/p/google-web-toolkit/source/detail?r=8176 Added: /branches/2.1/user/src/com/google/gwt/logging/client/package.html === --- /dev/null +++ /branches/2.1/user/src/com/google/gwt/logging/client/package.html Tue May 18 09:22:38 2010 @@ -0,0 +1,5 @@ +html +body +Log handlers and related classes for java.util.logging support in GWT. +/body +/html -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix issue 3415 and other Date/Time parsing issues. (issue534801)
LGTM http://gwt-code-reviews.appspot.com/534801/diff/15001/16002 File user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java (right): http://gwt-code-reviews.appspot.com/534801/diff/15001/16002#newcode76 user/test/com/google/gwt/i18n/client/impl/DateRecordTest.java:76: Date date = new Date(); Would something like date = getMockDate(final int tzoffset) overriding getTimezoneOffset() help testing specific timezones? Although I agree that very, very few people would have a system with say, GMT +15 min. http://gwt-code-reviews.appspot.com/534801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Have IE's DOMImpl invoke its event dispatching function via a (issue543801)
Reviewers: jgw, Description: Have IE's DOMImpl invoke its event dispatching function via a round-trip through the window object. That way, the only reference from DOM objects into GWT's code is on the window object, a place IE is careful to clean up when the browser navigates to a new page. This fixes a problem where the cross-site linker on IE could lead to memory leaking across page refreshes. Please review this at http://gwt-code-reviews.appspot.com/543801/show Affected files: M user/src/com/google/gwt/user/client/impl/DOMImplTrident.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fixes a memory leak on IE with the cross-site fragment loading strategy. (issue544801)
Reviewers: jgw, jlabanca, Description: Fixes a memory leak on IE with the cross-site fragment loading strategy. Now the callbacks on script tags are removed when they are invoked. Please review this at http://gwt-code-reviews.appspot.com/544801/show Affected files: M user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java Index: user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java === --- user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java (revision 8109) +++ user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java (working copy) @@ -60,6 +60,18 @@ Code download terminated); /** + * Clear callbacks on script objects. This is important on IE 6 and 7 to + * prevent a memory leak. If the callbacks aren't cleared, there is a cyclical + * chain of references between the script tag and the function callback, and + * IE 6/7 can't garbage collect them. + */ + @SuppressWarnings(unused) + private static native void clearCallbacks(JavaScriptObject script) /*-{ +var nop = new Function(''); +script.onerror = script.onload = script.onreadystatechange = nop; + }-*/; + + /** * Clear the success callback for fragment codefragment/code. */ @SuppressWarnings(unused) @@ -88,8 +100,9 @@ return; } var head = document.getElementsByTagName('head').item(0); + @com.google.gwt.core.client.impl.CrossSiteLoadingStrategy::clearOnSuccess(*)(fragment); + @com.google.gwt.core.client.impl.CrossSiteLoadingStrategy::clearCallbacks(*)(tag); head.removeChild(tag); - @com.google.gwt.core.client.impl.CrossSiteLoadingStrategy::clearOnSuccess(*)(fragment); loadfinishedhandl...@com.google.gwt.core.client.impl.asyncfragmentloader.loadterminatedhandler::loadTerminated(*)( exception); } @@ -99,8 +112,9 @@ JavaScriptObject tag) /*-{ return function(code) { var head = document.getElementsByTagName('head').item(0); + @com.google.gwt.core.client.impl.CrossSiteLoadingStrategy::clearOnSuccess(*)(fragment); + @com.google.gwt.core.client.impl.CrossSiteLoadingStrategy::clearCallbacks(*)(tag); head.removeChild(tag); - @com.google.gwt.core.client.impl.CrossSiteLoadingStrategy::clearOnSuccess(*)(fragment); __gwtModuleFunction.installCode(code); } }-*/; -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Have IE's DOMImpl invoke its event dispatching function via a (issue543801)
This is ready for review. http://gwt-code-reviews.appspot.com/543801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes a memory leak on IE with the cross-site fragment loading strategy. (issue544801)
This is ready for review. It's a tiny patch, and either of you would seem appropriate to me. Joel, this is a simpler memory leak than the one in the other patch I sent you. John, you recently reviewed a similar change to this class having to do with handling on-load and on-error events. http://gwt-code-reviews.appspot.com/544801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] RFC: Localized Date/Time formatting
Current GWT supports localized date/time formatting by providing predefined and localized patterns derived from Unicode CLDR data, accessible through DateFormat.get{Full,Long,Medium,Short}{Date,Time}Format(). However, these cover only a small range of the sort of formatting you would like to be able to perform. For example, DatePicker hard-codes format patterns d and MMM for its needs, yet that means they don't get properly localized. Another complication is there is no guidance on formatting a combined date/time value, as the order and connecting text differs between locales, and there is no guidance as to what the customary format for a locale is when you don't have specific needs. CLDR has since added additional formats, named by the information that is provided by them. So for example, format yMMM maps to MMM, y in English, but MMM y in German and MMMl y'x'G in French. However, there are a lot of possible variations, and not all locales define the same set. ICU4J includes a DateTimePatternGeneratorhttp://icu-project.org/apiref/icu4j/index.html?com/ibm/icu/text/DateTimePatternGenerator.htmlwhich takes a pattern skeleton and chooses/modifies the locale-specific pattern to best match what is requested. I propose improving GWT's date/time formatting abilities in the following ways: - create a new DateTimeFormatInfo interface to replace DateTimeFormatConstants - a default implementation DefaultDateTimeFormatInfo provides reasonable defaults and is useful for mocking - DateTimeFormatConstants would still be accepted by DateTimeFormatand would be wrapped by an adapter - it will clean up some issues with DateTimeFormatConstants that make it hard to extend, like having an array of date and time formats and defining return values of numeric fields as strings - localized implementations will have some set of common formats defined, processing the patterns as DateTimePatternGenerator would at the time the CLDR data is imported to GWT - DateTimeFormat will have new static getters for the additional common formats. The exact set is TBD, but something like: - DateTimeFormat getFormatDay() - DateTimeFormat.getFormatMonthDayAbbrev() - DateTimeFormat.getFormatYearMonthDayFull() - ... - This is chosen over having an enum passed into a getPredefinedFormat(PredefinedFormat) method for efficiency reasons, though perhaps improved enum optimizations will make that viable - add a new CustomDateTimeFormat interface which can be GWT.create'd to get localized patterns at compile time - example: public MyFormatters extends CustomDateTimeFormat { public static final MyFormatters INSTANCE = GWT.create(MyFormatters.class); @Pattern(yMMM) // or MMM, y etc, doesn't matter String yearMonthAbbrev(); @Pattern(M/d/y hh:mm:ss) // again, what matters is the included fields and their sizes, not the order or separator characters DateTimeFormat timestamp(); } dtf = DateTimeFormat.getInstance(MyFormatters.INSTANCE.yearMonthAbbrev()); dtf.format(date); dtf = MyFormatters.INSTANCE.timestamp(); ... - These patterns would still be processed at compile time and avoid runtime overhead - Returning DateTimeFormat will allow future optimizations that don't even parse the resulting pattern at runtime and reduce boilerplate code at the callsite, though may not be appropriate for all uses - extend Messages support to allow specifying a pattern skeleton rather than a pattern to be used directly, something like: - @DefaultMessage(Your order will ship on {0,localizedDate,M/d/y}) - This will be processed at compile time as well - Maybe we want to just rewrite all patterns supplied in date formats in Messages, but that would be a breaking change which would have to be carefully weighed Comments? -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8178 committed - Added an AppCacheWarmer that warms the AppEngine cache so that subsequ...
Revision: 8178 Author: gwt.mirror...@gmail.com Date: Tue May 18 14:43:14 2010 Log: Added an AppCacheWarmer that warms the AppEngine cache so that subsequent requests do not suffer from a cold startup. Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8178 Added: /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/server/AppCacheWarmer.java Modified: /branches/2.1/bikeshed/war/WEB-INF/appengine-web.xml === --- /dev/null +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/server/AppCacheWarmer.java Tue May 18 14:43:14 2010 @@ -0,0 +1,383 @@ +/* + * Copyright 2010 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.sample.expenses.server; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * Warm an App-Engine App. + */ +public class AppCacheWarmer { + + static class CountEmployees extends RequestObject { +CountEmployees() { + super(COUNT_EMPLOYEES, new String[0]); +} + } + + static class CountEmployeesByDepartment extends RequestObject { +CountEmployeesByDepartment(String department) { + super(COUNT_EMPLOYEES_BY_DEPARTMENT, new String[] {department}); +} + } + + static class CountReports extends RequestObject { +CountReports() { + super(COUNT_REPORTS, new String[0]); +} + } + + static class CountReportsBySearch extends RequestObject { +CountReportsBySearch(long reporterKey, String department, String startsWith) { + super(COUNT_REPORTS_BY_SEARCH, new String[] { + reporterKey + , department, startsWith}); +} + } + + static class FindAllEmployees extends RequestObject { +FindAllEmployees() { + super(FIND_ALL_EMPLOYEES, new String[0]); +} + } + + static class FindAllExpenses extends RequestObject { +FindAllExpenses() { + super(FIND_ALL_EXPENSES, new String[0]); +} + } + + static class FindAllReports extends RequestObject { +FindAllReports() { + super(FIND_ALL_REPORTS, new String[0]); +} + } + + static class FindEmployeeEntries extends RequestObject { +FindEmployeeEntries(int firstResult, int maxResults) { + super(FIND_EMPLOYEE_ENTRIES, new String[] { + + firstResult, + maxResults}); +} + } + + static class FindEmployeeEntriesByDepartment extends RequestObject { +FindEmployeeEntriesByDepartment(String department, int firstResult, +int maxResults) { + super(FIND_EMPLOYEE_ENTRIES_BY_DEPARTMENT, new String[] { + department, + firstResult, + maxResults}); +} + } + + static class FindExpense extends RequestObject { +FindExpense(String id) { + super(FIND_EXPENSE, new String[] {id}); +} + } + + static class FindExpensesByReport extends RequestObject { +FindExpensesByReport(String reportId) { + super(FIND_EXPENSES_BY_REPORT, new String[] {reportId}); +} + } + + static class FindReport extends RequestObject { +FindReport(String id) { + super(FIND_REPORT, new String[] {id}); +} + } + + static class FindReportEntries extends RequestObject { +FindReportEntries(int firstResult, int maxResults) { + super(FIND_REPORT_ENTRIES, new String[] { + + firstResult, + maxResults}); +} + } + + static class FindReportEntriesBySearch extends RequestObject { +FindReportEntriesBySearch(Long employeeId, String department, +String startsWith, String orderBy, int firstResult, int maxResults) { + super(FIND_REPORT_ENTRIES_BY_SEARCH, new String[] { + + employeeId, department, startsWith, orderBy, + firstResult, + + maxResults}); +} + } + + static class FindReportsByEmployee extends RequestObject { +FindReportsByEmployee(Long id) { + super(FIND_REPORTS_BY_EMPLOYEE, new String[] { + id}); +} + } + + /* + * Each subclass of the RequestObject represents a type of post request. + */ + static class RequestObject { +static int fetchedRequests = 0; +final String operation; +final String parameters[]; + +RequestObject(String operation, String parameters[]) {
[gwt-contrib] [google-web-toolkit] r8179 committed - More demo tweaks:...
Revision: 8179 Author: j...@google.com Date: Tue May 18 15:39:24 2010 Log: More demo tweaks: - Fixed subtle field-shadowing bug in Momentum. - Changed mobile apps to no longer try to use synthetic scrolling (too many problems on some devices). - Removed body margin styles from common.css (was getting injected on mobile and causing layout problems). Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8179 Modified: /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/Momentum.java /branches/2.1/bikeshed/src/com/google/gwt/sample/bikeshed/style/client/common.css /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.ui.xml /branches/2.1/bikeshed/war/Expenses.html /branches/2.1/bikeshed/war/Scaffold.html === --- /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/Momentum.java Fri May 14 13:11:53 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/mobile/client/Momentum.java Tue May 18 15:39:24 2010 @@ -221,7 +221,7 @@ currentOffset = new Point(initialOffset); previousOffset = new Point(initialOffset); -velocity = adjustInitialVelocity(velocity); +this.velocity = adjustInitialVelocity(velocity); if (isVelocityAboveThreshold(MIN_START_VELOCITY)) { decelerating = true; === --- /branches/2.1/bikeshed/src/com/google/gwt/sample/bikeshed/style/client/common.css Fri May 14 12:19:05 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/bikeshed/style/client/common.css Tue May 18 15:39:24 2010 @@ -1,10 +1,4 @@ /* global */ -body { - color: black; - margin: 8px; - margin-top: 3px; -} - body, table, td { font-family: Arial, sans-serif; font-weight: light; === --- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java Fri May 14 08:28:05 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java Tue May 18 15:39:24 2010 @@ -19,7 +19,7 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.event.shared.HandlerManager; import com.google.gwt.sample.expenses.gwt.request.ExpensesRequestFactory; -import com.google.gwt.user.client.ui.RootLayoutPanel; +import com.google.gwt.user.client.ui.RootPanel; /** * Entry point for the mobile version of the Expenses app. @@ -66,6 +66,6 @@ final ExpensesMobileShell shell = new ExpensesMobileShell(eventBus, requestFactory); -RootLayoutPanel.get().add(shell); +RootPanel.get().add(shell); } } === --- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.java Mon May 17 08:10:09 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.java Tue May 18 15:39:24 2010 @@ -19,15 +19,15 @@ import com.google.gwt.dom.client.Element; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.shared.HandlerManager; -import com.google.gwt.mobile.client.MobileScrollPanel; import com.google.gwt.sample.expenses.gwt.request.ExpenseRecord; import com.google.gwt.sample.expenses.gwt.request.ExpensesRequestFactory; import com.google.gwt.sample.expenses.gwt.request.ReportRecord; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.ResizeComposite; +import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import java.util.ArrayList; @@ -35,12 +35,12 @@ /** * TODO. */ -public class ExpensesMobileShell extends ResizeComposite { +public class ExpensesMobileShell extends Composite { interface ShellUiBinder extends UiBinderWidget, ExpensesMobileShell { } private static ShellUiBinder BINDER = GWT.create(ShellUiBinder.class); - @UiField MobileScrollPanel container; + @UiField SimplePanel container; @UiField HTML backButton, addButton, refreshButton, customButton; @UiField Element titleSpan; @@ -194,7 +194,6 @@ } container.add(page.asWidget()); -container.setScrollTop(0); titleSpan.setInnerText(page.getPageTitle()); backButton.setVisible(pages.size() 1); === --- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.ui.xml Fri May 14 08:28:05 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.ui.xml Tue May 18 15:39:24 2010 @@ -6,21 +6,14 @@ ui:style field='mobile'
[gwt-contrib] [google-web-toolkit] r8180 committed - Bumped up version number, and added auth on appEngine....
Revision: 8180 Author: amitman...@google.com Date: Tue May 18 17:22:30 2010 Log: Bumped up version number, and added auth on appEngine. Review by: knor...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8180 Modified: /branches/2.1/bikeshed/war/WEB-INF/appengine-web.xml /branches/2.1/bikeshed/war/WEB-INF/web.xml === --- /branches/2.1/bikeshed/war/WEB-INF/appengine-web.xml Tue May 18 14:43:14 2010 +++ /branches/2.1/bikeshed/war/WEB-INF/appengine-web.xml Tue May 18 17:22:30 2010 @@ -1,7 +1,7 @@ ?xml version=1.0 encoding=utf-8? appengine-web-app xmlns=http://appengine.google.com/ns/1.0; applicationgwt-bikeshed/application - version24/version + version27/version static-files include path=**.nocache.* expiration=1s/ include path=**.cache.html expiration=365d/ === --- /branches/2.1/bikeshed/war/WEB-INF/web.xml Sun May 16 05:11:07 2010 +++ /branches/2.1/bikeshed/war/WEB-INF/web.xml Tue May 18 17:22:30 2010 @@ -129,16 +129,14 @@ /security-constraint !-- Require login. -- -!-- security-constraint web-resource-collection web-resource-nameAccess/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint - role-name*/role-name + role-nameadmin/role-name /auth-constraint /security-constraint --- /web-app -- http://groups.google.com/group/Google-Web-Toolkit-Contributors