incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1390176 [2/2] - in /incubator/isis/trunk/framework/viewer/wicket: ./ wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ wicket-ui/src/main/java/or...
Date Tue, 25 Sep 2012 21:49:53 GMT
Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/icontitle/EntityIconAndTitlePanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/icontitle/EntityIconAndTitlePanel.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/icontitle/EntityIconAndTitlePanel.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/icontitle/EntityIconAndTitlePanel.java
Tue Sep 25 21:49:52 2012
@@ -38,10 +38,10 @@ import org.apache.wicket.request.resourc
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.model.models.ImageResourceCache;
+import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.ui.components.entity.blocks.action.EntityActionLinkFactory;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
-import org.apache.isis.viewer.wicket.ui.pages.PageType;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
 import org.apache.isis.viewer.wicket.ui.util.Links;
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/jdkmath/JavaMathBigIntegerPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/jdkmath/JavaMathBigIntegerPanel.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/jdkmath/JavaMathBigIntegerPanel.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/jdkmath/JavaMathBigIntegerPanel.java
Tue Sep 25 21:49:52 2012
@@ -39,6 +39,7 @@ public class JavaMathBigIntegerPanel ext
     private static final long serialVersionUID = 1L;
     private static final String ID_SCALAR_VALUE = "scalarValue";
     
+    @SuppressWarnings({ "rawtypes", "unused" })
     private static final IConverter CONVERTER = new AbstractIntegerConverter() {
         private static final long serialVersionUID = 1L;
         @Override

Copied: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/BookmarkedPagesModelProvider.java
(from r1388737, incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/BookmarkedPagesModelProvider.java?p2=incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/BookmarkedPagesModelProvider.java&p1=incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java&r1=1388737&r2=1390176&rev=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/BookmarkedPagesModelProvider.java
Tue Sep 25 21:49:52 2012
@@ -19,13 +19,12 @@
 
 package org.apache.isis.viewer.wicket.ui.pages;
 
-import org.apache.wicket.Page;
+import org.apache.isis.viewer.wicket.model.models.BookmarkedPagesModel;
 
-/**
- * Used by {@link PageClassList} implementations to add pages into the registry.
- */
-public interface PageRegistrySpi {
 
-    public void registerPage(PageType pageType, Class<? extends Page> pageClass);
 
-}
+public interface BookmarkedPagesModelProvider  {
+    
+    BookmarkedPagesModel getBookmarkedPagesModel();
+
+}
\ No newline at end of file

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html
Tue Sep 25 21:49:52 2012
@@ -23,21 +23,22 @@
       xml:lang="en"  
       lang="en">
 	<head>
-		<title>Apache Isis Wicket Viewer</title>
+		<title wicket:id="pageTitle"></title>
 		<wicket:link>
 			<link href="cssreset.css" rel="stylesheet" type="text/css"/>
 			<link href="PageAbstract.css" rel="stylesheet" type="text/css"/>
 		</wicket:link>
 	</head>
 	<body>
+		
 		<div id="container" class="page">
 
 			<div id="header">
-				<h1>Wicket Objects</h1>
+				<h1>Apache Isis Wicket Viewer</h1>
 			</div>
-			
+
 			<div wicket:id="applicationActions" id="applicationActions"></div>
-			
+
 			<div id="body">
 				<wicket:child/>
 			</div>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
Tue Sep 25 21:49:52 2012
@@ -24,8 +24,8 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.wicket.RestartResponseAtInterceptPageException;
-import org.apache.wicket.markup.MarkupStream;
 import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.model.IModel;
@@ -35,7 +35,10 @@ import org.apache.isis.core.metamodel.se
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.viewer.wicket.model.mementos.PageParameterNames;
 import org.apache.isis.viewer.wicket.model.models.ApplicationActionsModel;
+import org.apache.isis.viewer.wicket.model.models.BookmarkableModel;
+import org.apache.isis.viewer.wicket.model.models.BookmarkedPagesModel;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.app.cssrenderer.ApplicationCssRenderer;
@@ -52,19 +55,35 @@ public abstract class PageAbstract exten
 
     private static final long serialVersionUID = 1L;
     
+    private static final String DEFAULT_TITLE = "Apache Isis Wicket Viewer";
+    
     public static final String ID_MENU_LINK = "menuLink";
     public static final String ID_LOGOUT_LINK = "logoutLink";
     public static final String ID_ABOUT_LINK = "aboutLink";
 
     private final List<ComponentType> childComponentIds;
     private final PageParameters pageParameters;
-
+    
     public PageAbstract(final PageParameters pageParameters, final ComponentType... childComponentIds)
{
         addApplicationActionsComponent();
         this.childComponentIds = Collections.unmodifiableList(Arrays.asList(childComponentIds));
         this.pageParameters = pageParameters;
         addLogoutLink();
         addAboutLink();
+        add(new Label("pageTitle", PageParameterNames.PAGE_TITLE.getStringFrom(pageParameters,
DEFAULT_TITLE)));
+    }
+
+    protected void addBreadcrumbs() {
+        getComponentFactoryRegistry().addOrReplaceComponent(this, "breadcrumbs", ComponentType.RECENT_PAGES,
getBookmarkedPagesModel());
+    }
+
+    protected void bookmarkPage(BookmarkableModel<?> model) {
+        getBookmarkedPagesModel().bookmarkPage(model);
+    }
+
+    private BookmarkedPagesModel getBookmarkedPagesModel() {
+        BookmarkedPagesModelProvider application = (BookmarkedPagesModelProvider) getApplication();
+        return application.getBookmarkedPagesModel();
     }
 
     private void addLogoutLink() {

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassList.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassList.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassList.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassList.java
Tue Sep 25 21:49:52 2012
@@ -19,6 +19,8 @@
 
 package org.apache.isis.viewer.wicket.ui.pages;
 
+import org.apache.isis.viewer.wicket.model.models.PageType;
+
 /**
  * Specify the pages to use for each {@link PageType}.
  * 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistry.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistry.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistry.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistry.java
Tue Sep 25 21:49:52 2012
@@ -21,6 +21,8 @@ package org.apache.isis.viewer.wicket.ui
 
 import org.apache.wicket.Page;
 
+import org.apache.isis.viewer.wicket.model.models.PageType;
+
 /**
  * Registry of the {@link Page} class to use for each {@link PageType}.
  */

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java
Tue Sep 25 21:49:52 2012
@@ -21,6 +21,8 @@ package org.apache.isis.viewer.wicket.ui
 
 import org.apache.wicket.Page;
 
+import org.apache.isis.viewer.wicket.model.models.PageType;
+
 /**
  * Used by {@link PageClassList} implementations to add pages into the registry.
  */

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
Tue Sep 25 21:49:52 2012
@@ -31,6 +31,8 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public class AboutPage extends PageAbstract {
 
+    private static final long serialVersionUID = 1L;
+
     public AboutPage() {
         super(new PageParameters(), ComponentType.ABOUT);
         final IModel<?> model = buildModel();

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.html?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.html
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.html
Tue Sep 25 21:49:52 2012
@@ -29,6 +29,9 @@
 	</wicket:head>
 	<body>
 		<wicket:extend>
+
+			<div wicket:id="breadcrumbs"/>
+
 			<div class="actionPage">
 				<div wicket:id="action">
 				</div>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
Tue Sep 25 21:49:52 2012
@@ -19,11 +19,12 @@
 
 package org.apache.isis.viewer.wicket.ui.pages.action;
 
+import org.apache.wicket.Component;
 import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
-import org.apache.wicket.model.IModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
+import org.apache.isis.viewer.wicket.model.models.ActionModel.Mode;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.pages.PageAbstract;
 
@@ -33,22 +34,30 @@ import org.apache.isis.viewer.wicket.ui.
 @AuthorizeInstantiation("org.apache.isis.viewer.wicket.roles.USER")
 public class ActionPage extends PageAbstract {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * For use with {@link Component#setResponsePage(org.apache.wicket.Page)}
      */
-    public ActionPage(final ActionModel actionModel) {
+    public ActionPage(final ActionModel model) {
         super(new PageParameters(), ComponentType.ACTION);
-        addChildComponents(actionModel);
+        addChildComponents(model);
+
+        bookmarkPage(model);
+        addBreadcrumbs();
     }
 
     public ActionPage(final PageParameters pageParameters) {
         super(pageParameters, ComponentType.ACTION);
-        final IModel<?> model = buildModel();
+        final ActionModel model = buildModel();
         addChildComponents(model);
+        
+        // no need to bookmark because the ActionPanel will have done so for us
+        addBreadcrumbs();
     }
 
-    private IModel<?> buildModel() {
+
+    private ActionModel buildModel() {
         return ActionModel.createForPersistent(getPageParameters());
     }
-
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.html?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.html
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.html
Tue Sep 25 21:49:52 2012
@@ -29,6 +29,9 @@
 	</wicket:head>
 	<body>
 		<wicket:extend>
+
+			<div wicket:id="breadcrumbs"/>
+
 			<div wicket:id="entity" class="entityPage">
 			</div>
 		</wicket:extend>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
Tue Sep 25 21:49:52 2012
@@ -20,6 +20,7 @@
 package org.apache.isis.viewer.wicket.ui.pages.entity;
 
 import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -35,12 +36,21 @@ import org.apache.isis.viewer.wicket.ui.
 @AuthorizeInstantiation("org.apache.isis.viewer.wicket.roles.USER")
 public class EntityPage extends PageAbstract {
 
+    private static final long serialVersionUID = 1L;
+    
     private final EntityModel model;
 
+    /**
+     * Called reflectively, in support of 
+     * {@link BookmarkablePageLink bookmarkable} links.
+     */
     public EntityPage(final PageParameters pageParameters) {
         super(pageParameters, ComponentType.ENTITY);
         this.model = new EntityModel(pageParameters);
         addChildComponents(model);
+        
+        bookmarkPage(model);
+        addBreadcrumbs();
     }
 
     public EntityPage(final ObjectAdapter adapter) {
@@ -56,6 +66,9 @@ public class EntityPage extends PageAbst
         this.model = new EntityModel(adapter);
         model.setException(exIfAny);
         addChildComponents(model);
+        
+        bookmarkPage(model);
+        addBreadcrumbs();
     }
 
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java
Tue Sep 25 21:49:52 2012
@@ -33,6 +33,8 @@ import org.apache.isis.viewer.wicket.ui.
 @AuthorizeInstantiation("org.apache.isis.viewer.wicket.roles.USER")
 public class HomePage extends PageAbstract {
 
+    private static final long serialVersionUID = 1L;
+
     public HomePage() {
         super(new PageParameters(), ComponentType.WELCOME);
         final IModel<?> model = buildModel();

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
Tue Sep 25 21:49:52 2012
@@ -29,12 +29,14 @@ import com.google.inject.Inject;
 import com.google.inject.Injector;
 import com.google.inject.Module;
 
+import org.apache.log4j.Logger;
 import org.apache.wicket.Application;
 import org.apache.wicket.ConverterLocator;
 import org.apache.wicket.IConverterLocator;
 import org.apache.wicket.Page;
 import org.apache.wicket.authroles.authentication.AuthenticatedWebApplication;
 import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
+import org.apache.wicket.extensions.breadcrumb.DefaultBreadCrumbsModel;
 import org.apache.wicket.guice.GuiceComponentInjector;
 import org.apache.wicket.markup.head.CssHeaderItem;
 import org.apache.wicket.markup.head.IHeaderResponse;
@@ -53,10 +55,8 @@ import org.apache.isis.core.commons.conf
 import org.apache.isis.core.commons.config.IsisConfigurationBuilderPrimer;
 import org.apache.isis.core.commons.config.IsisConfigurationBuilderResourceStreams;
 import org.apache.isis.core.commons.resource.ResourceStreamSource;
-import org.apache.isis.core.commons.resource.ResourceStreamSourceComposite;
 import org.apache.isis.core.commons.resource.ResourceStreamSourceContextLoaderClassPath;
 import org.apache.isis.core.commons.resource.ResourceStreamSourceCurrentClassClassPath;
-import org.apache.isis.core.commons.resource.ResourceStreamSourceFileSystem;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.webapp.config.ResourceStreamSourceForWebInf;
 import org.apache.isis.runtimes.dflt.runtime.runner.IsisModule;
@@ -65,7 +65,9 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.webapp.WebAppConstants;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
+import org.apache.isis.viewer.wicket.model.models.BookmarkedPagesModel;
 import org.apache.isis.viewer.wicket.model.models.ImageResourceCache;
+import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.app.cssrenderer.ApplicationCssRenderer;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistrar;
@@ -74,14 +76,13 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.pages.PageClassList;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
-import org.apache.isis.viewer.wicket.ui.pages.PageType;
+import org.apache.isis.viewer.wicket.ui.pages.BookmarkedPagesModelProvider;
 import org.apache.isis.viewer.wicket.viewer.integration.isis.WicketServer;
 import org.apache.isis.viewer.wicket.viewer.integration.isis.WicketServerPrototype;
 import org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis;
 import org.apache.isis.viewer.wicket.viewer.integration.wicket.ConverterForObjectAdapter;
 import org.apache.isis.viewer.wicket.viewer.integration.wicket.ConverterForObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.viewer.integration.wicket.WebRequestCycleForIsis;
-import org.apache.log4j.Logger;
 
 /**
  * Main application, subclassing the Wicket {@link Application} and
@@ -122,9 +123,10 @@ import org.apache.log4j.Logger;
  * changed.)</li>
  * </ul>
  */
-public class IsisWicketApplication extends AuthenticatedWebApplication implements ComponentFactoryRegistryAccessor,
PageClassRegistryAccessor, ApplicationCssRenderer, AuthenticationSessionProvider {
+public class IsisWicketApplication extends AuthenticatedWebApplication implements ComponentFactoryRegistryAccessor,
PageClassRegistryAccessor, ApplicationCssRenderer, AuthenticationSessionProvider, BookmarkedPagesModelProvider
{
 
     private static final long serialVersionUID = 1L;
+    @SuppressWarnings("unused")
     private static final Logger LOG = Logger.getLogger(IsisWicketApplication.class);
 
     /**
@@ -165,6 +167,8 @@ public class IsisWicketApplication exten
     @Inject
     private IsisSystem system;
 
+    private BookmarkedPagesModel bookmarkedPagesModel;
+
     // /////////////////////////////////////////////////
     // constructor, init
     // /////////////////////////////////////////////////
@@ -205,6 +209,7 @@ public class IsisWicketApplication exten
         final Injector injector = Guice.createInjector(isisModule, newIsisWicketModule());
         injector.injectMembers(this);
         
+        this.bookmarkedPagesModel = new BookmarkedPagesModel();
 
         initWicketComponentInjection(injector);
     }
@@ -288,7 +293,7 @@ public class IsisWicketApplication exten
     protected String getApplicationCssUrl() {
         return applicationCssUrl;
     }
-
+    
     /**
      * Renders the {@link #getApplicationCssUrl() application-supplied CSS}, if
      * any.
@@ -365,7 +370,17 @@ public class IsisWicketApplication exten
         return IsisContext.getAuthenticationSession();
     }
 
+
+    // /////////////////////////////////////////////////
+    // Breadcrumbs support
+    // /////////////////////////////////////////////////
+
+    @Override
+    public BookmarkedPagesModel getBookmarkedPagesModel() {
+        return bookmarkedPagesModel;
+    }
     
+
     // /////////////////////////////////////////////////
     // *Provider impl.
     // /////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketUnsecuredApplication.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketUnsecuredApplication.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketUnsecuredApplication.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketUnsecuredApplication.java
Tue Sep 25 21:49:52 2012
@@ -60,12 +60,12 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.ImageResourceCache;
+import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.ui.app.cssrenderer.ApplicationCssRenderer;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistryAccessor;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
-import org.apache.isis.viewer.wicket.ui.pages.PageType;
 import org.apache.isis.viewer.wicket.viewer.integration.isis.WicketServer;
 import org.apache.isis.viewer.wicket.viewer.integration.isis.WicketServerPrototype;
 import org.apache.isis.viewer.wicket.viewer.integration.wicket.AnonymousWebSessionForIsis;

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
Tue Sep 25 21:49:52 2012
@@ -27,9 +27,11 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.actions.params.ActionParametersFormPanelFactory;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistrar;
 import org.apache.isis.viewer.wicket.ui.components.about.AboutPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.actionlink.ActionLinkPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.actions.ActionInfoPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.actions.ActionPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.appactions.cssmenu.AppActionsCssMenuFactory;
+import org.apache.isis.viewer.wicket.ui.components.bookmarkedpages.BookmarkedPagesPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.collection.CollectionPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.CollectionContentsAsAjaxTableFactory;
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.icons.CollectionContentsAsIconsFactory;
@@ -127,6 +129,7 @@ public class ComponentFactoryRegistrarDe
         addComponentFactoriesForEntity(componentFactories);
         addComponentFactoriesForActionInfo(componentFactories);
         addComponentFactoriesForAction(componentFactories);
+        addComponentFactoriesForActionLink(componentFactories);
         addComponentFactoriesForEntityCollection(componentFactories);
         addComponentFactoriesForEntityCollectionContents(componentFactories);
         addComponentFactoriesForEmptyCollection(componentFactories);
@@ -135,11 +138,13 @@ public class ComponentFactoryRegistrarDe
         addComponentFactoriesForVoidReturn(componentFactories);
         addComponentFactoriesForValue(componentFactories);
         addComponentFactoriesForParameters(componentFactories);
+        addComponentFactoriesForBreadcrumbs(componentFactories);
         
         addComponentFactoriesForUnknown(componentFactories);
 
     }
 
+
     protected void addComponentFactoriesForSpecial(final ComponentFactoryList componentFactories)
{
         componentFactories.add(new WizardPageDescriptionPanelFactory());
     }
@@ -246,10 +251,17 @@ public class ComponentFactoryRegistrarDe
         componentFactories.add(new ActionPanelFactory());
     }
 
+    protected void addComponentFactoriesForActionLink(final ComponentFactoryList componentFactories)
{
+        componentFactories.add(new ActionLinkPanelFactory());
+    }
+
     protected void addComponentFactoriesForApplicationActions(final ComponentFactoryList
componentFactories) {
         componentFactories.add(new AppActionsCssMenuFactory());
     }
 
+    protected void addComponentFactoriesForBreadcrumbs(ComponentFactoryList componentFactories)
{
+        componentFactories.add(new BookmarkedPagesPanelFactory());
+    }
 
     protected void addComponentFactoriesForUnknown(final ComponentFactoryList componentFactories)
{
         componentFactories.add(new UnknownModelPanelFactory());

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassListDefault.java
Tue Sep 25 21:49:52 2012
@@ -23,9 +23,9 @@ import com.google.inject.Singleton;
 
 import org.apache.wicket.Page;
 
+import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassList;
 import org.apache.isis.viewer.wicket.ui.pages.PageRegistrySpi;
-import org.apache.isis.viewer.wicket.ui.pages.PageType;
 import org.apache.isis.viewer.wicket.ui.pages.about.AboutPage;
 import org.apache.isis.viewer.wicket.ui.pages.action.ActionPage;
 import org.apache.isis.viewer.wicket.ui.pages.entity.EntityPage;

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassRegistryDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassRegistryDefault.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassRegistryDefault.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/pages/PageClassRegistryDefault.java
Tue Sep 25 21:49:52 2012
@@ -26,14 +26,11 @@ import com.google.inject.Inject;
 import com.google.inject.Singleton;
 
 import org.apache.wicket.Page;
-import org.hamcrest.Matcher;
 
-import org.apache.isis.core.commons.ensure.Ensure;
-import org.apache.isis.viewer.wicket.model.util.Classes;
+import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassList;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageRegistrySpi;
-import org.apache.isis.viewer.wicket.ui.pages.PageType;
 
 /**
  * Default implementation of {@link PageClassRegistry}; just delegates to an
@@ -81,17 +78,6 @@ public class PageClassRegistryDefault im
 
     @Override
     public final void registerPage(final PageType pageType, final Class<? extends Page>
pageClass) {
-        ensureThatArg(pageClass, Classes.isSubclassOf(pageType.getPageClass()));
         pagesByType.put(pageType, pageClass);
     }
-
-    // /////////////////////////////////////////////////////////
-    // Helpers
-    // /////////////////////////////////////////////////////////
-
-    @SuppressWarnings("unchecked")
-    private static void ensureThatArg(final Class<? extends Page> cls, final Matcher
clsMatcher) {
-        Ensure.ensureThatArg(cls, clsMatcher);
-    }
-
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Pages.java
Tue Sep 25 21:49:52 2012
@@ -31,8 +31,8 @@ import org.junit.Test;
 
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
 import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
+import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
-import org.apache.isis.viewer.wicket.ui.pages.PageType;
 import org.apache.isis.viewer.wicket.ui.pages.home.HomePage;
 
 public class IsisWicketApplication_Pages {

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/pages/PageClassListDefault_RegistrationAndCaching.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/pages/PageClassListDefault_RegistrationAndCaching.java?rev=1390176&r1=1390175&r2=1390176&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/pages/PageClassListDefault_RegistrationAndCaching.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/pages/PageClassListDefault_RegistrationAndCaching.java
Tue Sep 25 21:49:52 2012
@@ -29,7 +29,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
-import org.apache.isis.viewer.wicket.ui.pages.PageType;
+import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.ui.pages.action.ActionPage;
 import org.apache.isis.viewer.wicket.viewer.registries.pages.PageClassListDefault;
 import org.apache.isis.viewer.wicket.viewer.registries.pages.PageClassRegistryDefault;



Mime
View raw message