online-glom:gwt-glom.git
8 years agoUpdate from jooq 2.6 to 3. spring-security
Murray Cumming [Fri, 21 Jun 2013 11:20:27 +0000 (13:20 +0200)]
Update from jooq 2.6 to 3.

8 years agopom.xml: Update the guava version.
Murray Cumming [Thu, 20 Jun 2013 19:56:18 +0000 (21:56 +0200)]
pom.xml: Update the guava version.

8 years agopom.xml: Update spring-security-* versions.
Murray Cumming [Thu, 20 Jun 2013 19:49:20 +0000 (21:49 +0200)]
pom.xml: Update spring-security-* versions.

8 years agopom.xml: Update plugin versions.
Murray Cumming [Thu, 20 Jun 2013 19:47:10 +0000 (21:47 +0200)]
pom.xml: Update plugin versions.

8 years agopom.xml: Require a revent maven version.
Murray Cumming [Thu, 20 Jun 2013 19:35:39 +0000 (21:35 +0200)]
pom.xml: Require a revent maven version.

This lets us use later plugin versions, as suggested by
mvn versions:display-plugin-updates

8 years agopom.xml: Update more dependency version numbers.
Murray Cumming [Thu, 20 Jun 2013 19:23:21 +0000 (21:23 +0200)]
pom.xml: Update more dependency version numbers.

8 years agopom.xml: Update versions of some gwt stuff.
Murray Cumming [Thu, 20 Jun 2013 19:16:17 +0000 (21:16 +0200)]
pom.xml: Update versions of some gwt stuff.

8 years agoAdded the start of a UserRegister place/activity/view.
Murray Cumming [Wed, 19 Jun 2013 07:45:07 +0000 (09:45 +0200)]
Added the start of a UserRegister place/activity/view.

8 years agoAdd GlomActivity.
Murray Cumming [Wed, 19 Jun 2013 06:38:14 +0000 (08:38 +0200)]
Add GlomActivity.

* src/main/java/org/glom/web/client/activity/HasDocumentActivity.java:
  Move some of the implementation to:
* src/main/java/org/glom/web/client/activity/GlomActivity.java:
  We do not need to use this for non-document-specific URLs,
  but it is nice to separate its generic utility methods out.

8 years agoAdd GlomPlace.
Murray Cumming [Wed, 19 Jun 2013 06:16:47 +0000 (08:16 +0200)]
Add GlomPlace.

* src/main/java/org/glom/web/client/place/HasDocumentPlace.java:
  Move most of the Tokenizer to a parent class, so we can have
  system-wide URLs that do not involve a particular document.

8 years agoCorrect the OnlineGlomConstants.hu filename
Murray Cumming [Wed, 19 Jun 2013 08:00:17 +0000 (10:00 +0200)]
Correct the OnlineGlomConstants.hu filename

8 years agoInitial implementation of a users database.
Murray Cumming [Sat, 15 Jun 2013 20:10:13 +0000 (22:10 +0200)]
Initial implementation of a users database.

* src/main/java/org/glom/web/server/SqlUtils.java:
  Make createField() public so we can use it to create SQL queries
  for the users database.
* src/main/java/org/glom/web/server/users/UserDatabase.java:
  An overly-simplified API and implementation of a users database,
  based on the table structure in the Spring Security documentation.
* src/test/java/org/glom/web/server/users/UserDatabaseTest.java:
  Test the API.
* src/test/java/org/glom/web/server/SelfHoster.java
* src/test/java/org/glom/web/server/SelfHosterMySQL.java
* src/test/java/org/glom/web/server/SelfHosterPostgreSQL.java:
  Modify these so they can be used to self-host databases other than
  just databases for Glom documents, so we can use it to self-host
  a users database during testing.

8 years agoSqlUtils: Slight JdbcConnectionDetails cleanup.
Murray Cumming [Fri, 14 Jun 2013 07:00:21 +0000 (09:00 +0200)]
SqlUtils: Slight JdbcConnectionDetails cleanup.

* src/main/java/org/glom/web/server/SqlUtils.java:
  Make JdbcConnectionDetails static and do some checks before
  creating it in getJdbcConnectionDetails().

8 years agoMove some utility functions into SqlUtils.
Murray Cumming [Fri, 14 Jun 2013 06:51:06 +0000 (08:51 +0200)]
Move some utility functions into SqlUtils.

* src/main/java/org/glom/web/server/libglom/Document.java:
  Move getSqlDialect()
* src/test/java/org/glom/web/server/SelfHosterPostgreSQL.java:
  and move quoteAndEscapeSqlId()
* src/main/java/org/glom/web/server/SqlUtils.java: into here.
* src/test/java/org/glom/web/server/SelfHostExampleTest.java:
  Adapt.

9 years agoDocument: Add getConnectionDetails(), using new ServerDetails class.
Murray Cumming [Wed, 8 May 2013 09:16:40 +0000 (11:16 +0200)]
Document: Add getConnectionDetails(), using new ServerDetails class.

* src/main/java/org/glom/web/server/libglom/ServerDetails.java:
  Add the ServerDetails class, to hold host, port, etc.
* src/main/java/org/glom/web/server/libglom/Document.java: Replace
  getConnectionServer(), getConnectionPort(), etc, with
  getConnectionDetails().
* src/main/java/org/glom/web/server/SqlUtils.java:
* src/test/java/org/glom/web/server/SelfHosterMySQL.java:
  Simplify this code slightly by replacing three parameters with one
  in several methods.

9 years agoOnlineGlomProperties: Add getConfig() so it can load itself.
Murray Cumming [Wed, 8 May 2013 09:14:15 +0000 (11:14 +0200)]
OnlineGlomProperties: Add getConfig() so it can load itself.

* src/main/java/org/glom/web/server/ConfiguredDocumentSet.java:
  Move some OnlineGlomProperties instantiation to:
* src/main/java/org/glom/web/server/OnlineGlomProperties.java:
  new method getConfig().

9 years agoMoved UserStore to its own package.
Murray Cumming [Wed, 8 May 2013 07:51:11 +0000 (09:51 +0200)]
Moved UserStore to its own package.

* src/main/java/org/glom/web/server/UserStore.java:
  moved to src/main/java/org/glom/web/server/users/UserStore.java
* src/main/java/org/glom/web/server/OnlineGlomLoginServlet.java:
* src/main/java/org/glom/web/server/OnlineGlomServlet.java:
  Adapted.

9 years agospring-security: Use a custom HTML login form.
Murray Cumming [Wed, 10 Apr 2013 20:19:14 +0000 (22:19 +0200)]
spring-security: Use a custom HTML login form.

9 years agoIntial use of spring-security.
Murray Cumming [Tue, 9 Apr 2013 19:16:20 +0000 (21:16 +0200)]
Intial use of spring-security.

* pom.xml: Depend on spring-security and some related modules
  that apparently are not brought in by that already.
* src/main/webapp/WEB-INF/web.xml: Filter with spring-security.
* src/main/webapp/WEB-INF/applicationContext.xml:
  Basic spring-security setup, specifying a custom AuthenitcationProvider.
* src/main/java/org/glom/web/server/CustomSpringAuthenticationProvider.java:
  A custom authentication provider that justs grants access to anyone
  with any username and password.

9 years agoFix minor comment typos
Murray Cumming [Wed, 3 Apr 2013 15:23:28 +0000 (17:23 +0200)]
Fix minor comment typos

9 years agoAnother Eclipse files Quick Fix
Murray Cumming [Wed, 3 Apr 2013 13:12:05 +0000 (15:12 +0200)]
Another Eclipse files Quick Fix

* .settings/com.google.gdt.eclipse.core.prefs:
Eclipse suggested and did this change.

9 years agoStop using a ChangeLog
Murray Cumming [Wed, 3 Apr 2013 13:10:36 +0000 (15:10 +0200)]
Stop using a ChangeLog

9 years agoBuild: Eclipse file updates done by Eclipse.
Murray Cumming [Wed, 3 Apr 2013 13:09:51 +0000 (15:09 +0200)]
Build: Eclipse file updates done by Eclipse.

* .classpath:
* settings/com.google.gwt.eclipse.core.prefs:
Eclipse Quick Fix changes apparently to make these
up to date for the latest maven eclipse plugin.

9 years agoBuild: Update to gwt 2.5.1
Murray Cumming [Mon, 18 Mar 2013 10:25:53 +0000 (11:25 +0100)]
Build: Update to gwt 2.5.1

* pom.xml: Update the gwt and gwt-maven-plugin to 2.5.1.

9 years agoSelfHoster: Actually escape SQL IDs using JOOQ.
Murray Cumming [Fri, 15 Feb 2013 14:24:16 +0000 (15:24 +0100)]
SelfHoster: Actually escape SQL IDs using JOOQ.

* src/test/java/org/glom/web/server/SelfHoster.java:
Added quoteAndEscapeSqlId(), wrapping the use of JOOQ's
Factory.render() to escape and quote the SQL ID.
* src/test/java/org/glom/web/server/SelfHosterPostgreSQL.java:
* src/test/java/org/glom/web/server/SelfHosterMySQL.java:
escapeSqlId(): Rename to quoteAndEscapeSqlId(),
calling the quoteAndEscapeSqlId() in the base class, passing
the SQL dialect. We no longer need to do the quoting
here because JOOQ does it.
* src/test/java/org/glom/web/server/SelfHostExampleTest.java:
Add testSelfHosterEscapeIDSame() and
testSelfHosterEscapeIDNotSame(), to test the SQL escaping,
though it is only used in the test code anyway.

See https://groups.google.com/d/msg/jooq-user/8_zd3b07yh4/sXG0aYy8XsAJ
about the JOOQ usage.

9 years agoTest MySQL via self-hosting too, instead of just PostgreSQL.
Murray Cumming [Fri, 15 Feb 2013 11:15:51 +0000 (12:15 +0100)]
Test MySQL via self-hosting too, instead of just PostgreSQL.

        * pom.xml: Depend on the MYSQL JDBC driver.
        * src/main/java/org/glom/web/server/SqlUtils.java:
Make getJdbcConnectionDetails() public, for use in tests.
        * src/main/java/org/glom/web/shared/libglom/Field.java: getSqlType():
Take the SQL Dialect to support both MySQL and PostgreSQL.
        * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
        Test MySQL too.
        * src/test/java/org/glom/web/server/SelfHostExampleNonNumericPrimaryKeysTest.java:
        * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
Test MYSQL too.
        * src/test/java/org/glom/web/server/SelfHoster.java:
        * src/test/java/org/glom/web/server/SelfHosterMySQL.java:
        * src/test/java/org/glom/web/server/SelfHosterPostgreSQL.java:
Abstract some code into the base SelfHoster and finish implementing
the MYSQL version.

9 years agoSqlUtils: Do not hard-code the PostgreSQL SQL dialect.
Murray Cumming [Fri, 15 Feb 2013 11:06:46 +0000 (12:06 +0100)]
SqlUtils: Do not hard-code the PostgreSQL SQL dialect.

* src/main/java/org/glom/web/server/SqlUtils.java: Take
the JOOQ SQLDialect as a parameter to these utility
functions.
* src/main/java/org/glom/web/server/libglom/Document.java:
Add getSqlDialect().
* src/main/java/org/glom/web/server/: Use getSqlDialect()
to provide the new parameter.

9 years agoSelfHostExampleTest: Use the generic SelfHoster base class.
Murray Cumming [Sun, 3 Feb 2013 20:52:10 +0000 (21:52 +0100)]
SelfHostExampleTest: Use the generic SelfHoster base class.

        * src/test/java/org/glom/web/server/SelfHostTestUtils.java:
Take a SelfHoster parameter rather than a SelfHosterPostgreSQL.
        * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
Use the base class type where possible.

9 years agoSelfHosterPostgreSQL: Avoid some copy/pasting.
Murray Cumming [Thu, 31 Jan 2013 21:40:42 +0000 (22:40 +0100)]
SelfHosterPostgreSQL: Avoid some copy/pasting.

        * src/main/java/org/glom/web/server/SqlUtils.java:
Added getJdbcConnectionDetails() and used it in
createAndSetupDataSource(). Also support MySQL here.
        * src/test/java/org/glom/web/server/SelfHosterPostgreSQL.java:
        createConnection(): Use getJdbcConnectionDetails() instead of
repeating the start of the jdbc URI and the default database name.

9 years agoAvoid some copy/pasted connection/statement code.
Murray Cumming [Thu, 31 Jan 2013 20:32:56 +0000 (21:32 +0100)]
Avoid some copy/pasted connection/statement code.

        * src/main/java/org/glom/web/server/SqlUtils.java: Add executeQuery(),
which does the getting of the Connection and the creation of the Statement,
so the caller does not have to.
        * src/main/java/org/glom/web/server/OnlineGlomImagesServlet.java
        * src/main/java/org/glom/web/server/database/DetailsDBAccess.java
        * src/main/java/org/glom/web/server/database/ListDBAccess.java
        * src/main/java/org/glom/web/server/database/RelatedListNavigation.java
        * src/test/java/org/glom/web/server/SelfHoster.java: Use the new method
instead of doing all the work each time.

9 years agoDocument: Read and write the other hosting modes.
Murray Cumming [Wed, 16 Jan 2013 20:25:27 +0000 (21:25 +0100)]
Document: Read and write the other hosting modes.

        * src/main/java/org/glom/web/server/libglom/Document.java:
        Add to the hosting mode enum and handle all when loading
and saving a document. Also add constants for the XML
attribute values.

9 years agotests: Move more methods down to SelfHoster.
Murray Cumming [Mon, 14 Jan 2013 12:52:00 +0000 (13:52 +0100)]
tests: Move more methods down to SelfHoster.

9 years agoImprove a comment with a link
Murray Cumming [Tue, 29 Jan 2013 12:40:02 +0000 (13:40 +0100)]
Improve a comment with a link

9 years agoChange a translatable string slightly.
Murray Cumming [Fri, 25 Jan 2013 09:24:40 +0000 (10:24 +0100)]
Change a translatable string slightly.

* src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties:
Do not mention PostgreSQL, so we can support other database backends,
and other login systems in future.

9 years agoAdded a Hungarian translation.
Murray Cumming [Fri, 25 Jan 2013 09:23:29 +0000 (10:23 +0100)]
Added a Hungarian translation.

* src/main/java/org/glom/web/OnlineGlom.gwt.xml:
* src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_hu.properties:
This is from the new translation in Glom.

9 years agoUpdate translations from Glom.
Murray Cumming [Fri, 25 Jan 2013 09:17:49 +0000 (10:17 +0100)]
Update translations from Glom.

        * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties
* src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties
* src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties:
Take the translations from the Glom .po files.

9 years agotests: Split SelfHoster into SelfHoster and SelfHosterPostgreSQL.
Murray Cumming [Mon, 14 Jan 2013 12:17:38 +0000 (13:17 +0100)]
tests: Split SelfHoster into SelfHoster and SelfHosterPostgreSQL.

This should let me add MySQL hosting too.

9 years agoAdd a comment
Murray Cumming [Sat, 5 Jan 2013 10:37:02 +0000 (11:37 +0100)]
Add a comment

9 years agoPrevent client code from reading our client cookie.
Murray Cumming [Wed, 19 Dec 2012 21:26:39 +0000 (22:26 +0100)]
Prevent client code from reading our client cookie.

        * pom.xml: Use a later javax.servlet version than we seem to
get automatically, probably via GWT, so we have the
Cookie.setSecure() method, though I cannot find out when it
was added.
        * src/main/java/org/glom/web/server/OnlineGlomLoginServlet.java:
        checkAuthentication(): Call setSecure() on the Cookie, so it
can only be retrieved via HTTP(S), not by client code,
making it harder for Javascript to hijack the session.

9 years agoOnlineGlomServlet(): Simplify getting the request in all cases.
Murray Cumming [Wed, 19 Dec 2012 21:22:04 +0000 (22:22 +0100)]
OnlineGlomServlet(): Simplify getting the request in all cases.

        * src/main/java/org/glom/web/server/OnlineGlomServlet.java:
        getConnection(), getSessionIdFromCookie(): Move some code into
getRequest(), which lets us not worry about whether it is called
via GWT-RPC or as a regular servlet.

9 years agoDocumentLoginViewImpl: Refuse to try if not using HTTPS.
Murray Cumming [Wed, 19 Dec 2012 21:17:25 +0000 (22:17 +0100)]
DocumentLoginViewImpl: Refuse to try if not using HTTPS.

        * src/main/java/org/glom/web/client/ui/DocumentLoginViewImpl.java:
Show an error message, and disable the login button, if we are not using
HTTPS.
        * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties:
        * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_*.properties:
Add the translatable string for the error message.

9 years agoOnlineGlomLoginServlet.checkAuthentication(): Require HTTPS.
Murray Cumming [Wed, 19 Dec 2012 21:14:42 +0000 (22:14 +0100)]
OnlineGlomLoginServlet.checkAuthentication(): Require HTTPS.

        * pom.xml: Use HTTPS when running jetty for testing via mvn gwt:run.
This annoys us with a security warning about the self-signed certificate,
but it's better than the risk of deactivating the checks.
        * src/main/java/org/glom/web/server/OnlineGlomLoginServlet.java:
        checkAuthentication(): Refuse to check if the servlet is not running via
HTTPS.
        * src/main/webapp/WEB-INF/web.xml: Add a comment about why we do
not require HTTPS for the login servlet in all cases.

9 years agoDo not attempt connections for empty usernames and passwords.
Murray Cumming [Wed, 19 Dec 2012 20:14:06 +0000 (21:14 +0100)]
Do not attempt connections for empty usernames and passwords.

        * src/main/java/org/glom/web/server/SqlUtils.java:
        tryUsernameAndPassword(): Do not try if the username and
password are empty, to avoid useless warnings.

9 years agoUse the configuration file's username and password again. user-access
Murray Cumming [Mon, 17 Dec 2012 19:26:29 +0000 (20:26 +0100)]
Use the configuration file's username and password again.

* src/main/java/org/glom/web/server/OnlineGlomProperties.java:
Move Credentials to:
* src/main/java/org/glom/web/server/Credentials.java.
* src/main/java/org/glom/web/server/ConfiguredDocument.java:
Use Credentials here too, instead of its own Credentials class.
This keeps an open connection around for a while.
        * src/main/java/org/glom/web/client/ui/list/ListViewTable.java:
        * src/main/java/org/glom/web/server/ConfiguredDocumentSet.java:
        * src/main/java/org/glom/web/server/SessionListener.java:
        * src/main/java/org/glom/web/server/UserStore.java:
* src/test/java/org/glom/web/server/OnlineGlomPropertiesTest.java:
        Adapted.
* src/main/java/org/glom/web/server/OnlineGlomServlet.java:
Rename getConnectionForCookie() to getConnection() and also try the
ConfiguredDocument.getConnection().
        * src/main/java/org/glom/web/server/OnlineGlomImagesServlet.java:
        * src/main/java/org/glom/web/server/OnlineGlomLoginServlet.java:
* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
        Adapted.

9 years agoDocumentLoginViewImpl: Make this look like the document selector page.
Murray Cumming [Mon, 17 Dec 2012 15:22:49 +0000 (16:22 +0100)]
DocumentLoginViewImpl: Make this look like the document selector page.

* src/main/java/org/glom/web/client/ui/DocumentLoginViewImpl.ui.xml:
This new UIBinder file is based on DocumentSelectionViewImpl.
        * src/main/webapp/style.css: Add the style.
        * src/main/java/org/glom/web/client/ui/DocumentLoginViewImpl.java:
Use UIBinder.

9 years agoOnlineGlomImagesServlet: Make authentication work.
Murray Cumming [Mon, 17 Dec 2012 13:59:06 +0000 (14:59 +0100)]
OnlineGlomImagesServlet: Make authentication work.

        * src/main/java/org/glom/web/server/OnlineGlomImagesServlet.java:
        (OnlineGlomImagesServlet.doGet(): Pass the request to
        isAuthenticated(), getImageFromDocument() and getImageFromDatabase()
because getThreadLocalRequest() will not work if the servlet was
not called via GWT-RPC.
        * src/main/java/org/glom/web/server/OnlineGlomLoginServlet.java:
        isAuthenticated() take a request.
        * src/main/java/org/glom/web/server/OnlineGlomServlet.java:
        Add an isAuthenticated() and a getConnectionForCookie() that take
a request.
        getSessionIdFromCookie(): take a request, only trying
getThreadLocalRequest() if the request is null.

We probably should not be using a GWT base class for this service anyway,
but it simplifies the multiple-inheritance. We should try containment
instead.

9 years agoReally use the shared configuredDocumentSet and shared userStore
Murray Cumming [Mon, 17 Dec 2012 13:02:56 +0000 (14:02 +0100)]
Really use the shared configuredDocumentSet and shared userStore

9 years agoAdd a test for Utils.buildImageDataUrl().
Murray Cumming [Mon, 17 Dec 2012 13:01:10 +0000 (14:01 +0100)]
Add a test for Utils.buildImageDataUrl().

        * src/test/java/org/glom/web/server/UtilsTest.java:
Add this tests because this method has started failing with this
exception, and maybe this will help to debug it:
java.lang.NoSuchMethodError: org.apache.http.client.utils.URLEncodedUtils.encPath(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String;

9 years agoMove configuredDocumentSet into the base OnlineGlomServlet.
Murray Cumming [Mon, 17 Dec 2012 10:03:07 +0000 (11:03 +0100)]
Move configuredDocumentSet into the base OnlineGlomServlet.

       This leaves just one place where we can change the implementation
so we retrieve a shared document set instead.

9 years agoMove authentication to a separate login servlet.
Murray Cumming [Mon, 17 Dec 2012 09:53:21 +0000 (10:53 +0100)]
Move authentication to a separate login servlet.

        * 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:
Move checkAuthentication() and isAuthenticated() to:
        * src/main/java/org/glom/web/client/OnlineGlomLoginService.java
        * src/main/java/org/glom/web/client/OnlineGlomLoginServiceAsync.java
        * src/main/java/org/glom/web/server/OnlineGlomLoginServlet.java
        * src/main/webapp/WEB-INF/web.xml: Mention the new servlet.
        * src/main/java/org/glom/web/client/activity/DocumentLoginActivity.java:
        * src/main/java/org/glom/web/client/activity/HasDocumentActivity.java:
Adapted.

We already have to (but do not yet) share the login details between
the regular and images servlets, so we might as well separate it
competely. This assumes that I will find a way to share the data
between servlets.

9 years agoRenamed OnlineGlomImages to OnlineGlomImagesServlet.
Murray Cumming [Mon, 17 Dec 2012 09:12:19 +0000 (10:12 +0100)]
Renamed OnlineGlomImages to OnlineGlomImagesServlet.

9 years agoExperimenting with per-user access.
Murray Cumming [Mon, 10 Dec 2012 22:28:41 +0000 (23:28 +0100)]
Experimenting with per-user access.

        * src/main/java/org/glom/web/server/ConfiguredDocument.java:
Remove the connection, adding it as a parameter to public methods.
Moved setUsernameAndPassword() to
* src/main/java/org/glom/web/server/SqlUtils.java:
as tryUsernameAndPassword().
        * src/main/java/org/glom/web/server/ConfiguredDocumentSet.java:
        Adapted.
        * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
checkAuthentication(): Store a cookie if the authentication was
successful. Also create the database connection and store that too,
for later use.
        * src/main/java/org/glom/web/server/OnlineGlomImages.java:
 * src/main/java/org/glom/web/server/OnlineGlomServlet.java: Share
a base class, which gets the existing connection based on
the cookie.
        * src/main/java/org/glom/web/server/SessionListener.java:
Used to invalidate the connection when the browser session
ends. However, this probably needs to be declared in our web.xml.
        * src/main/java/org/glom/web/server/UserStore.java:
An in-memory store of the remembered credentials (and connections).
This is just a test: It never discards old unused credentials
and loses everything when the server stops.
        * src/test/java/org/glom/web/server/ConfiguredDocumentTest.java:
        * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
Adapted.

9 years agoAdd a test for Utils.buildImageDataUrl().
Murray Cumming [Mon, 17 Dec 2012 13:01:10 +0000 (14:01 +0100)]
Add a test for Utils.buildImageDataUrl().

        * src/test/java/org/glom/web/server/UtilsTest.java:
Add this tests because this method has started failing with this
exception, and maybe this will help to debug it:
java.lang.NoSuchMethodError: org.apache.http.client.utils.URLEncodedUtils.encPath(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String;

9 years agoDocumentLoginViewImpl: Make the strings translatable.
Murray Cumming [Wed, 12 Dec 2012 10:09:48 +0000 (11:09 +0100)]
DocumentLoginViewImpl: Make the strings translatable.

* src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties:
Add translatable strings needed for the login UI.
* src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_*.properties:
Add them here as placeholders, using the English text.
* src/main/java/org/glom/web/client/ui/DocumentLoginViewImpl.java: Use
the translated constants instead of hard-coding the strings.

9 years agoOnlineGlomServiceImpl: Check for authentication in all service methods.
Murray Cumming [Fri, 7 Dec 2012 20:52:53 +0000 (21:52 +0100)]
OnlineGlomServiceImpl: Check for authentication in all service methods.

        * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Call checkAuthentication() before doing anything.

9 years agoAdd a comment
Murray Cumming [Thu, 6 Dec 2012 21:20:22 +0000 (22:20 +0100)]
Add a comment

9 years agoUse a custom PlaceController to go to the previous page after login.
Murray Cumming [Thu, 6 Dec 2012 21:19:08 +0000 (22:19 +0100)]
Use a custom PlaceController to go to the previous page after login.

        * src/main/java/org/glom/web/client/PlaceControllerExt.java:
A derived PlaceController that knows the previous, and default,
places, and can take us to the appropriate one.
        * src/main/java/org/glom/web/client/ClientFactoryImpl.java:
        Instantiate the custom PlaceController instead of the regular one.
        * src/main/java/org/glom/web/client/OnlineGlom.java:
Use the defaultPlace from the PlaceControllerExt, to avoid
duplication.
        * src/main/java/org/glom/web/client/activity/DocumentLoginActivity.java:
        Add goToPrevious() and goToDefault(), using the custom PlaceController.
        Use these instead of the hard-coded goTo() calls.

9 years agoSome checks for nulls.
Murray Cumming [Wed, 5 Dec 2012 22:47:22 +0000 (23:47 +0100)]
Some checks for nulls.

        * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java:
        fillView():
        * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
        setLocaleList(), setReportList()):
        * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
        getReportsList(): Avoid using null objects.
        * src/main/java/org/glom/web/server/Utils.java:
        transformUnknownToActualType(): Try to avoid or catch
failures to parse the string as a double.

9 years agoTurn the authenication popup into a real Place.
Murray Cumming [Wed, 5 Dec 2012 22:45:44 +0000 (23:45 +0100)]
Turn the authenication popup into a real Place.

        * src/main/java/org/glom/web/client/place/HasTablePlace.java:
Moved some of this into a base class:
        * src/main/java/org/glom/web/client/place/HasDocumentPlace.java:
for use by:
* src/main/java/org/glom/web/client/place/DocumentLoginPlace.java

* src/main/java/org/glom/web/client/ui/AuthenticationPopup.java:
Removed this, moving its UI into:
* src/main/java/org/glom/web/client/ui/DocumentLoginView.java
* src/main/java/org/glom/web/client/ui/DocumentLoginViewImpl.java

        * src/main/java/org/glom/web/client/ClientFactory.java:
        * src/main/java/org/glom/web/client/ClientFactoryImpl.java:
        Added getDocumentLoginView() to return this view.

        * src/main/java/org/glom/web/client/activity/HasTableActivity.java:
Move some of this into a base class:
* src/main/java/org/glom/web/client/activity/HasDocumentActivity.java
checkAuthentication(): If the user is not authenticated,
instead of showing the popup, go to the login place.
* src/main/java/org/glom/web/client/activity/DocumentLoginActivity.java
A new activity for the DocumentLoginPlace. This checks if the
user is authenticated and either moves to the appropriate page or
waits for the user to enter credentials.

        * src/main/java/org/glom/web/client/activity/ListActivity.java:
        * src/main/java/org/glom/web/client/activity/ReportActivity.java:
Remove mentions of the authentication popup.

        * src/main/java/org/glom/web/client/mvp/AppPlaceHistoryMapper.java:
        Tell this about DocumentLoginPlace.
        * src/main/java/org/glom/web/client/mvp/DocumentSelectionActivityMapper.java:
        getActivity(): Also handle DocumentLoginPlace, returning DocumentLoginActivity.

The login screen is not pretty, and it does not yet attempt to take the use
back to the correct place.

9 years agoDetailsActivity: Check for authentication here too.
Murray Cumming [Tue, 4 Dec 2012 22:22:53 +0000 (23:22 +0100)]
DetailsActivity: Check for authentication here too.

        * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
        Call checkAuthentication to deal with a TODO here.

9 years agoAuthentication: Reduce some copy/paste by moving code to base class.
Murray Cumming [Tue, 4 Dec 2012 22:11:56 +0000 (23:11 +0100)]
Authentication: Reduce some copy/paste by moving code to base class.

        * src/main/java/org/glom/web/client/activity/HasTableActivity.java:
        Add checkAuthentication().
        * src/main/java/org/glom/web/client/activity/ListActivity.java:
        * src/main/java/org/glom/web/client/activity/ReportActivity.java:
Call it here instead of copy/pasting the code.

9 years agoAdd some comments
Murray Cumming [Tue, 4 Dec 2012 21:44:16 +0000 (22:44 +0100)]
Add some comments

9 years agoGwtTestOnlineGlomService: Add some assertions.
Murray Cumming [Tue, 4 Dec 2012 20:51:11 +0000 (21:51 +0100)]
GwtTestOnlineGlomService: Add some assertions.

        * src/test/java/org/glom/web/client/GwtTestOnlineGlomService.java:
However, these assertions will never be run because we have no
way to set up the test conditions (specifying documents and their
databases) for the OnlineGlom service.
See https://groups.google.com/forum/?hl=en&fromgroups=#!topic/google-web-toolkit/Z6rPWG4kcKQ

9 years agoAdd client-side tests for StringUtils and Utils.
Murray Cumming [Tue, 4 Dec 2012 20:32:04 +0000 (21:32 +0100)]
Add client-side tests for StringUtils and Utils.

        * src/test/java/org/glom/web/client/GwtTestStringUtils.java: Added.
        * src/test/java/org/glom/web/client/GwtTestUtils.java: Added.
This is mostly just to catch java->javascript compilation problems.

9 years agotests: Add client-side test for StringUtils.
Murray Cumming [Tue, 4 Dec 2012 05:30:55 +0000 (06:30 +0100)]
tests: Add client-side test for StringUtils.

9 years agoAdd GwtTestReportPlace.
Murray Cumming [Sun, 2 Dec 2012 21:53:36 +0000 (22:53 +0100)]
Add GwtTestReportPlace.

        * src/test/java/org/glom/web/client/place/GwtTestReportPlace.java:
This is like the existing GwtTest*Place tests.
It would be nice if we could just test that all client and shared
code can be compiled to Javascript without creating a test for it.
Currently, we only discover problems when starting it in a browser.

9 years agoAdd GwtTestDetailsPlace to test the same code as client-side.
Murray Cumming [Sun, 2 Dec 2012 21:44:31 +0000 (22:44 +0100)]
Add GwtTestDetailsPlace to test the same code as client-side.

        * src/test/java/org/glom/web/client/place/GwtTestDetailsPlace.java:
See the comment about the awkward client-side-only Date API.
Ignoring this Date API issue, it would be nice if we could test
the same code as both Java (server) and generated Javascript (client)
without duplicating most of the test code.

9 years agoAdd GwtTestDetailsPlace to test the same code as client-side.
Murray Cumming [Sun, 2 Dec 2012 21:44:31 +0000 (22:44 +0100)]
Add GwtTestDetailsPlace to test the same code as client-side.

        * src/test/java/org/glom/web/client/place/GwtTestDetailsPlace.java:
See the comment about the awkward client-side-only Date API.
Ignoring this Date API issue, it would be nice if we could test
the same code as both Java (server) and generated Javascript (client)
without duplicating most of the test code.

9 years agoDataItemTest: Test the date type too, and improve the asserts.
Murray Cumming [Sun, 2 Dec 2012 21:42:57 +0000 (22:42 +0100)]
DataItemTest: Test the date type too, and improve the asserts.

        * src/test/java/org/glom/web/shared/DataItemTest.java:
Add testdate(). See the comment about the awkward server-side-only
Date API.

9 years agoDetailsPlace: Use a date-formatting API available in GWT client code.
Murray Cumming [Sun, 2 Dec 2012 21:28:01 +0000 (22:28 +0100)]
DetailsPlace: Use a date-formatting API available in GWT client code.

        * src/main/java/org/glom/web/client/place/DetailsPlace.java:
        getStringForData(): Use DateTimeFormat.getFormat(), because that works
on the client side (but not the server side) instead of String.format()
with Date.getYear()/getMonth()/getDate(), because they work only on the
server side (but not on the client side). Rather annoying.
        * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java: Rename to
GwtTestDetailsPlace.
        * src/test/java/org/glom/web/client/place/ListPlaceTest.java: Rename to
GwtTestListPlaceTest, so we can run these as client-side (generated
Javascript) code so we can catch these problems sooner.
It is unfortunate that the code cannot run on the server-side as Java,
but it does not need to.

9 years agoIn the UI, allow primary keys to be any type, and test it.
Murray Cumming [Sun, 2 Dec 2012 20:52:07 +0000 (21:52 +0100)]
In the UI, allow primary keys to be any type, and test it.

* src/main/java/org/glom/web/shared/TypedDataItem.java:
        Added isUnknownType() for convenience.
        * src/main/java/org/glom/web/client/place/DetailsPlace.java:
        getToken(): Move some code into getStringForData() and handle
other data types.
        * src/main/java/org/glom/web/server/Utils.java:
        Added transformUnknownToActualType(), to parse the unknown string
as a particular type of data. This should correspond with
getStringForData() above.
        * src/main/java/org/glom/web/server/ConfiguredDocument.java:
Add setDataItemType() to set the type of data for primary
keys.
        getDetailsData(), getSuitableRecordToViewDetails():
Call it, to have the correctly-typed primary key value.
We do it here, on the server, instead of before, because it
is only here that we can know the field type that is in the
document.
        * src/test/java/org/glom/web/client/place/DetailsPlaceTest.java:
        Added testGetPlaceParametersNumericPrimaryKey(),
testGetPlaceParametersBooleanPrimaryKey() and
testGetPlaceParametersDatePrimaryKey).

9 years agoAllow primary keys to be any type, and test it.
Murray Cumming [Fri, 30 Nov 2012 20:41:45 +0000 (21:41 +0100)]
Allow primary keys to be any type, and test it.

        * src/main/java/org/glom/web/shared/TypedDataItem.java:
Add overrides for the other set*() methods, to set the type.
        Added getValue() which returns a generic Object.
* src/main/java/org/glom/web/server/SqlUtils.java:
buildSimpleWhereExpression(): Use TypedDataItem.getValue() instead of
getNumber().
        * src/test/java/org/glom/web/server/SelfHostExampleNonNumericPrimaryKeysTest.java:
Added this test, which is much like SelfHostExampleTest, but which uses this
test file, take from Glom:
        * src/test/resources/org/glom/web/server/test_example_music_collection_text_pk_fields.glom:
which has all the primary keys changes to text instead of numbers.

However, parts of the UI code still assume that primary keys are numbers.

9 years agoAdd missing file.
Murray Cumming [Wed, 28 Nov 2012 22:24:10 +0000 (23:24 +0100)]
Add missing file.

9 years agoSelfHostExampleTest: Move some checks into a utility function.
Murray Cumming [Wed, 28 Nov 2012 08:15:08 +0000 (09:15 +0100)]
SelfHostExampleTest: Move some checks into a utility function.

        * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
        Move the data checks into a new file:
* src/test/java/org/glom/web/server/SelfHostTestUtils.java:
SelfHostTestUtils.java: so we can use it in some other
tests, with different documents.

9 years agoSelfHosting test: Also try using a relationship.
Murray Cumming [Wed, 28 Nov 2012 08:06:42 +0000 (09:06 +0100)]
SelfHosting test: Also try using a relationship.

        * src/main/java/org/glom/web/server/database/DBAccess.java:
        convertResultSetToDTO(): Move some code into a public
method as:
        * src/main/java/org/glom/web/server/SqlUtils.java:
        fillDataItemFromResultSet(): This takes a DataItem and
sets it from a value from a datbase recordset.
        * src/main/java/org/glom/web/server/libglom/Document.java:
Make getDocument() public, so we can use it in a test.
        * src/test/java/org/glom/web/server/SelfHostExampleTest.java:
Add testExampleMusiccollectionDataRelated() and call it from
        testExampleMusiccollectionData(), to do a basic test of using
a relationship.

9 years agoBuild: Specify the source encoding.
Murray Cumming [Thu, 22 Nov 2012 10:05:26 +0000 (11:05 +0100)]
Build: Specify the source encoding.

        * pom.xml: Set project.build.sourceEncoding
This should fix this build problem on some systems:
[ERROR] /var/lib/jenkins/workspace/OnlineGlom/src/test/java/org/glom/web/server/libglom/DocumentTest.java:[139,72] error: unmappable character for encoding ASCII

9 years ago1.23.1 1.23.1
Murray Cumming [Tue, 20 Nov 2012 22:12:59 +0000 (23:12 +0100)]
1.23.1

9 years agoUpdate the jasperreports version.
Murray Cumming [Tue, 20 Nov 2012 21:05:48 +0000 (22:05 +0100)]
Update the jasperreports version.

        * pom.xml: This was shown by
mvn versions:display-dependency-updates

9 years agoEclipse: Reorder the Java Build Path to fix the build in Eclipse.
Murray Cumming [Tue, 20 Nov 2012 21:04:53 +0000 (22:04 +0100)]
Eclipse: Reorder the Java Build Path to fix the build in Eclipse.

        * .classpath: This prevents an error saying that getTextContent()
is undefined.
See http://mergetag.com/the-method-gettextcontent-is-undefined-for-the-type-node/

9 years agoExplicitly declare some dependencies (and scopes) that we use.
Murray Cumming [Tue, 20 Nov 2012 20:38:46 +0000 (21:38 +0100)]
Explicitly declare some dependencies (and scopes) that we use.

        * pom.xml: The dependency report showed what we use.

9 years agoUpdate the gwt-test-utils version.
Murray Cumming [Tue, 20 Nov 2012 20:37:55 +0000 (21:37 +0100)]
Update the gwt-test-utils version.

        * pom.xml: gwt-test-utils 0.43 uses GWT 2.5.0, not GWT 2.4.0.
Using both in the same project was causing gwt-log to fail in GWTBrige,
with this error:
testOutOfBounds(org.glom.web.server.libglom.DocumentLayoutPathTest):
(class: com/google/gwt/core/client/GWT, method: setBridge signature: (Lcom/google/gwt/core/client/GWTBridge;)V) Incompatible argument to function

9 years agoAllow generation of a dependency report.
Murray Cumming [Tue, 20 Nov 2012 20:00:44 +0000 (21:00 +0100)]
Allow generation of a dependency report.

9 years agoDocumentTest: testLocales(): Update for the latest example version.
Murray Cumming [Mon, 19 Nov 2012 20:54:35 +0000 (21:54 +0100)]
DocumentTest: testLocales(): Update for the latest example version.

        * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
        The .glom file, updated in the previous commit, now has more translations.

9 years agoUpdate the .glom files used for tests.
Murray Cumming [Mon, 19 Nov 2012 20:37:46 +0000 (21:37 +0100)]
Update the .glom files used for tests.

        * src/test/resources/org/glom/web/server/example_film_manager.glom:
        * src/test/resources/org/glom/web/server/example_music_collection.glom:
        * src/test/resources/org/glom/web/server/libglom/example_film_manager.glom:
        * src/test/resources/org/glom/web/server/libglom/example_music_collection.glom:
Copy them from git master of Glom.

9 years agoUpdate versions of depdencies.
Murray Cumming [Mon, 19 Nov 2012 06:12:36 +0000 (07:12 +0100)]
Update versions of depdencies.

        * pom.xml: Increase some version numbers based on the output of
, using mvn versions:display-dependency-updates.
        * src/test/java/org/glom/web/client/GwtTestOnlineGlom.java:
Use the annotation instead of getModuleName().
        * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
        Do not use deprecated assert() classes/methods.

9 years agoDocument: Correct an import to use the correct Log API.
Murray Cumming [Sun, 18 Nov 2012 22:24:50 +0000 (23:24 +0100)]
Document: Correct an import to use the correct Log API.

        * src/main/java/org/glom/web/server/libglom/Document.java:
Use our Utils.Log API rather than the jfree one that Eclipse
must have suggested at some time.

9 years agoDetails: Get static image data from our images services. images
Murray Cumming [Thu, 15 Nov 2012 22:15:31 +0000 (23:15 +0100)]
Details: Get static image data from our images services.

        * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
Add constructors for LayoutItemText and LayoutItemImage and
deal with their common type instead of just LayoutItemField.
        setData():
        * src/main/java/org/glom/web/client/activity/DetailsActivity.java:
        Adapted.
        * src/main/java/org/glom/web/client/ui/details/Group.java:
        createChildWidget(): Use the other DetailsCell constructors for
these layout items, and do not add them to the list of
cells with data from the database.
        * src/main/java/org/glom/web/server/ConfiguredDocument.java:
        getValidListViewLayoutGroup(), getDetailsLayoutGroup():
Remove the image data when cloning the layout and storing it in the
cache. Clients will instead get it via the URL, from
our images service.
        * src/main/java/org/glom/web/server/OnlineGlomImages.java:
doGet(): Depending on the URI parameters, optionally get
image data from a layout_item_image in the document,
via its layout path.
        * src/main/java/org/glom/web/server/database/DBAccess.java:
        convertResultSetToDTO(): Move some URIBuilder code to:
        * src/main/java/org/glom/web/server/Utils.java:
Add buildImageDataUrl() taking the primary key, etc, to
get data from the database.

9 years agoDocument: Static image items: Store an image URL, using the layout path.
Murray Cumming [Thu, 15 Nov 2012 21:59:32 +0000 (22:59 +0100)]
Document: Static image items: Store an image URL, using the layout path.

        * src/main/java/org/glom/web/server/Utils.java: Add buildImageDataUrl().
        * src/main/java/org/glom/web/server/libglom/Document.java:
        Add a constructor that takes the documentID, for use in the
LayoutItemImage URL.
loadLayoutNode(): Pass a Path object to the helper methods, so we
can use it to create a URL for LayoutItemImage items.
This seems as good a way as any to specify a layout item in the document.
        * src/main/java/org/glom/web/server/ConfiguredDocumentSet.java:
Pass the documentID to the constructor, for use in the LayoutItemImage
URL.

9 years agoDocument: Add getLayoutItemByPath().
Murray Cumming [Thu, 15 Nov 2012 21:46:49 +0000 (22:46 +0100)]
Document: Add getLayoutItemByPath().

        * src/main/java/org/glom/web/server/Utils.java:
Add buildLayoutPath() and parseLayoutPath().
        * src/test/java/org/glom/web/server/LayoutPathTest.java: Test that these
utility methods work.
        * src/main/java/org/glom/web/server/libglom/Document.java:
Add Add getLayoutItemByPath().
* src/test/java/org/glom/web/server/libglom/DocumentLayoutPathTest.java: Test
that it works.

This will be useful in subsequent commits.

9 years agoDocument: Use a better base64 decoder to read static image data.
Murray Cumming [Thu, 15 Nov 2012 21:33:25 +0000 (22:33 +0100)]
Document: Use a better base64 decoder to read static image data.

        * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
        getNodeTextChildAsValue(): Use the apache commons base64 decoder
instead of the gwt one, because it correctly decodes the strings
from g_base64_encode(). It is probably more correct.
The newlines might be confusing the gwt decoder.

9 years agoDocument: Do not use == to compare strings. Use equals().
Murray Cumming [Wed, 14 Nov 2012 22:43:20 +0000 (23:43 +0100)]
Document: Do not use == to compare strings. Use equals().

* src/main/java/org/glom/web/server/libglom/Document.java:
== only checks that they are the same object, so it can
seem to fail.

9 years agoDocument: Add and use public constants for layout names.
Murray Cumming [Wed, 14 Nov 2012 19:14:14 +0000 (20:14 +0100)]
Document: Add and use public constants for layout names.

        * src/main/java/org/glom/web/server/libglom/Document.java:
Make LAYOUT_NAME_DETAILS and LAYOUT_NAME_LIST public.
        * src/main/java/org/glom/web/server/ConfiguredDocument.java:
        * src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
        * src/test/java/org/glom/web/server/SelfHostConfiguredDocumentTest.java:
        * src/test/java/org/glom/web/server/libglom/DocumentTest.java: Use
them here instead of hard-coded the strings repeatedly.

9 years agoDocument: Load static text and image items too.
Murray Cumming [Tue, 13 Nov 2012 23:14:49 +0000 (00:14 +0100)]
Document: Load static text and image items too.

        * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemImage.java:
        * src/main/java/org/glom/web/shared/libglom/layout/LayoutItemText.java:
New LayoutItem classes to represent these layout items.
        * src/main/java/org/glom/web/shared/libglom/layout/StaticText.java: The
main text of a LayoutItemText.
        * src/main/java/org/glom/web/server/libglom/Document.java:
        load_after_layout_group(): Handle the node types and instantiate the
new classes.
        * src/test/java/org/glom/web/server/libglom/DocumentTest.java:
Add testLayoutItemText() to check that the text is loaded properly.

9 years agoDo not use client.GWT for shared code.
Murray Cumming [Tue, 13 Nov 2012 22:48:21 +0000 (23:48 +0100)]
Do not use client.GWT for shared code.

        * src/main/java/org/glom/web/shared/libglom/layout/Formatting.java:
Import shared.GWT instead of client.GWT, which seems to be appropriate.

9 years agoUse image data when recreating databases for testing.
Murray Cumming [Tue, 13 Nov 2012 06:06:34 +0000 (07:06 +0100)]
Use image data when recreating databases for testing.

        * src/main/java/org/glom/web/shared/DataItem.java: Add get/setImageData(),
for use locally (not acrosss the network) when recreating databases
for testing.
getValue(): Use it here instead of getImageDataUrl(), noting that
this method is only for use when recreating databases.
        * src/main/java/org/glom/web/server/libglom/Document.java:
getNodeTextChildAsValue(): Use it instead of setImageDataUrl().

9 years agoOnlineGlomImages: Detect the mime-type (content type).
Murray Cumming [Fri, 9 Nov 2012 21:28:59 +0000 (22:28 +0100)]
OnlineGlomImages: Detect the mime-type (content type).

        * src/main/java/org/glom/web/server/OnlineGlomImages.java:
doGet(): Instead of hard-coding image/png.

9 years agoEclipse project files: Use JDK 1.7 instead of JDK 1.6.
Murray Cumming [Fri, 9 Nov 2012 20:53:46 +0000 (21:53 +0100)]
Eclipse project files: Use JDK 1.7 instead of JDK 1.6.

        * .classpath:
        * .settings/org.eclipse.jdt.core.prefs: By changing the Eclipse
Java Compiler and Java Build path settings in the UI.

9 years agoDetails: Show images.
Murray Cumming [Mon, 23 Jul 2012 18:45:09 +0000 (20:45 +0200)]
Details: Show images.

        * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
Move some code into
        * src/main/java/org/glom/web/server/ConfiguredDocumentSet.java:
so it can be used in:
        * src/main/java/org/glom/web/server/OnlineGlomImages.java: A new servlet just
for serving image data.
* src/main/webapp/WEB-INF/web.xml: Mention the new servlet.

* src/main/java/org/glom/web/shared/DataItem.java: Added get/setImageDataUrl().
        * src/main/java/org/glom/web/client/ui/details/DetailsCell.java:
setData(): For image field types, add a GWT Image widget,
with the URL that was set in the DataItem.

        * pom.xml: Depend on org.apache.httpcomponents for UriBuilder.
        * src/main/java/org/glom/web/server/database/DBAccess.java:
        convertResultSetToDTO(): Set the URL for image data, so the client browser
can retrieve the image from our new servlet. This uses UriBuilder.
Move getPrimaryKeyField to:
 * src/main/java/org/glom/web/server/libglom/Document.java:
Added getTablePrimaryKeyField().

        * src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
        * src/main/java/org/glom/web/server/database/ListDBAccess.java:
        * src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
        Adapted.

9 years agoAttempting to use base64 data URL for images.
Murray Cumming [Sun, 22 Jul 2012 19:29:08 +0000 (21:29 +0200)]
Attempting to use base64 data URL for images.

9 years agoUse the latest (now stable) version of GWT.
Murray Cumming [Fri, 9 Nov 2012 12:06:22 +0000 (13:06 +0100)]
Use the latest (now stable) version of GWT.

* pom.xml: And the latest version of the gwt-maven-plugin.