2012-07-21 Murray Cumming tests: Use @BeforeClass on tearDown(). * src/test/java/org/glom/web/server/OnlineGlomPropertiesTest.java: * src/test/java/org/glom/web/server/SelfHostExampleTest.java: This avoids leaking a postgres process in SelfHostExampleTest. 2012-07-21 Murray Cumming tests: Test translations more. * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java: * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java: Test titles in the non-default locale. 2012-07-21 Murray Cumming tests: Add SelfHostConfiguredDocumentTest * src/test/java/org/glom/web/server/SelfHoster.java: Add getters for the username and password, for use by ConfiguredDocument. * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java: This tests some of the ConfiguredDocument API that requires a database connection. 2012-07-21 Murray Cumming Document: Load title translations and test them. * src/main/java/org/glom/web/server/libglom/Document.java: Load the translations of titles. I am surprised that we do not do this yet. * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java: * src/test/java/org/glom/web/server/libglom/DocumentTest.java: Test translations more. 2012-07-20 Murray Cumming Set JDBC timeouts. * src/main/java/org/glom/web/server/ConfiguredDocument.java: * src/main/java/org/glom/web/server/database/ListDBAccess.java: Set the timeout here too. 2012-07-20 Murray Cumming tests: ConfiguredDocumentTest: Make this pass. * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java: Disable tests that need a database connection. 2012-07-20 Murray Cumming Use Java 1.7 instead of Java 1.6. * pom.xml: Specify the 1.7 JDK, though I don't like how we seem to need to do this twice, at least for Eclipse. This seems OK because it is the current version. 2012-07-20 Murray Cumming Some error checking. * src/main/java/org/glom/web/server/Log.java: Avoid using null strings. * src/main/java/org/glom/web/server/database/ListDBAccess.java: Avoid using a null Connection. 2012-07-20 Murray Cumming tests: Add a ConfiguredDocument test. * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java: Add this test. 2012-07-20 Murray Cumming LayoutItemFIeld: getName(): Use the Field if it is set. * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java: getName(): If the full field details have been set, return its name, so that callers do not need to set the name separately. * src/test/java/org/glom/web/server/SelfHostExampleTest.java: testExampleMusiccollectionData): Do not use a TYPE_FORWARD_ONLY statement, so we can count the rows. 2012-07-20 Murray Cumming tests: SelfHoster: Test SqlUtils too. * src/test/java/org/glom/web/server/SelfHostExampleTest.java: Retrieve some data and check it too, as in the regular Glom test_selfhosting_new_from_example.cc test. * src/test/java/org/glom/web/server/SelfHoster.java: createConnection(): Make this public. 2012-07-20 Murray Cumming tests: SelfHoster: createConnection(): Do not warn about expected failures. Let the caller say if the connection is expected to fail, to avoid irrelevant error output. 2012-07-20 Murray Cumming tests: SelfHoster: createAndSelfHostNewEmpty(): Sleep after starting server. * src/test/java/org/glom/web/server/SelfHoster.java: createAndSelfHostNewEmpty(): Sleep initially, to avoid distracting errors due to the inevitable need to retry the connection while the database server starts. 2012-07-20 Murray Cumming tests: SelfHoster: createConnection(): Set a timeout. * src/test/java/org/glom/web/server/SelfHoster.java: createConnection(): Use setLoginTimeout() because it otherwise seems to take ages to actually return when it fails. 2012-07-20 Murray Cumming tests: SelfHoster: selfHost(): Close the test connection. * src/test/java/org/glom/web/server/SelfHoster.java: selfHost(): When we check that the connection works, close the connection. This seems to not be closed automatically otherwise. 2012-07-20 Murray Cumming Use slf4j-simple to see JDBC errors. * pom.xml: Depend on slf4j-simple so we can see errors from JDBC. 2012-07-19 Murray Cumming SelfHoster.discoverFirstFreePort(): Close the socket. * src/test/java/org/glom/web/server/SelfHoster.java: discoverFirstFreePort(): Close the socket. Eclipse Juno warns about this. 2012-07-19 Murray Cumming Avoid another code warning in Eclipse Juno. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Do instanceof checks on the FileUtils.listFiles() result and its items. 2012-07-13 Murray Cumming Avoid some code warnings in Eclipse Juno * src/main/java/org/glom/web/server/libglom/Document.java: getNodeTextChildAsValue(), setNodeTextChildAsValue(): Handle the invalid type. * src/test/java/org/glom/web/server/SelfHoster.java createTextFile(): Make sure that the FileOutputStream is closed. 2012-06-22 Murray Cumming Added OnlineGlomPropertiesTest. * src/main/java/org/glom/web/server/OnlineGlomProperties.java: Make sure we never return a null string. * src/test/java/org/glom/web/server/OnlineGlomPropertiesTest.java: Added tests of the OnlineGlomProperties API, using our sample file. 2012-06-20 Murray Cumming Make OnlineGlomProperties be a normal class. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Move OnlineGlomProperties into its own file to be a regular class: * src/main/java/org/glom/web/server/OnlineGlomProperties.java: This makes testing simpler. 2012-06-15 Murray Cumming OnlineGlomServiceImpl.init(): Move some code into a new method. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Create addDocument(). 2012-06-15 Murray Cumming OnlineGlomServiceImpl.OnlineGlomProperties: Improve getKey(). * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: OnlineGlomProperties.getKey(): Make this more robust by moving the check for *.*.filename to here. 2012-06-15 Murray Cumming OnlineGlomServiceImpl: Improve the OnlineGlomProperties class. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java init(): Move knowledge of the config file format into the OnlineGlomProperties inner class. 2012-06-15 Murray Cumming SelfHostExampleTest: Make sure we cleanup on failure. * src/test/java/org/glom/web/server/SelfHostExampleTest.java: Move the use of cleanup() to a tearDown() JUnit method. 2012-06-12 Murray Cumming ConfiguredDocument: Add a primary key to portals at least once. * src/main/java/org/glom/web/server/ConfiguredDocument.java updatePortalsExtras): Fix a typo so that we add the primary key column at least once. This is a fix for the previous commit: ConfiguredDocument: Do not add a primary key to portals each time. 2012-06-08 Murray Cumming SelfHoster: Avoid some compiler warnings. * src/test/java/org/glom/web/server/SelfHoster.java executeCommandLineAndWait(): executeCommandLineAndWaitUntilSecondCommandReturnsSuccess(): Comment out the now-unused streams for stdout and stderr from the command Processes. These are not used because readln() hangs while waiting for a new line, where there may be no next line. The commented out code is still there to help us figure out how to do this properly. 2012-06-08 Murray Cumming LayoutItemPortalDeepCloneTest: Test something to avoid warnings. * src/test/java/org/glom/web/server/libglom/LayoutItemPortalDeepCloneTest.java: Make this actually test the cloning again, though it is not very useful now that we do not use the part that had a problem with cloning before. 2012-06-08 Murray Cumming SelfHoster: Keep trying pg_ctl after starting postgres. * src/test/java/org/glom/web/server/SelfHoster.java executeCommandLineAndWaitUntilSecondCommandReturnsSuccess(): Try pg_ctl repeatedly (for ever) until it succeeds, as we do in regular Glom. This seems mad but it seems to work because the first command would fail if pg_ctl would eventually fail. 2012-06-08 Murray Cumming SelfHoster: Wait until the server is really ready. * src/test/java/org/glom/web/server/SelfHoster.java selfHost(): Attempt the connection after starting the server, retrying a few times if necessary, so that the server is really ready already when we return from this method. The regular Glom code does this too because pg_ctl reports success too soon. 2012-06-08 Murray Cumming ConfiguredDocument: Do not add a primary key to portals each time. * src/main/java/org/glom/web/server/ConfiguredDocument.java updatePortalsExtras(): Only add an extra primary key field if there is none, to avoid adding one each time we retrieve the details layout from the layouts cache. This should fix bug #676986 (Ben Konrath) 2012-05-25 Murray Cumming Document.load(): Support version 7 documents. * src/main/java/org/glom/web/server/libglom/Document.java: Load the database_title attribute if the title attribute is not there. Bug #676737 2012-05-24 Ben Konrath Add configuration for auto-generating mvn:i18n from with Eclipse. * pom.xml: Add PluginExecution configuration for gwt-maven-plugin. 2012-05-24 Murray Cumming Update translations, adding French. * src/main/java/org/glom/web/OnlineGlom.gwt.xml: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_fr.properties: Add a French translation, using the translation from Glom. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties: Update these based on the translations from Glom. 2012-05-24 Murray Cumming SelfHoster: Add some debug println messages to help when things fail. * src/test/java/org/glom/web/server/SelfHoster.java: Add several System.out.println() lines. 2012-05-23 Murray Cumming Tests: SelfHoster: Check other paths for PostgreSQL command-line tools. * src/test/java/org/glom/web/server/SelfHoster.java: getPathToPostgresExecutable(): Try some common paths (as on Ubuntu, for instance) instead of just /usr/bin (as on Fedora). Check the result when using this method. 2012-05-23 Murray Cumming Remove LayoutItemPortal.get/setNavigationTable(). * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java: Remove get/setNavigationTable(), which is only a cache, because it is not used, and does not need to be used, because that decision should be made on the server. * src/main/java/org/glom/web/server/ConfiguredDocument.java: updatePortalsExtras(): * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: getNavigationRecord(): * src/test/java/org/glom/web/server/libglom/LayoutItemPortalDeepCloneTest.java: Adapted. 2012-05-21 Murray Cumming Initial self-hosting for tests. * pom.xml: Change the scope for log4j, to hopefully make it available to the test code which uses it indirectly via jOOQ. * src/main/java/org/glom/web/server/ConfiguredDocument.java: Allow self-hosting, though we only use it for testing. * src/main/java/org/glom/web/server/libglom/Document.java: example rows: Use a map instead of a list for each row of values, so we know what field they are for, instead of relying on the sequence being correct. This is not very efficient, but it does not really need to be. * src/test/java/org/glom/web/server/libglom/DocumentTest.java testReadTableExampleRows(): Adapted. * src/main/java/org/glom/web/shared/DataItem.java: Added getValue() that returns an Object, for generic use. Note that Object seems to be the implicit base even of double. * src/main/java/org/glom/web/shared/libglom/Field.java: Add getSqlType(), for use in CREATE TABLE SQL queries. * src/test/java/org/glom/web/server/SelfHoster.java: Add this class to do self-hosting of PostgreSQL databases via its command-line utilities, based on Glom's C++ code in test_selfhosting_utils.cc and backends/postgres_self.cc. This is incomplete - it needs more warnings about failures and it needs to clean up properly when things fail. * src/test/java/org/glom/web/server/SelfHostExampleTest.java: A simple test of this new class. 2012-05-21 Murray Cumming Document: loading example data: Handle exceptions. * src/main/java/org/glom/web/server/libglom/Document.java: DateFormat.parse() and Double.valueOf() can throw exceptions, though Eclipse did not warn about that. 2012-05-20 Murray Cumming Document: load(), save(): Handle the example rows. * src/main/java/org/glom/web/shared/DataItem.java: Add get/setDate() and get/setImage(). * src/main/java/org/glom/web/server/libglom/Document.java: load(), save(): Load and save the example rows, though the date, time and image types are not handled properly yet. * src/test/java/org/glom/web/server/libglom/DocumentTest.java: Add testReadTableExampleRows() just to check that something is read. 2012-05-20 Murray Cumming Document: Add save(). * src/main/java/org/glom/web/shared/libglom/Translatable.java: Added getTranslationsMap() for use while saving. * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java: Adedd getUseDefaultFormatting() for use while saving. * src/main/java/org/glom/web/server/libglom/Document.java: Added save() and several private methods that it uses. This will be useful while testing via self-hosting. It is not complete, but should be complete enough for testing. 2012-05-17 Murray Cumming OnlineGlomService: Simplify the getList/RelatedViewData() methods. * src/main/java/org/glom/web/client/OnlineGlomService.java * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java Remove getSortedListViewData() and getSortedRelatedListData(), adding the sort column index and ascending bool to the regular method. Instead, a sort column index of -1 now means no sort. This is less explicit, but it's fairly simple, reduces the amount of code, and makes the OnlineGlomService API slightly smaller. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: getDataProvider(): * src/main/java/org/glom/web/server/ConfiguredDocument.java: getListViewData(), getRelatedListData(): * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: getListViewData(), getRelatedListData(): * src/main/java/org/glom/web/server/database/ListDBAccess.java: getListData(): * src/main/java/org/glom/web/server/database/ListViewDBAccess.java: getData(): * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: getData(): Adapted. 1.21.9.2: 2012-05-16 Murray Cumming Use translations for top-level groups too. * src/main/java/org/glom/web/server/ConfiguredDocument.java: updateTitlesForLocale(): Use the translation for the group as well as for child items. 1.21.9.1: Just recompiled to fix a problem in the released .tar.gz file. 1.21.9: 2012-05-15 Murray Cumming Corrections to navigation to related records. * src/main/java/org/glom/web/client/OnlineGlomService.java: * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: getRelatedListData(), getSortedRelatedListData)(), getRelatedListRowCount(), getSuitableRecordToViewDetails(): Take a LayoutItemPortal instead of a relationship name, because the relationship name is not necessarily unique on the layout. TOOD: This is inefficient, because it passes the whole list of child field items back to the server, but it is more correct, and happens to fix a bug with the primary key being lost after a few navigations. There is probably a chance to make this more efficient anyway in some more basic way. * src/main/java/org/glom/web/client/activity/DetailsActivity.java * src/main/java/org/glom/web/client/ui/details/RelatedListTable.jav * src/main/java/org/glom/web/server/ConfiguredDocument.java * src/main/java/org/glom/web/server/database/DBAccess.java * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: Adapted. 2012-05-15 Murray Cumming Fix the use of translations. * src/main/java/org/glom/web/server/ConfiguredDocument.java: Add updateTitlesForLocale(). getValidListViewLayoutGroup(), getDetailsLayoutGroup(): Call it to discard unwanted translations and to make getTitle() return the wanted translation wihout the need for the client code to specify a locale. * src/main/java/org/glom/web/shared/libglom/Translatable.java: getTitle(): Fallback to the original title, as libglom does. 2012-05-15 Murray Cumming Document: Correctly report the number of available translation locales. * src/main/java/org/glom/web/server/libglom/Document.java: Fill the available locale IDs list. * src/test/java/org/glom/web/server/libglom/DocumentTest.java: testLocales: Test this. 2012-05-15 Murray Cumming SqlUtils: Use camelCase. * src/main/java/org/glom/web/server/SqlUtils.java: Use camelCase. * src/main/java/org/glom/web/server/database/DetailsDBAccess.java: * src/main/java/org/glom/web/server/database/ListViewDBAccess.java: * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: * src/main/java/org/glom/web/server/ReportGenerator.java: Adapt. 2012-05-15 Murray Cumming Use jOOQ's tableByName() and fieldByName. * pom.xml: Use jOOQ 2.3.1 to get the new API. * src/main/java/org/glom/web/server/SqlUtils.java: build_sql_select_step_with_where_clause(), .createField(), builder_add_join(): Use Factory.tableByName() and Factory.fieldByName() so we can get correct quoting and escaping. Thanks to Lukas Eder for adding this, and other things, to jOOQ. 2012-05-15 Murray Cumming SqlUtils: Remove the Connection parameters. * src/main/java/org/glom/web/server/SqlUtils.java: build_sql_select_with_key(), build_sql_select_with_where_clause(), createSelect(), build_sql_select_step_with_where_clause(), build_sql_count_select_with_where_clause(), build_sql_select_count_rows(): Remove the Connection parameter because jOOQ does not actually need a connectionwhen it is just used to build a SQL string: https://groups.google.com/forum/#!topic/jooq-user/tIwobFOR2iM * src/main/java/org/glom/web/server/ReportGenerator.java: generateReport(): * src/main/java/org/glom/web/server/database/DetailsDBAccess.java: getData(): * src/main/java/org/glom/web/server/database/ListDBAccess.java: Constructor, getListData(), getResultSizeOfSQLQuery(): * src/main/java/org/glom/web/server/database/ListViewDBAccess.java: getSelectQuery(), getCountQuery(): * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: getSelectQuery(), getCountQuery(): * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: getNavigationRecord(): Adapted. 2012-05-14 Murray Cumming Fix quick find. * src/main/java/org/glom/web/server/SqlUtils.java: get_find_where_clause_quick(): Use a comparison of lowercase values, instead of a simple equals. Regular Glom uses the PostgreSQL ILIKE operator but jOOQ does not support that just yet, though it will soon. 2012-05-14 Murray Cumming TableToViewDetails: Use a real serialization ID. * src/main/java/org/glom/web/shared/libglom/layout/TableToViewDetails.java: Though this does not fix the serialization problem. 2012-05-12 Murray Cumming Added LayoutItemPortalDeepCloneTest. 2012-05-11 Murray Cumming Make navigation work again. * src/main/java/org/glom/web/server/libglom/Document.java: Add getLayoutItemFieldShouldHaveNavigation(). * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java: Replace get/setAddNavigation() with the partly-existing get/setNavigationTableName(), with an empty string being no navigation, because this is simpler. Use the new Document.getLayoutItemFieldShouldHaveNavigation() method to set this. * src/main/java/org/glom/web/server/ConfiguredDocument.java: Add updateFieldsExtras() and call setNavigationTableName in it. getDetailsLayoutGroup(), * src/main/java/org/glom/web/client/activity/DetailsActivity.java createLayout(): Adapted. * src/main/java/org/glom/web/client/ui/details/DetailsCell.java Constructor: Adapted. * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java: Replace get/setAddNavigation() with get/setNavigation(), returning a TableToViewDetails class with both the table name and UsesRelationship, because both are need. The previous code used java-libglom's output variable (strangely, via sharedptr) to return both, but we cannot really do that in Java. * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: getNavigationRecord(): Adapt. However, we cannot actually use the cache here because it somehow gets set to null during deepCopy(). I must test this. * src/test/java/org/glom/web/server/libglom/DocumentTest.java testGetSuitableTableToViewDetails(): Adapted. TODO: Find out why deepClone() is not quite working. 2012-05-11 Murray Cumming DBAccess: Simplify the retrievel of full field details. * src/main/java/org/glom/web/server/database/DBAccess.java getFieldsToShowForSQLQueryAddGroup(). This might be unnecessary anyway, because the Document loading should have done this. 2012-05-11 Murray Cumming Document: Correct loading of doubly-related layout fields. * src/main/java/org/glom/web/server/libglom/Document.java: loadUsesRelationship(): Actually set the related relationship, instead of only setting it if it's not found. 2012-05-09 Murray Cumming Replace all appearances of Colour with color. Because US English is dominant. 2012-05-09 Murray Cumming Use colors in HTML format, solving a warning about an unused function. * src/main/java/org/glom/web/shared/libglom/NumericFormat.java * src/main/java/org/glom/web/shared/libglom/layout/Formatting.java: Add *asHTMLColor() versions of methods. TODO: However, we should create and cache the results on the server. * src/main/java/org/glom/web/client/ui/details/DetailsCell.java * src/main/java/org/glom/web/client/ui/list/ListTable.java * src/main/java/org/glom/web/server/ConfiguredDocument.java * src/test/java/org/glom/web/server/libglom/DocumentTest.java: Use the asHTMLcolor() versions. 2012-05-09 Murray Cumming ListViewTable: Constructor: Take the table name as a parameter. * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: Constructor: Take the tableName, and set the member variable, because we use it here. * src/main/java/org/glom/web/client/ui/ListViewImpl.java: setCellTable(): Pass the table name. This makes navigation to non-default tables work again. I don't know why it worked before in the master branch. 2012-05-07 Murray Cumming ConfiguredDocument: Restore correct addition of hidden primary key items. * src/main/java/org/glom/web/client/ui/list/ListTable.java (ListTable.createCellTable): Uncomment out the check for the hidden primary key. * src/main/java/org/glom/web/server/ConfiguredDocument.java: Only add primary key items for top-level lists and portals, as before, instead of adding them to each group. * src/main/java/org/glom/web/shared/libglom/layout/LayoutGroup.java: Actually implement the extra methods such as setHiddenPrimaryKey() and comment that these are used only for top-level list groups and in portals. This strangeness suggests even more that this should not be squeezed into the LayoutGroup class. 2012-05-07 Murray Cumming Fix Formatting loading. * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java: getFormattingUsed(): Remove the duplicate Formatting member variable in favour of the one from the base class. * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemWithFormatting.java: Initialize a new Formatting instead of using null by default, so we have some defaults, instead of having to initialize one later just to get the same defaults. This also makes loading of formatting from the document work, because that expected a non-null. 2012-05-07 Murray Cumming RelatedListTable: Make sure that the tableName is set. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: Constructor: Take the tableName so it is available later. Otherwise, the server assumes that we mean the default table and cannot find the relationship in it. * src/main/java/org/glom/web/client/activity/DetailsActivity.java setData(): Pass the tableName to the RelatedListTable constructor. 2012-05-07 Murray Cumming Add some checks. * src/main/java/org/glom/web/client/activity/DetailsActivity.java: RelatedListNavigationButtonCell.onEnterKeyDown(), setData(): * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: getDataProvider(): * src/main/java/org/glom/web/client/ui/list/ListTable.java: addColumn(): * src/main/java/org/glom/web/server/database/DBAccess.java: convertResultSetToDTO(), getPortal(): * src/main/java/org/glom/web/server/database/ListDBAccess.java getListData(): * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: Add checks for null objects and out of range access, with log messages to give hints so we can fix these properly. 2012-05-07 Murray Cumming Portals: some corrections. * src/main/java/org/glom/web/client/activity/DetailsActivity.java setData(): * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: constructor: Use getRelationshipNameUsed() instead of getName(), because that is what is meant. * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java: getFromField(): Fix a typo, to get the field name, not the table name. * src/main/java/org/glom/web/server/database/DBAccess.java: getPortal(): Fix a typo that stopped this from working. 2012-05-07 Murray Cumming LayoutItemPortal: Also override getTitleOriginal(). * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java: This lets the base getTitle() with no parameters work. TODO: Test this properly. 2012-05-06 Murray Cumming LayoutItemPortal: getTitle*(): Use the relationship title. 2012-05-06 Murray Cumming LayoutItemField: Fix loading of custom titles. * src/main/java/org/glom/web/server/libglom/Document.java loadDataLayoutItemField(): The title, if any, instead of the field title, is stored in a title_custom node. Load it from there. * src/main/java/org/glom/web/shared/libglom/CustomTitle.java: Add this class. * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField: Add getCustomTitle() and use it, instead of super.getTitle*(), in the getTitle*() overrides. * src/test/java/org/glom/web/server/libglom/LayoutItemFieldTest.java: Adapt. 2012-05-06 Murray Cumming LayoutItemField: Fall back to field titles, so some are really shown. * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java: Override getTitleOriginal() and getTitle(), as in java-libglom. * src/test/java/org/glom/web/server/libglom/LayoutItemFieldTest.java: Test this behaviour. 2012-05-06 Murray Cumming Correct use of setExpectedResultSize(). * src/main/java/org/glom/web/server/ConfiguredDocument.java getValidListViewLayoutGroup(), getDetailsLayoutGroup(): Use setExpectedResultSize only on top-level groups (for instance, the list layout) or on child portals (in details views). Use the correct table name for portals to avoid SQL errors. Update the expected counts when returning cached layouts. 2012-05-06 Murray Cumming Document: Interpret no group column count as 1. * src/main/java/org/glom/web/server/libglom/Document.java: Use a sane default, though we now check for this in the UI code anyway. 2012-05-06 Murray Cumming More null checks. 2012-05-06 Murray Cumming Translatable: Use Hashmap instead of Treemap because GWT supports it. * src/main/java/org/glom/web/shared/libglom/Translatable.java: The use of Treemap lead to this error from async methods, with no further clue: "The response could not be deserialized" 2012-05-06 Murray Cumming OnlineGlom.gwt.xml: Add exludes to fix explicit gwt compilation in Eclipse. * src/main/java/org/glom/web/OnlineGlom.gwt.xml: This is necessary when using the Google -> GWT Compile, or g toolbar button -> GWT Compile Project... feature in Eclipse. 2012-05-06 Murray Cumming ListTable.addColumn(): Protect against a null Formatting. * src/main/java/org/glom/web/client/ui/list/ListTable.java: addColumn(): Create a default Formatting if it is null, because that is the simplest way to do this. 2012-05-06 Murray Cumming ConfiguredDocument.updateLayoutGroup(): Protect against a null dereference. * src/main/java/org/glom/web/server/ConfiguredDocument.java updateLayoutGroup(): Check that the field is not null. 2012-05-06 Murray Cumming ListViewImpl: Protected against a bad cast error. * src/main/java/org/glom/web/client/ui/ListViewImpl.java: onEnterKeyDown(): Do not cast without an instanceof check. 2012-05-06 Murray Cumming ListTable: Protect against an out of range error. * src/main/java/org/glom/web/client/ui/list/ListTable.java createCellTable(): This is unlikely, but can happen while debugging. 2012-05-06 Murray Cumming AsyncMessage onFailure() callbacks: Log the exception message. * src/main/java/org/glom/web/client/activity/DetailsActivity.java * src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java: * src/main/java/org/glom/web/client/activity/ListActivity.java: * src/main/java/org/glom/web/client/activity/ReportActivity.java: * src/main/java/org/glom/web/client/activity/TableSelectionActivity: * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: These are useful clues when something is wrong. 2012-05-06 Murray Cumming ConfiguredDocument: Avoid a null dereference. * src/main/java/org/glom/web/server/ConfiguredDocument.java TableLayoutsForLocale.getMapWithAdd(): Make sure that the list and details maps are created. 2012-05-06 Murray Cumming Document: Correct the port number parsing. * src/main/java/org/glom/web/server/libglom/Document.java: This lets us actually connect to the database and show the document. 2012-05-05 Murray Cumming Fix mvn gwt:test * pom.xml: Use htmlunit mode for gwt:test, because the default demands user-interaction, asking us to load a temporary URL in a browser.s * src/main/java/org/glom/web/OnlineGlom.gwt.xml: Add a servlet node, which is apparently necessary for testing the service. See the comment. * src/test/java/org/glom/web/client/GwtTestOnlineGlomService.java: Show the exception, if any. This is how I saw the 404 in the HTML in the exception. 2012-05-05 Murray Cumming DocumentTest: Move the .glom files into the resources directory. * src/test/java/org/glom/web/server/libglom/DocumentTest: And get the URI via getResource(). 2012-05-05 Murray Cumming Document: Remove the FieldIdentifies inner class. * src/main/java/org/glom/web/server/libglom/Document.java: We only use the Relationship (though the same function in libglom is maybe used in other ways) and so this removes a compiler warning. 2012-05-05 Murray Cumming Document.load() Remove the error code parameter. * src/main/java/org/glom/web/server/libglom/Document.java: load(): Remove the parameter. We do not set it yet and it could never have worked as an output parameter (though maybe it did in java-libglom). We could use an exception if we really want the failure reason. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: init(): * src/test/java/org/glom/web/server/libglom/DocumentTest.java: setUp(), testGetSuitableTableToViewDetails(): Adapt. 2012-05-05 Murray Cumming Make some inner classes static. * src/main/java/org/glom/web/server/ConfiguredDocument.java * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java * src/main/java/org/glom/web/server/ReportGenerator.java * src/main/java/org/glom/web/server/libglom/Document.java Make all inner classes static that can be static. 2012-05-05 Murray Cumming OnlineGlomServiceImpl: Do not load and check for java-libglom. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java init(): We do not use java-libglom any more. 2012-05-05 Murray Cumming Remove mentions of java-libglom. * README: Remove mention of java-libglom, because it no longer needed. * utils/build-onlineglom-war.sh: * utils/check-and-recover-tomcat.py: * utils/install-onlineglom-war.sh: Remove these as they are no longer useful. Building is now far easier, with no need for jhbuild. 2012-05-05 Murray Cumming Fix the build (mvn package) * src/main/java/org/glom/web/shared/libglom/layout/LayoutGroup.java (LayoutGroup): Make the LayoutItemList inner class static and protected. Otherwise the GWT Java->Javascript compilation fails with just this error, during mvn package or when attempting to view in a browser, in the GWT developer mode in Eclipse. [INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ gwt-glom --- [INFO] auto discovered modules [org.glom.web.OnlineGlom] [INFO] Compiling module org.glom.web.OnlineGlom [INFO] [ERROR] Errors in 'file:/home/murrayc/checkouts/gnome/gwt-glom/src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java' [INFO] [ERROR] Line 46: Failed to resolve 'org.glom.web.client.OnlineGlomService' via deferred binding [INFO] Scanning for additional dependencies: file:/home/murrayc/checkouts/gnome/gwt-glom/src/main/java/org/glom/web/client/ui/details/DetailsCell.java [INFO] [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?) [INFO] [WARN] org.glom.web.client.OnlineGlomService_Proxy [INFO] [ERROR] Cannot proceed due to previous errors It has taken me 2 days to find out what was causing that. After reducing the code, the compiler eventually showed me the full error message. 2012-05-04 Murray Cumming ConfiguredDocument: Cache the cloned and stripped layouts. * src/main/java/org/glom/web/server/ConfiguredDocument.java: getValidListViewLayoutGroup(), .getDetailsLayoutGroup(): Store the cloned layout in a map, so we can retrieve it again without rebuilding it. 2012-05-04 Murray Cumming UsesRelationshipImpl: Complete the relationshipEquals() implementation. 2012-05-04 Murray Cumming libglom classes: Implement some auto-generated emthods. 2012-05-04 Murray Cumming Add GwtTestOnlineGlomService. * src/test/java/org/glom/web/client/GwtTestOnlineGlomService.java: However, this (and the other GwtTest*) does not seem to run during mvn test. 2012-05-04 Murray Cumming Remove use of unsupported features from client code. * src/main/java/org/glom/web/client/StringUtils.java: Add equals(). * src/main/java/org/glom/web/shared/libglom/layout/UsesRelationshipImpl.java: * src/main/java/org/glom/web/shared/libglom/layout/reportparts/LayoutItemGroupBy.java: Use our client version of StringUtils instead of the apache commons one. However, the GWT Javascript compliation still fails. 2012-04-25 Murray Cumming Add a Field class and implement some loading of it in Document. 2012-04-25 Murray Cumming Initial Document loading implementation, instead of libglom. * src/test/java/org/glom/web/shared/libglom/: Add Document, Report, and Translatable classes, and adapt the rest of the code to use them. However, this is still missing Layout and Field classes and loading. 2012-04-24 Murray Cumming Use of jOOQ: Move Field creation into a utility method. * src/main/java/org/glom/web/server/SqlUtils.java: This lets us improve it more easily. 2012-04-24 Murray Cumming Use of jOOQ: Improve the code to COUNT a sub-select. * src/main/java/org/glom/web/server/SqlUtils.java: Move initial query creation into build_sql_select_step_with_where_clause(). build_sql_select_count_rows(): Use the jOOQ API instead of concatentating text, because a jOOQ Select*Step is a TableLike, which is what from() takes. 2012-04-23 Murray Cumming Use jOOQ instead of Glom.build_sql*(), to avoid native calls. * pom.xml: Depend on jooq. * src/main/java/org/glom/web/server/SqlUtils.java: Reimplement the methods with jOOQ, based on the C++ implementations in libglom, with some changes to the logic required by jooQ. Take a jOOQ Condition rather than a Glom.SqlExpr (GdaSqlExpr) for the where clause. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: * src/main/java/org/glom/web/server/ReportGenerator.java: * src/main/java/org/glom/web/server/SqlUtils.java: * src/main/java/org/glom/web/server/database/DetailsDBAccess.java: * src/main/java/org/glom/web/server/database/ListDBAccess.java: * src/main/java/org/glom/web/server/database/ListViewDBAccess.java: * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: * src/main/java/org/glom/web/server/database/RelatedListNavigation: Adapt. In particular, the SqlUtils methods now need to take a Connection, because jOOQ needs that, though it seems unnecessary. This is not quite finished. Ideally jOOQ would help us to build table_name.field_name names, quoting and escaping them properly. See http://stackoverflow.com/questions/10264001/instantiating-a-jooq-field-by-name 2012-04-21 Murray Cumming Move use of Glom.build_sql*() into a new SqlUtils class. * src/main/java/org/glom/web/server/SqlUtils.java: Add static methods to wrap Glom.build_sql*(). The parameter types are still Glom one, but this will make it easier to start using something other than libglom or SqlBuilder. 2012-04-21 Murray Cumming Update the project URL. * pom.xml: Use an OnlineGlom-specific URL for the project URL. 2012-04-21 Murray Cumming Main layout: Use a FlowTable instead of absolute positioning. * src/main/java/org/glom/web/client/OnlineGlom.java: onModuleLoad(): The RootLayoutPanel is a (extends) AbsolutePanel, so each of its child panels/widgets must have an absolute position. But that is annoying, so this adds a FlowTable and puts the child panels in there. 2012-04-21 Murray Cumming GwtTestOnlineGlom: Comment out unused code. * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java: Eclipse has started to say that some code is unused. 2012-04-21 Murray Cumming Update to the latest versions of dependencies. * pom.xml: Update version numbers of dependencies to the latest versions. * src/main/java/org/glom/web/server/ConfiguredDocument.java: * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: * src/main/java/org/glom/web/server/ReportGenerator.java: * src/main/java/org/glom/web/server/database/ListViewDBAccess.java: * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: * src/main/java/org/glom/web/server/database/RelatedListNavigation. java: * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java: Modify the imports where necessary. 2012-04-17 Murray Cumming Style: Remove overflow:hidden from searchbox * src/main/webapp/style.css: Because this pushes the Back To Link label/link on to the next row, which is then hidden due to the hard-coded (in ems) height. 2012-04-20 Murray Cumming Remove some duplicate code. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java getDocumentInfo(): This must have been duplicated during the merge from the reports branch. 1.21.8.1: 2012-04-19 Murray Cumming Reports: Localize the waiting for report message. * src/main/java/org/glom/web/client/activity/ReportActivity.java start(): Get the message from the contants. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties: Add the string here. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_de.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_zh_CN.properties: Update these files with the English text for newer strings for now. 2012-04-19 Murray Cumming Reports: Show a message while waiting for the report. * src/main/java/org/glom/web/client/ui/ReportView.java * src/main/java/org/glom/web/client/ui/ReportViewImpl.java: Add setWaitingText(), to show a message saying that we are waiting for the report to be ready. * src/main/java/org/glom/web/client/activity/ReportActivity.java start(): Call setWaitingText() before calling the async report generation. 2012-04-19 Murray Cumming ReportGenerator: Specify date and time formats. * src/main/java/org/glom/web/server/ReportGenerator.java: createFieldValueElement(): Use the default (and localized) short formats, though we still need a way to show 4-digit years without providing the format for every locale. * src/main/java/org/glom/web/server/database/DBAccess.java: convertResultSetToDTO(): Use the short formats here too. 2012-04-18 Murray Cumming ReportGenerator: Use the correct numeric formatting. * src/main/java/org/glom/web/server/ReportGenerator.java createFieldExpression(), createFieldValueElement(): Take the whole LayoutItem_Field instead of just the field name, so we have access to the formatting. createFieldValueElement(): Use JRTextField.setPattern() to specify the numeric formatting, with the help of a regular DecimalFormat. 2012-04-18 Murray Cumming ReportGenerator: Avoid showing null for group by titles. * src/main/java/org/glom/web/server/ReportGenerator.java generateReport(): Use setBlankWhenNull() on the field title style too, because this is used for values in group by sections. 2012-04-18 Murray Cumming ReportGenerator: Add a colon to titles in vertical groups. * src/main/java/org/glom/web/server/ReportGenerator.java addFieldToDetailBandVertical(): Pass true for the withColon parameter. 2012-04-18 Murray Cumming ReportGenerator: Simplify the code by using Position more. 2012-04-18 Murray Cumming Reports: Support vertical groups, roughly. * src/main/java/org/glom/web/server/ReportGenerator.java: addToReport(): Rename to addGroupToReport() and, if necessary, call the new addVerticalGroupToReport() method. createFieldValueElement(): Let the caller specify the Y position too. 2012-04-17 Murray Cumming Reports: Allow a second report to be shown. * src/main/java/org/glom/web/client/ui/ReportViewImpl.java: clear(): Do not remove the HTML widget, which broke the whole layout. 2012-04-17 Murray Cumming Locales drop-down: Show that we use English by default. * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java: fillView(): When we use English, just because that is the default, when no locale is specified, show that in the Locales drop-down instead of just showing the first item. 2012-04-17 Murray Cumming Unselect the Report/Locale/Table combo item when appropriate. * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java: setPlace(): clear reportName if this is not a ReportPlace. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: setSelectedTableName(), setSelectedLocale(), setSelectedReport(): When the provided name is empty, unselect all items, so that none are indicated. This uses a for loop because I cannot find a single method to do this. 2012-04-17 Murray Cumming Report: Give the user a way to get back to the list. * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java: start(), setPlace(): Show the Back To List link on reports, and also interpret selecting the empty report item as back to list. 2012-04-13 Murray Cumming Really show the selected Report name. * src/main/java/org/glom/web/client/activity/TableSelectionActivity: setPlace(): Store the reportName here, if it is that kind of Place. fillView(): Set the selected Report after filling the list of reports. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: setSelectedLocale(), setSelectedReport(): Avoid possible uses of null Strings, though we need some way to unselect all ListBox items in that case. 2012-04-13 Murray Cumming ReportGenerator: Try to avoid some problems. * src/main/java/org/glom/web/server/ReportGenerator.java addField(): Try to avoid duplicates, and avoid using a null class type. 2012-04-13 Murray Cumming Reports: Use quickFind. * src/main/java/org/glom/web/client/OnlineGlomService.java; * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: getReportHTML(): Add a quickFind parameter. * src/main/java/org/glom/web/client/activity/ReportActivity.java start(): Pass the quickFind parameter. * src/main/java/org/glom/web/server/ReportGenerator.java generateReport(): Take a quickFind parameter. 2012-04-13 Murray Cumming ReportPlace: Actually use the report name. * src/main/java/org/glom/web/client/place/ReportPlace.java getPlace(): Do not assign the report name to the quickfind. 2012-04-13 Murray Cumming Show java.library.path when complaining. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java init(): When telling us to check java.library.path, show the current value. 2012-03-06 Murray Cumming ReportGenerator: Do not show nulls. 2012-03-06 Murray Cumming ReportGenerator: Make the title font larger. 2012-03-06 Murray Cumming ReportGenerator: Put field titles inside groups, if there are groups. 2012-03-06 Murray Cumming ReportGenerator: Take the Report itself instead of the name and group. * src/main/java/org/glom/web/server/ConfiguredDocument.java Remove getReportLayoutGroup(). * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java getReportHTML(): Pass the report instead of its name and layout group. * src/main/java/org/glom/web/server/ReportGenerator.java generateReport(): Use the report object to use the title instead of the name. 2012-03-06 Murray Cumming ReportGenerator: Remove designBand parameters. * src/main/java/org/glom/web/server/ReportGenerator.java: Make designBand a class member instead of passing it to all methods. 2012-03-06 Murray Cumming ReportGenerator: Add lines, a bit like in the desktop version. * src/main/java/org/glom/web/server/ReportGenerator.java addToReport(): Use JRDesignLine. 2012-03-06 Murray Cumming ReportGenerator: Correct the title positions and use some bold style. * src/main/java/org/glom/web/server/ReportGenerator.java: Break the code up into reusable functions, correct the placement of titles, and use normal/bold styles as in the reports in the desktop version. 2012-03-06 Murray Cumming ReportGenerator: Add a header band to show the field titles. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java getReportHTML(): Pass the localeId to the ReportGenerator constructor. * src/main/java/org/glom/web/server/ReportGenerator.java constructor: Take the localeID so we can get translated field titles. generateReport(), addToReport(), addFieldToBand(): Add field titles in a column header band. 2012-03-05 Murray Cumming Reports drop-down list: Some improvement. * src/main/java/org/glom/web/client/ui/TableSelectionView.java * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Adedd setSelectedReport(), setReportList(): Add a blank line so that the user can select the first one. * src/main/java/org/glom/web/client/activity/ReportActivity.java start(): Show the current report by calling setSelectedReport(). This does not seem to work yet. 2012-03-05 Murray Cumming DetailsActivity, ListActivity: Move some variables into a base class. * src/main/java/org/glom/web/client/activity/DetailsActivity.java: * src/main/java/org/glom/web/client/activity/HasTableActivity.java: * src/main/java/org/glom/web/client/activity/ListActivity.java: Move the clientFactory, documentID, tableName and authenticationPopup into a base class, to avoid duplication. 2012-03-05 Murray Cumming Translate the Reports label. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java Get the "Reports" label string from the constants. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.pro perties: Add Reports to the constants. 2012-03-05 Murray Cumming Reports: Implement grouping. * src/main/java/org/glom/web/server/ReportGenerator.java: Handle LayoutItem_GroupBy items and try to do the right thing with JRDesignGroup. It seems to work. 2012-03-04 Murray Cumming Actually show some data with JasperReports. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: getReportHTML(): Move most code into a ReportGenerator class. * src/main/java/org/glom/web/server/ReportGenerator.java: Recurse into sub-groups, adding fields to the JasperDesign's details band. Note that we must set an arbitrary width and height, or it just will not show any data. 2012-03-04 Murray Cumming Reports Chooser: Show the titles, not the names. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java (TableSelectionViewImpl.setReportList): Show the titles in the UI, and the names as the values. * src/main/java/org/glom/web/server/ConfiguredDocument.java (ConfiguredDocument.getReportLayoutGroup): Do not return a default group now that we provide the report name, so it should always succeed. 2012-02-15 Murray Cumming Depend on jasperreports. * pom.xml: Add the dependency. My plan is to use this on the server side. 2012-01-31 Murray Cumming Implement navigation to report places. * src/main/java/org/glom/web/client/activity/ReportActivity.java start(): Do not bother to handle all events here. * src/main/java/org/glom/web/client/ui/TableSelectionView.java * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Added getSelectedReport(). * src/main/java/org/glom/web/client/activity/TableSelectionActivity .java: start(): When handling a change to the reports chooser, call getSelectedReport() and goTo() its ReportPlace. * src/main/java/org/glom/web/client/ui/ReportView.java * src/main/java/org/glom/web/client/ui/ReportViewImpl.java: Added setReportHTML() which puts the html in a gwt HTML widget. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java getReportHTML(): Return "TODO" just to show that this works. 2012-01-31 Murray Cumming Make ReportPlace usable. * src/main/java/org/glom/web/client/mvp/AppPlaceHistoryMapper.java: Mention ReportPlace. * src/main/java/org/glom/web/client/place/ReportPlace.java: Correct the @prefix annotation. 2012-01-31 Murray Cumming OnlineGlomService: Return report HTML rather than the LayoutGroup. * src/main/java/org/glom/web/client/OnlineGlomService.java: * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Change getReportLayout() to getReportHMTL() because we will not need to parse or render the report layout on the client side. * src/main/java/org/glom/web/server/ConfiguredDocument.java: getReportLayout(): Return the libglom LayoutGroup type because we will not need to convert to a shared type, because this will not be used on the client side. * src/main/java/org/glom/web/client/activity/ReportActivity.java: Adapted. Note that there is still no implementation for this. 2012-01-27 Murray Cumming Add a (empty) Report Place, View, and Activity. * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java: Rename to: * src/main/java/org/glom/web/client/place/HasTablePlace.java * src/main/java/org/glom/web/client/place/ListPlace.java: Move some of this into a superclass: * src/main/java/org/glom/web/client/place/HasRecordsPlace.java and also use it as the base of this new ReportPlace: * src/main/java/org/glom/web/client/place/ReportPlace.java * src/main/java/org/glom/web/client/ui/ReportView.java * src/main/java/org/glom/web/client/ui/ReportViewImpl.java * src/main/java/org/glom/web/client/activity/ReportActivity.java: Add these, containing mostly boiler-plate for now. * src/main/java/org/glom/web/client/OnlineGlomService.java * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java * src/main/java/org/glom/web/server/ConfiguredDocument.java * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Add API to get the LayoutGroup for the report. 2012-01-23 Murray Cumming Add and fill a Reports drop-down list box. * src/main/java/org/glom/web/server/ConfiguredDocument.java: Aded getReports(): * src/main/java/org/glom/web/client/OnlineGlomService.java: * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Added getReports(document, table, localeID), calling ConfiguredDocument.getReports(). * src/main/java/org/glom/web/client/ui/TableSelectionView.java: * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Added setReportsList() and a list widget. * src/main/java/org/glom/web/client/activity/TableSelectionActivity .java (TableSelectionActivity.fillView(): Fill the view's reports list. 1.21.8: 2012-04-12 Murray Cumming Translations: Add Esperanto. * src/main/java/org/glom/web/OnlineGlom.gwt.xml * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_eo. properties: Add this translation because someone took the time to make it. 2012-03-15 Murray Cumming Adapt to the java-libglom 1.21.7 API. * src/main/java/org/glom/web/server/ReportGenerator.java: addToReport(): get_group_secondary_fields() is now get_secondary_fields(). 2012-03-15 Murray Cumming Use the latest java-libglom version. * pom.xml: Use java-libglom 1.21.7. 2012-03-03 Ben Konrath Display date and time in details view. https://bugzilla.gnome.org/show_bug.cgi?id=671257 * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: 2012-03-05 Murray Cumming Require the latest java-libglom. * pom.xml: java-libglom 1.21.5 has LayoutItem_GroupBy. 2012-03-04 Murray Cumming ListViewDbAccess.getSelectQuery(): Avoid using empty quickfind strings. * src/main/java/org/glom/web/server/database/ListViewDBAccess.java ListViewDBAccess.getSelectQuery(): Do not create a where clause for an empty quickfind string. I also corrected libglom to create only empty where clauses for empty quickfind strings, but this avoids the need for that fix. 2012-02-24 Ben Konrath Improve the tabs in the Notebook widget. Bug #670728 2012-01-30 Murray Cumming Translations: Try to translate the strings. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_de.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_zh_CN.properties: Take the Open translation from GTK+'s .po files. Take the Details translation from Glom's po files. I have added the other strings to Glom so we can get translations that way: http://git.gnome.org/browse/glom/commit/?id=c3cefe607428a84bdf8de1b04e8bef6f70b04564 2012-01-27 Murray Cumming TableSelectionViewImpl: Put the search label and entry in a div. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Put the search widgets in a FlowTable so that the CSS can be used to style them while keeping them together. * src/main/webapp/style.css: Mention the new div. 2012-01-27 Murray Cumming Translate more strings in more locales. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties: * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: Translate the "Details" and "Open" string too. * src/main/java/org/glom/web/OnlineGlom.gwt.xml: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_zh_CN.properties: Add these new locales as placeholders though they currently contain English. 2012-01-27 Murray Cumming OnlineGlomServiceImpl: Avoid (unlikely) null object dereferences. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: get*(): Check the ConfiguredDocument* for null before using it. 2012-01-26 Murray Cumming Tell Eclipse about the generated java files. * .classpath: This lets it find OnlineGlomConstants.java. It would be nice if Eclipse just used the maven build files. 2012-01-26 Murray Cumming Prevent a crash when no locale is specified in the URL. * src/main/java/org/glom/web/client/Utils.java: getCurrentLocaleID(): Avoid returning a null string, obtained from Window.Location.getParameter(). This caused a crash when it was later passed to libglom's API. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: init(), getDocumentInfo(), getListViewLayout(), getDocuments(), getDetailsLayoutAndData(): Use StringUtils.defaultString() to guard against future null strings. 2012-01-26 Murray Cumming Use the ?locale= query param instead of the &lang= token param. * src/main/java/org/glom/web/client/place/ListPlace.java * src/main/java/org/glom/web/client/place/DetailsPlace.java * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java Remove the lang token key and value. * src/main/java/org/glom/web/client/ui/TableSelectionView.java * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: When the user selects a different locale from the chooser, use Window.Location.assign() to change the URL, which then causes a reload. * src/main/java/org/glom/web/client/Utils.java: Added getCurrentLocaleID(). * src/main/java/org/glom/web/client/activity/DetailsActivity.java * src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java * src/main/java/org/glom/web/client/activity/ListActivity.java * src/main/java/org/glom/web/client/activity/TableSelectionActivity * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java: * src/main/java/org/glom/web/client/ui/ListView.java: * src/main/java/org/glom/web/client/ui/ListViewImpl.java: Remove localeID member variables and method/constructor parameters, instead using Utils.getCurrentLocaleID() when we need a localID to pass to OnlineGlomService. 2012-01-26 Murray Cumming Internationalize the UI strings. * pom.xml: gwt-maven-plugin: Add the i18n goal and specify a , removing the unused . * src/main/resources/org/glom/web/client/Messages.properties: Remove this because it is unused. Messages are apparently strings that can have parameters, but we do not need that yet, so Contants will be enough for now. * src/main/java/org/glom/web/OnlineGlom.gwt.xml: Add extend-property lines to say that we support the en and de locales. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties: The original English strings. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_de.properties: Some German translations of the English strings. The i18n goal then uses the .properties file to generate an OnlineGlomConstants.java file in target/ and somehow GWT.create() magically returns an implementation that returns the translated strings. The documentation suggests putting these in src/java/*/client/, but it seems best to put it in src/resources/*/client/. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Instantiate OnlineGlomConstants via GWT.create() and use it to get the strings instead of hard-coding them. Note that we cannot import OnlineGlomConstants because it does not exist yet, but that does not seem to stop the build, though it confuses Eclipse. You can see the translated string by adding ?locale=de to the URL, like so: http://127.0.0.1:8888/OnlineGlom.html?gwt.codesvr=127.0.0.1:9997?locale=de#list:document=film_manager 2012-01-24 Murray Cumming Improve null/empty String checks. * pom.xml: Add a dependency on commons-lang, to use org.apache.commons.lang.StringUtils. * src/main/java/org/glom/web/server/ConfiguredDocument.java * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: Use StringUtils.isEmpty(). * src/main/java/org/glom/web/client/StringUtils.java: Add a tiny StringUtils class with a static isEmpty() function because we cannot use org.apache.commons.lang.StringUtils in client-side GWT code because it (apparently) cannot be compiled to javascript. * src/main/java/org/glom/web/client/activity/DetailsActivity.java * src/main/java/org/glom/web/client/activity/ListActivity.java * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java * src/main/java/org/glom/web/client/place/DetailsPlace.java * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java * src/main/java/org/glom/web/client/place/ListPlace.java * src/main/java/org/glom/web/client/ui/cell/NumericCell.java * src/main/java/org/glom/web/client/ui/cell/TextCell.java * src/main/java/org/glom/web/client/ui/details/DetailsCell.java * src/main/java/org/glom/web/client/ui/details/Group.java * src/main/java/org/glom/web/client/ui/details/Notebook.java: Use our StringUtils.isEmpty() function. 2012-01-24 Murray Cumming Update to the latest java-libglom API. * pom.xml: Require java-libglom 1.21.4. * src/main/java/org/glom/web/server/ConfiguredDocument.java getDocumentInfo(), getListViewLayoutGroup(): * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java getDocuments(): * src/main/java/org/glom/web/server/database/DBAccess.java getFieldsToShowForSQLQueryAddGroup(), getPrimaryKeyLayoutItemField(): Replace get_database_title() with either get_database_title_original() or get_database_title(localeID). 2012-01-24 Murray Cumming ConfiguredDocument: Avoid a null pointer exception. * src/main/java/org/glom/web/server/ConfiguredDocument.java Initialize localeID to "" to avoid returning a null String which causes a crash in java-libglom's swing-generated code. 2012-01-23 Murray Cumming Some simple renaming. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java * src/main/webapp/style.css: Rename, tableChooser to tablesChooser. Likewise for localeChooser. This seems more appropriate and is less ambiguous particularly in the .css file. 2012-01-23 Murray Cumming ConfiguredDocument: Rename the localedID private member variable. 2012-01-23 Murray Cumming Adapt to the latest java-libglom API from git master. * src/main/java/org/glom/web/server/database/ListDBAccess.java: libglom now uses only Vector instead of List, which uses add() instead of addLast(). 2012-01-22 Murray Cumming ConfiguredDocument: Rename the localedID private member variable. 2012-01-20 Murray Cumming Build a source tarball with mvn assembly:single * assembly.xml: Add this file. * pom.xml: Use the maven-assembly-plugin and tell it to use our assembly.xml file. 2012-01-19 Murray Cumming OnlineGlomServiceImpl: Get .glom files recursively. * pom.xml: Depend on commons-io from org.apache.commons. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java init(): Use org.apache.commons.io.FileUtils.listFiles() to get the files recursively, and with the easier filter for the extension. Use org.apache.commons.io.FilenameUtils.removeExtension() to simplify that code too. 2012-01-19 Murray Cumming README: Mention that you must install java-libglom packages separately. But then it works, because java-libglom is now in the central maven repository. 2012-01-18 Murray Cumming locales drop-down: Show the correct selected locale when the URL changes. * src/main/java/org/glom/web/client/activity/TableSelectionActivity .java: setPlace(): Move some code into fillView(). 2012-01-18 Murray Cumming locales drop-down: Do not lose the primary key. * src/main/java/org/glom/web/client/activity/DetailsActivity.java start(): onLocaleChange(): Pass the current primary key value, instead of an empty value. 2012-01-18 Murray Cumming locales drop-down: Do not lose the drop-down selection. * src/main/java/org/glom/web/client/activity/TableSelectionActivity .java (TableSelectionActivity.fillView): Set the selected locale after changing the drop-down items (though we do not really need to change them just because the locale changes.) 2012-01-18 Murray Cumming locales drop-down: Change the tables list when this changes. * src/main/java/org/glom/web/client/activity/TableSelectionActivity .java: TableSelectionActivity.start(): Move the async table titles retrieval into a private fillView() method and also call this when the chosen locale changes. Note that the document title is not actually translatable yet, but that is a problem that I should fix soon in libglom. 2012-01-18 Murray Cumming Improve the placement of the locales drop-down. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java Put the title and locales drop-down in a div (gwt.FlowTable). * src/main/webapp/style.css: Add magic css properties to make this work. Also remove the left margin from the title so that it lines up with the headerbox below it. 2012-01-18 Murray Cumming locales selector: Show human-readable locale titles. * src/main/java/org/glom/web/server/ConfiguredDocument.java getDocumentInfo(): Use java.util.Locale to show a real title of each locale, in the locale's own language. 2012-01-17 Murray Cumming Add a language/locale selector drop-down. * src/main/java/org/glom/web/shared/DocumentInfo.java: Add getLocaleIDs(), setLocaleIDs(), getLocaleTitles(), setLocaleTitles(). * /src/main/java/org/glom/web/server/ConfiguredDocument.java: getDocumentInfo(): Store the available Locales in the DocumentInfo. * src/main/java/org/glom/web/client/ui/TableSelectionView.java: * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Add a ListBox to show the available locales. Add getLocaleSelector(), setLocaleList(), getSelectedLocale(), setSelectedLocale(). * src/main/java/org/glom/web/client/event/LocaleChangeEvent.java * src/main/java/org/glom/web/client/event/LocaleChangeEventHandler. java: Add these classes. * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java: start(): Fill the locales ListBox. Handle its change event, firing a LocaleChangeEvent. setPlace(): Show the selected locale as specified by the URL token. * src/main/java/org/glom/web/client/activity/DetailsActivity.java: * src/main/java/org/glom/web/client/activity/ListActivity.java: Handle LocaleChangeEvent, going to a new *Place with that locale. The placement of the ListBox is not pretty, and it currently uses the ID as a title, instead of "English", "Deutsch", "Espanola", etc, but it is a start. 2012-01-17 Murray Cumming Search box: Show the search text from the URL token. * src/main/java/org/glom/web/client/ui/TableSelectionView.java: * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Add setQuickFindText(). * src/main/java/org/glom/web/client/activity/TableSelectionActivity .java: setPlace(): Store the queryText if the place is a ListPlace, and call TableSelectionView.setQuickFindText(). 2012-01-17 Murray Cumming Allow use of translations via, for instance, &lang=de in the URL. * pom.xml: Use the unstable java-libglom 1.21 version. * src/main/java/org/glom/web/client/OnlineGlomService.java: * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: init(): Instead of calling TranslatableItem.set_current_locale() (now removed), call ConfiguredDocument.setDefaultLocaleID(). However, this is only for default locales, which are not needed to change the locale in the URL. getDocumentInfo(), getListViewLayout(), getSortedListViewData(), getDetailsData(), getDetailsLayoutAndData(), getRelatedListData(), getSortedRelatedListData(): Add a localeID parameter, so we can get the layout for a particular locale. * src/main/java/org/glom/web/server/ConfiguredDocument.java: Add get/setDefaultLocaleID(). getDocumentInfo(), getListViewData(), getRelatedListData(), getDetailsLayoutGroup(), getListViewLayoutGroup(), createLayoutItemPortalDTO(), convertToGWTGlomLayoutItemField(): Add a localeID parameter, so we can get the layout for a particular locale. * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java: * src/main/java/org/glom/web/client/place/DetailsPlace.java: * src/main/java/org/glom/web/client/place/ListPlace.java: Parse and construct a lang parameter too. * src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java: start(): Pass the defaultLocaleID to addDocumentLink(). It is then passed to subsequent methods and constructors. * src/main/java/org/glom/web/client/activity/DetailsActivity.java: * src/main/java/org/glom/web/client/activity/ListActivity.java: Store the localeID from the *Place and pass it to other constructors and methods, such as OnlineGlomServiceAsync.getDetailsLayoutAndData(). * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java: * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java: * src/main/java/org/glom/web/client/ui/TableSelectionView.java * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java * src/main/java/org/glom/web/client/ui/ListView.java: * src/main/java/org/glom/web/client/ui/ListViewImpl.java: Take localeID parameters and pass them to subsequent constructors and methods, so that the layout is always retrieved for that locale. This is rather repetitive. Note that "" means the original (default) locale of the Glom document, which is usually English. 2012-01-17 Murray Cumming Documents: Remove final keyword to fix startup configuration. * src/main/java/org/glom/web/shared/Documents.java: Remove the final keywords on the private member variables because that breaks the startup, apparently (there are warnings) because it stops them from being serialized. I added these in the previous commit. 2012-01-13 Murray Cumming Documents: Add some final keywords. * src/main/java/org/glom/web/shared/Documents.java: Eclipse suggested this. 2012-01-13 Murray Cumming OnlineGlomServiceImpl: Add to overview comments. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Note that this is where all the document are loaded. They are not loaded freshly for each page. 2012-01-12 Murray Cumming Add a search box. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Add a TextBox for the text of a quick find. Add getQuickFindBox(), to get the widget, and getQuickFindText() to get the text. setBackLink(): Add a String quickFind parameter. * src/main/java/org/glom/web/client/ui/TableSelectionView.java (TableSelectionView): Add getQuickFindBox() and getQuickFindText() to the base interface, because that is how TableSelectionViewImpl is used. * src/main/webapp/style.css: Add style for the search box and its label. * src/main/java/org/glom/web/client/event/QuickFindChangeEvent.java: * src/main/java/org/glom/web/client/event/QuickFindChangeEventHandler.java: Add these files, based on the existing TableChangeEvent and TableChangeEventHandlers. * src/main/java/org/glom/web/client/activity/DetailsActivity.java start(): Handle QuickFindChangeEvent, passing its quickFind text to a ListPlace() that the user should be taken to. * src/main/java/org/glom/web/client/activity/ListActivity.java start(): Handle it here too and adapt the TableChangeEvent handler to pass the extra "" quickFind parameter to ListPlace. * src/main/java/org/glom/web/client/place/ListPlace.java: Constructor: Take an extra String quickFind parameter and store it, returning it from a new getQuickFind() method. getToken(): Put the quickFind text in the URL token. getPlace(): Parse the quickFind text from the URL token. * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.ja va: addDocumentLink(): Pass an extra "" quickFind parameter to the ListPlace constructor. * src/main/java/org/glom/web/client/activity/TableSelectionActivity .java: start(): Add a Change handler for the TableSelectionView's TextBox (via its base HasChangeHandlers interface), firing the new QuickFindChangeEvent. setPlace(): Adapt the call to TableSelectionView.setbackLink(), to pass the extra "" quickFind parameter. * src/main/java/org/glom/web/client/ui/ListViewImpl.java: setCellTable(): Add a String quickFind parameter and pass it to the ListViewTable() constructor. * src/main/java/org/glom/web/client/ui/ListView.java: Change setCellTable() in the base interface, because that is how ListViewImpl is used. * src/main/java/org/glom/web/client/ui/list/ListTable.java: Add a String quickFind member variable. * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: Constructor: Add a String quickFind parameter, storing it in the base ListTable's member variable. onRangeChanged(): Pass quickFind to the OnlineGlomServiceAsync.getSortedListViewData() and OnlineGlomServiceAsync.getListViewData() methods. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: getListViewData(), getSortedListViewData(): Add a String quickFind parameter, passing it to ConfiguredDocument.getListViewData(). * src/main/java/org/glom/web/client/OnlineGlomService.java: Change getListViewData(), getSortedListViewData() in the base interface, because that is how OnlineGlomServiceImpl is used, via this: * src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Change getListViewData(), getSortedListViewData() here too. This class can apparently be used to asynchronously call methods on OnlineGlomService, and GWT seems to implement that after recognizing just the *Async name convention and the extra AsyncCallback parameters. * src/main/java/org/glom/web/server/ConfiguredDocument.java getListViewData(): Add a String quickFind parameter, and pass it to ListViewDBAccess.getData(). * src/main/java/org/glom/web/server/database/ListDBAccess.java getListData(): Add a String quickFind parameter and pass it to getSelectQuery(). getSelectQuery(): Add a String quickFind parameter. * src/main/java/org/glom/web/server/database/ListViewDBAccess.java getSelectQuery(): Add a String quickFind parameter and use it with Glom.get_find_where_clause_quick() to pass a where_clause to Glom.build_sql_select_with_where_clause(), to actually filter the list view results. getData(): Add a String quickFind parameter, passing it to getListData(). * src/main/java/org/glom/web/server/database/RelatedListDBAccess.ja va: getData(): Pass an empty string to getListData() for the quickFind parameter. 2012-01-12 Murray Cumming ListTable: Minor change. * src/main/java/org/glom/web/client/ui/list/ListTable.java createCellTable(): Make this protected instead of public. 2012-01-12 Murray Cumming Many files: Use final for the parameters and use the @override attribute. 2012-01-22 Ben Konrath Add anchor links for single line text that starts with http, ftp and www. Bug #667269 2012-01-22 Ben Konrath Add ellipsis to single line text in details view. Bug #667269 2012-01-04 Murray Cumming Remove all javadoc author tags. Because they are awkward and meaningless when many people touch many files. See https://gitorious.org/online-glom/gwt-glom/commit/7628b732cb90cbc6d5635420a75568504e8b3655#comment_81164 2012-01-04 Murray Cumming Revert the COPYING.LESSER to COPYING rename. Apparently both should be there if it is LGPL. 2012-01-03 Murray Cumming *View: Remove unused imports. * src/main/java/org/glom/web/client/ui/DetailsView.java: * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java * src/main/java/org/glom/web/client/ui/ListView.java: * src/main/java/org/glom/web/client/ui/TableSelectionView.java: Remove unused imports, as suggested by Eclipse. 2012-01-02 Murray Cumming Move the *View::Presenter types, and some API into one base View. * src/main/java/org/glom/web/client/ui/DetailsView.java: * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java: * src/main/java/org/glom/web/client/ui/ListView.java: * src/main/java/org/glom/web/client/ui/TableSelectionView.java: Move Presenter, setPresenter() and clear() into a shared base interface, to avoid the unnecessary duplicate Presenter types and to more clearly show how the *Views share the same structure, even if they are not used polymorphically. * src/main/java/org/glom/web/client/ui/DetailsViewImpl.java: * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.ja va: * src/main/java/org/glom/web/client/activity/DetailsActivity.java: * src/main/java/org/glom/web/client/activity/ListActivity.java: * src/main/java/org/glom/web/client/activity/DocumentSelectionActiv ity.java: * src/main/java/org/glom/web/client/activity/TableSelectionActivity .java: Adapt. Feel free to revert this if there is a good reason for the duplicate types. 2012-01-02 Murray Cumming OnlineGlom: Make clientFactory a (protected) member, and test it a bit. * src/main/java/org/glom/web/client/OnlineGlom.java: Make clientFactory a class member instead of a local variable in the method. This lets us use it to get the view instances, for use in tests. * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java: beforeOnlineGlom(): Test some more details of the initial view. Again, this is not very useful. To really test gwt-glom we will need to start a local postgresql instance with local data, like the Glom tests in C++. 2012-01-02 Murray Cumming pom.xml: Mention the LGPL license. * pom.xml: Add a licenses section. * COPYING.LESSER: Move this to COPYING, which previously contained the GPL. But gwt-glom is all LGPL. 2012-01-02 Murray Cumming Add project information to README and pom.xml. * README: Add a brief description and mention some mvn commands. * pom.xml: This extra information shows up in mvn site generated pages. 2011-01-02 Murray Cumming Use the latest java-libglom version. * pom.xml: Use java-libglom 1.19.2 instead of 1.19.1. 2012-01-01 Murray Cumming GwtTestOnlineGlom: Test a little more. * src/main/java/org/glom/web/client/OnlineGlom.java: Make the panels protected rather than private, as suggested by the gwt-test-utils maintianer here: http://stackoverflow.com/questions/7931724/gwt-testcase-simulating-clicking-a-button-on-my-page * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java Test the initial visibility of the panels. However, this is not a very useful test. And I wonder how we should generally test using this idea for an activity/places app like ours where the real changes happen implicitly based on the history token/URL. 2012-01-01 Murray Cumming Slight modification to *Mapper comments. * src/main/java/org/glom/web/client/mvp/DataActivityMapper.java (DataActivityMapper) * src/main/java/org/glom/web/client/mvp/DocumentSelectionActivityMa pper.java * src/main/java/org/glom/web/client/mvp/TableSelectionActivityMappe r.java Remove comments mentioning GIN because they are just copied from the example code and are apparently not helpful: http://groups.google.com/group/google-web-toolkit/msg/82f0098b20669a73 Also change the mention of a class that is only in the example code. 2012-01-01 Murray Cumming GwtTestOnlineGlom test: Minor changes. * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java: Avoid the long qualified class name and modify the comment because it is now obvious to me that the mocked class is the only custom one created via GWT.create(). 2012-01-01 Murray Cumming Tests: Added the beginnings of a test using gwt-test-utils. * pom.xml: Add dependencies on gwt-test-utils and easymock. * src/test/resources/META-INF/gwt-test-utils.properties: Add this file which tells gwt-test-utils what class will be tested. * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java: Add a simple (but empty) test case. One class, used by the OnlineGlom class, is mocked so that it can be created. However, I am not sure why only this class needs to be mocked. Note that mockito seems more popular, and clearer, than easymock, but I have not got that working yet. It might be a matter of the mockito version. This test is run during mvn integration-test. 2011-12-31 Murray Cumming Tests: Use junit4-style syntax instead of junit3-style. * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java: * src/test/java/org/glom/web/client/place/ListPlaceTest.java: * src/test/java/org/glom/web/shared/DataItemTest.java: Use the @Test annotation rather than relying on the test*() prefix. Also no longer implement TestCase, to avoid triggering support for the junit3-way, which stops the annotations from working. Change the imports from import junit.framework.* to import org.junit.*, which is apparently the new way. 2011-12-31 Murray Cumming Added a test for ListPlace token parsing and creation. * src/test/java/org/glom/web/client/place/ListPlaceTest.java: This is much the same as DetailsPlaceTest. I wonder how we could test the other parts of the *Place API. 2011-12-30 Murray Cumming DetailsPlace test: Also test getToken() and recreation via getPlace(). * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java: testGetPlaceParameters(): Get the tokens from the DetailsPlace and recreate it, testing the recreated DetailsPlace for the same parameter values. 2011-12-30 Murray Cumming Use the surefire-report plugin. * pom.xml: This generates a HTML report about the tests in target/site/surefire-report.html when you do mvn surefire-report:report. It seems to be popular/normal. 2011-12-30 Murray Cumming Added a test for DetailsPlace. * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java: Test the getPlace() token parsing. 2011-12-30 Murray Cumming Added a first unit test. * pom.xml: Add a test goal, and a dependency on junit in that scope. * src/test/java/org/glom/web/shared/DataItemTest.java: This is a silly test but it is just to get things started. Note that maven/junit finds the test because it looks in src/test by default. 2011-12-22 Ben Konrath Change charsetName to "UTF-8" when replacing line breaks. JavaScript requires the charsetName to be "UTF-8". CharsetName values that work in Java (such as "UTF8") will not work when compiled to JavaScript. This fixes a problem with multi-line details view fields that have hard line breaks. The "License Text" field on this page demonstrates the problem: http://onlineglom.openismus.com/OnlineGlom/#details:document=debian_repository_analyzer&table=licenses&value=197 * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: 2011-12-22 Ben Konrath Fix another bug with related list navigation. I've tested all the navigation buttons in all of the related lists so things should be good now. * src/main/java/org/glom/web/server/ConfiguredDocument.java: 2011-12-22 Ben Konrath Fix a crasher when refreshing the list view with the default table. This crash will also happen when loading the list view with the default table from a link or bookmark. * src/main/java/org/glom/web/client/activity/DetailsActivity.java: Go to the main document selection page when the document id hasn't been set. * src/main/java/org/glom/web/client/activity/ListActivity.java: Go to the main document selection page when the document id hasn't been set. * src/main/java/org/glom/web/client/place/DetailsPlace.java: Use empty values for the details place when the document id hasn't been set. * src/main/java/org/glom/web/client/place/ListPlace.java: Use empty values for the list place when the document id hasn't been set. 2011-12-21 Ben Konrath Protect against NPE when glom.document.locale is not in config. This patch protects against an NPE when glom.document.locale is not in the config file. This NPE will also happen if glom.document.locale is commented out. The patch also updates the error message to display the class name when the getMessage() returns null. This was happening when the NPE was thrown and I had "Configuration Error: null". If an NPE is encountered with this patch, "Configuration Error: NullPointerException " will be displayed. This commit closes this bug: https://bugzilla.gnome.org/show_bug.cgi?id=666669 * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: 2011-12-20 Murray Cumming Rename onlineglom.properties to onlineglom.properties.sample. * src/main/resources/onlineglom.properties: Rename to: * src/main/resources/onlineglom.properties.sample: * src/main/resources/README: And add this file explaining that people should rename it back when deploying. 2011-12-20 Murray Cumming Allow choosing the translation in the .properties file. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java init(): Read a glom.document.locale value from the configuration file and call Glom's TransatableItem::set_current_locale() method. * src/main/resources/onlineglom.properties: Add a commented-out example of this new setting. It would be better to add &lang=de_DE to the URL, but the current libglom API does not allow us to do this easily. I am working on that. 2011-12-19 Murray Cumming Avoid a crash in parsing of token parameters. * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.j ava: getTokenParams(): Do not crash if a parameter has a key but no value, and ignore parameters with neither. 2011-12-17 Murray Cumming History token building/handling: Improve use of token parameters. * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java (HasSelectableTablePlace.Tokenizer): Add getTokenParams(String) and buildParamsToken(HashMap), for use by derived classes. Make the separator private because it is no longer be needed. * src/main/java/org/glom/web/client/place/DetailsPlace.java (DetailsPlace.Tokenizer.getToken): Use buildParamsToken() instead of manual string concatenation. (DetailsPlace.Tokenizer.getPlace): Use getTokenParams() instead of hardcoded indices and awkward splitting code. * src/main/java/org/glom/web/client/place/ListPlace.java (ListPlace.Tokenizer.getToken): Use buildParamsToken() instead of manual string concatenation. (ListPlace.Tokenizer.getPlace): Use getTokenParams() instead of hardcoded indices and awkward splitting code. This should fix bug #666420 2011-12-16 Murray Cumming Fix a Navgiation->Navigation typo in the code. * src/main/java/org/glom/web/client/activity/DetailsActivity.java Rename processNavgiation() to processNavigation(). 2011-12-16 Murray Cumming Fix a seperator->separator typo in the code. * src/main/java/org/glom/web/client/place/DetailsPlace.java * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java * src/main/java/org/glom/web/client/place/ListPlace.java: Just a misspelling. 2011-12-15 Ben Konrath Cleanup some comments. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: 2011-12-14 Ben Konrath Replace \n with
for multiline text in the details view. Vertical scrollbars are added when needed as well. * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: 2011-12-14 Ben Konrath Specify the font for document selection links. * src/main/webapp/style.css: 2011-12-14 Ben Konrath Fix bouncy CellTable while paging. This doesn't currently work with related list tables in unselected Notebook tabs. * src/main/java/org/glom/web/client/ui/list/ListTable.java 2011-12-14 Ben Konrath Revamp the appearance of the document selection page. * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java: * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.ui.xml: * src/main/webapp/style.css: 2011-12-13 Ben Konrath Set navigation button column to the smallest size possible. * src/main/java/org/glom/web/client/ui/list/ListTable.java: 2011-12-13 Ben Konrath Change OpenButton nomenclature to NavigationButton. Using NavigtionButton makes things more generic. Classes, methods and variables have been changed. This is a rename-only refactor. * src/main/java/org/glom/web/client/activity/DetailsActivity.java: * src/main/java/org/glom/web/client/ui/ListViewImpl.java: * src/main/java/org/glom/web/client/ui/cell/NavigationButtonCell.java: Renamed from OpenButtonCell. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: * src/main/java/org/glom/web/client/ui/list/ListTable.java: * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: 2011-12-12 Ben Konrath Remove unnecessary String argument in RelatedListTable and ListViewTable. * src/main/java/org/glom/web/client/activity/DetailsActivity.java: * src/main/java/org/glom/web/client/ui/ListViewImpl.java: * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: 2011-12-12 Ben Konrath Update variable names and comments. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: 2011-12-12 Ben Konrath Properly initialize numNonEmptyRows variable to zero. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: 2011-12-05 Ben Konrath Add latest mockup with HTML tables. Features of this mockup: -> HTML table for flowtable -> HTML table for flowtable column -> Example of how related lists would look -> Not using text entries for data items The current version of Online Glom doesn't use HTML tables for the flowtable columns. This mockup has been sent to the glom-devel mailing list but it's good to have it here as well. * mockups/details-view-html-tables.html: 2011-12-05 Ben Konrath Remove unnecessary getPrimaryKeyField() method. getPrimaryKeyFieldForTable(String) has been renamed to getPrimaryKeyField(String). * src/main/java/org/glom/web/server/database/DBAccess.java: * src/main/java/org/glom/web/server/database/DetailsDBAccess.java: * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: 2011-12-05 Ben Konrath Add string representation of TypedDataItem value to conversion error message. * src/main/java/org/glom/web/server/Utils.java: Logging the error message was extracted into its own method to avoid duplication. 2011-12-05 Ben Konrath Add type checking to navigation primary key value creation. Create navigation primary key only if the expected type from the Glom document matches the type returned by the SQL query. * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: 2011-12-05 Ben Konrath Rename a couple of variables in RelatedListNavigation. This is a rename-only refactor. * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: 2011-12-05 Ben Konrath Move getListLayoutGroup() into getListViewLayoutGroup(). This removes getListLayoutGroup(). It was only being called by getListViewLayoutGroup(). * src/main/java/org/glom/web/server/ConfiguredDocument.java: 2011-12-05 Ben Konrath Remove check for LayoutItem_Portal in list table method. This check is no longer necessary because the method isn't being used to create the LayoutItemPortal DTO. * src/main/java/org/glom/web/server/ConfiguredDocument.java: 2011-12-05 Ben Konrath Properly support related list navigation. Navigation from the "Repository Analyzer -> Package Scans -> Dependencies" related table wasn't working because the primary key for related tables wasn't being set properly. This commit fixes the problem. * src/main/java/org/glom/web/server/ConfiguredDocument.java: Don't use getListLayoutGroup() to create the LayoutItemPortal DTO. This method doesn't set the primary key properly for related list tables. * src/main/java/org/glom/web/server/database/DBAccess.java: Add table name parameter to getPrimaryKeyLayoutItemField(). This makes the method useful for getting the primary key for list view tables and for related list tables. * src/main/java/org/glom/web/server/database/ListDBAccess.java: * src/main/java/org/glom/web/server/database/ListViewDBAccess.java: Move code to set the primary key for the table from the abstract ListDBAccess class to ListViewDBAccess as it's only correct for list view tables. * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: Properly add primary key to related list tables. 2011-12-02 Ben Konrath Properly set the horizontal alignment of fields. This fix is for both the list tables and the details view. * src/main/java/org/glom/web/server/ConfiguredDocument.java: Use LayoutItem_WithFormatting.get_formatting_used_horizontal_alignment(boolean) to set the horizontal alignment of fields. 2011-12-02 Ben Konrath Display currency codes in the details view. * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: 2011-12-02 Ben Konrath Avoid duplicate JNI call. JNI is not as efficient as pure Java and this is an easy (and small) optimization. * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: Use previously retrieved value for whereClauseToTableName instead of getting it again. 2011-12-02 Ben Konrath Rename a couple of variables in RelatedListNavigation. This is a rename-only refactor. * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: 2011-12-02 Ben Konrath Indicate clearly that a mismatched primary key type is a bug. * src/main/java/org/glom/web/server/Utils.java: Change log level from warning to error. Add 'This is a bug.' to message. 2011-12-02 Ben Konrath Update / fix some comments. * src/main/java/org/glom/web/client/OnlineGlomService.java: Remove old comments. * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: Fix comment. * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java: Fix comments. Add some TODOs. 2011-12-02 Ben Konrath Enable navigation to details view with string primary key from related list. * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: Create a text primary key value when return type of result is java.sql.Types.VARCHAR. 2011-12-02 Ben Konrath Use checkboxes for booleans in the details view. * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: 2011-12-01 Ben Konrath Improve performance of related list height calculation. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: Put code to calculate the expected height in a static initializer so that that it's only called once. 2011-12-01 Ben Konrath Show related list tables in notebooks (again). Calculate the height of the related list tables so the Notebook can be set the correct height. The height of the related list table is also needed by FlowTable to be able decide how to create the layout. * src/main/java/org/glom/web/client/ui/details/Portal.java: Calculate and set the Portal height based on the height of the related list table and the Portal container. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: Add method to calculate the height of the related list tables. * src/main/java/org/glom/web/client/ui/list/ListTable.java: * src/main/webapp/style.css: Add css class for Pager. This is needed to calculate the height of the Pager widget. 2011-12-01 Ben Konrath Use CellTable API for table property instead of setting style on Element. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: 2011-12-01 Ben Konrath Make ListViewTable and RelatedListTable a consistent height. The tables are now a consistent height regardless of the contents of the table. A hidden button is added to empty rows to ensure that the height of these rows will match the height of rows with data. A navigation button column is now added to every table. The width of the navigation column is set to 0px when a RelatedListTable shouldn't have navigation buttons. This maintains the a consistent row height in tables that don't show the navigation buttons. * src/main/java/org/glom/web/client/activity/DetailsActivity.java: Hide navigation column when not needed. * src/main/java/org/glom/web/client/ui/ListViewImpl.java: Move method arguments for navigation button to constructor of ListViewTable. * src/main/java/org/glom/web/client/ui/cell/OpenButtonCell.java: Render hidden button for empty data rows. * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: Add method arguments for navigation button to constructor. * src/main/java/org/glom/web/client/ui/list/ListTable.java: Always create navigation buttons. Add hideNavigationButtons() method. * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: Add method arguments for navigation button to constructor. 2011-12-01 Ben Konrath Use 'visibility: hidden' in Utils.getWidgetHeight(). This is better choice because hidden elements are invisible, don't respond to events and are not part of the tab order. They will, however,