Murray Cumming [Fri, 8 Jul 2011 07:58:12 +0000 (09:58 +0200)]
ConfiguredDocument: Set the port number too.
* src/main/java/org/glom/web/server/ConfiguredDocument.java
(ConfiguredDocument.ConfiguredDocument): Get the port number from the
Glom document. Presumably this worked sometimes so far because there is a
default port number.
Murray Cumming [Fri, 8 Jul 2011 07:49:15 +0000 (09:49 +0200)]
ConfiguredDocument: Warn that sqlite and self-hosting are not supported.
* src/main/java/org/glom/web/server/ConfiguredDocument.java
(ConfiguredDocument.ConfiguredDocument): Check that the hosting mode is
correct, though we should throw an exception too.
Murray Cumming [Fri, 8 Jul 2011 07:40:01 +0000 (09:40 +0200)]
Fix a addDocuemnt typo.
* src/main/java/org/glom/web/shared/Documents.java
(Documents.addDocuemnt): Rename to addDocument().
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java
(OnlineGlomServiceImpl.getDocuments): Adapt.
Ben Konrath [Fri, 8 Jul 2011 15:36:32 +0000 (17:36 +0200)]
Cleanup comments.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Also
added braces to a one line if statement because the Eclipse formatter
was getting confused.
Murray Cumming [Fri, 8 Jul 2011 07:25:47 +0000 (09:25 +0200)]
Slightly improved log output when connection fails.
* src/main/java/org/glom/web/server/ConfiguredDocument.java
(ConfiguredDocument.setUsernameAndPassword):
We don't know for sure if it' the username/password that's wrong, so
rephrase the message.
Also ouput the exception message, though it's generic in this case.
Ben Konrath [Thu, 7 Jul 2011 19:10:01 +0000 (21:10 +0200)]
Update project config files for Eclipse 3.7 and use GWT 2.3.0.
These should really be two separate tasks but I counldn't get things to
work with GWT 2.2.0 and Eclipse 3.7.
* .classpath:
* .project:
* .settings/org.eclipse.jdt.core.prefs:
* .settings/org.eclipse.jdt.ui.prefs:
* .settings/org.eclipse.ltk.core.refactoring.prefs:
* .settings/org.eclipse.m2e.core.prefs:
Add new config files. Update current files. Remove references to the
webtools plugins as we're not using any of the webtools features.
* .gitignore: Add logs directory which is created when running with
'mvn gwt:run'.
* pom.xml: Update to GWT 2.3.0. Eclipse configuration was automatically added.
* src/main/java/org/glom/web/OnlineGlom.gwt.xml: Moved from
src/main/resources/org/glom/web/OnlineGlom.gwt.xml as per this known
limitation:
http://mojo.codehaus.org/gwt-maven-plugin/eclipse/google_plugin.html#Limitations
Murray Cumming [Thu, 7 Jul 2011 08:51:26 +0000 (10:51 +0200)]
onlineglom.properties: Add explanatory comments.
* src/main/resources/onlineglom.properties: Also change the default user
from ben to someuser, to avoid the risk of people thinking we just
stupidly hard-coded a locale path, when they see that on stderr or in a log.
Ben Konrath [Tue, 28 Jun 2011 15:58:51 +0000 (17:58 +0200)]
Use filename in Log for incorrect passwords.
* src/main/java/org/glom/web/server/ConfiguredDocument.java: Add
getFileName(String) method to get the filename from the URI.
Ben Konrath [Tue, 28 Jun 2011 12:56:13 +0000 (14:56 +0200)]
Add the table name to the URL token for the ListPlace.
This makes things consistent between the DetailsPlace and the
This makes things consistent between the DetailsPlace and the
ListPlace. It also allows the the ListPlace to be bookmarked.
* 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 getDefaultListLayout(). The default layout is now returned
by the getListLayout() method when the table name is an empty string.
* src/main/java/org/glom/web/client/activity/ListActivity.java:
Add table name field. Change to a new ListPlace when the table
has been changed. Use getListLayout() for getting the default
list layout.
* src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
Add table name field. Set the correct table name in the list box
when loading from bookmark. This corrects a problem for the
DetailsPlace too.
* src/main/java/org/glom/web/client/place/DetailsPlace.java:
Move table name to super-class (HasSelectableTable). Move document
and table URL keys to super-class in HasSelectableTable.
* src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java:
Add table name field. Add Tokenizer class with URL key common to
the subclasses (DetailsPlace and ListPlace).
* src/main/java/org/glom/web/client/place/ListPlace.java:
Add table name. Add code to parse the URL token.
* src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java:
Update ListPlace construction with empty table name string.
* src/main/java/org/glom/web/client/ui/TableSelectionView.java:
* src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
Change setTableSelectedIndex(int) to setSelectedTableName(String).
Update ListPlace construction with table name string.
* src/main/java/org/glom/web/shared/layout/LayoutGroup.java:
Change defaultTableName field to tableName to reflect how it's now
used. Update the getter and setter methods.
Ben Konrath [Tue, 28 Jun 2011 08:51:37 +0000 (10:51 +0200)]
Enable the table selector in the DetailsView.
* 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 getDefaultDetailsLayout(). The default layout is now returned
by the getDetailsLayout() method when the table name is an empty
string.
* src/main/java/org/glom/web/client/activity/DetailsActivity.java: Add
event handler for table change event. Change to using
getDetailsLayout() for the default details layout.
* src/main/java/org/glom/web/client/place/DetailsPlace.java: Add table
name to URL token.
* src/main/java/org/glom/web/client/ui/ListViewImpl.java: Use table
when navigating to the details place.
Ben Konrath [Mon, 27 Jun 2011 14:27:49 +0000 (16:27 +0200)]
Use filename based unique document ID in URL and for RPC.
The document ID is the glom document name with spaces (' ') replaced
with pluses ('+') and without the .glom extension.
This change is mostly a string substitution of 'documentTitle' for
'documentID'. The only code change is the addition of a Documents DTO to get the
filename to document title mappings as indicated below.
* src/main/java/org/glom/web/client/OnlineGlomService.java:
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
* src/main/java/org/glom/web/client/activity/DetailsActivity.java:
* src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java:
Use Documents DTO to create the document links in the document
selection view.
* 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/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:
* 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/server/Log.java:
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Change
getDocumentTitles() to getDocuments() and return the Documents DTO.
* src/main/java/org/glom/web/shared/Documents.java: New DTO for
transferring the filename to document title mappings.
Ben Konrath [Sat, 25 Jun 2011 12:40:25 +0000 (14:40 +0200)]
Make the authentication popup work again.
This bug was introduced when I extracted ConfiguredDocument to its own class.
* src/main/java/org/glom/web/server/ConfiguredDocument.java: Return the
correct success / fail status in setUsernameAndPassword().
Ben Konrath [Sat, 25 Jun 2011 12:06:27 +0000 (14:06 +0200)]
Use filename as unique key for configuring database usernames and passwords.
This replaces the use of the Glom document title which could change
depending on the locale. Thanks to Murray Cumming for pointing out this
problem.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
* src/main/resources/onlineglom.properties:
Ben Konrath [Fri, 24 Jun 2011 14:35:09 +0000 (16:35 +0200)]
Pass primary key value to DetailsView.
This enables the DetailsView to load the correct data.
* src/main/java/org/glom/web/client/activity/DetailsActivity.java: Add
primary key value field and set in constructor. Pass primary key
value to getDetailsData().
* src/main/java/org/glom/web/client/place/DetailsPlace.java: Add URL
variables for document title and primary key value.
* src/main/java/org/glom/web/client/ui/ListViewImpl.java: Pass primary
key value to the DetailsPlace.
Ben Konrath [Fri, 24 Jun 2011 09:31:09 +0000 (11:31 +0200)]
Add primary key index to LayoutGroup DTO and add ProvidesKey to CellTable.
This allows the primary key to be retrieved by the Details button. This
functionality has not been implemented yet but it's in the works.
* src/main/java/org/glom/web/client/activity/ListActivity.java: Pass
the LayoutGroup result to ListView.setCellTable instead of all of its
fields individually.
* src/main/java/org/glom/web/client/ui/ListView.java:
* src/main/java/org/glom/web/client/ui/ListViewImpl.java: Use
LayoutGroup as parameter for setCellTable. Add ProvidesKey to CellTable
get the primary key for the table.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Set the
index of the primary key in the LayoutGroup accounting for hidden
primary keys. Rename getJavaNumberFormat() to
convertToJavaNumberFormat() for consistency. Cleanup / add some
comments.
* src/main/java/org/glom/web/shared/layout/LayoutGroup.java: Add a
field for primary key index and a field to indicate whether the
primary key is hidden or not.
Ben Konrath [Thu, 23 Jun 2011 15:19:06 +0000 (17:19 +0200)]
Rename getTableData methods to getListData.
This is a rename refactor for consistency with other 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/client/ui/ListViewImpl.java:
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Thu, 23 Jun 2011 15:09:26 +0000 (17:09 +0200)]
Extract the ConfiguredDocument innerclass into its own class.
This makes the servlet code more object oriented.
* src/main/java/org/glom/web/server/ConfiguredDocument.java: Extracted
from private ConfiguredDocument class in OnlineGlomServiceImpl.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Use the
new ConfiguredDocument class.
Ben Konrath [Tue, 21 Jun 2011 13:27:58 +0000 (15:27 +0200)]
Use the LayoutGroup group for the list layout instead of ColumnInfo and LayoutListTable.
This makes things more inline with how libglom works and reduces code
duplication. This refactor lays the groundwork for adding the primary key to
the LayoutGroup object.
* 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 method names to getListLayout and getDefaultListLayout for
consistency. Use LayoutGroup as the DTO for the list layout instead of
ColumnInfo and LayoutListTable.
* src/main/java/org/glom/web/client/activity/ListActivity.java: Use the
new method names along with the LayoutGroup object for transferring the
list layout.
* src/main/java/org/glom/web/client/ui/ListView.java:
* src/main/java/org/glom/web/client/ui/ListViewImpl.java:
Use ArrayList<LayoutItem> instead of ColumnInfo[] in setCellTable().
* src/main/java/org/glom/web/shared/ColumnInfo.java: Deleted. Replaced
with LayoutGroup.
* src/main/java/org/glom/web/shared/LayoutListTable.java: Deleted.
Replaced with LayoutGroup.
* src/main/java/org/glom/web/shared/layout/LayoutGroup.java: Add
expectedResultSize and defaultTableName fields which are needed for
the list layout.
* src/main/java/org/glom/web/shared/layout/LayoutItemField.java: Add
type field which is needed for the list layout but will also be
useful for the details layout as things progress.
* src/main/java/org/glom/web/shared/layout/LayoutItemWithFormatting.java:
Make class abstract. Remove the unnecessary
getFormattingHorizontalAlignment method. Add setFormatting method.
Ben Konrath [Thu, 16 Jun 2011 18:36:14 +0000 (20:36 +0200)]
Add scripts for building and installing war.
These will help when updating OnlineGlom but they're also good
supplemental documentation of the build and deployment proceeding.
* utils/build-onlineglom-war.sh: New file.
* utils/install-onlineglom-war.sh: New file.
Ben Konrath [Thu, 16 Jun 2011 16:17:42 +0000 (18:17 +0200)]
Create wrapper class to create consistent log messages.
I wrapped methods in the Log class of gwt-log to add the method names
from the servlet and create consistent formatting of the document title
and table names in the log messages.
* src/main/java/org/glom/web/server/Log.java: New file with wrapped methods.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Convert all
log methods to use methods from wrapped Log class.
Ben Konrath [Thu, 16 Jun 2011 14:26:18 +0000 (16:26 +0200)]
Remove superfluous conditional return.
Thanks to Murray Cumming for pointing this out!
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Wed, 15 Jun 2011 11:55:14 +0000 (13:55 +0200)]
Return an ArrayList of LayoutGroups for the Details layout.
This corrects a problem with the details layout as it can have more
than one top level LayoutGroup.
* src/main/java/org/glom/web/client/OnlineGlomService.java:
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Change
method name from get*DetailsLayoutGroup to get*DetailsLayout. Return
an ArrayList<LayoutGroup> in the get*DetailsLayout methods.
* src/main/java/org/glom/web/client/activity/DetailsActivity.java: Deal
with ArrayList of LayoutGroups for the details view layout.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Change
method name from get*DetailsLayoutGroup to get*DetailsLayout. Return an
ArrayList<LayoutGroup> in the get*DetailsLayout methods. Inline
getTableFieldsToShowForSequence() into getFieldsToShowForSQLQuery() to simplify
the code a bit. Rename getTableFieldsToShowForSequenceAddGroup() to
getFieldsToShowForSQLQueryAddGroup() to try to keep things more consistent.
Ben Konrath [Tue, 14 Jun 2011 18:52:32 +0000 (20:52 +0200)]
Use cast_dynamic method to determine the libglom LayoutItem type.
This is better than finding the LayoutItem type by using the string
returned from the get_part_type_name() method.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Tue, 14 Jun 2011 18:22:02 +0000 (20:22 +0200)]
Add method names to log entries in the servlet.
This helps when tracking down deployment problems.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Tue, 14 Jun 2011 18:21:11 +0000 (20:21 +0200)]
Add data to the DetailsView using a hard-coded primary key value.
The layout and functionality of the DetailsView is not complete. This
is just a checkpoint so the patch doesn't get too big.
* src/main/java/org/glom/web/client/OnlineGlomService.java:
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
Add getDetailsData() servlet method.
* src/main/java/org/glom/web/client/activity/DetailsActivity.java:
Add RPC to getDetailsData(). Change the way the LayoutGroups and
LayoutFields are added to the DetailsView.
* src/main/java/org/glom/web/client/ui/DetailsView.java:
* src/main/java/org/glom/web/client/ui/DetailsViewImpl.java:
Add setData() method. Change addLayoutGroup() and addLayoutField() to
take the string for the title instead of the object.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Add implementation getDetailsData() along with some private helper
methods.
* src/main/webapp/style.css: Add padding to details-data class. Add a
details-label class with the same padding as the details-data class.
Ben Konrath [Fri, 3 Jun 2011 15:05:34 +0000 (17:05 +0200)]
Use presenter.goTo() to change to the DetailsPlace.
This will make things easier when we need to open the DetailsView with
data specific to the row that was clicked.
* src/main/java/org/glom/web/client/ui/ListViewImpl.java:
Ben Konrath [Thu, 2 Jun 2011 13:05:54 +0000 (15:05 +0200)]
Add CSS file from mockups.
I'm adding this now because it's going to be useful to have when
developing the DetailsView. The TableSelectionView and ListView aren't
setup properly yet.
* src/main/webapp/OnlineGlom.html:
* src/main/webapp/style.css:
Ben Konrath [Thu, 2 Jun 2011 12:55:11 +0000 (14:55 +0200)]
Use String.isEmpty() to check for empty string.
* src/main/java/org/glom/web/client/activity/ListActivity.java:
Ben Konrath [Thu, 2 Jun 2011 12:47:07 +0000 (14:47 +0200)]
Display main layout group titles in the DetailsView.
This is the start of the DetailsActivity/DetailsView implementation.
* src/main/java/org/glom/web/client/OnlineGlomService.java:
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
Add getDetailsLayoutGroup() and getDefaultDetailsLayoutGroup() methods.
* src/main/java/org/glom/web/client/activity/DetailsActivity.java:
Get the layout information for the details view from the server and set
the main layout group titles.
* src/main/java/org/glom/web/client/ui/DetailsView.java:
* src/main/java/org/glom/web/client/ui/DetailsViewImpl.java:
Add addLayoutGroup() and addLayoutField() methods. This are just
temporary methods for creating the the details view that will change
in the future.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Implement getDetailsLayoutGroup() and getDefaultDetailsLayoutGroup()
methods.
* src/main/java/org/glom/web/shared/layout/Formatting.java:
* src/main/java/org/glom/web/shared/layout/LayoutGroup.java:
* src/main/java/org/glom/web/shared/layout/LayoutItem.java:
* src/main/java/org/glom/web/shared/layout/LayoutItemField.java:
* src/main/java/org/glom/web/shared/layout/LayoutItemWithFormatting.java:
Data Transfer Objects that mimic the libglom object structure. These are
used for transferring the details layout but could also be used for
transferring the list layout.
Ben Konrath [Fri, 27 May 2011 12:17:50 +0000 (14:17 +0200)]
Reset the AuthenticationPopup when clearing the ListView.
* src/main/java/org/glom/web/client/activity/ListActivity.java:
Ben Konrath [Fri, 27 May 2011 12:09:55 +0000 (14:09 +0200)]
Fix problem with onlineglom.properties file loading.
The old way worked in Eclipse but not on the server. Loading the
onlineglom.properties file now works in Eclipse and on the server.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Tue, 24 May 2011 10:24:39 +0000 (12:24 +0200)]
Update gwt-log from 3.1.0 to 3.1.2.
Gwt-log 3.1.0 has been marked as depreciated.
* pom.xml:
Ben Konrath [Tue, 24 May 2011 10:03:40 +0000 (12:03 +0200)]
Add comment to ListActivity.goTo() method.
* src/main/java/org/glom/web/client/activity/ListActivity.java:
Ben Konrath [Tue, 24 May 2011 10:01:27 +0000 (12:01 +0200)]
Remove FIXME in convertGdkColorToHtmlColour()
The Gdk::Color value returned by libglom is 16-bits per channel on both
64 and 32-bit platforms.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Thu, 19 May 2011 14:39:31 +0000 (16:39 +0200)]
Improve performance of initial ListView load.
I removed a round trip to the server for getting the default table name
and then requesting information about that table. This also removes a potential
problem with the table change handler not being setup in time to receive the
table change event from the ListActivity.
* src/main/java/org/glom/web/client/OnlineGlomService.java:
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Add
getDefaultLayoutListTable() method. Improve comments.
* src/main/java/org/glom/web/client/activity/ListActivity.java: Use
getDefaultLayoutListTable() method instead of firing a table change
event to get the table to load.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Add
implementation of getDefaultLayoutListTable() method.
* src/main/java/org/glom/web/shared/LayoutListTable.java: Add field for
table name.
Ben Konrath [Thu, 19 May 2011 13:53:35 +0000 (15:53 +0200)]
Override toDebugString() in TableChangeEvent.
This is useful to have for debugging.
* src/main/java/org/glom/web/client/event/TableChangeEvent.java:
Ben Konrath [Thu, 19 May 2011 13:49:43 +0000 (15:49 +0200)]
Add a "Back to List" link when at the DetailsPlace.
* src/main/java/org/glom/web/client/activity/ListActivity.java:
Populate the CellTable based on the selected table of the ListBox if
it's set otherwise use the default table. This allows the "Back to
List" link to work.
* src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
Remove Place from constructors. Add a setPlace() method. Add
goToPlace() method. Set class as presenter for TableSelectionView.
* src/main/java/org/glom/web/client/mvp/TableSelectionActivityMapper.java:
Use the same TableSelectionActivity when switching between the List and
Details Places.
* src/main/java/org/glom/web/client/place/DetailsPlace.java:
Subclass the new HasSelectableTablePlace. This removes some duplicate
code.
* src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java:
New class to represent Places that display the TableSelectionView.
* src/main/java/org/glom/web/client/place/ListPlace.java:
Subclass the new HasSelectableTablePlace. This removes some duplicate
code.
* src/main/java/org/glom/web/client/ui/TableSelectionView.java:
* src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
Add Presenter interface. Add setBackLinkVisible() method. Add
setBackLink() method.
Ben Konrath [Wed, 18 May 2011 10:45:48 +0000 (12:45 +0200)]
Enable the "Details" buttons.
Right now only an empty details view is displayed.
* src/main/java/org/glom/web/client/ClientFactory.java:
* src/main/java/org/glom/web/client/ClientFactoryImpl.java:
Add DetailsView to ClientFactory.
* src/main/java/org/glom/web/client/activity/DetailsActivity.java:
A basic activity for the details view.
* src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
Add a new constructor that takes a DetailsPlace. Rename shutdown() to
clearView().
* src/main/java/org/glom/web/client/mvp/AppPlaceHistoryMapper.java:
Add DetailsPlace.Tokenizer to the list of tokens that are generated by
GWT.
* src/main/java/org/glom/web/client/mvp/DataActivityMapper.java:
Create a new DetailsActivity when a DetailsPlace is requested. Remove
unnecessary super() in constructor.
* src/main/java/org/glom/web/client/mvp/TableSelectionActivityMapper.java:
Create a new TableSelectionActivity when a DetailsPlace is requested. We
really shouldn't create a new TableSelectionActivity for both the ListPlace
and the DetailsPlace so this should be considered a temporary solution.
* src/main/java/org/glom/web/client/place/DetailsPlace.java:
New file. Represents a URL for the details view.
* src/main/java/org/glom/web/client/ui/DetailsView.java:
* src/main/java/org/glom/web/client/ui/DetailsViewImpl.java:
A basic details view interface and implementation.
* src/main/java/org/glom/web/client/ui/ListViewImpl.java:
Enable the "Details" buttons.
Ben Konrath [Thu, 12 May 2011 16:06:20 +0000 (18:06 +0200)]
Use a LayoutPanel with multiple display areas for main layout.
This is mostly a refactor in that there are no changes from the user
point of view. These changes are required so that we can swap out the list view
with the details view when the user clicks the "Details" button.
* src/main/java/org/glom/web/client/ClientFactory.java:
* src/main/java/org/glom/web/client/ClientFactoryImpl.java: Remove
OnlineGlomView. Add TableSelectionView, ListView and
AuthenticationPopup.
* src/main/java/org/glom/web/client/OnlineGlom.java: Use LayoutPanel
for main layout. Add display regions for main activities. Add
activity manager for for main activities.
* src/main/java/org/glom/web/client/activity/ListActivity.java: New
file from parts of the deleted OnlineGlomActivity.
* src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
New file from parts of the deleted OnlineGlomActivity.
* src/main/java/org/glom/web/client/event/TableChangeEvent.java:
* src/main/java/org/glom/web/client/event/TableChangeEventHandler.java:
New files for app wide table change event.
* src/main/java/org/glom/web/client/mvp/DataActivityMapper.java:
* src/main/java/org/glom/web/client/mvp/DocumentSelectionActivityMapper.java:
* src/main/java/org/glom/web/client/mvp/TableSelectionActivityMapper.java:
Activity mappers for the main activities replace the deleted app-wide
AppActivityMapper.
* src/main/java/org/glom/web/client/ui/AuthenticationPopup.java:
Fix a spelling error in he comment.
* src/main/java/org/glom/web/client/ui/ListView.java:
* src/main/java/org/glom/web/client/ui/ListViewImpl.java:
Renamed from LayoutListView and modified for MVP. This still not a
proper dumb view as prescribed by the MVP pattern but it works for now.
* src/main/java/org/glom/web/client/ui/TableSelectionView.java:
* src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
New widget stripped out of the deleted OnlineGlomView.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Remove hack that is fixed by this patch.
Ben Konrath [Fri, 6 May 2011 14:32:38 +0000 (16:32 +0200)]
Rename OnlineGlomPlace to ListPlace.
The only change besides the rename is that url will now display #list
instead of #Document.
* src/main/java/org/glom/web/client/activity/OnlineGlomActivity.java:
* src/main/java/org/glom/web/client/mvp/AppActivityMapper.java:
* src/main/java/org/glom/web/client/mvp/AppPlaceHistoryMapper.java:
* src/main/java/org/glom/web/client/place/ListPlace.java:
* src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java:
Ben Konrath [Fri, 6 May 2011 14:25:41 +0000 (16:25 +0200)]
Use Presenter for app navigation.
This is the proper way to deal with Place (URL) changes with the MVP
framework.
* src/main/java/org/glom/web/client/ClientFactory.java:
* src/main/java/org/glom/web/client/ClientFactoryImpl.java: Remove
PlaceHistoryMapper and PlaceHistoryHandler.
* src/main/java/org/glom/web/client/OnlineGlom.java: Re-add
PlaceHistoryMapper and PlaceHistoryHandler.
* src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java:
Don't use getHistoryMapper().getToken(place) to create the hyperlinks.
* src/main/java/org/glom/web/client/ui/DocumentSelectionView.java:
* src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java:
Add Presenter interface and setPresenter methods. Rename addHyperLink
to addDocumentLink taking only the document title as a parameter.
Ben Konrath [Thu, 14 Apr 2011 15:44:42 +0000 (17:44 +0200)]
Prompt for db username/password if they haven't been set.
This is implemented with a popup widget that is contained within the
OnlineGlomView and managed by the OnlineGlomActivity.
* src/main/java/org/glom/web/client/OnlineGlomService.java: Two new
methods for checking and setting the database username and password.
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Two
new methods for checking and setting the database username and
password.
* src/main/java/org/glom/web/client/activity/OnlineGlomActivity.java:
Display authentication popup if the JDBC connection to the database
has not been authenticated.
* src/main/java/org/glom/web/client/ui/AuthenticationPopup.java: New
file.
* src/main/java/org/glom/web/client/ui/OnlineGlomView.java: Add methods
for dealing with the authentication popup.
* src/main/java/org/glom/web/client/ui/OnlineGlomViewImpl.java:
Implement the methods for dealing with the authentication popup.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Don't
try to executed queries if the database connection hasn't been
authenticated. Implement methods for checking and setting the
database username and password.
Ben Konrath [Tue, 12 Apr 2011 15:32:25 +0000 (17:32 +0200)]
Make log messages a little clearer.
Add a dash betweeen the document title and the table name.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Tue, 12 Apr 2011 15:27:22 +0000 (17:27 +0200)]
Protect against NPEs when cleaning up database resources.
While this isn't strictly necessary because the exception is caught,
not protecting against the NPEs makes it harder to find the real error
in the log file.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Tue, 12 Apr 2011 12:55:54 +0000 (14:55 +0200)]
Move configuration of the servlet to the constructor.
The servlet will be initialized even if the database authentication
information is not set or correct. I still need to add the UI for prompting
the user for the authentication information when it's required.
* src/main/java/org/glom/web/client/OnlineGlomService.java: Add
javadocs for getDocumentTitles() method.
* src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java:
Set error message when RPC fails.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Get the
glom files directory from the configuration file. Try to set the
database authentication information for the specific document if it's
set and works otherwise try to use the global authentication
information set for the directory.
* src/main/resources/onlineglom.properties: Moved from
src/main/webapp/WEB-INF/OnlineGlom.properties. Updated with new keys.
Added detailed comments for the new keys.
Ben Konrath [Mon, 11 Apr 2011 12:27:46 +0000 (14:27 +0200)]
Remove unnecessary @Override in DocumentSelectionViewImpl.
* src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java:
Ben Konrath [Mon, 11 Apr 2011 12:25:04 +0000 (14:25 +0200)]
Remove center alignment in DocumentSelectionView.
The title element is still centred but the document titles and bottom
sentence are both left-aligned.
* src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.ui.xml:
Ben Konrath [Mon, 11 Apr 2011 09:04:00 +0000 (11:04 +0200)]
Change 'Demo' naming convention to 'Document'.
This is just a rename refactor with no functional changes to the code.
* src/main/java/org/glom/web/client/ClientFactory.java:
* src/main/java/org/glom/web/client/ClientFactoryImpl.java:
* src/main/java/org/glom/web/client/OnlineGlom.java:
* src/main/java/org/glom/web/client/OnlineGlomService.java:
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
* src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java:
* src/main/java/org/glom/web/client/mvp/AppActivityMapper.java:
* src/main/java/org/glom/web/client/mvp/AppPlaceHistoryMapper.java:
* src/main/java/org/glom/web/client/place/DocumentSelectionPlace.java:
* 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/DocumentSelectionViewImpl.ui.xml:
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Fri, 8 Apr 2011 12:46:20 +0000 (14:46 +0200)]
Remove FIXME from safeLongToInt() method.
Libglom uses longs on 32-bit and 64-bit platforms so it's ok to use
this method.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Fri, 8 Apr 2011 12:22:34 +0000 (14:22 +0200)]
Display an error if no glom documents are found in the specified directory.
* src/main/java/org/glom/web/client/activity/DemoSelectionActivity.java:
* src/main/java/org/glom/web/client/ui/DemoSelectionView.java:
* src/main/java/org/glom/web/client/ui/DemoSelectionViewImpl.java:
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Fri, 8 Apr 2011 12:19:03 +0000 (14:19 +0200)]
Add copyright header to one more file ... oops.
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java:
Ben Konrath [Fri, 8 Apr 2011 10:53:06 +0000 (12:53 +0200)]
Add copyright header to files without it.
* src/main/java/org/glom/web/client/activity/DemoSelectionActivity.java:
* src/main/java/org/glom/web/client/place/DemoSelectionPlace.java:
* src/main/java/org/glom/web/client/ui/DemoSelectionView.java:
* src/main/java/org/glom/web/client/ui/DemoSelectionViewImpl.java:
* src/main/java/org/glom/web/shared/ColumnInfo.java:
* src/main/java/org/glom/web/shared/GlomField.java:
Ben Konrath [Fri, 8 Apr 2011 10:41:52 +0000 (12:41 +0200)]
Add support for accessing multiple glom documents in the servlet.
This completes the demo selection functionality.
* src/main/java/org/glom/web/client/OnlineGlomService.java: Add
document title to methods.
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Add
document title to methods.
* src/main/java/org/glom/web/client/activity/DemoSelectionActivity.java:
Set browser window title when the activity starts. Correct name of
document title variable.
* src/main/java/org/glom/web/client/activity/OnlineGlomActivity.java:
Set browser window title when the activity starts. Set the table
selector change handler after table selector has been set. Clear the
OnlineGlomView when the activity has been stopped.
* src/main/java/org/glom/web/client/place/OnlineGlomPlace.java: Use the
document title as the place token. Use "#Document:" instead of
"#OnlineGlomPlace:" in the URL.
* src/main/java/org/glom/web/client/ui/DemoSelectionViewImpl.ui.xml:
Change heading to "Online Glom"
* src/main/java/org/glom/web/client/ui/LayoutListView.java: Use
document title in RPC methods.
* src/main/java/org/glom/web/client/ui/OnlineGlomView.java: Remove
setDocumentTitle() method. Add clear() method.
* src/main/java/org/glom/web/client/ui/OnlineGlomViewImpl.java: Remove
setDocumentTitle() method. Implement clear() method which removes the
change handler on the ListBox, clears the ListBox and clears the
DataPanel.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Implement methods with document title. Keep track for the configured
glom documents and their corresponding JDBC configurations in a hash
table. This information is retrieved using the document title as the
key in the hash table.
* src/main/java/org/glom/web/shared/GlomDocument.java: Remove
document title field as it's no longer needed.
Ben Konrath [Fri, 8 Apr 2011 09:37:26 +0000 (11:37 +0200)]
Update the Eclipse JDT configuration.
* .settings/org.eclipse.jdt.ui.prefs: Automatically add comments to new
methods. Automatically add the copyright header to new files.
Ben Konrath [Tue, 5 Apr 2011 15:02:19 +0000 (17:02 +0200)]
Add new page for demo selection.
This patch adds all the components required to view and start an
OnlineGlom demo by clicking on the desired hyperlink. The user is
able to return to the demo selection page with the browser's back
button. I still need to modify the servlet to work with multiple
documents so all demo links will load the file defined in the
OnlineGlom.properties.
* .gitignore: Add .gwt which holds the error log for the GWT UiBuidler.
This is only useful during development so we don't need to save it.
* src/main/java/org/glom/web/client/ClientFactory.java: Add method to
get a reference to the DemoSelectionView.
* src/main/java/org/glom/web/client/ClientFactoryImpl.java: Implement
method to get a reference to the DemoSelectionView.
* src/main/java/org/glom/web/client/OnlineGlom.java: Change the
default view to DemoSelectionView.
* src/main/java/org/glom/web/client/OnlineGlomService.java: Add method
to get glom document titles for glom files in a hard-coded directory.
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Add
method to get glom document titles for glom files in a hard-coded
directory.
* src/main/java/org/glom/web/client/activity/DemoSelectionActivity.java:
Presenter for DemoSelectionView.
* src/main/java/org/glom/web/client/mvp/AppActivityMapper.java: Update
for DemoSelectionView.
* src/main/java/org/glom/web/client/mvp/AppPlaceHistoryMapper.java:
Update for DemoSelectionView.
* src/main/java/org/glom/web/client/place/DemoSelectionPlace.java:
Basic 'Place' implementation for the DemoSelectionView.
* src/main/java/org/glom/web/client/ui/DemoSelectionView.java:
The interface for the DemoSelectionView.
* src/main/java/org/glom/web/client/ui/DemoSelectionViewImpl.java:
The implementation of the DemoSelectionView.
* src/main/java/org/glom/web/client/ui/DemoSelectionViewImpl.ui.xml:
The GWT UiBuilder xml file used in DemoSelectionViewImpl.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Add
implementation of method to get glom document titles for glom files
in a hard-coded directory.
* src/main/webapp/OnlineGlom.html: Remove link to CSS file as it's
on longer being used.
* src/main/webapp/glom.png: Glom logo.
Ben Konrath [Tue, 5 Apr 2011 11:01:23 +0000 (13:01 +0200)]
Move RPC code from OnlineGlomViewImpl to OnlineGlomActivity.
This is the forth and final commit of a refactor that will allow
OnlineGlom to be used with multiple documents.
* src/main/java/org/glom/web/client/activity/OnlineGlomActivity.java:
Move RPC code from OnlineGlomViewImpl to this class.
* src/main/java/org/glom/web/client/ui/OnlineGlomView.java: Add methods
to inferface.
* src/main/java/org/glom/web/client/ui/OnlineGlomViewImpl.java: Move
RPC code to the presenter class (the P in MVP).
Ben Konrath [Mon, 4 Apr 2011 12:15:44 +0000 (14:15 +0200)]
Start moving the existing OnlineGlom code to MVP.
This work is based on the GWT MVP framework that is documented here:
https://code.google.com/webtoolkit/doc/2.2/DevGuideMvpActivitiesAndPlaces.html
This is the third commit of a refactor that will allow OnlineGlom to
be used with multiple documents.
* src/main/java/org/glom/web/client/ClientFactory.java: New file.
Interface for client factory which is used to get instances of various
classes throughout the app.
* src/main/java/org/glom/web/client/ClientFactoryImpl.java: New file.
Implementation of client factory.
* src/main/java/org/glom/web/client/OnlineGlom.java: Add code to
initialize the MVP framework.
* src/main/java/org/glom/web/client/activity/OnlineGlomActivity.java:
New file. Activity manager for the main container widget. This is the
Presenter in MVP.
* src/main/java/org/glom/web/client/mvp/AppActivityMapper.java: New file.
Maps place (URL) to its corresponding activity.
* src/main/java/org/glom/web/client/mvp/AppPlaceHistoryMapper.java:
New file. This is just a place holder for a generated file.
* src/main/java/org/glom/web/client/place/OnlineGlomPlace.java:
New file. Represents the URL for the main Online Glom app.
* src/main/java/org/glom/web/client/ui/LayoutListView.java: Update
for changes in LayoutListViewImpl.
* src/main/java/org/glom/web/client/ui/OnlineGlomView.java: Create
interface for View. Move code to OnlineGlomViewImpl class.
* src/main/java/org/glom/web/client/ui/OnlineGlomViewImpl.java: New
file. Implementation of OnlineGlomView.
* src/main/resources/org/glom/web/OnlineGlom.gwt.xml: Add Activity and
Place resources. Use ClientFactoryImpl by default.
Ben Konrath [Mon, 4 Apr 2011 06:25:53 +0000 (08:25 +0200)]
Move View classes to their own package.
This is the second commit of a refactor that will allow OnlineGlom to
be used with multiple documents.
Ben Konrath [Sat, 2 Apr 2011 10:15:33 +0000 (12:15 +0200)]
Move UI code from the main module to its own class.
This is the first commit of a refactor that will allow OnlineGlom to be
used with multiple documents.
* src/main/java/org/glom/web/client/LayoutListView.java: Update
references to OnlineGlom to OnlineGlomView.
* src/main/java/org/glom/web/client/OnlineGlom.java: Move code to
OnlineGlomView and instantiate it here.
* src/main/java/org/glom/web/client/OnlineGlomView.java: New class that
represents the main OnlineGlomView with one document.
Ben Konrath [Fri, 1 Apr 2011 11:59:08 +0000 (13:59 +0200)]
Fix formatting of gwt.xml and add DTD.
* src/main/resources/org/glom/web/OnlineGlom.gwt.xml:
Ben Konrath [Wed, 30 Mar 2011 12:17:03 +0000 (14:17 +0200)]
Propperly convert gdkColor string to html colour string.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Mon, 28 Mar 2011 15:50:26 +0000 (17:50 +0200)]
Change implementation of OnlineGlomServiceImpl.getColumnInfoHorizontalAlignment().
This implementation matches
OnlineGlomServiceImpl.getColumnInfoGlomFieldType(), should perform better, is more
readable and is not tied to Swig.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Mon, 28 Mar 2011 15:43:19 +0000 (17:43 +0200)]
Use read-only checkboxes for boolean field types.
* src/main/java/org/glom/web/client/LayoutListView.java: Create columns
in the CellTable based on the field type. It currently only
distinguishes between boolean and text columns but I'll need to add
support for more types.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Set the
column type in the ColumnInfo object. Add method to convert between the
glom field type enum in ColumnInfo and the glom field type in libglom.
* src/main/java/org/glom/web/shared/ColumnInfo.java: Add support for
field type.
* src/main/java/org/glom/web/shared/GlomField.java: Add support for
getting and setting booleans.
Ben Konrath [Fri, 25 Mar 2011 15:32:17 +0000 (16:32 +0100)]
Don't get the Date twice from the ResultSet.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Fri, 25 Mar 2011 14:15:38 +0000 (15:15 +0100)]
Cleanup code in the servlet.
* TODO: Remove item about row count. Add item about testing row count
query with large number of rows.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Fix
spelling mistakes, change method parameter to be consistent with
other methods.
Ben Konrath [Fri, 25 Mar 2011 14:04:54 +0000 (15:04 +0100)]
Add server side logging with the gwt-log library.
* .gitignore: Ignore the log file we're now producing.
* TODO: Add a couple TODO item for logging.
* pom.xml: Add gwt-log and log4j as a dependency.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Add
logging of errors, warnings and some important info.
* src/main/resources/log4j.properties: New file to configure log4j.
Ben Konrath [Thu, 24 Mar 2011 09:52:36 +0000 (10:52 +0100)]
Add a disable button for the Details view.
* src/main/java/org/glom/web/client/LayoutListView.java:
Ben Konrath [Tue, 22 Mar 2011 13:17:19 +0000 (14:17 +0100)]
Use a count query to get the number of rows for the list view pager.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Tue, 22 Mar 2011 10:30:45 +0000 (11:30 +0100)]
Add more TODO information about CellTable pager positioning.
* TODO:
Ben Konrath [Sat, 19 Mar 2011 12:17:53 +0000 (13:17 +0100)]
Add TODO item about CellTable pager positioning.
* TODO:
Ben Konrath [Fri, 18 Mar 2011 13:39:50 +0000 (14:39 +0100)]
Remove unneeded GlomFieldColumn class.
This is just a small code cleanup.
* src/main/java/org/glom/web/client/LayoutListView.java:
Ben Konrath [Fri, 18 Mar 2011 09:55:27 +0000 (10:55 +0100)]
Use cursor mode in the query that gets data for the list view.
I still need to fix the potential memory problem when getting the row
count for the list view.
* TODO: Add note about testing memory usage with large data sets. Add
item about fixing row counting with large data sets.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Put the
PostgreSQL JDBC driver into cursor mode when getting data for the
list view.
Ben Konrath [Tue, 15 Mar 2011 14:02:09 +0000 (15:02 +0100)]
Remove the GWT Container from the Eclipse build classpath.
The GWT dependencies are set by Maven so this isn't needed.
* .classpath:
Murray Cumming [Tue, 15 Mar 2011 09:25:59 +0000 (10:25 +0100)]
Added some earlier mockups to git, but not to the tarball dist.
* mockups/: Added some mockups from 2010-02 by Daniel Borgmann for
Openismus. These hopefully show how we might structure the HTML so that
it can be styled easily with CSS. However, we probably need to adapt them
for the CSS structure that GWT dictates for common widgets.
Ben Konrath [Mon, 14 Mar 2011 11:44:42 +0000 (12:44 +0100)]
Locate OnlineGlom.properties using the ServletContext.
This is required to be able to locate the file in the deployed servlet.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Configure the database and glom document in in a helper method so
that the ServletContext can be used to locate OnlineGlom.properties.
* src/main/webapp/WEB-INF/OnlineGlom.properties: Moved from
src/main/webapp. This is the proper location for .properites files.
Ben Konrath [Sat, 12 Mar 2011 20:25:53 +0000 (21:25 +0100)]
Add note to README about why we're compiling down to obfuscated JavaScript.
* README:
Ben Konrath [Fri, 11 Mar 2011 21:08:49 +0000 (22:08 +0100)]
Use properites file to configure servlet.
This allows people to change the glom file path, db username and db
password without recompiling the code.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
* src/main/webapp/OnlineGlom.properties:
Ben Konrath [Fri, 11 Mar 2011 17:47:51 +0000 (18:47 +0100)]
Use table fields in layout list view if the layout list is not defined.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Manually create a LayoutFieldVector for the query builder using the
table fieldswhen a layout list is not defined in the glom file.
Ben Konrath [Fri, 11 Mar 2011 17:23:30 +0000 (18:23 +0100)]
Only show FIXME string for images when there's an image.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Also included
in this change are some small code cleanups.
Ben Konrath [Fri, 11 Mar 2011 09:40:30 +0000 (10:40 +0100)]
Set text for fields with TYPE_IMAGE and TYPE_INVALID to avoid NPEs.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Ben Konrath [Fri, 11 Mar 2011 09:27:07 +0000 (10:27 +0100)]
Correctly set the index of the default table.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Correctly set the index of the default table. Add commented out example
file paths.
Ben Konrath [Thu, 10 Mar 2011 17:07:17 +0000 (18:07 +0100)]
Add comment to pom.xml about the previous change.
* pom.xml: Add comment about the deployment issue so that it's obvious
why java-libglom is set to the provided scope.
Ben Konrath [Thu, 10 Mar 2011 10:53:34 +0000 (11:53 +0100)]
Change java-libglom dependency from compile to provided in pom.xml.
Since java-libglom uses jni it can only be loaded once and therefore
must be placed in $CATALINA_HOME/lib and not included in each war.
This directory is defined as /usr/share/tomcat6/lib/ on Ubuntu 10.04.
More information about this issue can be found in the Tomcat 6 release
notes in the "JNI Based Applications" section:
http://tomcat.apache.org/tomcat-6.0-doc/RELEASE-NOTES.txt
* README: Remove note about this issue. Deployment info should really
be on the wiki anyway so I'll add it right now.
* pom.xml: Change java-libglom dependency from compile to provided so
that it's copied in to the packaged war.
Ben Konrath [Wed, 9 Mar 2011 11:10:50 +0000 (12:10 +0100)]
Change to using a neutral locale for currency, date and time formatting.
This solves the problem of currency values being represented without a
space between the currency code and the number (e.g. "EUR5.89" is now
represented as "EUR 5.89"). More work is required when we implement
a locale preference setting.
* TODO: Add note about currency formatting issues with different
locales.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Change
to using the neutral ROOT locale.
Ben Konrath [Wed, 9 Mar 2011 10:43:46 +0000 (11:43 +0100)]
Add support for currency codes that are not ISO 4217 codes.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Use
the currency code defined in the glom file when it's not 3 characters
long or when Java doesn't recognize the string as an ISO 4217 code.
Ben Konrath [Tue, 8 Mar 2011 16:48:31 +0000 (17:48 +0100)]
Remove test classes, launch configurations and configuration.
The test stuff was getting in the way when creating the war. To make
the war file you can now do 'mvn clean package'. The packaged war file
will be in the target directory.
* .classpath: Remove unused classpathentry for tests and i18n.
* pom.xml: Remove junit.jar dependency. Properly use gwt.version
property. Don't run test or i18n goals when packaging the war.
* src/main/webapp/WEB-INF/web.xml: Add xml name space. Correct
formatting.
Removed files:
* OnlineGlomTest-dev.launch:
* OnlineGlomTest-prod.launch:
* src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
* src/test/resources/org/glom/web/OnlineGlomJUnit.gwt.xml:
Ben Konrath [Mon, 7 Mar 2011 16:49:06 +0000 (17:49 +0100)]
Update gwt-maven plugin to 2.2.0 and fix other configuation problems.
These fixes allow me to use 'mvn deploy' to create the war file.
* .classpath: This generated config has been updated by Eclipse. This
change was probably triggered by me updating from Eclipse 3.6.1 to
3.6.2.
* .gitignore: Add entry to ignore the directory
src/main/webapp/WEB-INF/deploy. This directory is generated by Eclipse.
* .project: The generated config has been updated by Eclipse. This
change was probably triggered by me updating from Eclipse 3.6.1 to
3.6.2.
* .settings/com.google.appengine.eclipse.core.prefs: Add empty config
so that Eclipse doesn't complain
* pom.xml: Update to gwt-maven-plugin 2.2.0.
* src/test/java/org/glom/web/client/GwtTestOnlineGlom.java: Move from
'tests' directory to 'client' directory. This is the new
gwt-maven-plugin convension.
* src/test/resources/org/glom/web/OnlineGlomJUnit.gwt.xml: Correctly
refer to org.glom.web.OnlineGlom gwt module and OnlineGlomServiceImpl.
Ben Konrath [Mon, 7 Mar 2011 15:36:48 +0000 (16:36 +0100)]
Add support for horizontal alignment in the LayoutList columns.
* TODO: Remove item about horizontal alignment. Add item about
improvements to ColumnInfo.
* src/main/java/org/glom/web/client/LayoutListView.java: Set horizontal
alignment on the columns. Use ColumnInfo RPC object get the column
title and horizontal alignment.
* src/main/java/org/glom/web/client/OnlineGlom.java: Update
LayoutListView creation with ColumnInfo RPC object.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Create
a ColumnInfo object for every LayoutList columnn. Convert the
FieldFormatting.HorizontalAlignment to the correct
ColumnnInfo.HorizontatlAlignment with the new
getColumnInfoHorizontalAlignment helper method.
* src/main/java/org/glom/web/shared/ColumnInfo.java: New RPC object
to encapsulate column information like alignment and title. This
could be used to set the colour instead of on a per cell field basis.
* src/main/java/org/glom/web/shared/LayoutListTable.java: Replace
column title storage and retrieval with ColumnInfo.
Ben Konrath [Fri, 4 Mar 2011 14:08:07 +0000 (15:08 +0100)]
Add support for column sorting.
* src/main/java/org/glom/web/client/LayoutListView.java: Change
AsynDataProvider to be an anonymous inner class. Use new
getSortedTableData RPC method when column sort is requested. Set all
columns sortable and add an AsyncHandler to activate sorting in the
AsyncDataProvider.
* src/main/java/org/glom/web/client/OnlineGlomService.java: Add new
method getSortedTableData(). Cleanup other method signatures.
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Add
new method getSortedTableData(). Cleanup other method signatures.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Implement getSortedTableData() and getTableData() methods by using a
private helper method with the appropriate parameters filled in. Use
user supplied sort clause when supplied, otherwise fall back to
sorting by the primary key. Move destroy() method to be underneath
constructor for readability. Cleanup comments.
Ben Konrath [Thu, 3 Mar 2011 09:06:33 +0000 (10:06 +0100)]
Add entry to ChangeLog for previous commit.
Ben Konrath [Thu, 3 Mar 2011 09:05:19 +0000 (10:05 +0100)]
Add support for colour text and colour backgrounds to the layout list cells.
Only the cell backgrounds are coloured which leaves a gap between the
cells that isn't coloured. I need to figure out a way to set
'style=background-colour:' on the whole column rather than just the
cell.
* TODO: Add a note about colouring the background of the whole column.
* src/main/java/org/glom/web/client/LayoutListView.java: Add a custom
column type (GlomFieldColumn) and a custom cell type (GlomFieldCell) to
render the coloured text and backgrounds. Use GlomField[] for the row type.
* src/main/java/org/glom/web/client/OnlineGlomService.java: Use GlomField[]
for the row type.
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Use
GlomField[] for the row type.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Use
GlomField[] for the row type. Set the text, text colour and background
colour in the GlomField objects as specified in the glom document. Add
method to convert from Gdk::Color to HTML colour string. Cleanup comments.
* src/main/java/org/glom/web/shared/GlomField.java: New file to encapulate
the glom field text, foreground colour and background colour.
Ben Konrath [Wed, 2 Mar 2011 09:25:20 +0000 (10:25 +0100)]
Don't display hidden tables in the combo box.
* src/main/java/org/glom/web/client/OnlineGlom.java: Update code to use
ArrayLists.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Add
code to ignore hidden tables using ArrayLists for the table names and
titles.
* src/main/java/org/glom/web/shared/GlomDocument.java: Change tableTitles and
tableNames to use ArrayLists instead of String[]. Update getter and setter
methods.
Ben Konrath [Tue, 1 Mar 2011 17:54:19 +0000 (18:54 +0100)]
Add support of Date and Time number types.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Implement formatting for Date and Time values. Change the default glom
file to small business example.
Ben Konrath [Tue, 1 Mar 2011 15:13:36 +0000 (16:13 +0100)]
Add support for formatting glom types as specified in the glom file.
Formatting isn't finished yet - I still need to add support for Date
and Time values.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Add
formatting support for TYPE_TEXT, TYPE_BOOLEAN and TYPE_NUMERIC. Remove
checks for null values in JDBC cleanup code and catch all exceptions
instead of just SQLExceptions.
* src/main/java/org/glom/web/shared/LayoutListTable.java: Fix incorrect
method name.
Ben Konrath [Tue, 1 Mar 2011 13:32:54 +0000 (14:32 +0100)]
Use GWT 2.2.0 instead of 2.1.1.
* pom.xml: Change GWT version numbers.
Ben Konrath [Tue, 1 Mar 2011 10:48:16 +0000 (11:48 +0100)]
A few small code cleanups.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Remove
duplicate for loop.
* src/main/java/org/glom/web/shared/GlomDocument.java: Remove
unnecessary object creation in constructor.
* src/main/java/org/glom/web/shared/LayoutListTable.java: Remove
unnecessary object creation in constructor.
Ben Konrath [Mon, 28 Feb 2011 12:58:53 +0000 (13:58 +0100)]
Add file for TODO list.
* TODO: New file.
Ben Konrath [Fri, 18 Feb 2011 15:02:34 +0000 (16:02 +0100)]
Enable the CellTable Pager when more than 20 rows need to be viewed.
The Pager will automatically become active when the results are larger
than the CellTable size which is currently set to 20 lines.
* src/main/java/org/glom/web/client/LayoutListView.java: Correct class
name on debug statment in RPC call in LayoutListDataProvider, add
numRows parameter to LayoutListView constructor, propperly set rowCount
in CellTable.
* src/main/java/org/glom/web/client/OnlineGlom.java: Correct class
name on debug statment in RPC call, use LayoutListTable object in RPC
calls, pass rowCount to LayoutListView.
* src/main/java/org/glom/web/client/OnlineGlomService.java: Change
getLayoutListHeaders to getLayoutListTable and return LayoutListTable
object.
* src/main/java/org/glom/web/client/OnlineGlomServiceAsync.java: Update
interface for changes in OnlineGlomService.
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: Change
getLayoutListHeaders() to getLayoutListTable() and return
LayoutListTable. Using this object allows me to pass other information
about the LayoutList like the expected number of rows in the result set.
The Connection object from the connection pool is now propperly closed.
Only the requested number of lines are returned to the client in
getTableData().
* src/main/java/org/glom/web/shared/LayoutListTable.java: Move from
GlomTable and add columnTitles and numRows.
Ben Konrath [Fri, 18 Feb 2011 12:00:38 +0000 (13:00 +0100)]
Use String arrays instead of GlomTable objects in GlomDocument GWT-RPC object.
This is a small performance boost. I'll use GlomTable to get the required
layoutlist information.
* src/main/java/org/glom/web/client/OnlineGlom.java:
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
* src/main/java/org/glom/web/shared/GlomDocument.java:
Ben Konrath [Fri, 18 Feb 2011 11:34:44 +0000 (12:34 +0100)]
Add option to turn off formatting in JDT formatter preferences.
* .settings/org.eclipse.jdt.core.prefs: