Make navigation work again.
authorMurray Cumming <murrayc@murrayc.com>
Fri, 11 May 2012 11:56:30 +0000 (13:56 +0200)
committerMurray Cumming <murrayc@murrayc.com>
Fri, 11 May 2012 11:56:30 +0000 (13:56 +0200)
commite522193202b563be1d01617bf8d8348ce454b240
treefe5190fdf5d7442fbcc90090443e12d881b18bbd
parent1efb90581ac219239e63541d1ebf3a25dafd19a3
Make navigation work again.

* src/main/java/org/glom/web/server/libglom/Document.java:
Add getLayoutItemFieldShouldHaveNavigation().
* src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java:
Replace get/setAddNavigation() with the partly-existing
get/setNavigationTableName(), with an empty string being no navigation,
because this is simpler. Use the new
Document.getLayoutItemFieldShouldHaveNavigation() method to set this.

* src/main/java/org/glom/web/server/ConfiguredDocument.java:
Add updateFieldsExtras() and call setNavigationTableName in it.
getDetailsLayoutGroup(),
* src/main/java/org/glom/web/client/activity/DetailsActivity.java
createLayout(): Adapted.
* src/main/java/org/glom/web/client/ui/details/DetailsCell.java
Constructor: Adapted.

* src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java:
Replace get/setAddNavigation() with get/setNavigation(), returning a
TableToViewDetails class with both the table name and UsesRelationship,
because both are need. The previous code used java-libglom's output
variable (strangely, via sharedptr) to return both, but we cannot really
do that in Java.
* src/main/java/org/glom/web/server/database/RelatedListNavigation.java:
getNavigationRecord(): Adapt. However, we cannot actually use the cache
here because it somehow gets set to null during deepCopy(). I must test this.
* src/test/java/org/glom/web/server/libglom/DocumentTest.java
testGetSuitableTableToViewDetails(): Adapted.

TODO: Find out why deepClone() is not quite working.
ChangeLog
src/main/java/org/glom/web/client/activity/DetailsActivity.java
src/main/java/org/glom/web/client/ui/details/DetailsCell.java
src/main/java/org/glom/web/server/ConfiguredDocument.java
src/main/java/org/glom/web/server/database/RelatedListNavigation.java
src/main/java/org/glom/web/server/libglom/Document.java
src/main/java/org/glom/web/shared/libglom/layout/LayoutGroup.java
src/main/java/org/glom/web/shared/libglom/layout/LayoutItemField.java
src/main/java/org/glom/web/shared/libglom/layout/LayoutItemPortal.java
src/test/java/org/glom/web/server/libglom/DocumentTest.java