11 years agoDocuments: Remove final keyword to fix startup configuration. libglom-1-20
Murray Cumming [Tue, 17 Jan 2012 09:39:18 +0000 (10:39 +0100)]
Documents: Remove final keyword to fix startup configuration.

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

11 years agoDocuments: Add some final keywords.
Murray Cumming [Fri, 13 Jan 2012 17:23:44 +0000 (18:23 +0100)]
Documents: Add some final keywords.

* src/main/java/org/glom/web/shared/ Eclipse suggested

11 years agoOnlineGlomServiceImpl: Add to overview comments.
Murray Cumming [Fri, 13 Jan 2012 17:20:43 +0000 (18:20 +0100)]
OnlineGlomServiceImpl: Add to overview comments.

* src/main/java/org/glom/web/server/
Note that this is where all the document are loaded. They are not
loaded freshly for each page.

11 years agoAdd a search box.
Murray Cumming [Thu, 12 Jan 2012 23:12:35 +0000 (00:12 +0100)]
Add a search box.

* src/main/java/org/glom/web/client/ui/
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): 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/
* src/main/java/org/glom/web/client/event/
Add these files, based on the existing TableChangeEvent and
* src/main/java/org/glom/web/client/activity/
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/
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/
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
setPlace(): Adapt the call to TableSelectionView.setbackLink(), to
pass the extra  quickFind parameter.

* src/main/java/org/glom/web/client/ui/
setCellTable(): Add a String quickFind parameter and pass it to
the ListViewTable() constructor.
* src/main/java/org/glom/web/client/ui/ Change
setCellTable() in the base interface, because that is how ListViewImpl
is used.

* src/main/java/org/glom/web/client/ui/list/
Add a String quickFind member variable.
* src/main/java/org/glom/web/client/ui/list/
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/
getListViewData(), getSortedListViewData(): Add a String quickFind
parameter, passing it to ConfiguredDocument.getListViewData().
* src/main/java/org/glom/web/client/
Change getListViewData(), getSortedListViewData() in the base interface,
because that is how OnlineGlomServiceImpl is used, via this:
* src/main/java/org/glom/web/client/
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/
getListViewData(): Add a String quickFind parameter, and pass it to
* src/main/java/org/glom/web/server/database/
getListData(): Add a String quickFind parameter and pass it to
getSelectQuery(): Add a String quickFind parameter.
* src/main/java/org/glom/web/server/database/
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/Rela
va: getData(): Pass an empty string to getL
quickFind parameter.

11 years agoListTable: Minor change.
Murray Cumming [Thu, 12 Jan 2012 13:31:04 +0000 (14:31 +0100)]
ListTable: Minor change.

* src/main/java/org/glom/web/client/ui/list/
createCellTable(): Make this protected instead of public.

11 years agoSeveral files: Use final for the parameters and use the @override attribute.
Murray Cumming [Thu, 12 Jan 2012 09:33:10 +0000 (10:33 +0100)]
Several files: Use final for the parameters and use the @override attribute.

11 years agoMinor documentation/comment changes
Murray Cumming [Thu, 12 Jan 2012 09:24:03 +0000 (10:24 +0100)]
Minor documentation/comment changes

11 years agoCorrect the ChangeLog
Murray Cumming [Wed, 11 Jan 2012 21:12:32 +0000 (22:12 +0100)]
Correct the ChangeLog

11 years agoAdd anchor links for single line text that starts with http, ftp and www.
Ben Konrath [Sun, 25 Dec 2011 01:29:50 +0000 (02:29 +0100)]
Add anchor links for single line text that starts with http, ftp and 

11 years agoAdd ellipsis to single line text in details view.
Ben Konrath [Sun, 25 Dec 2011 00:00:33 +0000 (01:00 +0100)]
Add ellipsis to single line text in details view.

11 years agoUpdate a copyright year.
Murray Cumming [Wed, 4 Jan 2012 20:08:48 +0000 (21:08 +0100)]
Update a copyright year.

11 years agoRemove all javadoc author tags.
Murray Cumming [Wed, 4 Jan 2012 20:08:05 +0000 (21:08 +0100)]
Remove all javadoc author tags.

Because they are awkward and meaningless when many people touch
many files.

11 years agoCorrect the ChangeLog
Murray Cumming [Wed, 4 Jan 2012 19:59:49 +0000 (20:59 +0100)]
Correct the ChangeLog

11 years agoRevert the COPYING.LESSER to COPYING rename.
Murray Cumming [Wed, 4 Jan 2012 19:54:41 +0000 (20:54 +0100)]
Revert the COPYING.LESSER to COPYING rename.

Apparently both should be there if it is LGPL.

This partially reverts commit ed70963225640fd794cdb3e1a01043060ad3aff7.

11 years ago*View: Remove unused imports.
Murray Cumming [Tue, 3 Jan 2012 12:51:38 +0000 (13:51 +0100)]
*View: Remove unused imports.

* src/main/java/org/glom/web/client/ui/
* src/main/java/org/glom/web/client/ui/
* src/main/java/org/glom/web/client/ui/
* src/main/java/org/glom/web/client/ui/
Remove unused imports, as suggested by Eclipse.

11 years agoMove the *View::Presenter types, and some API into one base View.
Murray Cumming [Mon, 2 Jan 2012 20:40:11 +0000 (21:40 +0100)]
Move the *View::Presenter types, and some API into one base View.

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

11 years agoOnlineGlom: Make clientFactory a (protected) member, and test it a bit.
Murray Cumming [Mon, 2 Jan 2012 19:59:19 +0000 (20:59 +0100)]
OnlineGlom: Make clientFactory a (protected) member, and test it a bit.

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

11 years agopom.xml: Mention the LGPL license.
Murray Cumming [Mon, 2 Jan 2012 13:48:44 +0000 (14:48 +0100)]
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.

11 years agoAdd project information to README and pom.xml.
Murray Cumming [Mon, 2 Jan 2012 13:40:04 +0000 (14:40 +0100)]
Add project information to README and pom.xml.

* README: Add a brief description and mention some mvn
* pom.xml: This extra information shows up in mvn site
generated pages.

11 years agoUse the latest java-libglom version.
Murray Cumming [Thu, 22 Dec 2011 12:06:08 +0000 (13:06 +0100)]
Use the latest java-libglom version.

* pom.xml: Use java-libglom 1.19.2 instead of 1.19.1.

11 years agoGwtTestOnlineGlom: Test a little more.
Murray Cumming [Sun, 1 Jan 2012 22:49:26 +0000 (23:49 +0100)]
GwtTestOnlineGlom: Test a little more.

* src/main/java/org/glom/web/client/ Make the panels
protected rather than private, as suggested by the gwt-test-utils
maintianer here:
* src/test/java/org/glom/web/client/
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.

11 years agoSlight modification to *Mapper comments.
Murray Cumming [Sun, 1 Jan 2012 21:14:28 +0000 (22:14 +0100)]
Slight modification to *Mapper comments.

* src/main/java/org/glom/web/client/mvp/
* src/main/java/org/glom/web/client/mvp/DocumentSelectionActivityMa
* src/main/java/org/glom/web/client/mvp/TableSelectionActivityMappe
Remove comments mentioning GIN because they are just copied from
the example code and are apparently not helpful:
Also change the mention of a class that is only in the example code.

11 years agoAdd comments with my understanding of the ClientFactory
Murray Cumming [Sun, 1 Jan 2012 21:02:23 +0000 (22:02 +0100)]
Add comments with my understanding of the ClientFactory

11 years agoGwtTestOnlineGlom test: Minor changes.
Murray Cumming [Sun, 1 Jan 2012 20:44:45 +0000 (21:44 +0100)]
GwtTestOnlineGlom test: Minor changes.

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

11 years agoImprove the ChangeLog
Murray Cumming [Sun, 1 Jan 2012 00:58:56 +0000 (01:58 +0100)]
Improve the ChangeLog

11 years agoTests: Added the beginnings of a test using gwt-test-utils.
Murray Cumming [Sun, 1 Jan 2012 00:58:26 +0000 (01:58 +0100)]
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/ Add this file
which tells gwt-test-utils what class will be tested.
* src/test/java/org/glom/web/client/
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.

11 years agoTests: Use junit4-style syntax instead of junit3-style.
Murray Cumming [Sat, 31 Dec 2011 22:13:23 +0000 (23:13 +0100)]
Tests: Use junit4-style syntax instead of junit3-style.

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

11 years agoAdded a test for ListPlace token parsing and creation.
Murray Cumming [Sat, 31 Dec 2011 20:28:49 +0000 (21:28 +0100)]
Added a test for ListPlace token parsing and creation.

* src/test/java/org/glom/web/client/place/
This is much the same as DetailsPlaceTest.

I wonder how we could test the other parts of the *Place API

11 years agowhitespace cleanup
Murray Cumming [Fri, 30 Dec 2011 22:34:26 +0000 (23:34 +0100)]
whitespace cleanup

11 years agoDetailsPlace test: Also test getToken() and recreation via getPlace().
Murray Cumming [Fri, 30 Dec 2011 22:27:09 +0000 (23:27 +0100)]
DetailsPlace test: Also test getToken() and recreation via getPlace().

* src/test/java/org/glom/web/client/place/
testGetPlaceParameters(): Get the tokens from the DetailsPlace and
recreate it, testing the recreated DetailsPlace for the same parameter

11 years agoUse the surefire-report plugin.
Murray Cumming [Fri, 30 Dec 2011 22:13:50 +0000 (23:13 +0100)]
Use the surefire-report plugin.

* pom.xml: This generates a HTML report about the tests in
when you do mvn surefire-report:report. It seems to be popular/normal.

11 years agoAdded a test for DetailsPlace.
Murray Cumming [Fri, 30 Dec 2011 22:12:14 +0000 (23:12 +0100)]
Added a test for DetailsPlace.

* src/test/java/org/glom/web/client/place/
Test the getPlace() token parsing.

11 years agoAdded a first unit test.
Murray Cumming [Fri, 30 Dec 2011 14:01:07 +0000 (15:01 +0100)]
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/
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.

11 years agoUpdate a URL in a comment
Murray Cumming [Fri, 30 Dec 2011 13:26:03 +0000 (14:26 +0100)]
Update a URL in a comment

11 years agoUpdate a URL in a comment
Murray Cumming [Fri, 30 Dec 2011 13:25:54 +0000 (14:25 +0100)]
Update a URL in a comment

11 years agoChange charsetName to "UTF-8" when replacing line breaks.
Ben Konrath [Thu, 22 Dec 2011 22:37:34 +0000 (23:37 +0100)]
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

This fixes a problem with multi-line details view fields that have hard
line breaks. The "License Text" field on this page demonstrates the

* src/main/java/org/glom/web/client/ui/details/

11 years agoFix another bug with related list navigation.
Ben Konrath [Thu, 22 Dec 2011 22:20:27 +0000 (23:20 +0100)]
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/

11 years agoFix a crasher when refreshing the list view with the default table.
Ben Konrath [Thu, 22 Dec 2011 14:05:04 +0000 (15:05 +0100)]
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/ Go
to the main document selection page when the document id hasn't been
* src/main/java/org/glom/web/client/activity/ Go to
the main document selection page when the document id hasn't been
* src/main/java/org/glom/web/client/place/ Use empty
values for the details place when the document id hasn't been set.
* src/main/java/org/glom/web/client/place/ Use empty
values for the list place when the document id hasn't been set.

11 years agoProtect against NPE when glom.document.locale is not in config.
Ben Konrath [Wed, 21 Dec 2011 17:23:07 +0000 (18:23 +0100)]
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

This commit closes this bug:

* src/main/java/org/glom/web/server/

11 years agoRename to
Murray Cumming [Tue, 20 Dec 2011 09:12:14 +0000 (10:12 +0100)]
Rename to

* src/main/resources/ Rename to:
* src/main/resources/
* src/main/resources/README: And add this file explaining that people
should rename it back when deploying.

11 years agoAllow choosing the translation in the .properties file.
Murray Cumming [Tue, 20 Dec 2011 08:56:21 +0000 (09:56 +0100)]
Allow choosing the translation in the .properties file.

* src/main/java/org/glom/web/server/
init(): Read a glom.document.locale value from the configuration file
and call Glom's TransatableItem::set_current_locale() method.
* src/main/resources/ 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.

11 years agoRevert unwanted change.
Murray Cumming [Tue, 20 Dec 2011 08:11:25 +0000 (09:11 +0100)]
Revert unwanted change.

11 years agoAvoid a crash in parsing of token parameters.
Murray Cumming [Mon, 19 Dec 2011 18:20:26 +0000 (19:20 +0100)]
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.

11 years agoHistory token building/handling: Improve use of token parameters.
Murray Cumming [Sat, 17 Dec 2011 22:23:58 +0000 (23:23 +0100)]
History token building/handling: Improve use of token parameters.

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

11 years agoUpdate a URL in a comment
Murray Cumming [Sat, 17 Dec 2011 12:40:32 +0000 (13:40 +0100)]
Update a URL in a comment

11 years agoFix a Navgiation->Navigation typo in the code.
Murray Cumming [Fri, 16 Dec 2011 20:39:42 +0000 (21:39 +0100)]
Fix a Navgiation->Navigation typo in the code.

* src/main/java/org/glom/web/client/activity/
Rename processNavgiation() to processNavigation().

11 years agoFix a seperator->separator typo in the code.
Murray Cumming [Fri, 16 Dec 2011 19:41:28 +0000 (20:41 +0100)]
Fix a seperator->separator typo in the code.

* src/main/java/org/glom/web/client/place/
* src/main/java/org/glom/web/client/place/
* src/main/java/org/glom/web/client/place/ Just a

11 years agoCleanup some comments.
Ben Konrath [Thu, 15 Dec 2011 13:50:32 +0000 (14:50 +0100)]
Cleanup some comments.

* src/main/java/org/glom/web/server/

11 years agoReplace \n with <br/> for multiline text in the details view.
Ben Konrath [Wed, 14 Dec 2011 16:28:03 +0000 (17:28 +0100)]
Replace \n with <br/> for multiline text in the details view.

Vertical scrollbars are added when needed as well.

* src/main/java/org/glom/web/client/ui/details/

11 years agoSpecify the font for document selection links.
Ben Konrath [Wed, 14 Dec 2011 11:21:28 +0000 (12:21 +0100)]
Specify the font for document selection links.

* src/main/webapp/style.css:

11 years agoFix bouncy CellTable while paging.
Ben Konrath [Wed, 14 Dec 2011 10:45:31 +0000 (11:45 +0100)]
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/

11 years agoRevamp the appearance of the document selection page.
Ben Konrath [Wed, 14 Dec 2011 10:01:20 +0000 (11:01 +0100)]
Revamp the appearance of the document selection page.

* src/main/java/org/glom/web/client/ui/
* src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.ui.xml:
* src/main/webapp/style.css:

11 years agoSet navigation button column to the smallest size possible.
Ben Konrath [Tue, 13 Dec 2011 19:34:36 +0000 (20:34 +0100)]
Set navigation button column to the smallest size possible.

* src/main/java/org/glom/web/client/ui/list/

11 years agoChange OpenButton nomenclature to NavigationButton.
Ben Konrath [Tue, 13 Dec 2011 09:22:43 +0000 (10:22 +0100)]
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/
* src/main/java/org/glom/web/client/ui/
* src/main/java/org/glom/web/client/ui/cell/
Renamed from OpenButtonCell.
* src/main/java/org/glom/web/client/ui/details/
* src/main/java/org/glom/web/client/ui/list/
* src/main/java/org/glom/web/client/ui/list/

11 years agoRemove unnecessary String argument in RelatedListTable and ListViewTable.
Ben Konrath [Mon, 12 Dec 2011 20:08:40 +0000 (21:08 +0100)]
Remove unnecessary String argument in RelatedListTable and ListViewTable.

* src/main/java/org/glom/web/client/activity/
* src/main/java/org/glom/web/client/ui/
* src/main/java/org/glom/web/client/ui/details/
* src/main/java/org/glom/web/client/ui/list/

11 years agoUpdate variable names and comments.
Ben Konrath [Mon, 12 Dec 2011 15:15:13 +0000 (16:15 +0100)]
Update variable names and comments.

* src/main/java/org/glom/web/client/ui/details/
* src/main/java/org/glom/web/client/ui/list/

11 years agoProperly initialize numNonEmptyRows variable to zero.
Ben Konrath [Mon, 12 Dec 2011 11:44:53 +0000 (12:44 +0100)]
Properly initialize numNonEmptyRows variable to zero.

* src/main/java/org/glom/web/client/ui/details/
* src/main/java/org/glom/web/client/ui/list/

11 years agoAdd latest mockup with HTML tables.
Ben Konrath [Mon, 5 Dec 2011 13:42:02 +0000 (14:42 +0100)]
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:

11 years agoRemove unnecessary getPrimaryKeyField() method.
Ben Konrath [Mon, 5 Dec 2011 13:23:55 +0000 (14:23 +0100)]
Remove unnecessary getPrimaryKeyField() method.

getPrimaryKeyFieldForTable(String) has been renamed to

* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/

11 years agoAdd string representation of TypedDataItem value to conversion error message.
Ben Konrath [Mon, 5 Dec 2011 13:14:47 +0000 (14:14 +0100)]
Add string representation of TypedDataItem value to conversion error message.

* src/main/java/org/glom/web/server/ Logging the error
message was extracted into its own method to avoid duplication.

11 years agoAdd type checking to navigation primary key value creation.
Ben Konrath [Mon, 5 Dec 2011 12:59:03 +0000 (13:59 +0100)]
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/

11 years agoRename a couple of variables in RelatedListNavigation.
Ben Konrath [Mon, 5 Dec 2011 12:29:59 +0000 (13:29 +0100)]
Rename a couple of variables in RelatedListNavigation.

This is a rename-only refactor.

* src/main/java/org/glom/web/server/database/

11 years agoMove getListLayoutGroup() into getListViewLayoutGroup().
Ben Konrath [Mon, 5 Dec 2011 12:26:29 +0000 (13:26 +0100)]
Move getListLayoutGroup() into getListViewLayoutGroup().

This removes getListLayoutGroup(). It was only being called by

* src/main/java/org/glom/web/server/

11 years agoRemove check for LayoutItem_Portal in list table method.
Ben Konrath [Mon, 5 Dec 2011 12:15:14 +0000 (13:15 +0100)]
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/

11 years agoProperly support related list navigation.
Ben Konrath [Mon, 5 Dec 2011 12:10:44 +0000 (13:10 +0100)]
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

* src/main/java/org/glom/web/server/ 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/ 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/
* src/main/java/org/glom/web/server/database/
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/
Properly add primary key to related list tables.

11 years agoProperly set the horizontal alignment of fields.
Ben Konrath [Fri, 2 Dec 2011 13:35:30 +0000 (14:35 +0100)]
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/ Use
to set the horizontal alignment of fields.

11 years agoRevert "Align TYPE_NUMERIC with AUTO alignment to the right in list tables."
Ben Konrath [Fri, 2 Dec 2011 12:51:16 +0000 (13:51 +0100)]
Revert "Align TYPE_NUMERIC with AUTO alignment to the right in list tables."

This reverts commit 551ec2a81ab5b7df0f4ce97262cdc3b64b360f05.

11 years agoAlign TYPE_NUMERIC with AUTO alignment to the right in list tables.
Ben Konrath [Fri, 2 Dec 2011 12:23:06 +0000 (13:23 +0100)]
Align TYPE_NUMERIC with AUTO alignment to the right in list tables.

* src/main/java/org/glom/web/client/ui/list/

11 years agoDisplay currency codes in the details view.
Ben Konrath [Fri, 2 Dec 2011 12:04:27 +0000 (13:04 +0100)]
Display currency codes in the details view.

* src/main/java/org/glom/web/client/ui/details/

11 years agoAvoid duplicate JNI call.
Ben Konrath [Fri, 2 Dec 2011 11:23:32 +0000 (12:23 +0100)]
Avoid duplicate JNI call.

JNI is not as efficient as pure Java and this is an easy (and small)

* src/main/java/org/glom/web/server/database/
Use previously retrieved value for whereClauseToTableName instead of
getting it again.

11 years agoRename a couple of variables in RelatedListNavigation.
Ben Konrath [Fri, 2 Dec 2011 11:16:53 +0000 (12:16 +0100)]
Rename a couple of variables in RelatedListNavigation.

This is a rename-only refactor.

* src/main/java/org/glom/web/server/database/

11 years agoIndicate clearly that a mismatched primary key type is a bug.
Ben Konrath [Fri, 2 Dec 2011 11:07:30 +0000 (12:07 +0100)]
Indicate clearly that a mismatched primary key type is a bug.

* src/main/java/org/glom/web/server/ Change log level from
warning to error. Add 'This is a bug.' to message.

11 years agoUpdate / fix some comments.
Ben Konrath [Fri, 2 Dec 2011 11:01:30 +0000 (12:01 +0100)]
Update / fix some comments.

* src/main/java/org/glom/web/client/ Remove old
* src/main/java/org/glom/web/client/ui/details/ Fix
* src/main/java/org/glom/web/server/database/
Fix comments. Add some TODOs.

11 years agoEnable navigation to details view with string primary key from related list.
Ben Konrath [Fri, 2 Dec 2011 10:54:06 +0000 (11:54 +0100)]
Enable navigation to details view with string primary key from related list.

* src/main/java/org/glom/web/server/database/
Create a text primary key value when return type of result is

11 years agoUse checkboxes for booleans in the details view.
Ben Konrath [Fri, 2 Dec 2011 10:01:42 +0000 (11:01 +0100)]
Use checkboxes for booleans in the details view.

* src/main/java/org/glom/web/client/ui/details/

11 years agoImprove performance of related list height calculation.
Ben Konrath [Thu, 1 Dec 2011 17:27:18 +0000 (18:27 +0100)]
Improve performance of related list height calculation.

* src/main/java/org/glom/web/client/ui/details/
Put code to calculate the expected height in a static initializer so
that that it's only called once.

11 years agoShow related list tables in notebooks (again).
Ben Konrath [Thu, 1 Dec 2011 16:41:35 +0000 (17:41 +0100)]
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/ 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/
Add method to calculate the height of the related list tables.
* src/main/java/org/glom/web/client/ui/list/
* src/main/webapp/style.css: Add css class for Pager. This is needed to
calculate the height of the Pager widget.

11 years agoUse CellTable API for table property instead of setting style on Element.
Ben Konrath [Thu, 1 Dec 2011 15:02:19 +0000 (16:02 +0100)]
Use CellTable API for table property instead of setting style on Element.

* src/main/java/org/glom/web/client/ui/details/

11 years agoMake ListViewTable and RelatedListTable a consistent height.
Ben Konrath [Thu, 1 Dec 2011 12:02:55 +0000 (13:02 +0100)]
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/ Hide
navigation column when not needed.
* src/main/java/org/glom/web/client/ui/ Move method
arguments for navigation button to constructor of ListViewTable.
* src/main/java/org/glom/web/client/ui/cell/ Render
hidden button for empty data rows.
* src/main/java/org/glom/web/client/ui/details/ Add method
arguments for navigation button to constructor.
* src/main/java/org/glom/web/client/ui/list/ Always
create navigation buttons. Add hideNavigationButtons() method.
* src/main/java/org/glom/web/client/ui/list/ Add method
arguments for navigation button to constructor.

11 years agoUse 'visibility: hidden' in Utils.getWidgetHeight().
Ben Konrath [Thu, 1 Dec 2011 10:50:29 +0000 (11:50 +0100)]
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, take up space which is required to be able to calculate the
height of the widget.

* src/main/java/org/glom/web/client/

11 years agoUse Utils.getWidgetHeight() in FlowTable.
Ben Konrath [Thu, 1 Dec 2011 10:30:31 +0000 (11:30 +0100)]
Use Utils.getWidgetHeight() in FlowTable.

* src/main/java/org/glom/web/client/ Remove TODO item about
* src/main/java/org/glom/web/client/ui/details/

11 years agoPut the details css class name on the correct table column.
Ben Konrath [Thu, 1 Dec 2011 02:02:18 +0000 (03:02 +0100)]
Put the details css class name on the correct table column.

* src/main/java/org/glom/web/client/ui/list/

11 years agoUpdate for java-libglom API change.
Ben Konrath [Wed, 30 Nov 2011 13:38:56 +0000 (14:38 +0100)]
Update for java-libglom API change.

The getters and setters on FieldFormatting and NumericFormat were
changed to remove the 'M'.

* src/main/java/org/glom/web/server/

11 years agoOnly allow RelatedListTables in Portals.
Ben Konrath [Tue, 29 Nov 2011 19:42:01 +0000 (20:42 +0100)]
Only allow RelatedListTables in Portals.

* src/main/java/org/glom/web/client/ui/details/

11 years agoOnly create a contents panel for Portals when title is being set.
Ben Konrath [Tue, 29 Nov 2011 19:32:49 +0000 (20:32 +0100)]
Only create a contents panel for Portals when title is being set.

* src/main/java/org/glom/web/client/ui/details/

11 years agoSet TabLayoutPanel height based on calculated height its widgets.
Ben Konrath [Tue, 29 Nov 2011 14:29:20 +0000 (15:29 +0100)]
Set TabLayoutPanel height based on calculated height its widgets.

This is a potential fix for this bug:

* src/main/java/org/glom/web/client/ui/details/

11 years agoAlign details field labels and data with the Open buttons.
Ben Konrath [Tue, 29 Nov 2011 14:10:02 +0000 (15:10 +0100)]
Align details field labels and data with the Open buttons.

* src/main/webapp/style.css:

11 years agoRemove unnecessary <div> in the Notebook widget.
Ben Konrath [Tue, 29 Nov 2011 10:08:29 +0000 (11:08 +0100)]
Remove unnecessary <div> in the Notebook widget.

* src/main/java/org/glom/web/client/ui/details/ Remove
method to get container FlowPanel (<div>).
* src/main/java/org/glom/web/client/ui/details/ Run the
initWidget() method directly on the TabLayoutPanel widget instead of
Group's container widget.

11 years agoDon't add group titles for Portals in Notebooks.
Ben Konrath [Tue, 29 Nov 2011 09:49:35 +0000 (10:49 +0100)]
Don't add group titles for Portals in Notebooks.

This reverts the previous patch and fixes a bug I introduced with
commit b1753fd27bd2c4ea189c4c353e0ece92dcc66c2c .

* src/main/java/org/glom/web/client/ui/details/
* src/main/java/org/glom/web/client/ui/details/

11 years agoRemove unused boolean argument in Portal constructor.
Ben Konrath [Mon, 28 Nov 2011 19:44:56 +0000 (20:44 +0100)]
Remove unused boolean argument in Portal constructor.

Just a code cleanup.

* src/main/java/org/glom/web/client/ui/details/
* src/main/java/org/glom/web/client/ui/details/

11 years ago Remove hack for glom 1.18 style glom files.
Ben Konrath [Mon, 28 Nov 2011 18:15:06 +0000 (19:15 +0100)]
 Remove hack for glom 1.18 style glom files.

 * src/main/java/org/glom/web/client/ui/details/
 * src/main/java/org/glom/web/client/ui/details/
 * src/main/java/org/glom/web/client/ui/details/

11 years agoUse Gda Value version of primary key to log result too large error.
Ben Konrath [Mon, 28 Nov 2011 14:46:26 +0000 (15:46 +0100)]
Use Gda Value version of primary key to log result too large error.

* src/main/java/org/glom/web/server/database/

11 years agoDon't use TypedDataItem.getText() for Unknown types from the URL.
Ben Konrath [Mon, 28 Nov 2011 14:17:46 +0000 (15:17 +0100)]
Don't use TypedDataItem.getText() for Unknown types from the URL.

* src/main/java/org/glom/web/client/place/
* src/main/java/org/glom/web/server/ Use getUnknown()
instead of getText().
* src/main/java/org/glom/web/shared/ Add unknown
String field and getUnknown() method.

11 years agoLog an error message when the java-libglom .so is not present.
Ben Konrath [Mon, 28 Nov 2011 13:14:40 +0000 (14:14 +0100)]
Log an error message when the java-libglom .so is not present.

The error message was being set in the exception but not logged.

* src/main/java/org/glom/web/server/

11 years agoIgnore LayoutItem_CalendarPortals.
Ben Konrath [Mon, 28 Nov 2011 12:40:01 +0000 (13:40 +0100)]
Ignore LayoutItem_CalendarPortals.

* src/main/java/org/glom/web/server/ Don't
create the LayoutItemPortal DTO for LayoutItem_CanendarPortals.

11 years agoExtract method for creating the LayoutItemPortal DTO.
Ben Konrath [Mon, 28 Nov 2011 12:25:13 +0000 (13:25 +0100)]
Extract method for creating the LayoutItemPortal DTO.

Just breaking the code up into smaller chunks.

* src/main/java/org/glom/web/server/

11 years agoAdd TypedDataItem.
Ben Konrath [Mon, 28 Nov 2011 08:09:54 +0000 (09:09 +0100)]
Add TypedDataItem.

This should have been added with the refactor. Oops!

* src/main/java/org/glom/web/shared/

11 years agoCreate primary key value from URL string using type from Glom document.
Ben Konrath [Mon, 28 Nov 2011 08:02:29 +0000 (09:02 +0100)]
Create primary key value from URL string using type from Glom document.

See this bug, comments 19 - 25:

* src/main/java/org/glom/web/client/place/ Don't
create a TypeDataItem for the primary key here when loading from a
URL. Show the same string for the primary key value as was received
from the URL string (when loading from a URL).
* src/main/java/org/glom/web/server/ Update method for
creating the Gda Value from the TypeDataItem to properly deal with
creating a Gda Value based on the Glom document type for the primary
key value string when loading from a URL.
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
* src/main/java/org/glom/web/server/database/
Update for changed method name.

11 years agoRename PrimaryKeyItem to TypedDataItem.
Ben Konrath [Sun, 27 Nov 2011 14:50:37 +0000 (15:50 +0100)]
Rename PrimaryKeyItem to TypedDataItem.

The name PrimaryKeyItem suggests what the class should be used for.
TypedDataItem is a neutral name that describes the class better.

This is a rename-only refactor.

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

11 years agoImprove Gda Value conversion from PrimaryKeyItem.
Ben Konrath [Fri, 25 Nov 2011 21:37:51 +0000 (22:37 +0100)]
Improve Gda Value conversion from PrimaryKeyItem.

The value from the PrimaryKeyItem is only used if its type match the
type from the glom document.

* src/main/java/org/glom/web/server/