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