Full navigation is working including viewing individual photos.
[photos] / src / main / java / org / wamblee / photos / wicket / AlbumPanel.java
index 57e95c7983f11c796580976935612ec23096321e..0c7841c7c32da4de8afc308dac7915e9a2bd2279 100644 (file)
@@ -121,9 +121,12 @@ public class AlbumPanel extends Panel {
         };
         add(prevLink);
 
+        // Avoid implicit references to the album to keep the link objects
+        // small and serializable.
+        final int albumSize = album.size();
         Link nextLink = new Link("nextLink") {
             {
-                if (index + MAX_ROWS * MAX_COLUMNS >= album.size()) {
+                if (index + MAX_ROWS * MAX_COLUMNS >= albumSize) {
                     setEnabled(false);
                 }
             }