11 years agoSqlUtils: Use camelCase. nonative
Murray Cumming [Tue, 15 May 2012 08:22:37 +0000 (10:22 +0200)]
SqlUtils: Use camelCase.

* src/main/java/org/glom/web/server/ Use camelCase.
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/ Adapt.

11 years agoUse jOOQ's tableByName() and fieldByName.
Murray Cumming [Tue, 15 May 2012 08:11:17 +0000 (10:11 +0200)]
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/
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.

11 years agoSqlUtils: Remove the Connection parameters.
Murray Cumming [Tue, 15 May 2012 07:27:08 +0000 (09:27 +0200)]
SqlUtils: Remove the Connection parameters.

* src/main/java/org/glom/web/server/
build_sql_select_with_key(), build_sql_select_with_where_clause(),
createSelect(), build_sql_select_step_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:!topic/jooq-user/tIwobFOR2iM

* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
Constructor, getListData(), getResultSizeOfSQLQuery():
* src/main/java/org/glom/web/server/database/
getSelectQuery(), getCountQuery():
* src/main/java/org/glom/web/server/database/
getSelectQuery(), getCountQuery():
* src/main/java/org/glom/web/server/database/
getNavigationRecord(): Adapted.

11 years agoFix quick find.
Murray Cumming [Mon, 14 May 2012 07:32:26 +0000 (09:32 +0200)]
Fix quick find.

* src/main/java/org/glom/web/server/
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.

11 years agoTableToViewDetails: Use a real serialization ID.
Murray Cumming [Mon, 14 May 2012 07:05:01 +0000 (09:05 +0200)]
TableToViewDetails: Use a real serialization ID.

* src/main/java/org/glom/web/shared/libglom/layout/
Though this does not fix the serialization problem.

11 years agoAdded LayoutItemPortalDeepCloneTest
Murray Cumming [Sat, 12 May 2012 19:24:26 +0000 (21:24 +0200)]
Added LayoutItemPortalDeepCloneTest

11 years agoAdded missing file.
Murray Cumming [Fri, 11 May 2012 15:14:10 +0000 (17:14 +0200)]
Added missing file.

11 years agoReplace all appearances of Colour with color.
Murray Cumming [Wed, 9 May 2012 07:34:43 +0000 (09:34 +0200)]
Replace all appearances of Colour with color.

Because US English is dominant.

11 years agoUse colors in HTML format, solving a warning about an unused function.
Murray Cumming [Wed, 9 May 2012 07:32:48 +0000 (09:32 +0200)]
Use colors in HTML format, solving a warning about an unused function.

* src/main/java/org/glom/web/shared/libglom/
* src/main/java/org/glom/web/shared/libglom/layout/
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/
* src/main/java/org/glom/web/client/ui/list/
* src/main/java/org/glom/web/server/
* src/test/java/org/glom/web/server/libglom/
Use the asHTMLcolor() versions.

11 years agoListViewTable: Constructor: Take the table name as a parameter.
Murray Cumming [Wed, 9 May 2012 07:14:52 +0000 (09:14 +0200)]
ListViewTable: Constructor: Take the table name as a parameter.

* src/main/java/org/glom/web/client/ui/list/
Constructor: Take the tableName, and set the member variable, because
we use it here.
* src/main/java/org/glom/web/client/ui/
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.

11 years agoMake navigation work again.
Murray Cumming [Fri, 11 May 2012 11:56:30 +0000 (13:56 +0200)]
Make navigation work again.

* src/main/java/org/glom/web/server/libglom/
Add getLayoutItemFieldShouldHaveNavigation().
* src/main/java/org/glom/web/shared/libglom/layout/
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/
Add updateFieldsExtras() and call setNavigationTableName in it.
* src/main/java/org/glom/web/client/activity/
createLayout(): Adapted.
* src/main/java/org/glom/web/client/ui/details/
Constructor: Adapted.

* src/main/java/org/glom/web/shared/libglom/layout/
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/
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/
testGetSuitableTableToViewDetails(): Adapted.

TODO: Find out why deepClone() is not quite working.

11 years agoDBAccess: Simplify the retrievel of full field details.
Murray Cumming [Fri, 11 May 2012 11:52:11 +0000 (13:52 +0200)]
DBAccess: Simplify the retrievel of full field details.

* src/main/java/org/glom/web/server/database/
getFieldsToShowForSQLQueryAddGroup(). This might be unnecessary anyway,
because the Document loading should have done this.

11 years agoSome unimportant code formatting/comments/logging.
Murray Cumming [Fri, 11 May 2012 11:36:44 +0000 (13:36 +0200)]
Some unimportant code formatting/comments/logging.

11 years agoDocument: Correct loading of doubly-related layout fields.
Murray Cumming [Fri, 11 May 2012 11:34:16 +0000 (13:34 +0200)]
Document: Correct loading of doubly-related layout fields.

* src/main/java/org/glom/web/server/libglom/
loadUsesRelationship(): Actually set the related relationship, instead
of only setting it if it's not found.

11 years agoConfiguredDocument: Restore correct addition of hidden primary key items.
Murray Cumming [Mon, 7 May 2012 21:27:38 +0000 (23:27 +0200)]
ConfiguredDocument: Restore correct addition of hidden primary key items.

* src/main/java/org/glom/web/client/ui/list/
(ListTable.createCellTable): Uncomment out the check for the hidden
primary key.
* src/main/java/org/glom/web/server/ 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/
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.

11 years agoFix Formatting loading.
Murray Cumming [Mon, 7 May 2012 18:38:12 +0000 (20:38 +0200)]
Fix Formatting loading.

* src/main/java/org/glom/web/shared/libglom/layout/
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/
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.

11 years agoRelatedListTable: Make sure that the tableName is set.
Murray Cumming [Mon, 7 May 2012 10:17:22 +0000 (12:17 +0200)]
RelatedListTable: Make sure that the tableName is set.

* src/main/java/org/glom/web/client/ui/details/
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/
setData(): Pass the tableName to the RelatedListTable constructor.

11 years agoFix portal navigation via the Details button.
Murray Cumming [Mon, 7 May 2012 10:08:18 +0000 (12:08 +0200)]
Fix portal navigation via the Details button.

* src/main/java/org/glom/web/server/
Add some checks for empty relationship names, and comments that an empty
table name is OK, because it is later interpreted as the default table.
* src/main/java/org/glom/web/server/database/
getNavigationRecord(): Uncomment and correct the code that decides what
table to navigate to.

11 years agoAdd some checks.
Murray Cumming [Mon, 7 May 2012 09:28:07 +0000 (11:28 +0200)]
Add some checks.

* src/main/java/org/glom/web/client/activity/
RelatedListNavigationButtonCell.onEnterKeyDown(), setData():
* src/main/java/org/glom/web/client/ui/details/
* src/main/java/org/glom/web/client/ui/list/
* src/main/java/org/glom/web/server/database/
convertResultSetToDTO(), getPortal():
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
Add checks for null objects and out of range access, with log messages to
give hints so we can fix these properly.

11 years agoPortals: some corrections.
Murray Cumming [Mon, 7 May 2012 09:25:04 +0000 (11:25 +0200)]
Portals: some corrections.

* src/main/java/org/glom/web/client/activity/
* src/main/java/org/glom/web/client/ui/details/
constructor: Use getRelationshipNameUsed() instead of getName(), because
that is what is meant.
* src/main/java/org/glom/web/shared/libglom/layout/
getFromField(): Fix a typo, to get the field name, not the table name.
* src/main/java/org/glom/web/server/database/
getPortal(): Fix a typo that stopped this from working.

11 years agoLayoutItemPortal: Also override getTitleOriginal().
Murray Cumming [Mon, 7 May 2012 07:27:27 +0000 (09:27 +0200)]
LayoutItemPortal: Also override getTitleOriginal().

* src/main/java/org/glom/web/shared/libglom/layout/
This lets the base getTitle() with no parameters work.
TODO: Test this properly.

11 years agoLayoutItemPortal: getTitle*(): Use the relationship title.
Murray Cumming [Sun, 6 May 2012 21:13:41 +0000 (23:13 +0200)]
LayoutItemPortal: getTitle*(): Use the relationship title.

11 years agoLayoutItemField: Fix loading of custom titles.
Murray Cumming [Sun, 6 May 2012 21:01:03 +0000 (23:01 +0200)]
LayoutItemField: Fix loading of custom titles.

* src/main/java/org/glom/web/server/libglom/
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/ Add this
* 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/

11 years agoLayoutItemField: Fall back to field titles, so some are really shown.
Murray Cumming [Sun, 6 May 2012 20:15:56 +0000 (22:15 +0200)]
LayoutItemField: Fall back to field titles, so some are really shown.

* src/main/java/org/glom/web/shared/libglom/layout/
Override getTitleOriginal() and getTitle(), as in java-libglom.
* src/test/java/org/glom/web/server/libglom/
Test this behaviour.

11 years agoCorrect use of setExpectedResultSize().
Murray Cumming [Sun, 6 May 2012 19:48:55 +0000 (21:48 +0200)]
Correct use of setExpectedResultSize().

* src/main/java/org/glom/web/server/
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.

11 years agoDocument: Interpret no group column count as 1.
Murray Cumming [Sun, 6 May 2012 15:05:35 +0000 (17:05 +0200)]
Document: Interpret no group column count as 1.

* src/main/java/org/glom/web/server/libglom/ Use a sane
default, though we now check for this in the UI code anyway.

11 years agoMore null checks.
Murray Cumming [Sun, 6 May 2012 15:00:50 +0000 (17:00 +0200)]
More null checks.

11 years agoTranslatable: Use Hashmap instead of Treemap because GWT supports it.
Murray Cumming [Sun, 6 May 2012 14:18:36 +0000 (16:18 +0200)]
Translatable: Use Hashmap instead of Treemap because GWT supports it.

* src/main/java/org/glom/web/shared/libglom/
The use of Treemap lead to this error from async methods, with no
further clue:
"The response could not be deserialized"

11 years agoOnlineGlom.gwt.xml: Add exludes to fix explicit gwt compilation in Eclipse.
Murray Cumming [Sun, 6 May 2012 14:11:41 +0000 (16:11 +0200)]
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.

11 years agoListTable.addColumn(): Protect against a null Formatting.
Murray Cumming [Sun, 6 May 2012 13:51:27 +0000 (15:51 +0200)]
ListTable.addColumn(): Protect against a null Formatting.

* src/main/java/org/glom/web/client/ui/list/ addColumn():
Create a default Formatting if it is null, because that is the simplest
way to do this.

11 years agoConfiguredDocument.updateLayoutGroup(): Protect against a null dereference.
Murray Cumming [Sun, 6 May 2012 13:36:31 +0000 (15:36 +0200)]
ConfiguredDocument.updateLayoutGroup(): Protect against a null dereference.

* src/main/java/org/glom/web/server/
updateLayoutGroup(): Check that the field is not null.

11 years agoListViewImpl: Protected against a bad cast error.
Murray Cumming [Sun, 6 May 2012 13:28:32 +0000 (15:28 +0200)]
ListViewImpl: Protected against a bad cast error.

* src/main/java/org/glom/web/client/ui/
onEnterKeyDown(): Do not cast without an instanceof check.

11 years agoListTable: Protect against an out of range error.
Murray Cumming [Sun, 6 May 2012 13:23:54 +0000 (15:23 +0200)]
ListTable: Protect against an out of range error.

* src/main/java/org/glom/web/client/ui/list/
createCellTable(): This is unlikely, but can happen while debugging.

11 years agoAsyncMessage onFailure() callbacks: Log the exception message.
Murray Cumming [Sun, 6 May 2012 10:59:01 +0000 (12:59 +0200)]
AsyncMessage onFailure() callbacks: Log the exception message.

* src/main/java/org/glom/web/client/activity/
* src/main/java/org/glom/web/client/activity/
* src/main/java/org/glom/web/client/activity/
* src/main/java/org/glom/web/client/activity/
* src/main/java/org/glom/web/client/activity/TableSelectionActivity:
* src/main/java/org/glom/web/client/ui/details/
* src/main/java/org/glom/web/client/ui/list/
These are useful clues when something is wrong.

11 years agoConfiguredDocument: Avoid a null dereference.
Murray Cumming [Sun, 6 May 2012 10:45:01 +0000 (12:45 +0200)]
ConfiguredDocument: Avoid a null dereference.

* src/main/java/org/glom/web/server/
TableLayoutsForLocale.getMapWithAdd(): Make sure that the list and
details maps are created.

11 years agoDocument: Correct the port number parsing.
Murray Cumming [Sun, 6 May 2012 10:25:01 +0000 (12:25 +0200)]
Document: Correct the port number parsing.

* src/main/java/org/glom/web/server/libglom/
This lets us actually connect to the database and show the document.

11 years agoAdded a TODO
Murray Cumming [Sun, 6 May 2012 10:18:30 +0000 (12:18 +0200)]
Added a TODO

11 years agoFix mvn gwt:test
Murray Cumming [Sat, 5 May 2012 21:40:33 +0000 (23:40 +0200)]
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/
Show the exception, if any. This is how I saw the 404 in the HTML in
the exception.

11 years agoDocumentTest: Move the .glom files into the resources directory.
Murray Cumming [Sat, 5 May 2012 20:32:05 +0000 (22:32 +0200)]
DocumentTest: Move the .glom files into the resources directory.

* src/test/java/org/glom/web/server/libglom/DocumentTest: And get the
URI via getResource().

11 years agoRemove an unused variable
Murray Cumming [Sat, 5 May 2012 19:56:57 +0000 (21:56 +0200)]
Remove an unused variable

11 years agoDocument: Remove the FieldIdentifies inner class.
Murray Cumming [Sat, 5 May 2012 19:52:31 +0000 (21:52 +0200)]
Document: Remove the FieldIdentifies inner class.

* src/main/java/org/glom/web/server/libglom/ We only
use the Relationship (though the same function in libglom is maybe
used in other ways) and so this removes a compiler warning.

11 years agoDocument.load() Remove the error code parameter.
Murray Cumming [Sat, 5 May 2012 19:48:00 +0000 (21:48 +0200)]
Document.load() Remove the error code parameter.

* src/main/java/org/glom/web/server/libglom/ 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/
* src/test/java/org/glom/web/server/libglom/
setUp(), testGetSuitableTableToViewDetails(): Adapt.

11 years agoMake some inner classes static.
Murray Cumming [Sat, 5 May 2012 19:44:11 +0000 (21:44 +0200)]
Make some inner classes static.

* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/libglom/
Make all inner classes static that can be static.

11 years agoOnlineGlomServiceImpl: Do not load and check for java-libglom.
Murray Cumming [Sat, 5 May 2012 19:35:48 +0000 (21:35 +0200)]
OnlineGlomServiceImpl: Do not load and check for java-libglom.

* src/main/java/org/glom/web/server/
init(): We do not use java-libglom any more.

11 years agoRemove mentions of java-libglom.
Murray Cumming [Sat, 5 May 2012 19:24:04 +0000 (21:24 +0200)]
Remove mentions of java-libglom.

* README: Remove mention of java-libglom, because it no longer needed.
* utils/
* utils/
* utils/ Remove these as they are no longer
useful. Building is now far easier, with no need for jhbuild.

11 years agoFix the build (mvn package)
Murray Cumming [Sat, 5 May 2012 19:03:02 +0000 (21:03 +0200)]
Fix the build (mvn package)

* src/main/java/org/glom/web/shared/libglom/layout/
(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/'
[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/
[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.

11 years agoConfiguredDocument: Cache the cloned and stripped layouts.
Murray Cumming [Fri, 4 May 2012 13:13:31 +0000 (15:13 +0200)]
ConfiguredDocument: Cache the cloned and stripped layouts.

* src/main/java/org/glom/web/server/
getValidListViewLayoutGroup(), .getDetailsLayoutGroup(): Store the cloned
layout in a map, so we can retrieve it again without rebuilding it.

11 years agoUsesRelationshipImpl: Complete the relationshipEquals() implementation.
Murray Cumming [Fri, 4 May 2012 11:31:20 +0000 (13:31 +0200)]
UsesRelationshipImpl: Complete the relationshipEquals() implementation.

11 years agoFix a typo in a test.
Murray Cumming [Fri, 4 May 2012 11:25:14 +0000 (13:25 +0200)]
Fix a typo in a test.

11 years agolibglom classes: Implement some auto-generated emthods.
Murray Cumming [Fri, 4 May 2012 11:22:08 +0000 (13:22 +0200)]
libglom classes: Implement some auto-generated emthods.

11 years agoAdd GwtTestOnlineGlomService.
Murray Cumming [Fri, 4 May 2012 09:52:50 +0000 (11:52 +0200)]
Add GwtTestOnlineGlomService.

* src/test/java/org/glom/web/client/
However, this (and the other GwtTest*) does not seem to run during
mvn test.

11 years agoRemove use of unsupported features from client code.
Murray Cumming [Fri, 4 May 2012 09:26:08 +0000 (11:26 +0200)]
Remove use of unsupported features from client code.

* src/main/java/org/glom/web/client/ Add equals().
* src/main/java/org/glom/web/shared/libglom/layout/
* src/main/java/org/glom/web/shared/libglom/layout/reportparts/
Use our client version of StringUtils instead of the apache commons one.

However, the GWT Javascript compliation still fails.

11 years agolibglom classes: Use serialization instead of deep cloning.
Murray Cumming [Fri, 4 May 2012 08:21:26 +0000 (10:21 +0200)]
libglom classes: Use serialization instead of deep cloning.

Because using clone() or Cloneable in classes that are also compiled to
client Javascript will cause that compilation to fail, even if those methods are
never used in the client Javascript.
However, somethign else is still breaking the GWT javascript compilation.

11 years agoLayoutItemPortal: Move use of Document.
Murray Cumming [Thu, 3 May 2012 20:49:10 +0000 (22:49 +0200)]
LayoutItemPortal: Move use of Document.

11 years agoAvoid apache.commons StringUtils in shared.
Murray Cumming [Thu, 3 May 2012 20:36:35 +0000 (22:36 +0200)]
Avoid apache.commons StringUtils in shared.

11 years agoUpdate hacky paths in test
Murray Cumming [Thu, 3 May 2012 20:32:12 +0000 (22:32 +0200)]
Update hacky paths in test

11 years agoMove Document from shared to server.
Murray Cumming [Thu, 3 May 2012 20:30:10 +0000 (22:30 +0200)]
Move Document from shared to server.

11 years agoReplace a Hashmap with TreeMap for GWT
Murray Cumming [Thu, 3 May 2012 20:18:50 +0000 (22:18 +0200)]
Replace a Hashmap with TreeMap for GWT

11 years agoConvert most code to camelCase.
Murray Cumming [Thu, 3 May 2012 20:09:53 +0000 (22:09 +0200)]
Convert most code to camelCase.

11 years agoSome import reorganizing by Eclipse
Murray Cumming [Thu, 3 May 2012 19:28:43 +0000 (21:28 +0200)]
Some import reorganizing by Eclipse

11 years agoSome code reformatting by Eclipse
Murray Cumming [Thu, 3 May 2012 19:28:15 +0000 (21:28 +0200)]
Some code reformatting by Eclipse

11 years agoSome cleanup by Eclipse
Murray Cumming [Thu, 3 May 2012 19:27:26 +0000 (21:27 +0200)]
Some cleanup by Eclipse

11 years agoSome cleanup by Eclipse
Murray Cumming [Thu, 3 May 2012 19:26:55 +0000 (21:26 +0200)]
Some cleanup by Eclipse

11 years agoFix a use of String ==.
Murray Cumming [Thu, 3 May 2012 10:26:14 +0000 (12:26 +0200)]
Fix a use of String ==.

11 years agoFurther libglom implementation in Java.
Murray Cumming [Thu, 3 May 2012 10:22:02 +0000 (12:22 +0200)]
Further libglom implementation in Java.

Finish the libglom classes enough to pass the DocumentTest test
case from java-libglom.

11 years agoAdd a Field class and implement some loading of it in Document.
Murray Cumming [Wed, 25 Apr 2012 10:43:28 +0000 (12:43 +0200)]
Add a Field class and implement some loading of it in Document.

11 years agoInitial Document loading implementation, instead of libglom.
Murray Cumming [Wed, 25 Apr 2012 09:52:34 +0000 (11:52 +0200)]
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.

11 years agoUse of jOOQ: Move Field creation into a utility method.
Murray Cumming [Tue, 24 Apr 2012 15:38:48 +0000 (17:38 +0200)]
Use of jOOQ: Move Field creation into a utility method.

* src/main/java/org/glom/web/server/
This lets us improve it more easily.

11 years agoUse of jOOQ: Improve the code to COUNT a sub-select.
Murray Cumming [Tue, 24 Apr 2012 14:22:07 +0000 (16:22 +0200)]
Use of jOOQ: Improve the code to COUNT a sub-select.

* src/main/java/org/glom/web/server/
Move initial query creation into
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.

11 years agoUse jOOQ instead of Glom.build_sql*(), to avoid native calls.
Murray Cumming [Sun, 22 Apr 2012 22:30:44 +0000 (00:30 +0200)]
Use jOOQ instead of Glom.build_sql*(), to avoid native calls.

* pom.xml: Depend on jooq.
* src/main/java/org/glom/web/server/ 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/
* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* 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.

11 years agoAdd a TODO
Murray Cumming [Sat, 21 Apr 2012 20:25:35 +0000 (22:25 +0200)]
Add a TODO

11 years agoMove use of Glom.build_sql*() into a new SqlUtils class.
Murray Cumming [Sat, 21 Apr 2012 20:17:23 +0000 (22:17 +0200)]
Move use of Glom.build_sql*() into a new SqlUtils class.

* src/main/java/org/glom/web/server/ 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.

11 years agoCode style changes from Eclipse
Murray Cumming [Sat, 21 Apr 2012 20:10:49 +0000 (22:10 +0200)]
Code style changes from Eclipse

11 years agoUpdate the project URL.
Murray Cumming [Sat, 21 Apr 2012 14:08:15 +0000 (16:08 +0200)]
Update the project URL.

* pom.xml: Use an OnlineGlom-specific URL for the project URL.

11 years agoCode style changes from Eclipse
Murray Cumming [Sat, 21 Apr 2012 13:22:13 +0000 (15:22 +0200)]
Code style changes from Eclipse

11 years agoMain layout: Use a FlowTable instead of absolute positioning.
Murray Cumming [Sat, 21 Apr 2012 13:21:16 +0000 (15:21 +0200)]
Main layout: Use a FlowTable instead of absolute positioning.

* src/main/java/org/glom/web/client/ 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.

11 years agoGwtTestOnlineGlom: Comment out unused code.
Murray Cumming [Sat, 21 Apr 2012 11:05:05 +0000 (13:05 +0200)]
GwtTestOnlineGlom: Comment out unused code.

* src/test/java/org/glom/web/client/
Eclipse has started to say that some code is unused.

11 years agoCodestyle changes from Eclipse
Murray Cumming [Fri, 20 Apr 2012 22:09:35 +0000 (00:09 +0200)]
Codestyle changes from Eclipse

11 years agoUpdate to the latest versions of dependencies.
Murray Cumming [Fri, 20 Apr 2012 22:07:49 +0000 (00:07 +0200)]
Update to the latest versions of dependencies.

* pom.xml: Update version numbers of dependencies to the latest
* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/RelatedListNavigation.
* src/test/java/org/glom/web/client/
Modify the imports where necessary.

11 years agoSyntax changes by Eclipse.
Murray Cumming [Fri, 20 Apr 2012 19:54:14 +0000 (21:54 +0200)]
Syntax changes by Eclipse.

11 years agoStyle: Remove overflow:hidden from searchbox
Murray Cumming [Tue, 17 Apr 2012 12:28:06 +0000 (14:28 +0200)]
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.



11 years agoRemove some duplicate code.
Murray Cumming [Fri, 20 Apr 2012 08:52:43 +0000 (10:52 +0200)]
Remove some duplicate code.

* src/main/java/org/glom/web/server/
getDocumentInfo(): This must have been duplicated during the merge from the
reports branch.

11 years ago1.21.8.1
Murray Cumming [Thu, 19 Apr 2012 19:57:54 +0000 (21:57 +0200)]

11 years agoMerge branch 'reports'
Murray Cumming [Thu, 19 Apr 2012 12:08:14 +0000 (14:08 +0200)]
Merge branch 'reports'


11 years agoReports: Try to avoid page breaks reports
Murray Cumming [Thu, 19 Apr 2012 11:47:41 +0000 (13:47 +0200)]
Reports: Try to avoid page breaks

11 years agoAdd some comments.
Murray Cumming [Thu, 19 Apr 2012 11:25:48 +0000 (13:25 +0200)]
Add some comments.

11 years agoReports: Localize the waiting for report message.
Murray Cumming [Thu, 19 Apr 2012 10:50:31 +0000 (12:50 +0200)]
Reports: Localize the waiting for report message.

* src/main/java/org/glom/web/client/activity/
start(): Get the message from the contants.
* src/main/resources/org/glom/web/client/ui/
Add the string here.
* src/main/resources/org/glom/web/client/ui/
* src/main/resources/org/glom/web/client/ui/
* src/main/resources/org/glom/web/client/ui/
* src/main/resources/org/glom/web/client/ui/
* src/main/resources/org/glom/web/client/ui/
Update these files with the English text for newer strings for now.

11 years agoReports: Show a message while waiting for the report.
Murray Cumming [Thu, 19 Apr 2012 10:31:57 +0000 (12:31 +0200)]
Reports: Show a message while waiting for the report.

* src/main/java/org/glom/web/client/ui/
* src/main/java/org/glom/web/client/ui/
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/
start(): Call setWaitingText() before calling the async
report generation.

11 years agoReportGenerator: Specify date and time formats.
Murray Cumming [Thu, 19 Apr 2012 09:46:02 +0000 (11:46 +0200)]
ReportGenerator: Specify date and time formats.

* src/main/java/org/glom/web/server/
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/
convertResultSetToDTO(): Use the short formats here too.

11 years agoReportGenerator: Use the correct numeric formatting.
Murray Cumming [Wed, 18 Apr 2012 19:32:21 +0000 (21:32 +0200)]
ReportGenerator: Use the correct numeric formatting.

* src/main/java/org/glom/web/server/
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.

11 years agoCode formatting changes by Eclipse.
Murray Cumming [Wed, 18 Apr 2012 19:01:09 +0000 (21:01 +0200)]
Code formatting changes by Eclipse.

11 years agoReportGenerator: Avoid showing null for group by titles.
Murray Cumming [Wed, 18 Apr 2012 19:00:16 +0000 (21:00 +0200)]
ReportGenerator: Avoid showing null for group by titles.

* src/main/java/org/glom/web/server/
generateReport(): Use setBlankWhenNull() on the field title
style too, because this is used for values in group by

11 years agoRename a member variable
Murray Cumming [Wed, 18 Apr 2012 18:42:32 +0000 (20:42 +0200)]
Rename a member variable

11 years agoReportGenerator: Add a colon to titles in vertical groups.
Murray Cumming [Wed, 18 Apr 2012 08:42:36 +0000 (10:42 +0200)]
ReportGenerator: Add a colon to titles in vertical groups.

* src/main/java/org/glom/web/server/
addFieldToDetailBandVertical(): Pass true for the withColon

11 years agoReportGenerator: Simplify the code by using Position more.
Murray Cumming [Wed, 18 Apr 2012 08:37:07 +0000 (10:37 +0200)]
ReportGenerator: Simplify the code by using Position more.

11 years agoReports: Support vertical groups, roughly.
Murray Cumming [Wed, 18 Apr 2012 08:10:07 +0000 (10:10 +0200)]
Reports: Support vertical groups, roughly.

* src/main/java/org/glom/web/server/
addToReport(): Rename to addGroupToReport() and, if necessary,
call the new addVerticalGroupToReport() method.
createFieldValueElement(): Let the caller specify the Y position

11 years agoReports: Allow a second report to be shown.
Murray Cumming [Tue, 17 Apr 2012 14:35:05 +0000 (16:35 +0200)]
Reports: Allow a second report to be shown.

* src/main/java/org/glom/web/client/ui/
clear(): Do not remove the HTML widget, which broke the whole layout.

11 years agoLocales drop-down: Show that we use English by default.
Murray Cumming [Tue, 17 Apr 2012 13:53:27 +0000 (15:53 +0200)]
Locales drop-down: Show that we use English by default.

* src/main/java/org/glom/web/client/activity/
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.

11 years agoUnselect the Report/Locale/Table combo item when appropriate.
Murray Cumming [Tue, 17 Apr 2012 13:27:38 +0000 (15:27 +0200)]
Unselect the Report/Locale/Table combo item when appropriate.

* src/main/java/org/glom/web/client/activity/
setPlace(): clear reportName if this is not a ReportPlace.
* src/main/java/org/glom/web/client/ui/
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.

11 years agoReport: Give the user a way to get back to the list.
Murray Cumming [Tue, 17 Apr 2012 12:54:22 +0000 (14:54 +0200)]
Report: Give the user a way to get back to the list.

* src/main/java/org/glom/web/client/activity/
start(), setPlace(): Show the Back To List link on reports, and also
interpret selecting the empty report item as back to list.