Add client-side tests for StringUtils and Utils.
[online-glom:gwt-glom.git] / ChangeLog
1 2012-12-04  Murray Cumming  <murrayc@murrayc.com>
2
3         Add client-side tests for StringUtils and Utils.
4
5         * src/test/java/org/glom/web/client/GwtTestStringUtils.java: Added.
6         * src/test/java/org/glom/web/client/GwtTestUtils.java: Added.
7         This is mostly just to catch java->javascript compilation problems.
8
9 2012-12-02  Murray Cumming  <murrayc@murrayc.com>
10
11         Add GwtTestReportPlace.
12
13         * src/test/java/org/glom/web/client/place/GwtTestReportPlace.java:
14         This is like the existing GwtTest*Place tests.
15         It would be nice if we could just test that all client and shared
16         code can be compiled to Javascript without creating a test for it.
17         Currently, we only discover problems when starting it in a browser.
18
19 2012-12-02  Murray Cumming  <murrayc@murrayc.com>
20
21         Add GwtTestDetailsPlace to test the same code as client-side.
22
23         * src/test/java/org/glom/web/client/place/GwtTestDetailsPlace.java:
24         See the comment about the awkward client-side-only Date API.
25         Ignoring this Date API issue, it would be nice if we could test 
26         the same code as both Java (server) and generated Javascript (client)
27         without duplicating most of the test code.
28
29 2012-12-02  Murray Cumming  <murrayc@murrayc.com>
30
31         DataItemTest: Test the date type too, and improve the asserts.
32
33         * src/test/java/org/glom/web/shared/DataItemTest.java:
34         Add testdate(). See the comment about the awkward server-side-only
35         Date API.
36
37 2012-12-02  Murray Cumming  <murrayc@murrayc.com>
38
39         DetailsPlace: Use a date-formatting API available in GWT client code.
40
41         * src/main/java/org/glom/web/client/place/DetailsPlace.java:
42         getStringForData(): Use DateTimeFormat.getFormat(), because that works 
43         on the client side (but not the server side) instead of String.format()
44         with Date.getYear()/getMonth()/getDate(), because they work only on the 
45         server side (but not on the client side). Rather annoying.
46         * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java: Rename to
47         GwtTestDetailsPlace.
48         * src/test/java/org/glom/web/client/place/ListPlaceTest.java: Rename to
49         GwtTestListPlaceTest, so we can run these as client-side (generated 
50         Javascript) code so we can catch these problems sooner.
51         It is unfortunate that the code cannot run on the server-side as Java,
52         but it does not need to.
53
54 2012-12-02  Murray Cumming  <murrayc@murrayc.com>
55
56         In the UI, allow primary keys to be any type, and test it.
57
58         * src/main/java/org/glom/web/shared/TypedDataItem.java:
59         Added isUnknownType() for convenience.
60         * src/main/java/org/glom/web/client/place/DetailsPlace.java:
61         getToken(): Move some code into getStringForData() and handle
62         other data types.
63         * src/main/java/org/glom/web/server/Utils.java:
64         Added transformUnknownToActualType(), to parse the unknown string
65         as a particular type of data. This should correspond with 
66         getStringForData() above.
67         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
68         Add setDataItemType() to set the type of data for primary
69         keys.
70         getDetailsData(), getSuitableRecordToViewDetails():
71         Call it, to have the correctly-typed primary key value.
72         We do it here, on the server, instead of before, because it 
73         is only here that we can know the field type that is in the 
74         document.
75         * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java:
76         Added testGetPlaceParametersNumericPrimaryKey(),
77         testGetPlaceParametersBooleanPrimaryKey() and 
78         testGetPlaceParametersDatePrimaryKey).
79
80 2012-11-30  Murray Cumming  <murrayc@murrayc.com>
81
82         Allow primary keys to be any type, and test it.
83
84         * src/main/java/org/glom/web/shared/TypedDataItem.java:
85         Add overrides for the other set*() methods, to set the type.
86         Added getValue() which returns a generic Object.
87         * src/main/java/org/glom/web/server/SqlUtils.java:
88         buildSimpleWhereExpression(): Use TypedDataItem.getValue() instead of 
89         getNumber().
90         * src/test/java/org/glom/web/server/SelfHostExampleNonNumericPrimaryKeysTest.java:
91         Added this test, which is much like SelfHostExampleTest, but which uses this
92         test file, take from Glom:
93         * src/test/resources/org/glom/web/server/test_example_music_collection_text_pk_fields.glom:
94         which has all the primary keys changes to text instead of numbers.
95
96         However, parts of the UI code still assume that primary keys are numbers.
97
98 2012-11-28  Murray Cumming  <murrayc@murrayc.com>
99
100         SelfHostExampleTest: Move some checks into a utility function.
101
102         * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
103         Move the data checks into a new file:
104         * src/test/java/org/glom/web/server/SelfHostTestUtils.java:
105         SelfHostTestUtils.java: so we can use it in some other 
106         tests, with different documents.
107
108 2012-11-28  Murray Cumming  <murrayc@murrayc.com>
109
110         SelfHosting test: Also try using a relationship.
111
112         * src/main/java/org/glom/web/server/database/DBAccess.java:
113         convertResultSetToDTO(): Move some code into a public 
114         method as:
115         * src/main/java/org/glom/web/server/SqlUtils.java:
116         fillDataItemFromResultSet(): This takes a DataItem and 
117         sets it from a value from a datbase recordset.
118         * src/main/java/org/glom/web/server/libglom/Document.java:
119         Make getDocument() public, so we can use it in a test.
120         * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
121         Add testExampleMusiccollectionDataRelated() and call it from 
122         testExampleMusiccollectionData(), to do a basic test of using
123         a relationship.
124
125 2012-11-22  Murray Cumming  <murrayc@murrayc.com>
126
127         Build: Specify the source encoding.
128
129         * pom.xml: Set project.build.sourceEncoding
130         This should fix this build problem on some systems:
131         [ERROR] /var/lib/jenkins/workspace/OnlineGlom/src/test/java/org/glom/web/server/libglom/DocumentTest.java:[139,72] error: unmappable character for encoding ASCII
132
133 1.23.1:
134
135 2012-11-20  Murray Cumming  <murrayc@murrayc.com>
136
137         Update the jasperreports version.
138
139         * pom.xml: This was shown by
140         mvn versions:display-dependency-updates
141
142 2012-11-20  Murray Cumming  <murrayc@murrayc.com>
143
144         Eclipse: Reorder the Java Build Path to fix the build in Eclipse.
145
146         * .classpath: This prevents an error saying that getTextContent()
147         is undefined.
148         See http://mergetag.com/the-method-gettextcontent-is-undefined-for-the-type-node/
149
150 2012-11-20  Murray Cumming  <murrayc@murrayc.com>
151
152         Explicitly declare some dependencies (and scopes) that we use.
153
154         * pom.xml: The dependency report showed what we use.
155
156 2012-11-20  Murray Cumming  <murrayc@murrayc.com>
157
158         Update the gwt-test-utils version.
159
160         * pom.xml: gwt-test-utils 0.43 uses GWT 2.5.0, not GWT 2.4.0.
161         Using both in the same project was causing gwt-log to fail in GWTBrige,
162         with this error:
163         testOutOfBounds(org.glom.web.server.libglom.DocumentLayoutPathTest):
164         (class: com/google/gwt/core/client/GWT, method: setBridge signature: (Lcom/google/gwt/core/client/GWTBridge;)V) Incompatible argument to function
165
166 2012-11-19  Murray Cumming  <murrayc@murrayc.com>
167
168         DocumentTest: testLocales(): Update for the latest example version.
169
170         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
171         The .glom file, updated in the previous commit, now has more translations.
172
173 2012-11-19  Murray Cumming  <murrayc@murrayc.com>
174
175         Update the .glom files used for tests.
176
177         * src/test/resources/org/glom/web/server/example_film_manager.glom:
178         * src/test/resources/org/glom/web/server/example_music_collection.glom:
179         * src/test/resources/org/glom/web/server/libglom/example_film_manager.glom:
180         * src/test/resources/org/glom/web/server/libglom/example_music_collection.glom:
181         Copy them from git master of Glom.
182
183 2012-11-18  Murray Cumming  <murrayc@murrayc.com>
184
185         Update versions of dependencies.
186
187         * pom.xml: Increase some version numbers based on the output of
188         , using mvn versions:display-dependency-updates.
189         * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
190         Use the annotation instead of getModuleName().
191         * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
192         Do not use deprecated assert() classes/methods.
193
194 2012-11-18  Murray Cumming  <murrayc@murrayc.com>
195
196         Document: Correct an import to use the correct Log API.
197
198         * src/main/java/org/glom/web/server/libglom/Document.java:
199         Use our Utils.Log API rather than the jfree one that Eclipse
200         must have suggested at some time.
201
202 2012-11-15  Murray Cumming  <murrayc@murrayc.com>
203
204         Details: Get static image data from our images services.
205
206         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
207         Add constructors for LayoutItemText and LayoutItemImage and
208         deal with their common type instead of just LayoutItemField.
209         setData():
210         * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
211         Adapted.
212         * src/main/java/org/glom/web/client/ui/details/Group.java:
213         createChildWidget(): Use the other DetailsCell constructors for
214         these layout items, and do not add them to the list of
215         cells with data from the database.
216         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
217         getValidListViewLayoutGroup(), getDetailsLayoutGroup():
218         Remove the image data when cloning the layout and storing it in the
219         cache. Clients will instead get it via the URL, from
220         our images service.
221         * src/main/java/org/glom/web/server/OnlineGlomImages.java:
222         doGet(): Depending on the URI parameters, optionally get 
223         image data from a layout_item_image in the document,
224         via its layout path.
225         * src/main/java/org/glom/web/server/database/DBAccess.java:
226         convertResultSetToDTO(): Move some URIBuilder code to:
227         * src/main/java/org/glom/web/server/Utils.java:
228         Add buildImageDataUrl() taking the primary key, etc, to
229         get data from the database.
230
231 2012-11-15  Murray Cumming  <murrayc@murrayc.com>
232
233         Document: Static image items: Store an image URL, using the layout path. 
234
235         * src/main/java/org/glom/web/server/Utils.java: Add buildImageDataUrl().
236         * src/main/java/org/glom/web/server/libglom/Document.java:
237         Add a constructor that takes the documentID, for use in the 
238         LayoutItemImage URL.
239         loadLayoutNode(): Pass a Path object to the helper methods, so we 
240         can use it to create a URL for LayoutItemImage items.
241         This seems as good a way as any to specify a layout item in the document.
242         * src/main/java/org/glom/web/server/ConfiguredDocumentSet.java:
243         Pass the documentID to the constructor, for use in the LayoutItemImage
244         URL.
245
246 2012-11-15  Murray Cumming  <murrayc@murrayc.com>
247
248         Document: Add getLayoutItemByPath().
249
250         * src/main/java/org/glom/web/server/Utils.java:
251         Add buildLayoutPath() and parseLayoutPath().
252         * src/test/java/org/glom/web/server/LayoutPathTest.java: Test that these 
253         utility methods work.
254         * src/main/java/org/glom/web/server/libglom/Document.java:
255         Add Add getLayoutItemByPath().
256         * src/test/java/org/glom/web/server/libglom/DocumentLayoutPathTest.java: Test 
257         that it works.
258
259         This will be useful in subsequent commits.
260
261 2012-11-15  Murray Cumming  <murrayc@murrayc.com>
262
263         Document: Use a better base64 decoder to read static image data.
264
265         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
266         getNodeTextChildAsValue(): Use the apache commons base64 decoder
267         instead of the gwt one, because it correctly decodes the strings
268         from g_base64_encode(). It is probably more correct.
269         The newlines might be confusing the gwt decoder.
270
271 2012-11-14  Murray Cumming  <murrayc@murrayc.com>
272
273         Document: Do not use == to compare strings. Use equals().
274
275         * src/main/java/org/glom/web/server/libglom/Document.java:
276         == only checks that they are the same object, so it can 
277         seem to fail.
278
279 2012-11-14  Murray Cumming  <murrayc@murrayc.com>
280
281         Document: Add and use public constants for layout names.
282
283         * src/main/java/org/glom/web/server/libglom/Document.java:
284         Make LAYOUT_NAME_DETAILS and LAYOUT_NAME_LIST public.
285         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
286         * src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
287         * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
288         * src/test/java/org/glom/web/server/libglom/DocumentTest.java: Use 
289         them here instead of hard-coded the strings repeatedly.
290
291 2012-11-13  Murray Cumming  <murrayc@murrayc.com>
292
293         Document: Load static text and image items too.
294
295         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemImage.java:
296         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemText.java:
297         New LayoutItem classes to represent these layout items.
298         * src/main/java/org/glom/web/shared/libglom/layout/StaticText.java: The 
299         main text of a LayoutItemText.
300         * src/main/java/org/glom/web/server/libglom/Document.java:
301         load_after_layout_group(): Handle the node types and instantiate the 
302         new classes.
303         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
304         Add testLayoutItemText() to check that the text is loaded properly.
305
306 2012-11-13  Murray Cumming  <murrayc@murrayc.com>
307
308         Do not use client.GWT for shared code.
309
310         * src/main/java/org/glom/web/shared/libglom/layout/Formatting.java:
311         Import shared.GWT instead of client.GWT, which seems to be appropriate.
312
313 2012-11-12  Murray Cumming  <murrayc@murrayc.com>
314
315         Use image data when recreating databases for testing.
316
317         * src/main/java/org/glom/web/shared/DataItem.java: Add get/setImageData(),
318         for use locally (not acrosss the network) when recreating databases
319         for testing.
320         getValue(): Use it here instead of getImageDataUrl(), noting that 
321         this method is only for use when recreating databases.
322         * src/main/java/org/glom/web/server/libglom/Document.java:
323         getNodeTextChildAsValue(): Use it instead of setImageDataUrl().
324
325 2012-11-09  Murray Cumming  <murrayc@murrayc.com>
326
327         OnlineGlomImages: Detect the mime-type (content type).
328
329         * src/main/java/org/glom/web/server/OnlineGlomImages.java:
330         doGet(): Instead of hard-coding image/png.
331
332 2012-11-09  Murray Cumming  <murrayc@murrayc.com>
333
334         Eclipse project files: Use JDK 1.7 instead of JDK 1.6.
335
336         * .classpath:
337         * .settings/org.eclipse.jdt.core.prefs: By changing the Eclipse
338         Java Compiler and Java Build path settings in the UI.
339
340 2012-11-09  Murray Cumming  <murrayc@murrayc.com>
341
342         Use the latest (now stable) version of GWT.
343
344         * pom.xml: And the latest version of the gwt-maven-plugin.
345
346 2012-11-08  Murray Cumming  <murrayc@murrayc.com>
347
348         Added an Indonesian translation.
349
350         * src/main/java/org/glom/web/OnlineGlom.gwt.xml:
351         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_id.properties:
352         This is from the new translation in Glom.
353
354 2012-07-23  Murray Cumming  <murrayc@murrayc.com>
355
356         Details: Show images.
357
358         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
359         Move some code into
360         * src/main/java/org/glom/web/server/ConfiguredDocumentSet.java:
361         so it can be used in:
362         * src/main/java/org/glom/web/server/OnlineGlomImages.java: A new servlet just
363         for serving image data.
364         * src/main/webapp/WEB-INF/web.xml: Mention the new servlet.
365
366         * src/main/java/org/glom/web/shared/DataItem.java: Added get/setImageDataUrl().
367         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
368         setData(): For image field types, add a GWT Image widget, 
369         with the URL that was set in the DataItem.
370
371         * pom.xml: Depend on org.apache.httpcomponents for UriBuilder.
372         * src/main/java/org/glom/web/server/database/DBAccess.java:
373         convertResultSetToDTO(): Set the URL for image data, so the client browser
374         can retrieve the image from our new servlet. This uses UriBuilder.
375         Move getPrimaryKeyField to:
376         * src/main/java/org/glom/web/server/libglom/Document.java:
377         Added getTablePrimaryKeyField().
378
379         * src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
380         * src/main/java/org/glom/web/server/database/ListDBAccess.java:
381         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
382         Adapted.
383
384 2012-07-22  Murray Cumming  <murrayc@murrayc.com>
385
386         Rename the servlet.
387
388         * src/main/java/org/glom/web/OnlineGlom.gwt.xml:
389         * src/main/java/org/glom/web/client/OnlineGlomService.java:
390         * src/main/webapp/WEB-INF/web.xml: Change the servlet-name from libGlom
391         to gwtGlom, which is more appropriate.
392         This servlet name does not seem to be visible to the client side anyway.
393
394 2012-07-22  Murray Cumming  <murrayc@murrayc.com>
395
396         Tests: Make the imports of assert*() consistent.
397
398         * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
399         * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java:
400         * src/test/java/org/glom/web/client/place/ListPlaceTest.java:
401         * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java:
402         * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
403         * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
404         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
405         * src/test/java/org/glom/web/server/libglom/LayoutItemFieldTest.java:
406         * src/test/java/org/glom/web/server/libglom/LayoutItemPortalDeepCloneTest.java:
407         * src/test/java/org/glom/web/shared/DataItemTest.java:
408         Just do
409         import static org.junit.Assert.*;
410         which seems fairly common.
411
412 1.21.10 (unstable):
413
414 2012-07-21  Murray Cumming  <murrayc@murrayc.com>
415
416         tests: Move a test that needs a database connection.
417
418         * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java:
419         Move testGetListViewLayoutGroup() to
420         * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
421         because it needs a database connection.
422
423 2012-07-21  Murray Cumming  <murrayc@murrayc.com>
424
425         tests: Use @BeforeClass on tearDown().
426
427         * src/test/java/org/glom/web/server/OnlineGlomPropertiesTest.java:
428         * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
429         This avoids leaking a postgres process in SelfHostExampleTest.
430
431 2012-07-21  Murray Cumming  <murrayc@murrayc.com>
432
433         tests: Test translations more.
434
435         * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java:
436         * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
437         Test titles in the non-default locale.
438
439 2012-07-21  Murray Cumming  <murrayc@murrayc.com>
440
441         tests: Add SelfHostConfiguredDocumentTest
442  
443         * src/test/java/org/glom/web/server/SelfHoster.java: Add getters for the 
444         username and password, for use by ConfiguredDocument.
445         * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java: 
446         This tests some of the ConfiguredDocument API that requires a database connection.
447
448 2012-07-21  Murray Cumming  <murrayc@murrayc.com>
449
450         Document: Load title translations and test them.
451
452         * src/main/java/org/glom/web/server/libglom/Document.java: Load the translations
453         of titles. I am surprised that we do not do this yet.
454         * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java:
455         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
456         Test translations more.
457
458 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
459
460         Set JDBC timeouts.
461
462         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
463         * src/main/java/org/glom/web/server/database/ListDBAccess.java:
464         Set the timeout here too.
465
466 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
467
468         tests: ConfiguredDocumentTest: Make this pass.
469
470         * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java:
471         Disable tests that need a database connection.
472
473 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
474
475         Use Java 1.7 instead of Java 1.6.
476
477         * pom.xml: Specify the 1.7 JDK, though I don't like how we seem to need
478         to do this twice, at least for Eclipse.
479         This seems OK because it is the current version.
480
481 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
482
483         Some error checking.
484
485         * src/main/java/org/glom/web/server/Log.java: Avoid using null strings.
486         * src/main/java/org/glom/web/server/database/ListDBAccess.java:
487         Avoid using a null Connection.
488
489 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
490
491         tests: Add a ConfiguredDocument test.
492
493         * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java:
494         Add this test.
495
496 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
497
498         LayoutItemFIeld: getName(): Use the Field if it is set.
499
500         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java:
501         getName(): If the full field details have been set, return its name, so that
502         callers do not need to set the name separately.
503         * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
504         testExampleMusiccollectionData): Do not use a TYPE_FORWARD_ONLY statement,
505         so we can count the rows.
506
507 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
508
509         tests: SelfHoster: Test SqlUtils too.
510
511         * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
512         Retrieve some data and check it too, as in the regular Glom
513         test_selfhosting_new_from_example.cc test.
514         * src/test/java/org/glom/web/server/SelfHoster.java:
515         createConnection(): Make this public.
516
517 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
518
519         tests: SelfHoster: createConnection(): Do not warn about expected failures.
520         
521         Let the caller say if the connection is expected to fail, to avoid 
522         irrelevant error output.
523
524 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
525
526         tests: SelfHoster: createAndSelfHostNewEmpty(): Sleep after starting server.
527         
528         * src/test/java/org/glom/web/server/SelfHoster.java:
529         createAndSelfHostNewEmpty(): Sleep initially, to avoid distracting errors
530         due to the inevitable need to retry the connection while the database server
531         starts.
532
533 2012-07-20  Murray Cumming  <murrayc@murray.com>
534
535         tests: SelfHoster: createConnection(): Set a timeout.
536
537         * src/test/java/org/glom/web/server/SelfHoster.java:
538         createConnection(): Use setLoginTimeout() because it otherwise seems to take
539         ages to actually return when it fails.
540
541 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
542
543         tests: SelfHoster: selfHost(): Close the test connection.
544
545         * src/test/java/org/glom/web/server/SelfHoster.java: selfHost():
546         When we check that the connection works, close the connection. This seems
547         to not be closed automatically otherwise.
548
549 2012-07-20  Murray Cumming  <murrayc@murrayc.com>
550
551         Use slf4j-simple to see JDBC errors.
552
553         * pom.xml: Depend on slf4j-simple so we can see errors from JDBC.
554
555 2012-07-19  Murray Cumming  <murrayc@murrayc.com>
556
557         SelfHoster.discoverFirstFreePort(): Close the socket.
558
559         * src/test/java/org/glom/web/server/SelfHoster.java:
560         discoverFirstFreePort(): Close the socket. Eclipse Juno warns about this.
561
562 2012-07-19  Murray Cumming  <murrayc@murrayc.com>
563
564         Avoid another code warning in Eclipse Juno.
565
566         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
567         Do instanceof checks on the FileUtils.listFiles() result and its 
568         items.
569
570 2012-07-13  Murray Cumming  <murrayc@murrayc.com>
571
572         Avoid some code warnings in Eclipse Juno
573
574         * src/main/java/org/glom/web/server/libglom/Document.java:
575         getNodeTextChildAsValue(), setNodeTextChildAsValue(): Handle the invalid type.
576         * src/test/java/org/glom/web/server/SelfHoster.java
577         createTextFile(): Make sure that the FileOutputStream is closed.
578
579 2012-06-22  Murray Cumming  <murrayc@murrayc.com>
580
581         Added OnlineGlomPropertiesTest.
582
583         * src/main/java/org/glom/web/server/OnlineGlomProperties.java:
584         Make sure we never return a null string.
585         * src/test/java/org/glom/web/server/OnlineGlomPropertiesTest.java:
586         Added tests of the OnlineGlomProperties API, using our sample file.
587
588 2012-06-20  Murray Cumming  <murrayc@murrayc.com>
589
590         Make OnlineGlomProperties be a normal class.
591
592         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
593         Move OnlineGlomProperties into its own file to be a regular class:
594         * src/main/java/org/glom/web/server/OnlineGlomProperties.java:
595         This makes testing simpler.
596
597 2012-06-15  Murray Cumming  <murrayc@murrayc.com>
598
599         OnlineGlomServiceImpl.init(): Move some code into a new method.
600
601         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
602         Create addDocument().
603
604 2012-06-15  Murray Cumming  <murrayc@murrayc.com>
605
606         OnlineGlomServiceImpl.OnlineGlomProperties: Improve getKey().
607
608         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
609         OnlineGlomProperties.getKey(): Make this more robust by moving the
610         check for *.*.filename to here.
611
612 2012-06-15  Murray Cumming  <murrayc@murrayc.com>
613
614         OnlineGlomServiceImpl: Improve the OnlineGlomProperties class.
615
616         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
617         init(): Move knowledge of the config file format into the 
618         OnlineGlomProperties inner class.
619
620 2012-06-15  Murray Cumming  <murrayc@murrayc.com>
621
622         SelfHostExampleTest: Make sure we cleanup on failure.
623
624         * src/test/java/org/glom/web/server/SelfHostExampleTest.java: Move
625         the use of cleanup() to a tearDown() JUnit method.
626
627 1.21.9.3:
628
629 2012-06-12  Murray Cumming  <murrayc@murrayc.com>
630
631         ConfiguredDocument: Add a primary key to portals at least once.
632
633         * src/main/java/org/glom/web/server/ConfiguredDocument.java
634         updatePortalsExtras): Fix a typo so that we add the primary key
635         column at least once.
636         This is a fix for the previous commit:
637         ConfiguredDocument: Do not add a primary key to portals each time.
638
639 2012-06-08  Murray Cumming  <murrayc@murrayc.com>
640
641         SelfHoster: Avoid some compiler warnings.
642
643         * src/test/java/org/glom/web/server/SelfHoster.java
644         executeCommandLineAndWait():
645         executeCommandLineAndWaitUntilSecondCommandReturnsSuccess(): Comment out
646         the now-unused streams for stdout and stderr from the command Processes.
647         These are not used because readln() hangs while waiting for a new line,
648         where there may be no next line. The commented out code is still there
649         to help us figure out how to do this properly.
650
651 2012-06-08  Murray Cumming  <murrayc@murrayc.com>
652
653         LayoutItemPortalDeepCloneTest: Test something to avoid warnings.
654
655         * src/test/java/org/glom/web/server/libglom/LayoutItemPortalDeepCloneTest.java:
656         Make this actually test the cloning again, though it is not very useful
657         now that we do not use the part that had a problem with cloning before.
658
659 2012-06-08  Murray Cumming  <murrayc@murrayc.com>
660
661         SelfHoster: Keep trying pg_ctl after starting postgres.
662
663         * src/test/java/org/glom/web/server/SelfHoster.java
664         executeCommandLineAndWaitUntilSecondCommandReturnsSuccess():
665         Try pg_ctl repeatedly (for ever) until it succeeds, as we do in 
666         regular Glom. This seems mad but it seems to work because the first
667         command would fail if pg_ctl would eventually fail.
668
669 2012-06-08  Murray Cumming  <murrayc@murrayc.com>
670
671         SelfHoster: Wait until the server is really ready.
672
673         * src/test/java/org/glom/web/server/SelfHoster.java
674         selfHost(): Attempt the connection after starting the server, retrying 
675         a few times if necessary, so that the server is really ready already when
676         we return from this method.
677         The regular Glom code does this too because pg_ctl reports success too soon.
678
679 2012-06-08  Murray Cumming  <murrayc@murrayc.com>
680
681         ConfiguredDocument: Do not add a primary key to portals each time.
682
683         * src/main/java/org/glom/web/server/ConfiguredDocument.java
684         updatePortalsExtras(): Only add an extra primary key field if there is 
685         none, to avoid adding one each time we retrieve the details layout from the
686         layouts cache.
687         This should fix bug #676986 (Ben Konrath) 
688
689 2012-05-25  Murray Cumming  <murrayc@murrayc.com>
690
691         Document.load(): Support version 7 documents. 
692
693         * src/main/java/org/glom/web/server/libglom/Document.java: Load the 
694         database_title attribute if the title attribute is not there.
695         Bug #676737
696
697 2012-05-24  Ben Konrath  <ben@bagu.org>
698
699         Add configuration for auto-generating mvn:i18n from with Eclipse.
700
701         * pom.xml: Add PluginExecution configuration for gwt-maven-plugin.
702
703 2012-05-24  Murray Cumming  <murrayc@murrayc.com>
704
705         Update translations, adding French.
706
707         * src/main/java/org/glom/web/OnlineGlom.gwt.xml:
708         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_fr.properties:
709         Add a French translation, using the translation from Glom.
710
711         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties:
712         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties:
713         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties:
714         Update these based on the translations from Glom.
715
716 2012-05-24  Murray Cumming  <murrayc@murrayc.com>
717
718         SelfHoster: Add some debug println messages to help when things fail.
719
720         * src/test/java/org/glom/web/server/SelfHoster.java: Add several
721         System.out.println() lines.
722
723 2012-05-23  Murray Cumming  <murrayc@murrayc.com>
724
725         Tests: SelfHoster: Check other paths for PostgreSQL command-line tools.
726
727         * src/test/java/org/glom/web/server/SelfHoster.java:
728         getPathToPostgresExecutable(): Try some common paths (as on Ubuntu, for 
729         instance) instead of just /usr/bin (as on Fedora). Check the result when 
730         using this method.
731
732 2012-05-23  Murray Cumming  <murrayc@murrayc.com>
733
734         Remove LayoutItemPortal.get/setNavigationTable().
735         
736         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java:
737         Remove get/setNavigationTable(), which is only a cache, because it is not
738         used, and does not need to be used, because that decision should be made on
739         the server.
740         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
741         updatePortalsExtras():
742         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
743         getNavigationRecord():
744         * src/test/java/org/glom/web/server/libglom/LayoutItemPortalDeepCloneTest.java:
745         Adapted.
746
747 2012-05-21  Murray Cumming  <murrayc@murrayc.com>
748
749         Initial self-hosting for tests.
750
751         * pom.xml: Change the scope for log4j, to hopefully make it 
752         available to the test code which uses it indirectly via jOOQ.
753         * src/main/java/org/glom/web/server/ConfiguredDocument.java: Allow
754         self-hosting, though we only use it for testing.
755
756         * src/main/java/org/glom/web/server/libglom/Document.java:
757         example rows: Use a map instead of a list for each row of values,
758         so we know what field they are for, instead of relying on the sequence
759         being correct. This is not very efficient, but it does not really need 
760         to be.
761         * src/test/java/org/glom/web/server/libglom/DocumentTest.java
762         testReadTableExampleRows(): Adapted.
763
764         * src/main/java/org/glom/web/shared/DataItem.java: Added getValue()
765         that returns an Object, for generic use. Note that Object seems to be 
766         the implicit base even of double.
767         * src/main/java/org/glom/web/shared/libglom/Field.java: Add getSqlType(),
768         for use in CREATE TABLE SQL queries.
769         * src/test/java/org/glom/web/server/SelfHoster.java: Add this class 
770         to do self-hosting of PostgreSQL databases via its command-line 
771         utilities, based on Glom's C++ code in test_selfhosting_utils.cc and
772         backends/postgres_self.cc. This is incomplete - it needs more 
773         warnings about failures and it needs to clean up properly when things
774         fail.
775         * src/test/java/org/glom/web/server/SelfHostExampleTest.java: A simple 
776         test of this new class.
777
778 2012-05-21  Murray Cumming  <murrayc@murrayc.com>
779
780         Document: loading example data: Handle exceptions.
781
782         * src/main/java/org/glom/web/server/libglom/Document.java:
783         DateFormat.parse() and Double.valueOf() can throw exceptions, though
784         Eclipse did not warn about that.
785
786 2012-05-20  Murray Cumming  <murrayc@murrayc.com>
787
788         Document: load(), save(): Handle the example rows.
789
790         * src/main/java/org/glom/web/shared/DataItem.java: Add get/setDate() 
791         and get/setImage().
792         * src/main/java/org/glom/web/server/libglom/Document.java:
793         load(), save(): Load and save the example rows, though the date, time
794         and image types are not handled properly yet.
795         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
796         Add testReadTableExampleRows() just to check that something is read.
797
798 2012-05-20  Murray Cumming  <murrayc@murrayc.com>
799
800         Document: Add save().
801
802         * src/main/java/org/glom/web/shared/libglom/Translatable.java:
803         Added getTranslationsMap() for use while saving.
804         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java:
805         Adedd getUseDefaultFormatting() for use while saving.
806         * src/main/java/org/glom/web/server/libglom/Document.java: Added save()
807         and several private methods that it uses.
808
809         This will be useful while testing via self-hosting.
810         It is not complete, but should be complete enough for testing.
811
812 2012-05-17  Murray Cumming  <murrayc@murrayc.com>
813
814         OnlineGlomService: Simplify the getList/RelatedViewData() methods.
815
816         * src/main/java/org/glom/web/client/OnlineGlomService.java
817         * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java
818         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
819         Remove getSortedListViewData() and getSortedRelatedListData(), adding
820         the sort column index and ascending bool to the regular method.
821         Instead, a sort column index of -1 now means no sort.
822         This is less explicit, but it's fairly simple, reduces the amount of 
823         code, and makes the OnlineGlomService API slightly smaller.
824         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
825         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
826         getDataProvider():
827         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
828         getListViewData(), getRelatedListData():
829         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
830         getListViewData(), getRelatedListData():
831         * src/main/java/org/glom/web/server/database/ListDBAccess.java:
832         getListData():
833         * src/main/java/org/glom/web/server/database/ListViewDBAccess.java:
834         getData():
835         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
836         getData(): Adapted.
837
838 1.21.9.2:
839
840 2012-05-16  Murray Cumming  <murrayc@murrayc.com>
841
842         Use translations for top-level groups too.
843
844         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
845         updateTitlesForLocale(): Use the translation for the group 
846         as well as for child items.
847
848 1.21.9.1:
849
850 Just recompiled to fix a problem in the released .tar.gz file.
851
852 1.21.9:
853
854 2012-05-15  Murray Cumming  <murrayc@murrayc.com>
855
856         Corrections to navigation to related records.
857         
858         * src/main/java/org/glom/web/client/OnlineGlomService.java:
859         * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
860         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
861         getRelatedListData(), getSortedRelatedListData)(), getRelatedListRowCount(),
862         getSuitableRecordToViewDetails(): Take a LayoutItemPortal instead of a 
863         relationship name, because the relationship name is not necessarily unique 
864         on the layout.
865         TOOD: This is inefficient, because it passes the whole list of 
866         child field items back to the server, but it is more correct, and happens
867         to fix a bug with the primary key being lost after a few navigations.
868         There is probably a chance to make this more efficient anyway in some 
869         more basic way.
870         
871         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
872         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.jav
873         * src/main/java/org/glom/web/server/ConfiguredDocument.java
874         * src/main/java/org/glom/web/server/database/DBAccess.java
875         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
876         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
877         Adapted.
878
879 2012-05-15  Murray Cumming  <murrayc@murrayc.com>
880
881         Fix the use of translations.
882
883         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
884         Add updateTitlesForLocale().
885         getValidListViewLayoutGroup(), getDetailsLayoutGroup():
886         Call it to discard unwanted translations and to make getTitle() return
887         the wanted translation wihout the need for the client code to specify a locale.
888         * src/main/java/org/glom/web/shared/libglom/Translatable.java:
889         getTitle(): Fallback to the original title, as libglom does.
890
891 2012-05-15  Murray Cumming  <murrayc@murrayc.com>
892
893         Document: Correctly report the number of available translation locales.
894
895         * src/main/java/org/glom/web/server/libglom/Document.java: Fill
896         the available locale IDs list.
897         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
898         testLocales: Test this.
899
900 2012-05-15  Murray Cumming  <murrayc@murrayc.com>
901
902         SqlUtils: Use camelCase.
903
904         * src/main/java/org/glom/web/server/SqlUtils.java: Use camelCase.
905         * src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
906         * src/main/java/org/glom/web/server/database/ListViewDBAccess.java:
907         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
908         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
909         * src/main/java/org/glom/web/server/ReportGenerator.java: Adapt.
910
911 2012-05-15  Murray Cumming  <murrayc@murrayc.com>
912
913         Use jOOQ's tableByName() and fieldByName.
914
915         * pom.xml: Use jOOQ 2.3.1 to get the new API.
916         * src/main/java/org/glom/web/server/SqlUtils.java:
917         build_sql_select_step_with_where_clause(), .createField(),
918         builder_add_join(): Use Factory.tableByName() and Factory.fieldByName()
919         so we can get correct quoting and escaping. Thanks to Lukas Eder for 
920         adding this, and other things, to jOOQ.
921
922 2012-05-15  Murray Cumming  <murrayc@murrayc.com>
923
924         SqlUtils: Remove the Connection parameters.
925
926         * src/main/java/org/glom/web/server/SqlUtils.java:
927         build_sql_select_with_key(), build_sql_select_with_where_clause(),
928         createSelect(), build_sql_select_step_with_where_clause(),
929         build_sql_count_select_with_where_clause(),
930         build_sql_select_count_rows(): Remove the Connection parameter because
931         jOOQ does not actually need a connectionwhen it is just used to build 
932         a SQL string:
933         https://groups.google.com/forum/#!topic/jooq-user/tIwobFOR2iM
934
935         * src/main/java/org/glom/web/server/ReportGenerator.java:
936         generateReport():
937         * src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
938         getData():
939         * src/main/java/org/glom/web/server/database/ListDBAccess.java:
940         Constructor, getListData(), getResultSizeOfSQLQuery():
941         * src/main/java/org/glom/web/server/database/ListViewDBAccess.java:
942         getSelectQuery(), getCountQuery():
943         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
944         getSelectQuery(), getCountQuery():
945         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
946         getNavigationRecord(): Adapted.
947
948 2012-05-14  Murray Cumming  <murrayc@murrayc.com>
949
950         Fix quick find.
951
952         * src/main/java/org/glom/web/server/SqlUtils.java:
953         get_find_where_clause_quick(): Use a comparison of 
954         lowercase values, instead of a simple equals. Regular Glom
955         uses the PostgreSQL ILIKE operator but jOOQ does not 
956         support that just yet, though it will soon.
957
958 2012-05-14  Murray Cumming  <murrayc@murrayc.com>
959
960         TableToViewDetails: Use a real serialization ID.
961
962         * src/main/java/org/glom/web/shared/libglom/layout/TableToViewDetails.java:
963         Though this does not fix the serialization problem.
964
965 2012-05-12  Murray Cumming  <murrayc@murrayc.com>
966
967         Added LayoutItemPortalDeepCloneTest.
968
969 2012-05-11  Murray Cumming  <murrayc@murrayc.com>
970
971         Make navigation work again.
972
973         * src/main/java/org/glom/web/server/libglom/Document.java:
974         Add getLayoutItemFieldShouldHaveNavigation().
975         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java:
976         Replace get/setAddNavigation() with the partly-existing 
977         get/setNavigationTableName(), with an empty string being no navigation,
978         because this is simpler. Use the new 
979         Document.getLayoutItemFieldShouldHaveNavigation() method to set this.
980         
981         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
982         Add updateFieldsExtras() and call setNavigationTableName in it.
983         getDetailsLayoutGroup(), 
984         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
985         createLayout(): Adapted.
986         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java
987         Constructor: Adapted.
988
989         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java:
990         Replace get/setAddNavigation() with get/setNavigation(), returning a
991         TableToViewDetails class with both the table name and UsesRelationship,
992         because both are need. The previous code used java-libglom's output 
993         variable (strangely, via sharedptr) to return both, but we cannot really
994         do that in Java.
995         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
996         getNavigationRecord(): Adapt. However, we cannot actually use the cache
997         here because it somehow gets set to null during deepCopy(). I must test this.
998         * src/test/java/org/glom/web/server/libglom/DocumentTest.java
999         testGetSuitableTableToViewDetails(): Adapted.
1000         
1001         TODO: Find out why deepClone() is not quite working.
1002         
1003 2012-05-11  Murray Cumming  <murrayc@murrayc.com>
1004
1005         DBAccess: Simplify the retrievel of full field details.
1006
1007         * src/main/java/org/glom/web/server/database/DBAccess.java
1008         getFieldsToShowForSQLQueryAddGroup(). This might be unnecessary anyway,
1009         because the Document loading should have done this.
1010
1011 2012-05-11  Murray Cumming  <murrayc@murrayc.com>
1012
1013         Document: Correct loading of doubly-related layout fields.
1014
1015         * src/main/java/org/glom/web/server/libglom/Document.java:
1016         loadUsesRelationship(): Actually set the related relationship, instead
1017         of only setting it if it's not found.
1018
1019 2012-05-09  Murray Cumming  <murrayc@murrayc.com>
1020
1021         Replace all appearances of Colour with color.
1022
1023         Because US English is dominant.
1024
1025 2012-05-09  Murray Cumming  <murrayc@murrayc.com>
1026
1027         Use colors in HTML format, solving a warning about an unused function.
1028
1029         * src/main/java/org/glom/web/shared/libglom/NumericFormat.java
1030         * src/main/java/org/glom/web/shared/libglom/layout/Formatting.java:
1031         Add *asHTMLColor() versions of methods.
1032         TODO: However, we should create and cache the results on the server.
1033         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java
1034         * src/main/java/org/glom/web/client/ui/list/ListTable.java
1035         * src/main/java/org/glom/web/server/ConfiguredDocument.java
1036         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
1037         Use the asHTMLcolor() versions.
1038
1039 2012-05-09  Murray Cumming  <murrayc@murrayc.com>
1040
1041         ListViewTable: Constructor: Take the table name as a parameter.
1042
1043         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
1044         Constructor: Take the tableName, and set the member variable, because
1045         we use it here.
1046         * src/main/java/org/glom/web/client/ui/ListViewImpl.java:
1047         setCellTable(): Pass the table name.
1048         This makes navigation to non-default tables work again. I don't know 
1049         why it worked before in the master branch.
1050
1051 2012-05-07  Murray Cumming  <murrayc@murrayc.com>
1052
1053         ConfiguredDocument: Restore correct addition of hidden primary key items.
1054
1055         * src/main/java/org/glom/web/client/ui/list/ListTable.java
1056         (ListTable.createCellTable): Uncomment out the check for the hidden
1057         primary key.
1058         * src/main/java/org/glom/web/server/ConfiguredDocument.java: Only
1059         add primary key items for top-level lists and portals, as before, 
1060         instead of adding them to each group.
1061         * src/main/java/org/glom/web/shared/libglom/layout/LayoutGroup.java:
1062         Actually implement the extra methods such as setHiddenPrimaryKey() and
1063         comment that these are used only for top-level list groups and in portals.
1064         This strangeness suggests even more that this should not be squeezed
1065         into the LayoutGroup class.
1066
1067 2012-05-07  Murray Cumming  <murrayc@murrayc.com>
1068
1069         Fix Formatting loading.
1070
1071         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java:
1072         getFormattingUsed(): Remove the duplicate Formatting member variable
1073         in favour of the one from the base class.
1074         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemWithFormatting.java:
1075         Initialize a new Formatting instead of using null by default, so we 
1076         have some defaults, instead of having to initialize one later just to 
1077         get the same defaults. This also makes loading of formatting from the
1078         document work, because that expected a non-null.
1079
1080 2012-05-07  Murray Cumming  <murrayc@murrayc.com>
1081
1082         RelatedListTable: Make sure that the tableName is set.
1083
1084         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
1085         Constructor: Take the tableName so it is available later. Otherwise, 
1086         the server assumes that we mean the default table and cannot find the
1087         relationship in it.
1088         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
1089         setData(): Pass the tableName to the RelatedListTable constructor.
1090
1091 2012-05-07  Murray Cumming  <murrayc@murrayc.com>
1092
1093         Add some checks.
1094
1095         * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
1096         RelatedListNavigationButtonCell.onEnterKeyDown(), setData():
1097         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
1098         getDataProvider():
1099         * src/main/java/org/glom/web/client/ui/list/ListTable.java:
1100         addColumn():
1101         * src/main/java/org/glom/web/server/database/DBAccess.java:
1102         convertResultSetToDTO(), getPortal():
1103         * src/main/java/org/glom/web/server/database/ListDBAccess.java
1104         getListData():
1105         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
1106         Add checks for null objects and out of range access, with log messages to
1107         give hints so we can fix these properly.
1108
1109 2012-05-07  Murray Cumming  <murrayc@murrayc.com>
1110
1111         Portals: some corrections.
1112
1113         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
1114         setData():
1115         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
1116         constructor: Use getRelationshipNameUsed() instead of getName(), because
1117         that is what is meant.
1118         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java:
1119         getFromField(): Fix a typo, to get the field name, not the table name.
1120         * src/main/java/org/glom/web/server/database/DBAccess.java:
1121         getPortal(): Fix a typo that stopped this from working.
1122
1123 2012-05-07  Murray Cumming  <murrayc@murrayc.com>
1124
1125         LayoutItemPortal: Also override getTitleOriginal().
1126
1127         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java:
1128         This lets the base getTitle() with no parameters work.
1129         TODO: Test this properly.
1130
1131 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1132
1133         LayoutItemPortal: getTitle*(): Use the relationship title.
1134
1135 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1136
1137         LayoutItemField: Fix loading of custom titles.
1138
1139         * src/main/java/org/glom/web/server/libglom/Document.java
1140         loadDataLayoutItemField(): The title, if any, instead of the field 
1141         title, is stored in a title_custom node. Load it from there.
1142         * src/main/java/org/glom/web/shared/libglom/CustomTitle.java: Add this
1143         class.
1144         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField:
1145         Add getCustomTitle() and use it, instead of super.getTitle*(), in the
1146         getTitle*() overrides.
1147         * src/test/java/org/glom/web/server/libglom/LayoutItemFieldTest.java:
1148         Adapt.
1149
1150 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1151
1152         LayoutItemField: Fall back to field titles, so some are really shown.
1153
1154         * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java:
1155         Override getTitleOriginal() and getTitle(), as in java-libglom.
1156         * src/test/java/org/glom/web/server/libglom/LayoutItemFieldTest.java:
1157         Test this behaviour.
1158
1159 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1160
1161         Correct use of setExpectedResultSize().
1162
1163         * src/main/java/org/glom/web/server/ConfiguredDocument.java
1164         getValidListViewLayoutGroup(), getDetailsLayoutGroup():
1165         Use setExpectedResultSize only on top-level groups (for instance, the
1166         list layout) or on child portals (in details views).
1167         Use the correct table name for portals to avoid SQL errors.
1168         Update the expected counts when returning cached layouts.
1169
1170 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1171
1172         Document: Interpret no group column count as 1.
1173
1174         * src/main/java/org/glom/web/server/libglom/Document.java: Use a sane
1175         default, though we now check for this in the UI code anyway.
1176
1177 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1178
1179         More null checks.
1180
1181 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1182
1183         Translatable: Use Hashmap instead of Treemap because GWT supports it.
1184
1185         * src/main/java/org/glom/web/shared/libglom/Translatable.java:
1186         The use of Treemap lead to this error from async methods, with no 
1187         further clue:
1188         "The response could not be deserialized"
1189
1190 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1191
1192         OnlineGlom.gwt.xml: Add exludes to fix explicit gwt compilation in Eclipse.
1193
1194         * src/main/java/org/glom/web/OnlineGlom.gwt.xml: This is necessary 
1195         when using the Google -> GWT Compile, or 
1196         g toolbar button -> GWT Compile Project... feature in Eclipse.
1197
1198 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1199
1200         ListTable.addColumn(): Protect against a null Formatting.
1201
1202         * src/main/java/org/glom/web/client/ui/list/ListTable.java: addColumn():
1203         Create a default Formatting if it is null, because that is the simplest
1204         way to do this.
1205
1206 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1207
1208         ConfiguredDocument.updateLayoutGroup(): Protect against a null dereference.
1209
1210         * src/main/java/org/glom/web/server/ConfiguredDocument.java
1211         updateLayoutGroup(): Check that the field is not null.
1212
1213 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1214
1215         ListViewImpl: Protected against a bad cast error.
1216
1217         * src/main/java/org/glom/web/client/ui/ListViewImpl.java:
1218         onEnterKeyDown(): Do not cast without an instanceof check.
1219
1220 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1221
1222         ListTable: Protect against an out of range error.
1223
1224         * src/main/java/org/glom/web/client/ui/list/ListTable.java
1225         createCellTable(): This is unlikely, but can happen while debugging.
1226
1227 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1228
1229         AsyncMessage onFailure() callbacks: Log the exception message.
1230
1231         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
1232         * src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java:
1233         * src/main/java/org/glom/web/client/activity/ListActivity.java:
1234         * src/main/java/org/glom/web/client/activity/ReportActivity.java:
1235         * src/main/java/org/glom/web/client/activity/TableSelectionActivity:
1236         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
1237         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
1238         These are useful clues when something is wrong.
1239
1240 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1241
1242         ConfiguredDocument: Avoid a null dereference.
1243
1244         * src/main/java/org/glom/web/server/ConfiguredDocument.java
1245         TableLayoutsForLocale.getMapWithAdd(): Make sure that the list and 
1246         details maps are created.
1247
1248 2012-05-06  Murray Cumming  <murrayc@murrayc.com>
1249
1250         Document: Correct the port number parsing.
1251
1252         * src/main/java/org/glom/web/server/libglom/Document.java:
1253         This lets us actually connect to the database and show the document.
1254
1255 2012-05-05  Murray Cumming  <murrayc@murrayc.com>
1256
1257         Fix mvn gwt:test
1258
1259         * pom.xml: Use htmlunit mode for gwt:test, because the default demands
1260         user-interaction, asking us to load a temporary URL in a browser.s
1261         * src/main/java/org/glom/web/OnlineGlom.gwt.xml: Add a servlet node,
1262         which is apparently necessary for testing the service. See the comment.
1263         * src/test/java/org/glom/web/client/GwtTestOnlineGlomService.java: 
1264         Show the exception, if any. This is how I saw the 404 in the HTML in 
1265         the exception.
1266
1267 2012-05-05  Murray Cumming  <murrayc@murrayc.com>
1268
1269         DocumentTest: Move the .glom files into the resources directory.
1270
1271         * src/test/java/org/glom/web/server/libglom/DocumentTest: And get the
1272         URI via getResource().
1273
1274 2012-05-05  Murray Cumming  <murrayc@murrayc.com>
1275
1276         Document: Remove the FieldIdentifies inner class.
1277
1278         * src/main/java/org/glom/web/server/libglom/Document.java: We only
1279         use the Relationship (though the same function in libglom is maybe
1280         used in other ways) and so this removes a compiler warning.
1281
1282 2012-05-05  Murray Cumming  <murrayc@murrayc.com>
1283
1284         Document.load() Remove the error code parameter.
1285
1286         * src/main/java/org/glom/web/server/libglom/Document.java: load():
1287         Remove the parameter. We do not set it yet and it could never have
1288         worked as an output parameter (though maybe it did in java-libglom).
1289         We could use an exception if we really want the failure reason.
1290         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
1291         init():
1292         * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
1293         setUp(), testGetSuitableTableToViewDetails(): Adapt.
1294
1295 2012-05-05  Murray Cumming  <murrayc@murrayc.com>
1296
1297         Make some inner classes static.
1298
1299         * src/main/java/org/glom/web/server/ConfiguredDocument.java
1300         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
1301         * src/main/java/org/glom/web/server/ReportGenerator.java
1302         * src/main/java/org/glom/web/server/libglom/Document.java
1303         Make all inner classes static that can be static.
1304
1305 2012-05-05  Murray Cumming  <murrayc@murrayc.com>
1306
1307         OnlineGlomServiceImpl: Do not load and check for java-libglom.
1308
1309         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
1310         init(): We do not use java-libglom any more.
1311
1312 2012-05-05  Murray Cumming  <murrayc@murrayc.com>
1313
1314         Remove mentions of java-libglom.
1315
1316         * README: Remove mention of java-libglom, because it no longer needed.
1317         * utils/build-onlineglom-war.sh:
1318         * utils/check-and-recover-tomcat.py:
1319         * utils/install-onlineglom-war.sh: Remove these as they are no longer
1320         useful. Building is now far easier, with no need for jhbuild.
1321
1322 2012-05-05  Murray Cumming  <murrayc@murrayc.com>
1323
1324         Fix the build (mvn package)
1325
1326         * src/main/java/org/glom/web/shared/libglom/layout/LayoutGroup.java
1327         (LayoutGroup): Make the LayoutItemList inner class static and protected.
1328         Otherwise the GWT Java->Javascript compilation fails with just this
1329         error, during mvn package or when attempting to view in a browser, 
1330         in the GWT developer mode in Eclipse.
1331
1332         [INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ gwt-glom ---
1333         [INFO] auto discovered modules [org.glom.web.OnlineGlom]
1334         [INFO] Compiling module org.glom.web.OnlineGlom
1335         [INFO]    [ERROR] Errors in 'file:/home/murrayc/checkouts/gnome/gwt-glom/src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java'
1336         [INFO]       [ERROR] Line 46:  Failed to resolve 'org.glom.web.client.OnlineGlomService' via deferred binding
1337         [INFO]    Scanning for additional dependencies: file:/home/murrayc/checkouts/gnome/gwt-glom/src/main/java/org/glom/web/client/ui/details/DetailsCell.java
1338         [INFO]       [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
1339         [INFO]          [WARN] org.glom.web.client.OnlineGlomService_Proxy
1340         [INFO]    [ERROR] Cannot proceed due to previous errors
1341
1342         It has taken me 2 days to find out what was causing that. After reducing
1343         the code, the compiler eventually showed me the full error message.
1344
1345 2012-05-04  Murray Cumming  <murrayc@murrayc.com>
1346
1347         ConfiguredDocument: Cache the cloned and stripped layouts.
1348
1349         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
1350         getValidListViewLayoutGroup(), .getDetailsLayoutGroup(): Store the cloned
1351         layout in a map, so we can retrieve it again without rebuilding it.
1352
1353 2012-05-04  Murray Cumming  <murrayc@murrayc.com>
1354
1355         UsesRelationshipImpl: Complete the relationshipEquals() implementation.
1356
1357 2012-05-04  Murray Cumming  <murrayc@murrayc.com>
1358
1359         libglom classes: Implement some auto-generated emthods.
1360
1361 2012-05-04  Murray Cumming  <murrayc@murrayc.com>
1362
1363         Add GwtTestOnlineGlomService.
1364
1365         * src/test/java/org/glom/web/client/GwtTestOnlineGlomService.java:
1366         However, this (and the other GwtTest*) does not seem to run during 
1367         mvn test. 
1368
1369 2012-05-04  Murray Cumming  <murrayc@murrayc.com>
1370
1371         Remove use of unsupported features from client code.
1372
1373         * src/main/java/org/glom/web/client/StringUtils.java: Add equals().
1374         * src/main/java/org/glom/web/shared/libglom/layout/UsesRelationshipImpl.java:
1375         * src/main/java/org/glom/web/shared/libglom/layout/reportparts/LayoutItemGroupBy.java:
1376         Use our client version of StringUtils instead of the apache commons one.
1377         
1378         However, the GWT Javascript compliation still fails.
1379
1380 2012-04-25  Murray Cumming  <murrayc@murrayc.com>
1381
1382         Add a Field class and implement some loading of it in Document.
1383
1384 2012-04-25  Murray Cumming  <murrayc@murrayc.com>
1385
1386         Initial Document loading implementation, instead of libglom.
1387
1388         * src/test/java/org/glom/web/shared/libglom/: Add Document, Report,
1389         and Translatable classes, and adapt the rest of the code to use them.
1390         However, this is still missing Layout and Field classes and loading.
1391
1392 2012-04-24  Murray Cumming  <murrayc@murrayc.com>
1393
1394         Use of jOOQ: Move Field creation into a utility method.
1395
1396         * src/main/java/org/glom/web/server/SqlUtils.java:
1397         This lets us improve it more easily.
1398
1399 2012-04-24  Murray Cumming  <murrayc@murrayc.com>
1400
1401         Use of jOOQ: Improve the code to COUNT a sub-select.
1402
1403         * src/main/java/org/glom/web/server/SqlUtils.java:
1404         Move initial query creation into 
1405         build_sql_select_step_with_where_clause().
1406         build_sql_select_count_rows(): Use the jOOQ API instead of
1407         concatentating text, because a jOOQ Select*Step is a TableLike,
1408         which is what from() takes.
1409
1410 2012-04-23  Murray Cumming  <murrayc@murrayc.com>
1411
1412         Use jOOQ instead of Glom.build_sql*(), to avoid native calls.
1413
1414         * pom.xml: Depend on jooq.
1415         * src/main/java/org/glom/web/server/SqlUtils.java: Reimplement the
1416         methods with jOOQ, based on the C++ implementations in libglom,
1417         with some changes to the logic required by jooQ.
1418         Take a jOOQ Condition rather than a Glom.SqlExpr (GdaSqlExpr) for the
1419         where clause.
1420         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
1421         * src/main/java/org/glom/web/server/ReportGenerator.java:
1422         * src/main/java/org/glom/web/server/SqlUtils.java:
1423         * src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
1424         * src/main/java/org/glom/web/server/database/ListDBAccess.java:
1425         * src/main/java/org/glom/web/server/database/ListViewDBAccess.java:
1426         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
1427         * src/main/java/org/glom/web/server/database/RelatedListNavigation:
1428         Adapt. In particular, the SqlUtils methods now need to take a Connection,
1429         because jOOQ needs that, though it seems unnecessary.
1430
1431         This is not quite finished. Ideally jOOQ would help us to build 
1432         table_name.field_name names, quoting and escaping them properly.
1433         See http://stackoverflow.com/questions/10264001/instantiating-a-jooq-field-by-name
1434
1435 2012-04-21  Murray Cumming  <murrayc@murrayc.com>
1436
1437         Move use of Glom.build_sql*() into a new SqlUtils class.
1438
1439         * src/main/java/org/glom/web/server/SqlUtils.java: Add static methods
1440         to wrap Glom.build_sql*(). The parameter types are still Glom one,
1441         but this will make it easier to start using something other than 
1442         libglom or SqlBuilder.
1443
1444 2012-04-21  Murray Cumming  <murrayc@murrayc.com>
1445
1446         Update the project URL.
1447
1448         * pom.xml: Use an OnlineGlom-specific URL for the project URL.
1449
1450 2012-04-21  Murray Cumming  <murrayc@murrayc.com>
1451
1452         Main layout: Use a FlowTable instead of absolute positioning.
1453
1454         * src/main/java/org/glom/web/client/OnlineGlom.java: onModuleLoad():
1455         The RootLayoutPanel is a (extends) AbsolutePanel, so each of its 
1456         child panels/widgets must have an absolute position. But that is annoying, so
1457         this adds a FlowTable and puts the child panels in there.
1458
1459 2012-04-21  Murray Cumming  <murrayc@murrayc.com>
1460
1461         GwtTestOnlineGlom: Comment out unused code.
1462
1463         * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
1464         Eclipse has started to say that some code is unused.
1465
1466 2012-04-21  Murray Cumming  <murrayc@murrayc.com>
1467
1468         Update to the latest versions of dependencies.
1469
1470         * pom.xml: Update version numbers of dependencies to the latest
1471         versions.
1472         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
1473         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
1474         * src/main/java/org/glom/web/server/ReportGenerator.java:
1475         * src/main/java/org/glom/web/server/database/ListViewDBAccess.java:
1476         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
1477         * src/main/java/org/glom/web/server/database/RelatedListNavigation.
1478         java:
1479         * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
1480         Modify the imports where necessary.
1481
1482 2012-04-17  Murray Cumming  <murrayc@murrayc.com>
1483
1484         Style: Remove overflow:hidden from searchbox
1485
1486         * src/main/webapp/style.css: Because this pushes the Back To Link
1487         label/link on to the next row, which is then hidden due to the 
1488         hard-coded (in ems) height.
1489
1490 2012-04-20  Murray Cumming  <murrayc@murrayc.com>
1491
1492         Remove some duplicate code.
1493
1494         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
1495         getDocumentInfo(): This must have been duplicated during the merge from the
1496         reports branch.
1497
1498 1.21.8.1:
1499
1500 2012-04-19  Murray Cumming  <murrayc@murrayc.com>
1501
1502         Reports: Localize the waiting for report message.
1503
1504         * src/main/java/org/glom/web/client/activity/ReportActivity.java
1505         start(): Get the message from the contants.
1506         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties:
1507         Add the string here.
1508         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties:
1509         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_de.properties:
1510         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties:
1511         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties:
1512         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_zh_CN.properties:
1513         Update these files with the English text for newer strings for now.
1514
1515 2012-04-19  Murray Cumming  <murrayc@murrayc.com>
1516
1517         Reports: Show a message while waiting for the report.
1518
1519         * src/main/java/org/glom/web/client/ui/ReportView.java
1520         * src/main/java/org/glom/web/client/ui/ReportViewImpl.java:
1521         Add setWaitingText(), to show a message saying that we are 
1522         waiting for the report to be ready.
1523         * src/main/java/org/glom/web/client/activity/ReportActivity.java
1524         start(): Call setWaitingText() before calling the async
1525         report generation.
1526
1527 2012-04-19  Murray Cumming  <murrayc@murrayc.com>
1528
1529         ReportGenerator: Specify date and time formats.
1530
1531         * src/main/java/org/glom/web/server/ReportGenerator.java:
1532         createFieldValueElement(): Use the default (and localized)
1533         short formats, though we still need a way to show 4-digit
1534         years without providing the format for every locale.
1535         * src/main/java/org/glom/web/server/database/DBAccess.java:
1536         convertResultSetToDTO(): Use the short formats here too.
1537
1538 2012-04-18  Murray Cumming  <murrayc@murrayc.com>
1539
1540         ReportGenerator: Use the correct numeric formatting.
1541
1542         * src/main/java/org/glom/web/server/ReportGenerator.java
1543         createFieldExpression(), createFieldValueElement(): Take the
1544         whole LayoutItem_Field instead of just the field name, so
1545         we have access to the formatting.
1546         createFieldValueElement(): Use JRTextField.setPattern() to
1547         specify the numeric formatting, with the help of a 
1548         regular DecimalFormat.
1549
1550 2012-04-18  Murray Cumming  <murrayc@murrayc.com>
1551
1552         ReportGenerator: Avoid showing null for group by titles.
1553
1554         * src/main/java/org/glom/web/server/ReportGenerator.java
1555         generateReport(): Use setBlankWhenNull() on the field title
1556         style too, because this is used for values in group by
1557         sections.
1558
1559 2012-04-18  Murray Cumming  <murrayc@murrayc.com>
1560
1561         ReportGenerator: Add a colon to titles in vertical groups.
1562
1563         * src/main/java/org/glom/web/server/ReportGenerator.java
1564         addFieldToDetailBandVertical(): Pass true for the withColon
1565         parameter.
1566
1567 2012-04-18  Murray Cumming  <murrayc@murrayc.com>
1568
1569         ReportGenerator: Simplify the code by using Position more.
1570
1571 2012-04-18  Murray Cumming  <murrayc@murrayc.com>
1572
1573         Reports: Support vertical groups, roughly.
1574
1575         * src/main/java/org/glom/web/server/ReportGenerator.java:
1576         addToReport(): Rename to addGroupToReport() and, if necessary,
1577         call the new addVerticalGroupToReport() method.
1578         createFieldValueElement(): Let the caller specify the Y position
1579         too.
1580
1581 2012-04-17  Murray Cumming  <murrayc@murrayc.com>
1582
1583         Reports: Allow a second report to be shown.
1584
1585         * src/main/java/org/glom/web/client/ui/ReportViewImpl.java:
1586         clear(): Do not remove the HTML widget, which broke the whole layout.
1587
1588 2012-04-17  Murray Cumming  <murrayc@murrayc.com>
1589
1590         Locales drop-down: Show that we use English by default.
1591
1592         * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
1593         fillView(): When we use English, just because that is the default, when
1594         no locale is specified, show that in the Locales drop-down instead of 
1595         just showing the first item.
1596
1597 2012-04-17  Murray Cumming  <murrayc@murrayc.com>
1598
1599         Unselect the Report/Locale/Table combo item when appropriate.
1600
1601         * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
1602         setPlace(): clear reportName if this is not a ReportPlace.
1603         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
1604         setSelectedTableName(), setSelectedLocale(), setSelectedReport():
1605         When the provided name is empty, unselect all items, so that none are
1606         indicated. This uses a for loop because I cannot find a single method
1607         to do this.
1608
1609 2012-04-17  Murray Cumming  <murrayc@murrayc.com>
1610
1611         Report: Give the user a way to get back to the list.
1612
1613         * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
1614         start(), setPlace(): Show the Back To List link on reports, and also 
1615         interpret selecting the empty report item as back to list.
1616
1617 2012-04-13  Murray Cumming  <murrayc@murrayc.com>
1618
1619         Really show the selected Report name.
1620
1621         * src/main/java/org/glom/web/client/activity/TableSelectionActivity:
1622         setPlace(): Store the reportName here, if it is that kind of Place.
1623         fillView(): Set the selected Report after filling the list of reports.
1624         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
1625         setSelectedLocale(), setSelectedReport(): Avoid possible uses of
1626         null Strings, though we need some way to unselect all ListBox items
1627         in that case.
1628
1629 2012-04-13  Murray Cumming  <murrayc@murrayc.com>
1630
1631         ReportGenerator: Try to avoid some problems.
1632
1633         * src/main/java/org/glom/web/server/ReportGenerator.java
1634         addField(): Try to avoid duplicates, and avoid using a null
1635         class type.
1636
1637 2012-04-13  Murray Cumming  <murrayc@murrayc.com>
1638
1639         Reports: Use quickFind.
1640
1641         * src/main/java/org/glom/web/client/OnlineGlomService.java;
1642         * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
1643         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
1644         getReportHTML(): Add a quickFind parameter.
1645         * src/main/java/org/glom/web/client/activity/ReportActivity.java
1646         start(): Pass the quickFind parameter.
1647         * src/main/java/org/glom/web/server/ReportGenerator.java
1648         generateReport(): Take a quickFind parameter.
1649
1650 2012-04-13  Murray Cumming  <murrayc@murrayc.com>
1651
1652         ReportPlace: Actually use the report name.
1653
1654         * src/main/java/org/glom/web/client/place/ReportPlace.java
1655         getPlace(): Do not assign the report name to the quickfind.
1656
1657 2012-04-13  Murray Cumming  <murrayc@murrayc.com>
1658
1659         Show java.library.path when complaining.
1660
1661         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
1662         init(): When telling us to check java.library.path, show the
1663         current value.
1664
1665 2012-03-06  Murray Cumming  <murrayc@murrayc.com>
1666
1667         ReportGenerator: Do not show nulls.
1668
1669 2012-03-06  Murray Cumming  <murrayc@murrayc.com>
1670
1671         ReportGenerator: Make the title font larger.
1672
1673 2012-03-06  Murray Cumming  <murrayc@murrayc.com>
1674
1675         ReportGenerator: Put field titles inside groups, if there are groups.
1676
1677 2012-03-06  Murray Cumming  <murrayc@murrayc.com>
1678
1679         ReportGenerator: Take the Report itself instead of the name and group.
1680
1681         * src/main/java/org/glom/web/server/ConfiguredDocument.java
1682         Remove getReportLayoutGroup().
1683         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
1684         getReportHTML(): Pass the report instead
1685         of its name and layout group.
1686         * src/main/java/org/glom/web/server/ReportGenerator.java
1687         generateReport(): Use the report object to use the title 
1688         instead of the name.
1689
1690 2012-03-06  Murray Cumming  <murrayc@murrayc.com>
1691
1692         ReportGenerator: Remove designBand parameters.
1693
1694         * src/main/java/org/glom/web/server/ReportGenerator.java:
1695         Make designBand a class member instead of passing it to all
1696         methods.
1697
1698 2012-03-06  Murray Cumming  <murrayc@murrayc.com>
1699
1700         ReportGenerator: Add lines, a bit like in the desktop version.
1701
1702         * src/main/java/org/glom/web/server/ReportGenerator.java
1703         addToReport(): Use JRDesignLine.
1704
1705 2012-03-06  Murray Cumming  <murrayc@murrayc.com>
1706
1707         ReportGenerator: Correct the title positions and use some bold style.
1708
1709         * src/main/java/org/glom/web/server/ReportGenerator.java:
1710         Break the code up into reusable functions, correct the placement of 
1711         titles, and use normal/bold styles as in the reports in the desktop 
1712         version.
1713
1714 2012-03-06  Murray Cumming  <murrayc@murrayc.com>
1715
1716         ReportGenerator: Add a header band to show the field titles.
1717
1718         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
1719         getReportHTML(): Pass the localeId to the ReportGenerator 
1720         constructor.
1721         * src/main/java/org/glom/web/server/ReportGenerator.java
1722         constructor: Take the localeID so we can get translated field
1723         titles.
1724         generateReport(), addToReport(), addFieldToBand(): Add field 
1725         titles in a column header band.
1726
1727 2012-03-05  Murray Cumming  <murrayc@murrayc.com>
1728
1729         Reports drop-down list: Some improvement.
1730
1731         * src/main/java/org/glom/web/client/ui/TableSelectionView.java
1732         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
1733         Adedd setSelectedReport(),
1734         setReportList(): Add a blank line so that the user can select the 
1735         first one.
1736         * src/main/java/org/glom/web/client/activity/ReportActivity.java
1737         start(): Show the current report by calling setSelectedReport().
1738         This does not seem to work yet.
1739
1740 2012-03-05  Murray Cumming  <murrayc@murrayc.com>
1741
1742         DetailsActivity, ListActivity: Move some variables into a base class.
1743
1744         * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
1745         * src/main/java/org/glom/web/client/activity/HasTableActivity.java:
1746         * src/main/java/org/glom/web/client/activity/ListActivity.java: Move 
1747         the clientFactory, documentID, tableName and authenticationPopup into
1748         a base class, to avoid duplication.
1749
1750 2012-03-05  Murray Cumming  <murrayc@murrayc.com>
1751
1752         Translate the Reports label.
1753
1754         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java
1755         Get the "Reports" label string from the constants.
1756         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.pro
1757         perties: Add Reports to the constants.
1758
1759 2012-03-05  Murray Cumming  <murrayc@murrayc.com>
1760
1761         Reports: Implement grouping.
1762
1763         * src/main/java/org/glom/web/server/ReportGenerator.java:
1764         Handle LayoutItem_GroupBy items and try to do the right thing
1765         with JRDesignGroup. It seems to work.
1766
1767 2012-03-04  Murray Cumming  <murrayc@murrayc.com>
1768
1769         Actually show some data with JasperReports.
1770
1771         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: 
1772         getReportHTML(): Move most code into a ReportGenerator class.
1773         * src/main/java/org/glom/web/server/ReportGenerator.java:
1774         Recurse into sub-groups, adding fields to the JasperDesign's details
1775         band. Note that we must set an arbitrary width and height, or it just
1776         will not show any data.
1777
1778 2012-03-04  Murray Cumming  <murrayc@murrayc.com>
1779
1780         Reports Chooser: Show the titles, not the names.
1781
1782         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java
1783         (TableSelectionViewImpl.setReportList): Show the titles in the UI,
1784         and the names as the values.
1785         * src/main/java/org/glom/web/server/ConfiguredDocument.java
1786         (ConfiguredDocument.getReportLayoutGroup): Do not return a default
1787         group now that we provide the report name, so it should always 
1788         succeed.
1789
1790 2012-02-15  Murray Cumming  <murrayc@murrayc.com>
1791
1792         Depend on jasperreports.
1793
1794         * pom.xml: Add the dependency. My plan is to use this on the 
1795         server side.
1796
1797 2012-01-31  Murray Cumming  <murrayc@murrayc.com>
1798
1799         Implement navigation to report places.
1800
1801         * src/main/java/org/glom/web/client/activity/ReportActivity.java
1802         start(): Do not bother to handle all events here.
1803         * src/main/java/org/glom/web/client/ui/TableSelectionView.java
1804         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
1805         Added getSelectedReport().
1806         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
1807         .java: start(): When handling a change to the reports chooser,
1808         call getSelectedReport() and goTo() its ReportPlace.
1809         * src/main/java/org/glom/web/client/ui/ReportView.java
1810         * src/main/java/org/glom/web/client/ui/ReportViewImpl.java:
1811         Added setReportHTML() which puts the html in a gwt HTML widget.
1812         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
1813         getReportHTML(): Return "TODO" just to show that this works.
1814
1815 2012-01-31  Murray Cumming  <murrayc@murrayc.com>
1816
1817         Make ReportPlace usable.
1818
1819         * src/main/java/org/glom/web/client/mvp/AppPlaceHistoryMapper.java:
1820         Mention ReportPlace.
1821         * src/main/java/org/glom/web/client/place/ReportPlace.java:
1822         Correct the @prefix annotation.
1823
1824 2012-01-31  Murray Cumming  <murrayc@murrayc.com>
1825
1826         OnlineGlomService: Return report HTML rather than the LayoutGroup.
1827
1828         * src/main/java/org/glom/web/client/OnlineGlomService.java:
1829         * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
1830         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
1831         Change getReportLayout() to getReportHMTL() because we will not need to 
1832         parse or render the report layout on the client side.
1833         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
1834         getReportLayout(): Return the libglom LayoutGroup type because we will
1835         not need to convert to a shared type, because this will not be used on
1836         the client side.
1837         * src/main/java/org/glom/web/client/activity/ReportActivity.java:
1838         Adapted.
1839
1840         Note that there is still no implementation for this.
1841
1842
1843 2012-01-27  Murray Cumming  <murrayc@murrayc.com>
1844
1845         Add a (empty) Report Place, View, and Activity.
1846
1847         * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java:
1848         Rename to:
1849         * src/main/java/org/glom/web/client/place/HasTablePlace.java
1850         * src/main/java/org/glom/web/client/place/ListPlace.java: Move some of
1851         this into a superclass:
1852         * src/main/java/org/glom/web/client/place/HasRecordsPlace.java
1853         and also use it as the base of this new ReportPlace:
1854         * src/main/java/org/glom/web/client/place/ReportPlace.java
1855
1856         * src/main/java/org/glom/web/client/ui/ReportView.java
1857         * src/main/java/org/glom/web/client/ui/ReportViewImpl.java
1858         * src/main/java/org/glom/web/client/activity/ReportActivity.java:
1859         Add these, containing mostly boiler-plate for now.
1860
1861         * src/main/java/org/glom/web/client/OnlineGlomService.java
1862         * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java
1863         * src/main/java/org/glom/web/server/ConfiguredDocument.java
1864         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
1865         Add API to get the LayoutGroup for the report.
1866
1867 2012-01-23  Murray Cumming  <murrayc@murrayc.com>
1868
1869         Add and fill a Reports drop-down list box.
1870
1871         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
1872         Aded getReports():
1873         * src/main/java/org/glom/web/client/OnlineGlomService.java:
1874         * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
1875         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
1876         Added getReports(document, table, localeID), calling 
1877         ConfiguredDocument.getReports().
1878         * src/main/java/org/glom/web/client/ui/TableSelectionView.java:
1879         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
1880         Added setReportsList() and a list widget.
1881         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
1882         .java (TableSelectionActivity.fillView(): Fill the view's reports list.
1883
1884
1885 1.21.8:
1886
1887 2012-04-12  Murray Cumming  <murrayc@murrayc.com>
1888
1889         Translations: Add Esperanto.
1890
1891         * src/main/java/org/glom/web/OnlineGlom.gwt.xml
1892         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_eo.
1893         properties: Add this translation because someone took the time to make it.
1894
1895 2012-03-15  Murray Cumming  <murrayc@murrayc.com>
1896
1897         Adapt to the java-libglom 1.21.7 API. 
1898
1899         * src/main/java/org/glom/web/server/ReportGenerator.java:
1900         addToReport(): get_group_secondary_fields() is now
1901         get_secondary_fields().
1902
1903
1904 2012-03-15  Murray Cumming  <murrayc@murrayc.com>
1905
1906         Use the latest java-libglom version.
1907
1908         * pom.xml: Use java-libglom 1.21.7.
1909
1910 2012-03-03  Ben Konrath  <ben@bagu.org>
1911
1912         Display date and time in details view.
1913
1914         https://bugzilla.gnome.org/show_bug.cgi?id=671257
1915
1916         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
1917
1918 2012-03-05  Murray Cumming  <murrayc@murrayc.com>
1919
1920         Require the latest java-libglom.
1921
1922         * pom.xml: java-libglom 1.21.5 has LayoutItem_GroupBy.
1923
1924 2012-03-04  Murray Cumming  <murrayc@murrayc.com>
1925
1926         ListViewDbAccess.getSelectQuery(): Avoid using empty quickfind strings.
1927
1928         * src/main/java/org/glom/web/server/database/ListViewDBAccess.java
1929         ListViewDBAccess.getSelectQuery(): Do not create a where clause for 
1930         an empty quickfind string. I also corrected libglom to create only 
1931         empty where clauses for empty quickfind strings, but this avoids the
1932         need for that fix.
1933
1934 2012-02-24  Ben Konrath  <ben@bagu.org>
1935
1936         Improve the tabs in the Notebook widget.
1937
1938         Bug #670728
1939
1940 2012-01-30  Murray Cumming  <murrayc@murrayc.com>
1941
1942         Translations: Try to translate the strings.
1943
1944         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties:
1945         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_de.properties:
1946         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties:
1947         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties:
1948         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_zh_CN.properties:
1949         Take the Open translation from GTK+'s .po files.
1950         Take the Details translation from Glom's po files.
1951         I have added the other strings to Glom so we can get translations that way:
1952         http://git.gnome.org/browse/glom/commit/?id=c3cefe607428a84bdf8de1b04e8bef6f70b04564
1953
1954 2012-01-27  Murray Cumming  <murrayc@murrayc.com>
1955
1956         TableSelectionViewImpl: Put the search label and entry in a div.
1957
1958         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
1959         Put the search widgets in a FlowTable so that the CSS can be used to
1960         style them while keeping them together.
1961         * src/main/webapp/style.css: Mention the new div.
1962
1963 2012-01-27  Murray Cumming  <murrayc@murrayc.com>
1964
1965         Translate more strings in more locales.
1966
1967         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties:
1968         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
1969         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
1970         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
1971         Translate the "Details" and "Open" string too.
1972
1973         * src/main/java/org/glom/web/OnlineGlom.gwt.xml:
1974         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties:
1975         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties:
1976         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties:
1977         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties:
1978         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_zh_CN.properties:
1979         Add these new locales as placeholders though they currently contain English.
1980
1981 2012-01-27  Murray Cumming  <murrayc@murrayc.com>
1982
1983         OnlineGlomServiceImpl: Avoid (unlikely) null object dereferences.
1984
1985         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: get*():
1986         Check the ConfiguredDocument* for null before using it.
1987
1988 2012-01-26  Murray Cumming  <murrayc@murrayc.com>
1989
1990         Tell Eclipse about the generated java files.
1991
1992         * .classpath: This lets it find OnlineGlomConstants.java.
1993         It would be nice if Eclipse just used the maven build files.
1994
1995 2012-01-26  Murray Cumming  <murrayc@murrayc.com>
1996
1997         Prevent a crash when no locale is specified in the URL.
1998
1999         * src/main/java/org/glom/web/client/Utils.java: getCurrentLocaleID():
2000         Avoid returning a null string, obtained from 
2001         Window.Location.getParameter(). This caused a crash when it was
2002         later passed to libglom's API.
2003         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
2004         init(), getDocumentInfo(), getListViewLayout(), getDocuments(),
2005         getDetailsLayoutAndData(): Use StringUtils.defaultString() to
2006         guard against future null strings.
2007
2008 2012-01-26  Murray Cumming  <murrayc@murrayc.com>
2009
2010         Use the ?locale= query param instead of the &lang= token param. 
2011
2012         * src/main/java/org/glom/web/client/place/ListPlace.java
2013         * src/main/java/org/glom/web/client/place/DetailsPlace.java
2014         * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java
2015         Remove the lang token key and value.
2016         
2017         * src/main/java/org/glom/web/client/ui/TableSelectionView.java
2018         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
2019         When the user selects a different locale from the chooser, use 
2020         Window.Location.assign() to change the URL, which then causes a reload.
2021         
2022         * src/main/java/org/glom/web/client/Utils.java: Added getCurrentLocaleID().
2023         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
2024         * src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java
2025         * src/main/java/org/glom/web/client/activity/ListActivity.java
2026         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
2027         * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java
2028         * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java:
2029         * src/main/java/org/glom/web/client/ui/ListView.java:
2030         * src/main/java/org/glom/web/client/ui/ListViewImpl.java:
2031
2032         Remove localeID member variables and method/constructor parameters, instead
2033         using Utils.getCurrentLocaleID() when we need a localID to pass to 
2034         OnlineGlomService.
2035
2036 2012-01-26  Murray Cumming  <murrayc@murrayc.com>
2037
2038         Internationalize the UI strings.
2039
2040         * pom.xml: gwt-maven-plugin: Add the i18n goal and specify a 
2041         <i18nConstantsBundle>, removing the unused <i18nMessagesBundle>.
2042         * src/main/resources/org/glom/web/client/Messages.properties: Remove this
2043         because it is unused. Messages are apparently strings that can have 
2044         parameters, but we do not need that yet, so Contants will be enough for now.
2045         * src/main/java/org/glom/web/OnlineGlom.gwt.xml: Add extend-property lines
2046         to say that we support the en and de locales.
2047         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties:
2048         The original English strings.
2049         * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_de.properties:
2050         Some German translations of the English strings.
2051         The i18n goal then uses the .properties file to generate an 
2052         OnlineGlomConstants.java file in target/ and somehow GWT.create() magically
2053         returns an implementation that returns the translated strings.
2054         The documentation suggests putting these in src/java/*/client/, but it seems
2055         best to put it in src/resources/*/client/.
2056         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
2057         Instantiate OnlineGlomConstants via GWT.create() and use it to get the strings
2058         instead of hard-coding them.
2059         Note that we cannot import OnlineGlomConstants because it does not exist yet,
2060         but that does not seem to stop the build, though it confuses Eclipse.
2061         
2062         You can see the translated string by adding ?locale=de to the URL, like so:
2063         http://127.0.0.1:8888/OnlineGlom.html?gwt.codesvr=127.0.0.1:9997?locale=de#list:document=film_manager
2064
2065 2012-01-24  Murray Cumming  <murrayc@murrayc.com>
2066
2067         Improve null/empty String checks. 
2068
2069         * pom.xml: Add a dependency on commons-lang, to use
2070         org.apache.commons.lang.StringUtils.
2071         * src/main/java/org/glom/web/server/ConfiguredDocument.java
2072         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
2073         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java
2074         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
2075         Use StringUtils.isEmpty().
2076
2077         * src/main/java/org/glom/web/client/StringUtils.java: Add a tiny
2078         StringUtils class with a static isEmpty() function because we 
2079         cannot use org.apache.commons.lang.StringUtils in client-side
2080         GWT code because it (apparently) cannot be compiled to javascript.
2081         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
2082         * src/main/java/org/glom/web/client/activity/ListActivity.java
2083         * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java
2084         * src/main/java/org/glom/web/client/place/DetailsPlace.java
2085         * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java
2086         * src/main/java/org/glom/web/client/place/ListPlace.java
2087         * src/main/java/org/glom/web/client/ui/cell/NumericCell.java
2088         * src/main/java/org/glom/web/client/ui/cell/TextCell.java
2089         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java
2090         * src/main/java/org/glom/web/client/ui/details/Group.java
2091         * src/main/java/org/glom/web/client/ui/details/Notebook.java: Use 
2092         our StringUtils.isEmpty() function.
2093
2094 2012-01-24  Murray Cumming  <murrayc@murrayc.com>
2095
2096         Update to the latest java-libglom API.
2097
2098         * pom.xml: Require java-libglom 1.21.4.
2099         * src/main/java/org/glom/web/server/ConfiguredDocument.java
2100         getDocumentInfo(), getListViewLayoutGroup():
2101         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
2102         getDocuments():
2103         * src/main/java/org/glom/web/server/database/DBAccess.java
2104         getFieldsToShowForSQLQueryAddGroup(),
2105         getPrimaryKeyLayoutItemField(): Replace get_database_title()
2106         with either get_database_title_original() or 
2107         get_database_title(localeID).
2108
2109 2012-01-24  Murray Cumming  <murrayc@murrayc.com>
2110
2111         ConfiguredDocument: Avoid a null pointer exception.
2112
2113         * src/main/java/org/glom/web/server/ConfiguredDocument.java
2114         Initialize localeID to "" to avoid returning a null String which 
2115         causes a crash in java-libglom's swing-generated code.
2116
2117 2012-01-23  Murray Cumming  <murrayc@murrayc.com>
2118
2119         Some simple renaming.
2120
2121         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java
2122         * src/main/webapp/style.css: Rename, tableChooser to tablesChooser. Likewise
2123         for localeChooser. This seems more appropriate and is less ambiguous 
2124         particularly in the .css file.
2125
2126 2012-01-23  Murray Cumming  <murrayc@murrayc.com>
2127
2128         ConfiguredDocument: Rename the localedID private member variable.
2129
2130 2012-01-23  Murray Cumming  <murrayc@murrayc.com>
2131
2132         Adapt to the latest java-libglom API from git master.
2133
2134         * src/main/java/org/glom/web/server/database/ListDBAccess.java:
2135         libglom now uses only Vector instead of List, which uses add() instead of
2136         addLast(). 
2137
2138 2012-01-22  Murray Cumming  <murrayc@murrayc.com>
2139
2140         ConfiguredDocument: Rename the localedID private member variable.
2141
2142 2012-01-20  Murray Cumming  <murrayc@murrayc.com>
2143
2144         Build a source tarball with mvn assembly:single
2145
2146         * assembly.xml: Add this file.
2147         * pom.xml: Use the maven-assembly-plugin and tell it to use 
2148         our assembly.xml file.
2149
2150 2012-01-19  Murray Cumming  <murrayc@murrayc.com>
2151
2152         OnlineGlomServiceImpl: Get .glom files recursively.
2153
2154         * pom.xml: Depend on commons-io from org.apache.commons.
2155         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
2156         init(): Use org.apache.commons.io.FileUtils.listFiles() to get the 
2157         files recursively, and with the easier filter for the extension.
2158         Use org.apache.commons.io.FilenameUtils.removeExtension() to 
2159         simplify that code too.
2160
2161 2012-01-19  Murray Cumming  <murrayc@murrayc.com>
2162
2163         README: Mention that you must install java-libglom packages separately.
2164
2165         But then it works, because java-libglom is now in the central maven 
2166         repository.
2167
2168 2012-01-18  Murray Cumming  <murrayc@murrayc.com>
2169
2170         locales drop-down: Show the correct selected locale when the URL changes.
2171
2172         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
2173         .java: setPlace(): Move some code into fillView().
2174
2175 2012-01-18  Murray Cumming  <murrayc@murrayc.com>
2176
2177         locales drop-down: Do not lose the primary key.
2178
2179         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
2180         start(): onLocaleChange(): Pass the current primary key value, 
2181         instead of an empty value.
2182
2183 2012-01-18  Murray Cumming  <murrayc@murrayc.com>
2184
2185         locales drop-down: Do not lose the drop-down selection.
2186
2187         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
2188         .java (TableSelectionActivity.fillView): Set the selected locale
2189         after changing the drop-down items (though we do not really need
2190         to change them just because the locale changes.)
2191
2192 2012-01-18  Murray Cumming  <murrayc@murrayc.com>
2193
2194         locales drop-down: Change the tables list when this changes.
2195
2196         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
2197         .java: TableSelectionActivity.start(): Move the async table titles
2198         retrieval into a private fillView() method and also call this when 
2199         the chosen locale changes.
2200         Note that the document title is not actually translatable yet, but
2201         that is a problem that I should fix soon in libglom.
2202
2203 2012-01-18  Murray Cumming  <murrayc@murrayc.com>
2204
2205         Improve the placement of the locales drop-down.
2206
2207         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java
2208         Put the title and locales drop-down in a div (gwt.FlowTable).
2209         * src/main/webapp/style.css: Add magic css properties to make this work.
2210         Also remove the left margin from the title so that it lines up with the 
2211         headerbox below it.
2212
2213 2012-01-18  Murray Cumming  <murrayc@murrayc.com>
2214
2215         locales selector: Show human-readable locale titles.
2216
2217         * src/main/java/org/glom/web/server/ConfiguredDocument.java
2218         getDocumentInfo(): Use java.util.Locale to show a real title of 
2219         each locale, in the locale's own language.
2220
2221 2012-01-17  Murray Cumming  <murrayc@murrayc.com>
2222
2223         Add a language/locale selector drop-down.
2224
2225         * src/main/java/org/glom/web/shared/DocumentInfo.java:
2226         Add getLocaleIDs(), setLocaleIDs(), getLocaleTitles(), setLocaleTitles().
2227         * /src/main/java/org/glom/web/server/ConfiguredDocument.java:
2228         getDocumentInfo(): Store the available Locales in the DocumentInfo.
2229         * src/main/java/org/glom/web/client/ui/TableSelectionView.java:
2230         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
2231         Add a ListBox to show the available locales. Add getLocaleSelector(),
2232         setLocaleList(), getSelectedLocale(), setSelectedLocale().
2233         * src/main/java/org/glom/web/client/event/LocaleChangeEvent.java
2234         * src/main/java/org/glom/web/client/event/LocaleChangeEventHandler.
2235         java: Add these classes.
2236         * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
2237         start(): Fill the locales ListBox. Handle its change event, firing a 
2238         LocaleChangeEvent.
2239         setPlace(): Show the selected locale as specified by the URL token.
2240         * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
2241         * src/main/java/org/glom/web/client/activity/ListActivity.java:
2242         Handle LocaleChangeEvent, going to a new *Place with that locale.
2243
2244         The placement of the ListBox is not pretty, and it currently uses the ID
2245         as a title, instead of "English", "Deutsch", "Espanola", etc, but it 
2246         is a start.
2247
2248
2249 2012-01-17  Murray Cumming  <murrayc@murrayc.com>
2250
2251         Search box: Show the search text from the URL token.
2252
2253         * src/main/java/org/glom/web/client/ui/TableSelectionView.java:
2254         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
2255         Add setQuickFindText().
2256         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
2257         .java: setPlace(): Store the queryText if the place is a ListPlace, 
2258         and call TableSelectionView.setQuickFindText().
2259
2260 2012-01-17  Murray Cumming  <murrayc@murrayc.com>
2261
2262         Allow use of translations via, for instance, &lang=de in the URL.
2263
2264         * pom.xml: Use the unstable java-libglom 1.21 version.
2265
2266         * src/main/java/org/glom/web/client/OnlineGlomService.java:
2267         * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java
2268         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
2269         init(): Instead of calling TranslatableItem.set_current_locale() 
2270         (now removed), call ConfiguredDocument.setDefaultLocaleID().
2271         However, this is only for default locales, which are not needed to 
2272         change the locale in the URL.
2273         getDocumentInfo(), getListViewLayout(), getSortedListViewData(),
2274         getDetailsData(), getDetailsLayoutAndData(), getRelatedListData(),
2275         getSortedRelatedListData(): Add a localeID parameter, so we can get the 
2276         layout for a particular locale.
2277         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
2278         Add get/setDefaultLocaleID().
2279         getDocumentInfo(), getListViewData(), getRelatedListData(),
2280         getDetailsLayoutGroup(), getListViewLayoutGroup(),
2281         createLayoutItemPortalDTO(), convertToGWTGlomLayoutItemField(): Add a 
2282         localeID parameter, so we can get the layout for a particular locale.
2283
2284         * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java:
2285         * src/main/java/org/glom/web/client/place/DetailsPlace.java:
2286         * src/main/java/org/glom/web/client/place/ListPlace.java:
2287         Parse and construct a lang parameter too.
2288
2289         * src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java:
2290         start(): Pass the defaultLocaleID to addDocumentLink(). It is then
2291         passed to subsequent methods and constructors.
2292         * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
2293         * src/main/java/org/glom/web/client/activity/ListActivity.java:
2294         Store the localeID from the *Place and pass it to other constructors
2295         and methods, such as OnlineGlomServiceAsync.getDetailsLayoutAndData().
2296
2297         * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java:
2298         * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java:
2299         * src/main/java/org/glom/web/client/ui/TableSelectionView.java
2300         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java
2301         * src/main/java/org/glom/web/client/ui/ListView.java:
2302         * src/main/java/org/glom/web/client/ui/ListViewImpl.java:
2303         Take localeID parameters and pass them to subsequent constructors and 
2304         methods, so that the layout is always retrieved for that locale.
2305
2306         This is rather repetitive.
2307
2308         Note that "" means the original (default) locale of the Glom document,
2309         which is usually English.       
2310
2311 2012-01-17  Murray Cumming  <murrayc@murrayc.com>
2312
2313         Documents: Remove final keyword to fix startup configuration.
2314
2315         * src/main/java/org/glom/web/shared/Documents.java: Remove the
2316         final keywords on the private member variables because that breaks
2317         the startup, apparently (there are warnings) because it stops them
2318         from being serialized. I added these in the previous commit.
2319
2320 2012-01-13  Murray Cumming  <murrayc@murrayc.com>
2321
2322         Documents: Add some final keywords.
2323
2324         * src/main/java/org/glom/web/shared/Documents.java: Eclipse suggested
2325         this.
2326
2327 2012-01-13  Murray Cumming  <murrayc@murrayc.com>
2328
2329         OnlineGlomServiceImpl: Add to overview comments.
2330
2331         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
2332         Note that this is where all the document are loaded. They are not 
2333         loaded freshly for each page.
2334
2335 2012-01-12  Murray Cumming  <murrayc@murrayc.com>
2336
2337         Add a search box.
2338
2339         * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
2340         Add a TextBox for the text of a quick find.
2341         Add getQuickFindBox(), to get the widget, and getQuickFindText() to 
2342         get the text.
2343         setBackLink(): Add a String quickFind parameter.
2344         * src/main/java/org/glom/web/client/ui/TableSelectionView.java
2345         (TableSelectionView): Add getQuickFindBox() and getQuickFindText()
2346         to the base interface, because that is how TableSelectionViewImpl is used.
2347         * src/main/webapp/style.css: Add style for the search box and its label.
2348
2349         * src/main/java/org/glom/web/client/event/QuickFindChangeEvent.java:
2350         * src/main/java/org/glom/web/client/event/QuickFindChangeEventHandler.java:
2351         Add these files, based on the existing TableChangeEvent and 
2352         TableChangeEventHandlers.
2353         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
2354         start(): Handle QuickFindChangeEvent, passing its quickFind text to
2355         a ListPlace() that the user should be taken to.
2356         * src/main/java/org/glom/web/client/activity/ListActivity.java
2357         start(): Handle it here too and adapt the TableChangeEvent handler to 
2358         pass the extra "" quickFind parameter to ListPlace.
2359         * src/main/java/org/glom/web/client/place/ListPlace.java: 
2360         Constructor: Take an extra String quickFind parameter and store it, 
2361         returning it from a new  getQuickFind() method.
2362         getToken(): Put the quickFind text in the URL token.
2363         getPlace(): Parse the quickFind text from the URL token.
2364         * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.ja
2365         va: addDocumentLink(): Pass an extra "" quickFind parameter to the 
2366         ListPlace constructor.
2367         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
2368         .java: start(): Add a Change handler for the TableSelectionView's
2369         TextBox (via its base HasChangeHandlers interface), firing the new 
2370         QuickFindChangeEvent.
2371         setPlace(): Adapt the call to TableSelectionView.setbackLink(), to 
2372         pass the extra "" quickFind parameter.
2373
2374         * src/main/java/org/glom/web/client/ui/ListViewImpl.java:
2375         setCellTable(): Add a String quickFind parameter and pass it to 
2376         the ListViewTable() constructor.
2377         * src/main/java/org/glom/web/client/ui/ListView.java: Change 
2378         setCellTable() in the base interface, because that is how ListViewImpl
2379         is used.
2380
2381         * src/main/java/org/glom/web/client/ui/list/ListTable.java:
2382         Add a String quickFind member variable.
2383         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
2384         Constructor: Add a String quickFind parameter, storing it in the
2385         base ListTable's member variable.
2386         onRangeChanged(): Pass quickFind to the 
2387         OnlineGlomServiceAsync.getSortedListViewData() and 
2388         OnlineGlomServiceAsync.getListViewData() methods.
2389
2390         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
2391         getListViewData(), getSortedListViewData(): Add a String quickFind 
2392         parameter, passing it to ConfiguredDocument.getListViewData().
2393         * src/main/java/org/glom/web/client/OnlineGlomService.java:
2394         Change getListViewData(), getSortedListViewData() in the base interface,
2395         because that is how OnlineGlomServiceImpl is used, via this:
2396         * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
2397         Change getListViewData(), getSortedListViewData() here too.
2398         This class can apparently be used to asynchronously call methods on 
2399         OnlineGlomService, and GWT seems to implement that after recognizing 
2400         just the *Async name convention and the extra AsyncCallback parameters.
2401
2402         * src/main/java/org/glom/web/server/ConfiguredDocument.java
2403         getListViewData(): Add a String quickFind parameter, and pass it to 
2404         ListViewDBAccess.getData().
2405         * src/main/java/org/glom/web/server/database/ListDBAccess.java
2406         getListData(): Add a String quickFind parameter and pass it to 
2407         getSelectQuery().
2408         getSelectQuery(): Add a String quickFind parameter.
2409         * src/main/java/org/glom/web/server/database/ListViewDBAccess.java
2410         getSelectQuery(): Add a String quickFind parameter and use it with 
2411         Glom.get_find_where_clause_quick() to pass a where_clause to 
2412         Glom.build_sql_select_with_where_clause(), to actually filter the 
2413         list view results.
2414         getData(): Add a String quickFind parameter, passing it to getListData().
2415         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.ja
2416         va: getData(): Pass an empty string to getListData() for the 
2417         quickFind parameter.
2418
2419 2012-01-12  Murray Cumming  <murrayc@murrayc.com>
2420
2421         ListTable: Minor change.
2422
2423         * src/main/java/org/glom/web/client/ui/list/ListTable.java
2424         createCellTable(): Make this protected instead of public.
2425
2426 2012-01-12  Murray Cumming  <murrayc@murrayc.com>
2427
2428         Many files: Use final for the parameters and use the @override attribute.
2429
2430 2012-01-22  Ben Konrath <ben@bagu.org>
2431
2432         Add anchor links for single line text that starts with http, ftp and www.
2433
2434         Bug #667269
2435
2436 2012-01-22  Ben Konrath <ben@bagu.org>
2437
2438         Add ellipsis to single line text in details view.
2439
2440         Bug #667269
2441
2442 2012-01-04  Murray Cumming  <murrayc@murrayc.com>
2443
2444         Remove all javadoc author tags.
2445
2446         Because they are awkward and meaningless when many people touch
2447         many files.
2448         See https://gitorious.org/online-glom/gwt-glom/commit/7628b732cb90cbc6d5635420a75568504e8b3655#comment_81164
2449  
2450 2012-01-04  Murray Cumming  <murrayc@murrayc.com>
2451
2452         Revert the COPYING.LESSER to COPYING rename.
2453
2454         Apparently both should be there if it is LGPL.
2455
2456 2012-01-03  Murray Cumming  <murrayc@murrayc.com>
2457
2458         *View: Remove unused imports.
2459
2460         * src/main/java/org/glom/web/client/ui/DetailsView.java:
2461         * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java
2462         * src/main/java/org/glom/web/client/ui/ListView.java:
2463         * src/main/java/org/glom/web/client/ui/TableSelectionView.java:
2464         Remove unused imports, as suggested by Eclipse.
2465
2466 2012-01-02  Murray Cumming  <murrayc@murrayc.com>
2467
2468         Move the *View::Presenter types, and some API into one base View.
2469
2470         * src/main/java/org/glom/web/client/ui/DetailsView.java:
2471         * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java:
2472         * src/main/java/org/glom/web/client/ui/ListView.java:
2473         * src/main/java/org/glom/web/client/ui/TableSelectionView.java: Move
2474         Presenter, setPresenter() and clear() into a shared base interface,
2475         to avoid the unnecessary duplicate Presenter types and to more clearly
2476         show how the *Views share the same structure, even if they are not 
2477         used polymorphically.
2478
2479         * src/main/java/org/glom/web/client/ui/DetailsViewImpl.java:
2480         * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.ja
2481         va:
2482         * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
2483         * src/main/java/org/glom/web/client/activity/ListActivity.java:
2484         * src/main/java/org/glom/web/client/activity/DocumentSelectionActiv
2485         ity.java:
2486         * src/main/java/org/glom/web/client/activity/TableSelectionActivity
2487         .java: Adapt.
2488
2489         Feel free to revert this if there is a good reason for the duplicate
2490         types.
2491
2492 2012-01-02  Murray Cumming  <murrayc@murrayc.com>
2493
2494         OnlineGlom: Make clientFactory a (protected) member, and test it a bit.
2495
2496         * src/main/java/org/glom/web/client/OnlineGlom.java: Make clientFactory
2497         a class member instead of a local variable in the method.
2498         This lets us use it to get the view instances, for use in tests.
2499         * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
2500         beforeOnlineGlom(): Test some more details of the initial view.
2501         Again, this is not very useful.
2502
2503         To really test gwt-glom we will need to start a local postgresql 
2504         instance with local data, like the Glom tests in C++.
2505
2506 2012-01-02  Murray Cumming  <murrayc@murrayc.com>
2507
2508         pom.xml: Mention the LGPL license.
2509
2510         * pom.xml: Add a licenses section.
2511         * COPYING.LESSER: Move this to COPYING, which
2512         previously contained the GPL. But gwt-glom is all LGPL.
2513
2514 2012-01-02  Murray Cumming  <murrayc@murrayc.com>
2515
2516         Add project information to README and pom.xml.
2517
2518         * README: Add a brief description and mention some mvn
2519         commands.
2520         * pom.xml: This extra information shows up in mvn site
2521         generated pages.
2522
2523 2011-01-02  Murray Cumming  <murrayc@murrayc.com>
2524
2525         Use the latest java-libglom version.
2526
2527         * pom.xml: Use java-libglom 1.19.2 instead of 1.19.1.
2528
2529 2012-01-01  Murray Cumming  <murrayc@murrayc.com>
2530
2531         GwtTestOnlineGlom: Test a little more.
2532
2533         * src/main/java/org/glom/web/client/OnlineGlom.java: Make the panels
2534         protected rather than private, as suggested by the gwt-test-utils
2535         maintianer here:
2536         http://stackoverflow.com/questions/7931724/gwt-testcase-simulating-clicking-a-button-on-my-page
2537         * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java
2538         Test the initial visibility of the panels.
2539
2540         However, this is not a very useful test.
2541         And I wonder how we should generally test using this idea for an
2542         activity/places app like ours where the real changes happen implicitly
2543         based on the history token/URL.
2544
2545 2012-01-01  Murray Cumming  <murrayc@murrayc.com>
2546
2547         Slight modification to *Mapper comments.
2548
2549         * src/main/java/org/glom/web/client/mvp/DataActivityMapper.java
2550         (DataActivityMapper)
2551         * src/main/java/org/glom/web/client/mvp/DocumentSelectionActivityMa
2552         pper.java
2553         * src/main/java/org/glom/web/client/mvp/TableSelectionActivityMappe
2554         r.java
2555         Remove comments mentioning GIN because they are just copied from 
2556         the example code and are apparently not helpful:
2557         http://groups.google.com/group/google-web-toolkit/msg/82f0098b20669a73
2558         Also change the mention of a class that is only in the example code.
2559
2560 2012-01-01  Murray Cumming  <murrayc@murrayc.com>
2561
2562         GwtTestOnlineGlom test: Minor changes.
2563
2564         * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
2565         Avoid the long qualified class name and modify the comment 
2566         because it is now obvious to me that the mocked class is the only
2567         custom one created via GWT.create().
2568
2569 2012-01-01  Murray Cumming  <murrayc@murrayc.com>
2570
2571         Tests: Added the beginnings of a test using gwt-test-utils.
2572
2573         * pom.xml: Add dependencies on gwt-test-utils and easymock.
2574         * src/test/resources/META-INF/gwt-test-utils.properties: Add this file
2575         which tells gwt-test-utils what class will be tested.
2576         * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
2577         Add a simple (but empty) test case. One class, used by the OnlineGlom
2578         class, is mocked so that it can be created. However, I am not sure 
2579         why only this class needs to be mocked.
2580
2581         Note that mockito seems more popular, and clearer, than easymock,
2582         but I have not got that working yet. It might be a matter of the 
2583         mockito version.
2584
2585         This test is run during mvn integration-test.
2586
2587 2011-12-31  Murray Cumming  <murrayc@murrayc.com>
2588
2589         Tests: Use junit4-style syntax instead of junit3-style.
2590
2591         * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java:
2592         * src/test/java/org/glom/web/client/place/ListPlaceTest.java:
2593         * src/test/java/org/glom/web/shared/DataItemTest.java:
2594         Use the @Test annotation rather than relying on the test*() prefix.
2595         Also no longer implement TestCase, to avoid triggering support for 
2596         the junit3-way, which stops the annotations from working.
2597         Change the imports from import junit.framework.* to 
2598         import org.junit.*, which is apparently the new way.
2599
2600 2011-12-31  Murray Cumming  <murrayc@murrayc.com>
2601
2602         Added a test for ListPlace token parsing and creation.
2603
2604         * src/test/java/org/glom/web/client/place/ListPlaceTest.java:
2605         This is much the same as DetailsPlaceTest.
2606
2607         I wonder how we could test the other parts of the *Place API.
2608
2609 2011-12-30  Murray Cumming  <murrayc@murrayc.com>
2610
2611         DetailsPlace test: Also test getToken() and recreation via getPlace().
2612
2613         * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java:
2614         testGetPlaceParameters(): Get the tokens from the DetailsPlace and 
2615         recreate it, testing the recreated DetailsPlace for the same parameter
2616         values.
2617
2618 2011-12-30  Murray Cumming  <murrayc@murrayc.com>
2619
2620         Use the surefire-report plugin.
2621
2622         * pom.xml: This generates a HTML report about the tests in 
2623         target/site/surefire-report.html
2624         when you do mvn surefire-report:report. It seems to be popular/normal.
2625
2626 2011-12-30  Murray Cumming  <murrayc@murrayc.com>
2627
2628         Added a test for DetailsPlace.
2629
2630         * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java:
2631         Test the getPlace() token parsing.
2632
2633 2011-12-30  Murray Cumming  <murrayc@murrayc.com>
2634
2635         Added a first unit test.
2636
2637         * pom.xml: Add a test goal, and a dependency on junit in that scope.
2638         * src/test/java/org/glom/web/shared/DataItemTest.java:
2639         This is a silly test but it is just to get things started. Note that
2640         maven/junit finds the test because it looks in src/test by default.
2641
2642 2011-12-22  Ben Konrath  <ben@bagu.org>
2643
2644         Change charsetName to "UTF-8" when replacing line breaks.
2645
2646         JavaScript requires the charsetName to be "UTF-8". CharsetName values
2647         that work in Java (such as "UTF8") will not work when compiled to
2648         JavaScript.
2649
2650         This fixes a problem with multi-line details view fields that have hard
2651         line breaks. The "License Text" field on this page demonstrates the
2652         problem:
2653
2654         http://onlineglom.openismus.com/OnlineGlom/#details:document=debian_repository_analyzer&table=licenses&value=197
2655
2656         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
2657
2658 2011-12-22  Ben Konrath  <ben@bagu.org>
2659
2660         Fix another bug with related list navigation.
2661
2662         I've tested all the navigation buttons in all of the related lists
2663         so things should be good now.
2664
2665         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
2666
2667 2011-12-22  Ben Konrath  <ben@bagu.org>
2668
2669         Fix a crasher when refreshing the list view with the default table.
2670
2671         This crash will also happen when loading the list view with the default
2672         table from a link or bookmark.
2673
2674         * src/main/java/org/glom/web/client/activity/DetailsActivity.java: Go
2675         to the main document selection page when the document id hasn't been
2676         set.
2677         * src/main/java/org/glom/web/client/activity/ListActivity.java: Go to
2678         the main document selection page when the document id hasn't been
2679         set.
2680         * src/main/java/org/glom/web/client/place/DetailsPlace.java: Use empty
2681         values for the details place when the document id hasn't been set.
2682         * src/main/java/org/glom/web/client/place/ListPlace.java: Use empty
2683         values for the list place when the document id hasn't been set.
2684
2685 2011-12-21  Ben Konrath  <ben@bagu.org>
2686
2687         Protect against NPE when glom.document.locale is not in config.
2688
2689         This patch protects against an NPE when glom.document.locale is not in
2690         the config file. This NPE will also happen if glom.document.locale is
2691         commented out.
2692
2693         The patch also updates the error message to display the class name when
2694         the getMessage() returns null. This was happening when the NPE was
2695         thrown and I had "Configuration Error: null". If an NPE is encountered
2696         with this patch, "Configuration Error: NullPointerException " will be
2697         displayed.
2698
2699         This commit closes this bug:
2700
2701         https://bugzilla.gnome.org/show_bug.cgi?id=666669
2702
2703         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
2704
2705 2011-12-20  Murray Cumming  <murrayc@murrayc.com>
2706
2707         Rename onlineglom.properties to onlineglom.properties.sample.
2708
2709         * src/main/resources/onlineglom.properties: Rename to:
2710         * src/main/resources/onlineglom.properties.sample:
2711         * src/main/resources/README: And add this file explaining that people
2712         should rename it back when deploying.
2713
2714 2011-12-20  Murray Cumming  <murrayc@murrayc.com>
2715
2716         Allow choosing the translation in the .properties file.
2717
2718         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
2719         init(): Read a glom.document.locale value from the configuration file 
2720         and call Glom's TransatableItem::set_current_locale() method.
2721         * src/main/resources/onlineglom.properties: Add a commented-out 
2722         example of this new setting.
2723
2724         It would be better to add &lang=de_DE to the URL, but the current 
2725         libglom API does not allow us to do this easily. I am working on that.
2726
2727 2011-12-19  Murray Cumming  <murrayc@murrayc.com>
2728
2729         Avoid a crash in parsing of token parameters.
2730
2731         * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.j
2732         ava: getTokenParams(): Do not crash if a parameter has a key but no 
2733         value, and ignore parameters with neither.
2734
2735 2011-12-17  Murray Cumming  <murrayc@murayc.com>
2736
2737         History token building/handling: Improve use of token parameters.
2738
2739         * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java 
2740         (HasSelectableTablePlace.Tokenizer): Add getTokenParams(String)
2741         and buildParamsToken(HashMap), for use by derived classes.
2742         Make the separator private because it is no longer be needed.
2743         * src/main/java/org/glom/web/client/place/DetailsPlace.java
2744         (DetailsPlace.Tokenizer.getToken): Use buildParamsToken()
2745         instead of manual string concatenation.
2746         (DetailsPlace.Tokenizer.getPlace): Use getTokenParams() instead 
2747         of hardcoded indices and awkward splitting code.
2748         * src/main/java/org/glom/web/client/place/ListPlace.java
2749         (ListPlace.Tokenizer.getToken): Use buildParamsToken()
2750         instead of manual string concatenation.
2751         (ListPlace.Tokenizer.getPlace): Use getTokenParams() instead 
2752         of hardcoded indices and awkward splitting code.
2753         This should fix bug #666420
2754
2755 2011-12-16  Murray Cumming  <murrayc@murrayc.com>
2756
2757         Fix a Navgiation->Navigation typo in the code.
2758
2759         * src/main/java/org/glom/web/client/activity/DetailsActivity.java
2760         Rename processNavgiation() to processNavigation().
2761
2762 2011-12-16  Murray Cumming  <murrayc@murrayc.com>
2763
2764         Fix a seperator->separator typo in the code.
2765
2766         * src/main/java/org/glom/web/client/place/DetailsPlace.java
2767         * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java
2768         * src/main/java/org/glom/web/client/place/ListPlace.java: Just a 
2769         misspelling.
2770
2771 2011-12-15  Ben Konrath <ben@bagu.org>
2772
2773         Cleanup some comments.
2774
2775         * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
2776
2777 2011-12-14  Ben Konrath <ben@bagu.org>
2778
2779         Replace \n with <br/> for multiline text in the details view.
2780
2781         Vertical scrollbars are added when needed as well.
2782
2783         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
2784
2785 2011-12-14  Ben Konrath <ben@bagu.org>
2786
2787         Specify the font for document selection links.
2788
2789         * src/main/webapp/style.css:
2790
2791 2011-12-14  Ben Konrath <ben@bagu.org>
2792
2793         Fix bouncy CellTable while paging.
2794
2795         This doesn't currently work with related list tables in unselected
2796         Notebook tabs.
2797
2798         * src/main/java/org/glom/web/client/ui/list/ListTable.java
2799
2800 2011-12-14  Ben Konrath <ben@bagu.org>
2801
2802         Revamp the appearance of the document selection page.
2803
2804         * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java:
2805         * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.ui.xml:
2806         * src/main/webapp/style.css:
2807
2808 2011-12-13  Ben Konrath <ben@bagu.org>
2809
2810         Set navigation button column to the smallest size possible.
2811
2812         * src/main/java/org/glom/web/client/ui/list/ListTable.java:
2813
2814 2011-12-13  Ben Konrath <ben@bagu.org>
2815
2816         Change OpenButton nomenclature to NavigationButton.
2817
2818         Using NavigtionButton makes things more generic. Classes, methods and
2819         variables have been changed.
2820
2821         This is a rename-only refactor.
2822
2823         * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
2824         * src/main/java/org/glom/web/client/ui/ListViewImpl.java:
2825         * src/main/java/org/glom/web/client/ui/cell/NavigationButtonCell.java:
2826         Renamed from OpenButtonCell.
2827         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
2828         * src/main/java/org/glom/web/client/ui/list/ListTable.java:
2829         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
2830
2831 2011-12-12  Ben Konrath <ben@bagu.org>
2832
2833         Remove unnecessary String argument in RelatedListTable and ListViewTable.
2834
2835         * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
2836         * src/main/java/org/glom/web/client/ui/ListViewImpl.java:
2837         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
2838         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
2839
2840 2011-12-12  Ben Konrath <ben@bagu.org>
2841
2842         Update variable names and comments.
2843
2844         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
2845         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
2846
2847 2011-12-12  Ben Konrath <ben@bagu.org>
2848
2849         Properly initialize numNonEmptyRows variable to zero.
2850
2851         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
2852         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
2853
2854 2011-12-05  Ben Konrath  <ben@bagu.org>
2855
2856         Add latest mockup with HTML tables.
2857
2858         Features of this mockup:
2859
2860         -> HTML table for flowtable
2861         -> HTML table for flowtable column
2862         -> Example of how related lists would look
2863         -> Not using text entries for data items
2864
2865         The current version of Online Glom doesn't use HTML tables for the
2866         flowtable columns.
2867
2868         This mockup has been sent to the glom-devel mailing list but it's good
2869         to have it here as well.
2870
2871         * mockups/details-view-html-tables.html:
2872
2873 2011-12-05  Ben Konrath  <ben@bagu.org>
2874
2875         Remove unnecessary getPrimaryKeyField() method.
2876
2877         getPrimaryKeyFieldForTable(String) has been renamed to
2878         getPrimaryKeyField(String).
2879
2880         * src/main/java/org/glom/web/server/database/DBAccess.java:
2881         * src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
2882         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
2883
2884 2011-12-05  Ben Konrath  <ben@bagu.org>
2885
2886         Add string representation of TypedDataItem value to conversion error message.
2887
2888         * src/main/java/org/glom/web/server/Utils.java: Logging the error
2889         message was extracted into its own method to avoid duplication.
2890
2891 2011-12-05  Ben Konrath  <ben@bagu.org>
2892
2893         Add type checking to navigation primary key value creation.
2894
2895         Create navigation primary key only if the expected type from the Glom
2896         document matches the type returned by the SQL query.
2897
2898         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
2899
2900 2011-12-05  Ben Konrath  <ben@bagu.org>
2901
2902         Rename a couple of variables in RelatedListNavigation.
2903
2904         This is a rename-only refactor.
2905
2906         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
2907
2908 2011-12-05  Ben Konrath  <ben@bagu.org>
2909
2910         Move getListLayoutGroup() into getListViewLayoutGroup().
2911
2912         This removes getListLayoutGroup(). It was only being called by
2913         getListViewLayoutGroup().
2914
2915         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
2916
2917 2011-12-05  Ben Konrath  <ben@bagu.org>
2918
2919         Remove check for LayoutItem_Portal in list table method.
2920
2921         This check is no longer necessary because the method isn't being used
2922         to create the LayoutItemPortal DTO.
2923
2924         * src/main/java/org/glom/web/server/ConfiguredDocument.java:
2925
2926 2011-12-05  Ben Konrath  <ben@bagu.org>
2927
2928         Properly support related list navigation.
2929
2930         Navigation from the "Repository Analyzer -> Package Scans ->
2931         Dependencies" related table wasn't working because the primary key for
2932         related tables wasn't being set properly. This commit fixes the
2933         problem.
2934
2935         * src/main/java/org/glom/web/server/ConfiguredDocument.java: Don't use
2936         getListLayoutGroup() to create the LayoutItemPortal DTO. This method
2937         doesn't set the primary key properly for related list tables.
2938         * src/main/java/org/glom/web/server/database/DBAccess.java: Add table
2939         name parameter to getPrimaryKeyLayoutItemField(). This makes the method
2940         useful for getting the primary key for list view tables and for related
2941         list tables.
2942         * src/main/java/org/glom/web/server/database/ListDBAccess.java:
2943         * src/main/java/org/glom/web/server/database/ListViewDBAccess.java:
2944         Move code to set the primary key for the table from the abstract
2945         ListDBAccess class to ListViewDBAccess as it's only correct for list
2946         view tables.
2947         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
2948         Properly add primary key to related list tables.
2949
2950 2011-12-02  Ben Konrath  <ben@bagu.org>
2951
2952         Properly set the horizontal alignment of fields.
2953
2954         This fix is for both the list tables and the details view.
2955
2956         * src/main/java/org/glom/web/server/ConfiguredDocument.java: Use
2957         LayoutItem_WithFormatting.get_formatting_used_horizontal_alignment(boolean)
2958         to set the horizontal alignment of fields.
2959
2960 2011-12-02  Ben Konrath  <ben@bagu.org>
2961
2962         Display currency codes in the details view.
2963
2964         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
2965
2966 2011-12-02  Ben Konrath  <ben@bagu.org>
2967
2968         Avoid duplicate JNI call.
2969
2970         JNI is not as efficient as pure Java and this is an easy (and small)
2971         optimization.
2972
2973         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
2974         Use previously retrieved value for whereClauseToTableName instead of
2975         getting it again.
2976
2977 2011-12-02  Ben Konrath  <ben@bagu.org>
2978
2979         Rename a couple of variables in RelatedListNavigation.
2980
2981         This is a rename-only refactor.
2982
2983         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
2984
2985 2011-12-02  Ben Konrath  <ben@bagu.org>
2986
2987         Indicate clearly that a mismatched primary key type is a bug.
2988
2989         * src/main/java/org/glom/web/server/Utils.java: Change log level from
2990         warning to error. Add 'This is a bug.' to message.
2991
2992 2011-12-02  Ben Konrath  <ben@bagu.org>
2993
2994         Update / fix some comments.
2995
2996         * src/main/java/org/glom/web/client/OnlineGlomService.java: Remove old
2997         comments.
2998         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: Fix
2999         comment.
3000         * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
3001         Fix comments. Add some TODOs.
3002
3003 2011-12-02  Ben Konrath  <ben@bagu.org>
3004
3005         Enable navigation to details view with string primary key from related list.
3006
3007         * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
3008         Create a text primary key value when return type of result is
3009         java.sql.Types.VARCHAR.
3010
3011 2011-12-02  Ben Konrath  <ben@bagu.org>
3012
3013         Use checkboxes for booleans in the details view.
3014
3015         * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
3016
3017 2011-12-01  Ben Konrath  <ben@bagu.org>
3018
3019         Improve performance of related list height calculation.
3020
3021         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
3022         Put code to calculate the expected height in a static initializer so
3023         that that it's only called once.
3024
3025 2011-12-01  Ben Konrath  <ben@bagu.org>
3026
3027         Show related list tables in notebooks (again).
3028
3029         Calculate the height of the related list tables so the Notebook can be
3030         set the correct height. The height of the related list table is also needed by
3031         FlowTable to be able decide how to create the layout.
3032
3033         * src/main/java/org/glom/web/client/ui/details/Portal.java: Calculate
3034         and set the Portal height based on the height of the related list
3035         table and the Portal container.
3036         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
3037         Add method to calculate the height of the related list tables.
3038         * src/main/java/org/glom/web/client/ui/list/ListTable.java:
3039         * src/main/webapp/style.css: Add css class for Pager. This is needed to
3040         calculate the height of the Pager widget.
3041
3042 2011-12-01  Ben Konrath  <ben@bagu.org>
3043
3044         Use CellTable API for table property instead of setting style on Element.
3045
3046         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
3047
3048 2011-12-01  Ben Konrath  <ben@bagu.org>
3049
3050         Make ListViewTable and RelatedListTable a consistent height.
3051
3052         The tables are now a consistent height regardless of the contents of
3053         the table. A hidden button is added to empty rows to ensure that the
3054         height of these rows will match the height of rows with data.
3055
3056         A navigation button column is now added to every table. The width of
3057         the navigation column is set to 0px when a RelatedListTable shouldn't
3058         have navigation buttons. This maintains the a consistent row height in
3059         tables that don't show the navigation buttons.
3060
3061         * src/main/java/org/glom/web/client/activity/DetailsActivity.java: Hide
3062         navigation column when not needed.
3063         * src/main/java/org/glom/web/client/ui/ListViewImpl.java: Move method
3064         arguments for navigation button to constructor of ListViewTable.
3065         * src/main/java/org/glom/web/client/ui/cell/OpenButtonCell.java: Render
3066         hidden button for empty data rows.
3067         * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: Add method
3068         arguments for navigation button to constructor.
3069         * src/main/java/org/glom/web/client/ui/list/ListTable.java: Always
3070         create navigation buttons. Add hideNavigationButtons() method.
3071         * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: Add method
3072         arguments for navigation button to constructor.
3073
3074 2011-12-01  Ben Konrath  <ben@bagu.org>
3075
3076         Use 'visibility: hidden' in Utils.getWidgetHeight().
3077
3078         This is better choice because hidden elements are invisible, don't
3079         respond to events and are not part of the tab order. They will,
3080         however, 
3081