incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1098948 [13/16] - in /incubator/isis/trunk/viewer: restful/applib/src/main/java/org/apache/isis/viewer/restful/applib/ restful/applib/src/main/java/org/apache/isis/viewer/restful/applib/providers/ restful/applib/src/main/java/org/apache/is...
Date Tue, 03 May 2011 07:44:50 GMT
Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItemPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItemPanel.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItemPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItemPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu;
 
 import org.apache.wicket.model.Model;
@@ -27,19 +26,19 @@ import org.apache.wicket.model.Model;
  */
 class CssMenuItemPanel extends CssMenuItemPanelAbstract<CssMenuItemPanel.MyModel> {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
+
+    static class MyModel extends Model<CssMenuItem> {
+        private static final long serialVersionUID = 1L;
+
+        public MyModel(final CssMenuItem cssMenuItem) {
+            super(cssMenuItem);
+        }
+    }
+
+    public CssMenuItemPanel(final String id, final CssMenuItem cssMenuItem) {
+        super(id, new MyModel(cssMenuItem));
 
-	static class MyModel extends Model<CssMenuItem>{
-		private static final long serialVersionUID = 1L;
-		
-		public MyModel(CssMenuItem cssMenuItem) {
-			super(cssMenuItem);
-		}
-	}
-
-	public CssMenuItemPanel(String id, CssMenuItem cssMenuItem) {
-		super(id, new MyModel(cssMenuItem));
-		
-		addSubMenuItems(this, getModel().getObject());
-	}
+        addSubMenuItems(this, getModel().getObject());
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItemPanelAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItemPanelAbstract.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItemPanelAbstract.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItemPanelAbstract.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu;
 
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
@@ -29,15 +28,15 @@ import org.apache.wicket.model.IModel;
  */
 abstract class CssMenuItemPanelAbstract<T extends IModel<?>> extends PanelAbstract<T> {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public CssMenuItemPanelAbstract(String id, T model) {
-		super(id, model);
-		setRenderBodyOnly(true);
-	}
-
-	protected void addSubMenuItems(WebMarkupContainer markupContainer, CssMenuItem cssMenuItem) {
-		cssMenuItem.addTo(markupContainer);
-	}
+    public CssMenuItemPanelAbstract(final String id, final T model) {
+        super(id, model);
+        setRenderBodyOnly(true);
+    }
+
+    protected void addSubMenuItems(final WebMarkupContainer markupContainer, final CssMenuItem cssMenuItem) {
+        cssMenuItem.addTo(markupContainer);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuLinkFactory.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuLinkFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuLinkFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu;
 
 import java.io.Serializable;
@@ -34,18 +33,21 @@ public interface CssMenuLinkFactory exte
     public class LinkAndLabel {
         private final Link<?> link;
         private final String label;
-        public LinkAndLabel(Link<?> link, String label) {
+
+        public LinkAndLabel(final Link<?> link, final String label) {
             this.link = link;
             this.label = label;
         }
+
         public Link<?> getLink() {
             return link;
         }
+
         public String getLabel() {
             return label;
         }
     }
-    
-	LinkAndLabel newLink(ObjectAdapterMemento adapter, ObjectAction noAction, String linkId);
+
+    LinkAndLabel newLink(ObjectAdapterMemento adapter, ObjectAction noAction, String linkId);
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuPanel.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu;
 
 import java.util.Arrays;
@@ -25,7 +24,6 @@ import java.util.List;
 
 import org.apache.isis.viewer.wicket.model.util.Strings;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
-import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuPanel.Style;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
 import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
 import org.apache.wicket.markup.html.WebMarkupContainer;
@@ -33,91 +31,85 @@ import org.apache.wicket.markup.repeater
 import org.apache.wicket.model.util.ListModel;
 
 /**
- * Top level panel for a CSS menu, consisting of a number of unparented
- * {@link CssMenuItem}s.
+ * Top level panel for a CSS menu, consisting of a number of unparented {@link CssMenuItem}s.
  * 
  * <p>
  * The {@link Style} enum allows the presentation to be altered.
  */
 public class CssMenuPanel extends PanelAbstract<CssMenuPanel.MyModel> {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public enum Style {
-		REGULAR {
-			@Override
-			public String getAppendValue() {
-				return null; // ie, append nothing
-			}
-		}, 
-		SMALL {
-			@Override
-			public String getAppendValue() {
-				return toString();
-			}
-		};
-		public String toString() {
-			return Strings.toCamelCase(name());
-		}
-
-		public String getAppendValue() {
-			return toString();
-		}
-	}
-
-	static class MyModel extends ListModel<CssMenuItem> {
-
-		private static final long serialVersionUID = 1L;
-
-		public MyModel(List<CssMenuItem> cssMenuItems) {
-			super(cssMenuItems);
-		}
-	}
-
-	public static CssMenuItem.Builder newMenuItem(String name) {
-		return CssMenuItem.newMenuItem(name);
-	}
+    public enum Style {
+        REGULAR {
+            @Override
+            public String getAppendValue() {
+                return null; // ie, append nothing
+            }
+        },
+        SMALL {
+            @Override
+            public String getAppendValue() {
+                return toString();
+            }
+        };
+        @Override
+        public String toString() {
+            return Strings.toCamelCase(name());
+        }
+
+        public String getAppendValue() {
+            return toString();
+        }
+    }
+
+    static class MyModel extends ListModel<CssMenuItem> {
+
+        private static final long serialVersionUID = 1L;
+
+        public MyModel(final List<CssMenuItem> cssMenuItems) {
+            super(cssMenuItems);
+        }
+    }
+
+    public static CssMenuItem.Builder newMenuItem(final String name) {
+        return CssMenuItem.newMenuItem(name);
+    }
 
-	private StyleAppender styleAppender;
+    private final StyleAppender styleAppender;
     static final String ID_MENU_ITEMS = "menuItems";
     static final String ID_MENU_ITEM = "menuItem";
 
-	public CssMenuPanel(String id, final Style style,
-			List<CssMenuItem> topLevelMenuItems) {
-		super(id, new MyModel(topLevelMenuItems));
-		this.styleAppender = new StyleAppender(style);
-
-		add(styleAppender);
-
-		RepeatingView menuItemRv = new RepeatingView(CssMenuPanel.ID_MENU_ITEMS);
-		add(menuItemRv);
-
-		for (CssMenuItem cssMenuItem : this.getModel().getObject()) {
-			WebMarkupContainer menuItemMarkup = new WebMarkupContainer(
-					menuItemRv.newChildId());
-			menuItemRv.add(menuItemMarkup);
-
-			menuItemMarkup.add(new CssMenuItemPanel(CssMenuPanel.ID_MENU_ITEM,
-					cssMenuItem));
-		}
-
-	}
-
-	public CssMenuPanel(ComponentType componentType, Style style, CssMenuItem... topLevelMenuItems) {
-		this(componentType.getWicketId(), style, Arrays.asList(topLevelMenuItems));
-	}
-	
-	static final class StyleAppender extends CssClassAppender {
-		
-		private static final long serialVersionUID = 1L;
-		
-		public StyleAppender(Style style) {
-			super(style.getAppendValue());
-		}
-		
-	}
+    public CssMenuPanel(final String id, final Style style, final List<CssMenuItem> topLevelMenuItems) {
+        super(id, new MyModel(topLevelMenuItems));
+        this.styleAppender = new StyleAppender(style);
 
-}
+        add(styleAppender);
+
+        final RepeatingView menuItemRv = new RepeatingView(CssMenuPanel.ID_MENU_ITEMS);
+        add(menuItemRv);
+
+        for (final CssMenuItem cssMenuItem : this.getModel().getObject()) {
+            final WebMarkupContainer menuItemMarkup = new WebMarkupContainer(menuItemRv.newChildId());
+            menuItemRv.add(menuItemMarkup);
+
+            menuItemMarkup.add(new CssMenuItemPanel(CssMenuPanel.ID_MENU_ITEM, cssMenuItem));
+        }
 
+    }
 
+    public CssMenuPanel(final ComponentType componentType, final Style style, final CssMenuItem... topLevelMenuItems) {
+        this(componentType.getWicketId(), style, Arrays.asList(topLevelMenuItems));
+    }
 
+    static final class StyleAppender extends CssClassAppender {
+
+        private static final long serialVersionUID = 1L;
+
+        public StyleAppender(final Style style) {
+            super(style.getAppendValue());
+        }
+
+    }
+
+}

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssSubMenuItemsPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssSubMenuItemsPanel.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssSubMenuItemsPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssSubMenuItemsPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu;
 
 import java.util.List;
@@ -31,30 +30,29 @@ import org.apache.wicket.model.util.List
  */
 public class CssSubMenuItemsPanel extends CssMenuItemPanelAbstract<CssSubMenuItemsPanel.MyModel> {
 
-	private static final long serialVersionUID = 1L;
-	
-	static class MyModel extends ListModel<CssMenuItem>{
-
-		private static final long serialVersionUID = 1L;
-		
-		public MyModel(List<CssMenuItem> cssMenuItems) {
-			super(cssMenuItems);
-		}
-	}
-
-
-	public CssSubMenuItemsPanel(String id, List<CssMenuItem> subMenuItems) {
-		super(id, new MyModel(subMenuItems));
-		setRenderBodyOnly(true);
-		
-		RepeatingView menuItemRv = new RepeatingView(getId());
-		add(menuItemRv);
-		for (CssMenuItem cssMenuItem : getModel().getObject()) {
-			WebMarkupContainer menuItemMarkup = new WebMarkupContainer(menuItemRv.newChildId());
-			menuItemRv.add(menuItemMarkup);
-			
-			addSubMenuItems(menuItemMarkup, cssMenuItem);
-		}
-	}
+    private static final long serialVersionUID = 1L;
+
+    static class MyModel extends ListModel<CssMenuItem> {
+
+        private static final long serialVersionUID = 1L;
+
+        public MyModel(final List<CssMenuItem> cssMenuItems) {
+            super(cssMenuItems);
+        }
+    }
+
+    public CssSubMenuItemsPanel(final String id, final List<CssMenuItem> subMenuItems) {
+        super(id, new MyModel(subMenuItems));
+        setRenderBodyOnly(true);
+
+        final RepeatingView menuItemRv = new RepeatingView(getId());
+        add(menuItemRv);
+        for (final CssMenuItem cssMenuItem : getModel().getObject()) {
+            final WebMarkupContainer menuItemMarkup = new WebMarkupContainer(menuItemRv.newChildId());
+            menuItemRv.add(menuItemMarkup);
+
+            addSubMenuItems(menuItemMarkup, cssMenuItem);
+        }
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/dropdownchoices/DropDownChoicesForObjectAdapterMementos.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.dropdownchoices;
 
 import java.util.List;
@@ -31,22 +30,19 @@ import org.apache.wicket.markup.html.for
 import org.apache.wicket.markup.html.form.IChoiceRenderer;
 import org.apache.wicket.model.IModel;
 
-public class DropDownChoicesForObjectAdapterMementos extends
-        DropDownChoice<ObjectAdapterMemento> {
-    
-    private final static class ObjectAdapterMementoRenderer implements
-            IChoiceRenderer<ObjectAdapterMemento> {
-        
+public class DropDownChoicesForObjectAdapterMementos extends DropDownChoice<ObjectAdapterMemento> {
+
+    private final static class ObjectAdapterMementoRenderer implements IChoiceRenderer<ObjectAdapterMemento> {
+
         private static final long serialVersionUID = 1L;
 
         @Override
-        public Object getDisplayValue(ObjectAdapterMemento nom) {
+        public Object getDisplayValue(final ObjectAdapterMemento nom) {
             return nom.getObjectAdapter().titleString();
         }
 
         @Override
-        public String getIdValue(ObjectAdapterMemento nom,
-                int index) {
+        public String getIdValue(final ObjectAdapterMemento nom, final int index) {
             final Oid oid = nom.getObjectAdapter().getOid();
             return getOidStringifier().enString(oid);
         }
@@ -54,6 +50,7 @@ public class DropDownChoicesForObjectAda
         protected OidStringifier getOidStringifier() {
             return getPersistenceSession().getOidGenerator().getOidStringifier();
         }
+
         protected PersistenceSession getPersistenceSession() {
             return IsisContext.getPersistenceSession();
         }
@@ -61,16 +58,14 @@ public class DropDownChoicesForObjectAda
 
     private static final long serialVersionUID = 1L;
 
-    public DropDownChoicesForObjectAdapterMementos(String id,
-            IModel<ObjectAdapterMemento> model,
-            IModel<? extends List<? extends ObjectAdapterMemento>> choices) {
+    public DropDownChoicesForObjectAdapterMementos(final String id, final IModel<ObjectAdapterMemento> model,
+        final IModel<? extends List<? extends ObjectAdapterMemento>> choices) {
         this(id, model, choices, new ObjectAdapterMementoRenderer());
     }
 
-    private DropDownChoicesForObjectAdapterMementos(String id,
-            IModel<ObjectAdapterMemento> model,
-            IModel<? extends List<? extends ObjectAdapterMemento>> choices,
-            IChoiceRenderer<? super ObjectAdapterMemento> renderer) {
+    private DropDownChoicesForObjectAdapterMementos(final String id, final IModel<ObjectAdapterMemento> model,
+        final IModel<? extends List<? extends ObjectAdapterMemento>> choices,
+        final IChoiceRenderer<? super ObjectAdapterMemento> renderer) {
         super(id, model, choices, renderer);
     }
 

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java Tue May  3 07:44:41 2011
@@ -17,27 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.entitylink;
 
 import java.util.List;
 
-import org.apache.wicket.Page;
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.extensions.yui.calendar.DateField;
-import org.apache.wicket.markup.html.PackageResource;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.FormComponentPanel;
-import org.apache.wicket.markup.html.form.TextField;
-import org.apache.wicket.markup.html.image.Image;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-
-import com.google.common.collect.Lists;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.object.icon.IconFacet;
 import org.apache.isis.core.metamodel.spec.ActionType;
@@ -63,13 +46,27 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.pages.PageType;
 import org.apache.isis.viewer.wicket.ui.pages.entity.EntityPage;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.extensions.yui.calendar.DateField;
+import org.apache.wicket.markup.html.PackageResource;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.FormComponentPanel;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+import com.google.common.collect.Lists;
 
 /**
- * {@link FormComponentPanel} representing a reference to an entity: a link and
- * a findUsing button.
+ * {@link FormComponentPanel} representing a reference to an entity: a link and a findUsing button.
  */
-public class EntityLink extends FormComponentPanelAbstract<ObjectAdapter>
-        implements CancelHintRequired, ActionInvokeHandler {
+public class EntityLink extends FormComponentPanelAbstract<ObjectAdapter> implements CancelHintRequired,
+    ActionInvokeHandler {
 
     private static final long serialVersionUID = 1L;
 
@@ -95,7 +92,7 @@ public class EntityLink extends FormComp
     private Label label;
     private ObjectAdapterMemento pending;
 
-    public EntityLink(String id, final EntityModel entityModel) {
+    public EntityLink(final String id, final EntityModel entityModel) {
         super(id, entityModel);
         setType(ObjectAdapter.class);
         linkFactory = new FindUsingLinkFactory(this);
@@ -116,27 +113,25 @@ public class EntityLink extends FormComp
     }
 
     private void addOrReplaceOidField() {
-        entityOidField = new TextField<ObjectAdapterMemento>(ID_ENTITY_OID,
-                new Model<ObjectAdapterMemento>() {
+        entityOidField = new TextField<ObjectAdapterMemento>(ID_ENTITY_OID, new Model<ObjectAdapterMemento>() {
 
-                    private static final long serialVersionUID = 1L;
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public ObjectAdapterMemento getObject() {
+                if (pending != null) {
+                    return pending;
+                }
+                final ObjectAdapter adapter = EntityLink.this.getModelObject();
+                return ObjectAdapterMemento.createOrNull(adapter);
+            }
 
-                    @Override
-                    public ObjectAdapterMemento getObject() {
-                        if (pending != null) {
-                            return pending;
-                        }
-                        ObjectAdapter adapter = EntityLink.this
-                                .getModelObject();
-                        return ObjectAdapterMemento.createOrNull(adapter);
-                    }
-
-                    @Override
-                    public void setObject(ObjectAdapterMemento adapterMemento) {
-                        pending = adapterMemento;
-                    }
+            @Override
+            public void setObject(final ObjectAdapterMemento adapterMemento) {
+                pending = adapterMemento;
+            }
 
-                }) {
+        }) {
             private static final long serialVersionUID = 1L;
 
             @Override
@@ -153,45 +148,43 @@ public class EntityLink extends FormComp
 
     void rebuildFindUsingMenu() {
         final EntityModel entityModel = getEntityModel();
-        List<ObjectAction> actions = findServiceActionsFor(entityModel
-                .getTypeOfSpecification());
+        final List<ObjectAction> actions = findServiceActionsFor(entityModel.getTypeOfSpecification());
         findUsing = new WebMarkupContainer(ID_FIND_USING);
         switch (actions.size()) {
-        case 0:
-            permanentlyHide(findUsing, ComponentType.ACTION);
-            break;
-        default:
-            // TODO: i18n
-
-            CssMenuBuilder cssMenuBuilder = new CssMenuBuilder(null,
-                    getServiceAdapters(), actions, linkFactory);
-            CssMenuPanel cssMenuPanel = cssMenuBuilder.buildPanel(
-                    ComponentType.ACTION.getWicketId(), "find using...");
-
-            findUsing.addOrReplace(cssMenuPanel);
-            actionFindUsingComponent = cssMenuPanel;
-            break;
+            case 0:
+                permanentlyHide(findUsing, ComponentType.ACTION);
+                break;
+            default:
+                // TODO: i18n
+
+                final CssMenuBuilder cssMenuBuilder =
+                    new CssMenuBuilder(null, getServiceAdapters(), actions, linkFactory);
+                final CssMenuPanel cssMenuPanel =
+                    cssMenuBuilder.buildPanel(ComponentType.ACTION.getWicketId(), "find using...");
+
+                findUsing.addOrReplace(cssMenuPanel);
+                actionFindUsingComponent = cssMenuPanel;
+                break;
         }
         addOrReplace(findUsing);
     }
 
     /**
-     * Must be called after {@link #setEnabled(boolean)} to ensure that the
-     * <tt>findUsing</tt> button is shown/not shown as required.
+     * Must be called after {@link #setEnabled(boolean)} to ensure that the <tt>findUsing</tt> button is shown/not shown
+     * as required.
      * 
      * <p>
-     * REVIEW: there ought to be a better way to do this. I'd hoped to override
-     * {@link #setEnabled(boolean)}, but it is <tt>final</tt>, and there doesn't
-     * seem to be anyway to install a listener. One option might be to move it
-     * to {@link #onBeforeRender()} ?
+     * REVIEW: there ought to be a better way to do this. I'd hoped to override {@link #setEnabled(boolean)}, but it is
+     * <tt>final</tt>, and there doesn't seem to be anyway to install a listener. One option might be to move it to
+     * {@link #onBeforeRender()} ?
      */
     public void syncFindUsingVisibility() {
         findUsing.setVisible(isEnabled() && !getEntityModel().isViewMode());
     }
 
     /**
-     * Since we override {@link #convertInput()}, it is (apparently) enough to
-     * just return a value that is suitable for error reporting.
+     * Since we override {@link #convertInput()}, it is (apparently) enough to just return a value that is suitable for
+     * error reporting.
      * 
      * @see DateField#getInput() for reference
      */
@@ -201,8 +194,8 @@ public class EntityLink extends FormComp
     }
 
     /**
-     * Ensures that the link is always enabled and traversable, even if (in the context of
-     * an entity property form) the entity model is in view mode.
+     * Ensures that the link is always enabled and traversable, even if (in the context of an entity property form) the
+     * entity model is in view mode.
      * 
      * <p>
      * A slight hack, but works...
@@ -211,15 +204,15 @@ public class EntityLink extends FormComp
     public boolean isEnabled() {
         return true;
     }
-    
+
     @Override
     protected void convertInput() {
-    	ObjectAdapter pendingAdapter = getPendingAdapter();
+        final ObjectAdapter pendingAdapter = getPendingAdapter();
         setConvertedInput(pendingAdapter);
     }
 
     private ObjectAdapter getPendingAdapter() {
-        ObjectAdapterMemento memento = entityOidField.getModelObject();
+        final ObjectAdapterMemento memento = entityOidField.getModelObject();
         return memento != null ? memento.getObjectAdapter() : null;
     }
 
@@ -229,23 +222,19 @@ public class EntityLink extends FormComp
         super.onBeforeRender();
     }
 
-    
     private void syncWithInput() {
         final EntityModel entityModel = getEntityModel();
 
-        ObjectAdapter adapter = Generics.coalesce(getPendingAdapter(),
-                entityModel.getObject());
+        final ObjectAdapter adapter = Generics.coalesce(getPendingAdapter(), entityModel.getObject());
 
         syncImageWithInput(adapter);
 
-        IModel<List<? extends ObjectAdapterMemento>> choicesMementos = getChoicesModel();
+        final IModel<List<? extends ObjectAdapterMemento>> choicesMementos = getChoicesModel();
         if (choicesMementos != null) {
-            
+
             // choices drop-down
-            final IModel<ObjectAdapterMemento> modelObject = entityOidField
-                    .getModel();
-            addOrReplace(new DropDownChoicesForObjectAdapterMementos(ID_CHOICES,
-                    modelObject, choicesMementos));
+            final IModel<ObjectAdapterMemento> modelObject = entityOidField.getModel();
+            addOrReplace(new DropDownChoicesForObjectAdapterMementos(ID_CHOICES, modelObject, choicesMementos));
 
             // no need for link, since can see in drop-down
             permanentlyHide(ID_ENTITY_LINK_WRAPPER);
@@ -267,12 +256,12 @@ public class EntityLink extends FormComp
 
         // link
         syncEntityDetailsButtonWithInput(adapter);
-        
+
         syncEntityDetailsWithInput(adapter);
         syncFindUsingVisibility();
     }
 
-    private void syncImageWithInput(ObjectAdapter adapter) {
+    private void syncImageWithInput(final ObjectAdapter adapter) {
         if (adapter != null) {
             addOrReplaceImage(adapter);
         } else {
@@ -280,7 +269,7 @@ public class EntityLink extends FormComp
         }
     }
 
-    private void syncEntityDetailsButtonWithInput(ObjectAdapter adapter) {
+    private void syncEntityDetailsButtonWithInput(final ObjectAdapter adapter) {
         if (adapter != null && getEntityModel().isEditMode()) {
             final Link<String> link = new Link<String>(ID_ENTITY_DETAILS_LINK) {
                 private static final long serialVersionUID = 1L;
@@ -298,11 +287,11 @@ public class EntityLink extends FormComp
     }
 
     private Model<String> buildEntityDetailsModel() {
-        final String label = getEntityModel().isEntityDetailsVisible()?"hide":"show";
+        final String label = getEntityModel().isEntityDetailsVisible() ? "hide" : "show";
         return Model.of(label);
     }
 
-    private void syncLinkWithInput(ObjectAdapter adapter) {
+    private void syncLinkWithInput(final ObjectAdapter adapter) {
         if (adapter != null) {
             addOrReplaceLink(adapter);
         } else {
@@ -310,7 +299,7 @@ public class EntityLink extends FormComp
         }
     }
 
-    private void syncEntityTitleNullWithInput(ObjectAdapter adapter) {
+    private void syncEntityTitleNullWithInput(final ObjectAdapter adapter) {
         if (adapter != null) {
             permanentlyHide(ID_ENTITY_TITLE_NULL);
         } else {
@@ -330,22 +319,21 @@ public class EntityLink extends FormComp
     private IModel<List<? extends ObjectAdapterMemento>> getChoicesModel() {
         final EntityModel entityModel = getEntityModel();
         if (entityModel instanceof ScalarModel) {
-            ScalarModel scalarModel = (ScalarModel) entityModel;
+            final ScalarModel scalarModel = (ScalarModel) entityModel;
             final List<ObjectAdapter> choices = scalarModel.getChoices();
             if (choices.size() == 0) {
                 return null;
             }
             // take a copy otherwise is only lazily evaluated
-            final List<ObjectAdapterMemento> choicesMementos = 
-                Lists.newArrayList(Lists.transform(
-                    choices, Mementos.fromAdapter()));
+            final List<ObjectAdapterMemento> choicesMementos =
+                Lists.newArrayList(Lists.transform(choices, Mementos.fromAdapter()));
             return Model.ofList(choicesMementos);
         }
         return null;
     }
 
-    private void addOrReplaceImage(ObjectAdapter adapter) {
-        PackageResource imageResource = determineImageResource(adapter);
+    private void addOrReplaceImage(final ObjectAdapter adapter) {
+        final PackageResource imageResource = determineImageResource(adapter);
 
         if (imageResource != null) {
             image = new Image(ID_ENTITY_IMAGE, imageResource);
@@ -355,14 +343,14 @@ public class EntityLink extends FormComp
         }
     }
 
-    private PackageResource determineImageResource(ObjectAdapter adapter) {
+    private PackageResource determineImageResource(final ObjectAdapter adapter) {
         ObjectSpecification typeOfSpec;
         PackageResource imageResource = null;
         if (adapter != null) {
             typeOfSpec = adapter.getSpecification();
-            IconFacet iconFacet = typeOfSpec.getFacet(IconFacet.class);
+            final IconFacet iconFacet = typeOfSpec.getFacet(IconFacet.class);
             if (iconFacet != null) {
-                String iconName = iconFacet.iconName(adapter);
+                final String iconName = iconFacet.iconName(adapter);
                 imageResource = getImageCache().findImage(iconName);
             }
         }
@@ -373,17 +361,14 @@ public class EntityLink extends FormComp
         return imageResource;
     }
 
-    private void addOrReplaceLink(ObjectAdapter adapter) {
-        PageParameters pageParameters = EntityModel.createPageParameters(
-                adapter, getOidStringifier());
-        Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(
-                PageType.ENTITY);
-        BookmarkablePageLink<EntityPage> link = new BookmarkablePageLink<EntityPage>(
-                ID_ENTITY_LINK, pageClass, pageParameters);
+    private void addOrReplaceLink(final ObjectAdapter adapter) {
+        final PageParameters pageParameters = EntityModel.createPageParameters(adapter, getOidStringifier());
+        final Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(PageType.ENTITY);
+        final BookmarkablePageLink<EntityPage> link =
+            new BookmarkablePageLink<EntityPage>(ID_ENTITY_LINK, pageClass, pageParameters);
         label = new Label(ID_ENTITY_TITLE, adapter.titleString());
         link.add(label);
-        WebMarkupContainer entityLinkWrapper = new WebMarkupContainer(
-                ID_ENTITY_LINK_WRAPPER);
+        final WebMarkupContainer entityLinkWrapper = new WebMarkupContainer(ID_ENTITY_LINK_WRAPPER);
         entityLinkWrapper.addOrReplace(link);
 
         entityLinkWrapper.setEnabled(true);
@@ -391,34 +376,30 @@ public class EntityLink extends FormComp
         addOrReplace(entityLinkWrapper);
     }
 
-    private static List<ObjectAction> findServiceActionsFor(
-            ObjectSpecification scalarTypeSpec) {
-        List<ObjectAction> actionList = Lists.newArrayList();
+    private static List<ObjectAction> findServiceActionsFor(final ObjectSpecification scalarTypeSpec) {
+        final List<ObjectAction> actionList = Lists.newArrayList();
         addServiceActionsFor(scalarTypeSpec, ActionType.USER, actionList);
         if (IsisContext.getDeploymentType() == DeploymentType.EXPLORATION) {
-            addServiceActionsFor(scalarTypeSpec,
-                    ActionType.EXPLORATION, actionList);
+            addServiceActionsFor(scalarTypeSpec, ActionType.EXPLORATION, actionList);
         }
         return actionList;
     }
 
-    private static void addServiceActionsFor(ObjectSpecification noSpec,
-            ActionType actionType, List<ObjectAction> actionList) {
-        final List<ObjectAction> serviceActionsFor = noSpec
-                .getServiceActionsReturning(actionType);
+    private static void addServiceActionsFor(final ObjectSpecification noSpec, final ActionType actionType,
+        final List<ObjectAction> actionList) {
+        final List<ObjectAction> serviceActionsFor = noSpec.getServiceActionsReturning(actionType);
         actionList.addAll(serviceActionsFor);
     }
 
     @Override
-    public void onClick(ActionModel actionModel) {
-        ActionPanel actionPanel = new ActionPanel(actionFindUsingComponent
-                .getComponentType().toString(), actionModel);
+    public void onClick(final ActionModel actionModel) {
+        final ActionPanel actionPanel =
+            new ActionPanel(actionFindUsingComponent.getComponentType().toString(), actionModel);
         actionFindUsingComponent.replaceWith(actionPanel);
     }
 
-    public void onSelected(ObjectAdapter selectedAdapter) {
-        final ObjectAdapterMemento selectedAdapterMemento = ObjectAdapterMemento
-                .createOrNull(selectedAdapter);
+    public void onSelected(final ObjectAdapter selectedAdapter) {
+        final ObjectAdapterMemento selectedAdapterMemento = ObjectAdapterMemento.createOrNull(selectedAdapter);
         onSelected(selectedAdapterMemento);
     }
 

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLinkFactory.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLinkFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLinkFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.entitylink;
 
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
@@ -30,24 +29,25 @@ import org.apache.wicket.model.IModel;
 
 public class EntityLinkFactory extends ComponentFactoryAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public EntityLinkFactory() {
-		super(ComponentType.ENTITY_LINK);
-	}
-
-	@Override
-	public ApplicationAdvice appliesTo(IModel<?> model) {
-		if (!(model instanceof EntityModel)) {
-			return ApplicationAdvice.DOES_NOT_APPLY;
-		}
-		EntityModel entityModel = (EntityModel) model;
-		ObjectSpecification specification = entityModel.getTypeOfSpecification();
-		return appliesIf(specification != null && !specification.containsFacet(ValueFacet.class));
-	}
-
-	public Component createComponent(String id, IModel<?> model) {
-		EntityModel entityModel = (EntityModel) model;
-		return new EntityLink(id, entityModel);
-	}
+    public EntityLinkFactory() {
+        super(ComponentType.ENTITY_LINK);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        if (!(model instanceof EntityModel)) {
+            return ApplicationAdvice.DOES_NOT_APPLY;
+        }
+        final EntityModel entityModel = (EntityModel) model;
+        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
+        return appliesIf(specification != null && !specification.containsFacet(ValueFacet.class));
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        final EntityModel entityModel = (EntityModel) model;
+        return new EntityLink(id, entityModel);
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.entitylink;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -35,45 +34,47 @@ import org.apache.wicket.markup.html.lin
 
 final class FindUsingLinkFactory implements CssMenuLinkFactory {
 
-	private static final long serialVersionUID = 1L;
-	
-	private final EntityLink entityLink;
-
-	FindUsingLinkFactory(EntityLink entityLink) {
-		this.entityLink = entityLink;
-	}
-
-	public LinkAndLabel newLink(ObjectAdapterMemento adapterMemento,
-			ObjectAction action, final String linkId) {
-		final ActionMemento actionMemento = new ActionMemento(action);
-		final ActionModel.Mode actionMode = ActionModel.determineMode(action);
-		final ActionModel actionModel = ActionModel.create(adapterMemento, actionMemento, actionMode, SingleResultsMode.SELECT);
-		
-		actionModel.setSelectionHandler(new SelectionHandler() {
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			public void onSelected(Component context, ObjectAdapter selectedAdapter) {
-				entityLink.onSelected(selectedAdapter);
-			}
-		});
-		actionModel.setNoResultsHandler(new NoResultsHandler() {
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			public void onNoResults(Component context) {
-				entityLink.onNoResults();
-			}
-		});
-
-		return new LinkAndLabel(new Link<String>(linkId) {
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			public void onClick() {
-				entityLink.onClick(actionModel);
-			}
-		}, Actions.labelFor(action));
-	}
-	
+    private static final long serialVersionUID = 1L;
+
+    private final EntityLink entityLink;
+
+    FindUsingLinkFactory(final EntityLink entityLink) {
+        this.entityLink = entityLink;
+    }
+
+    @Override
+    public LinkAndLabel newLink(final ObjectAdapterMemento adapterMemento, final ObjectAction action,
+        final String linkId) {
+        final ActionMemento actionMemento = new ActionMemento(action);
+        final ActionModel.Mode actionMode = ActionModel.determineMode(action);
+        final ActionModel actionModel =
+            ActionModel.create(adapterMemento, actionMemento, actionMode, SingleResultsMode.SELECT);
+
+        actionModel.setSelectionHandler(new SelectionHandler() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public void onSelected(final Component context, final ObjectAdapter selectedAdapter) {
+                entityLink.onSelected(selectedAdapter);
+            }
+        });
+        actionModel.setNoResultsHandler(new NoResultsHandler() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public void onNoResults(final Component context) {
+                entityLink.onNoResults();
+            }
+        });
+
+        return new LinkAndLabel(new Link<String>(linkId) {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public void onClick() {
+                entityLink.onClick(actionModel);
+            }
+        }, Actions.labelFor(action));
+    }
+
 }
\ No newline at end of file

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/CancelHintRequired.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/CancelHintRequired.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/CancelHintRequired.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/CancelHintRequired.java Tue May  3 07:44:41 2011
@@ -17,17 +17,16 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.formcomponent;
 
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.FormComponent;
 
 /**
- * {@link FormComponent}s that require explicit notification that their owning {@link Form}
- * has been cancelled should implement this interface.
+ * {@link FormComponent}s that require explicit notification that their owning {@link Form} has been cancelled should
+ * implement this interface.
  */
 public interface CancelHintRequired {
 
-	void onCancel();
+    void onCancel();
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormComponentPanelAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormComponentPanelAbstract.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormComponentPanelAbstract.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormComponentPanelAbstract.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.formcomponent;
 
 import java.util.List;
@@ -45,84 +44,82 @@ import org.apache.wicket.markup.html.for
 import org.apache.wicket.model.IModel;
 
 /**
- * Convenience adapter for {@link FormComponent}s 
- * that are implemented using the Wicket {@link FormComponentPanel}, providing
- * the ability to build up the panel using other {@link ComponentType}s.
+ * Convenience adapter for {@link FormComponent}s that are implemented using the Wicket {@link FormComponentPanel},
+ * providing the ability to build up the panel using other {@link ComponentType}s.
  */
-public abstract class FormComponentPanelAbstract<T> extends FormComponentPanel<T> implements PersistenceSessionAccessor, AuthenticationSessionAccessor {
+public abstract class FormComponentPanelAbstract<T> extends FormComponentPanel<T> implements
+    PersistenceSessionAccessor, AuthenticationSessionAccessor {
+
+    private static final long serialVersionUID = 1L;
+
+    private ComponentType componentType;
+
+    public FormComponentPanelAbstract(final ComponentType componentType) {
+        this(componentType, null);
+    }
+
+    public FormComponentPanelAbstract(final String id) {
+        this(id, null);
+    }
 
-	private static final long serialVersionUID = 1L;
+    public FormComponentPanelAbstract(final ComponentType componentType, final IModel<T> model) {
+        this(componentType.getWicketId(), model);
+    }
+
+    public FormComponentPanelAbstract(final String id, final IModel<T> model) {
+        super(id, model);
+        this.componentType = ComponentType.lookup(id);
+    }
 
-	private ComponentType componentType;
+    public ComponentType getComponentType() {
+        return componentType;
+    }
 
-	public FormComponentPanelAbstract(ComponentType componentType) {
-		this(componentType, null);
-	}
-
-	public FormComponentPanelAbstract(String id) {
-		this(id, null);
-	}
-
-	public FormComponentPanelAbstract(ComponentType componentType, IModel<T> model) {
-		this(componentType.getWicketId(), model);
-	}
-
-	public FormComponentPanelAbstract(String id, IModel<T> model) {
-		super(id, model);
-		this.componentType = ComponentType.lookup(id);
-	}
-
-
-	public ComponentType getComponentType() {
-		return componentType;
-	}
-	
-	
-	/**
-	 * For subclasses
-	 * @return 
-	 */
-	protected Component addOrReplace(ComponentType componentType, IModel<?> model) {
-		return getComponentFactoryRegistry().addOrReplaceComponent(this, componentType, model);
-	}
-
-	/**
-	 * For subclasses
-	 */
-	protected void permanentlyHide(ComponentType... componentIds) {
-		permanentlyHide(this, componentIds);
-	}
-
-	/**
-	 * For subclasses
-	 */
-	public void permanentlyHide(String... ids) {
-		permanentlyHide(this, ids);
-	}
-
-	/**
-	 * For subclasses
-	 */
-	protected void permanentlyHide(MarkupContainer container, ComponentType... componentIds) {
-		Components.permanentlyHide(container, componentIds);
-	}
-
-	/**
-	 * For subclasses
-	 */
-	public void permanentlyHide(MarkupContainer container, String... ids) {
-		Components.permanentlyHide(container, ids);
-	}
-
-
-	/////////////////////////////////////////////////////////////////////
-	// Convenience
-	/////////////////////////////////////////////////////////////////////
+    /**
+     * For subclasses
+     * 
+     * @return
+     */
+    protected Component addOrReplace(final ComponentType componentType, final IModel<?> model) {
+        return getComponentFactoryRegistry().addOrReplaceComponent(this, componentType, model);
+    }
+
+    /**
+     * For subclasses
+     */
+    protected void permanentlyHide(final ComponentType... componentIds) {
+        permanentlyHide(this, componentIds);
+    }
 
-	protected ComponentFactoryRegistry getComponentFactoryRegistry() {
-		final ComponentFactoryRegistryAccessor cfra = (ComponentFactoryRegistryAccessor)getApplication();
+    /**
+     * For subclasses
+     */
+    public void permanentlyHide(final String... ids) {
+        permanentlyHide(this, ids);
+    }
+
+    /**
+     * For subclasses
+     */
+    protected void permanentlyHide(final MarkupContainer container, final ComponentType... componentIds) {
+        Components.permanentlyHide(container, componentIds);
+    }
+
+    /**
+     * For subclasses
+     */
+    public void permanentlyHide(final MarkupContainer container, final String... ids) {
+        Components.permanentlyHide(container, ids);
+    }
+
+    // ///////////////////////////////////////////////////////////////////
+    // Convenience
+    // ///////////////////////////////////////////////////////////////////
+
+    protected ComponentFactoryRegistry getComponentFactoryRegistry() {
+        final ComponentFactoryRegistryAccessor cfra = (ComponentFactoryRegistryAccessor) getApplication();
         return cfra.getComponentFactoryRegistry();
-	}
+    }
 
     protected PageClassRegistry getPageClassRegistry() {
         final PageClassRegistryAccessor pcra = (PageClassRegistryAccessor) getApplication();
@@ -130,36 +127,35 @@ public abstract class FormComponentPanel
     }
 
     protected ImageCache getImageCache() {
-        final ImageCacheAccessor ica = (ImageCacheAccessor)getApplication();
+        final ImageCacheAccessor ica = (ImageCacheAccessor) getApplication();
         return ica.getImageCache();
     }
 
+    /**
+     * The underlying {@link AuthenticationSession Isis session} wrapped in the {@link #getWebSession() Wicket session}.
+     * 
+     * @return
+     */
+    @Override
+    public AuthenticationSession getAuthenticationSession() {
+        return ((AuthenticationSessionAccessor) Session.get()).getAuthenticationSession();
+    }
+
+    // ///////////////////////////////////////////////////////////////////
+    // Dependencies (from IsisContext)
+    // ///////////////////////////////////////////////////////////////////
+
+    @Override
+    public PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
 
+    protected List<ObjectAdapter> getServiceAdapters() {
+        return getPersistenceSession().getServices();
+    }
 
-	/**
-	 * The underlying {@link AuthenticationSession Isis session} wrapped in the
-	 * {@link #getWebSession() Wicket session}.
-	 * @return
-	 */
-	public AuthenticationSession getAuthenticationSession() {
-		return ((AuthenticationSessionAccessor) Session.get()).getAuthenticationSession();
-	}
-
-	/////////////////////////////////////////////////////////////////////
-	// Dependencies (from IsisContext)
-	/////////////////////////////////////////////////////////////////////
-	
-	public PersistenceSession getPersistenceSession() {
-		return IsisContext.getPersistenceSession();
-	}
-	
-	protected List<ObjectAdapter> getServiceAdapters() {
-		return getPersistenceSession().getServices();
-	}
-
-	protected OidStringifier getOidStringifier() {
-		return getPersistenceSession().getOidGenerator().getOidStringifier();
-	}
+    protected OidStringifier getOidStringifier() {
+        return getPersistenceSession().getOidGenerator().getOidStringifier();
+    }
 
-	
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormFeedbackPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormFeedbackPanel.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormFeedbackPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/formcomponent/FormFeedbackPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.formcomponent;
 
 import org.apache.wicket.feedback.FeedbackMessage;
@@ -26,24 +25,22 @@ import org.apache.wicket.markup.html.for
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
 
 /**
- * {@link FeedbackPanel} designed for forms; filters out any {@link FeedbackMessage}s from
- * {@link FormComponent}s (the idea being that they will have their own {@link FeedbackPanel}s.
+ * {@link FeedbackPanel} designed for forms; filters out any {@link FeedbackMessage}s from {@link FormComponent}s (the
+ * idea being that they will have their own {@link FeedbackPanel}s.
  */
 public class FormFeedbackPanel extends FeedbackPanel {
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
+
+    public FormFeedbackPanel(final String id) {
+        super(id);
+        setFilter(new IFeedbackMessageFilter() {
+
+            private static final long serialVersionUID = 1L;
 
-	public FormFeedbackPanel(String id) {
-		super(id);
-		setFilter(
-			new IFeedbackMessageFilter() {
-					
-				private static final long serialVersionUID = 1L;
-					
-				@Override
-				public boolean accept(FeedbackMessage message) {
-					return !(message.getReporter() instanceof FormComponent<?>);
-				}
-			}
-		);
-	}
+            @Override
+            public boolean accept(final FeedbackMessage message) {
+                return !(message.getReporter() instanceof FormComponent<?>);
+            }
+        });
+    }
 }
\ No newline at end of file

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages;
 
 import java.util.Arrays;
@@ -46,107 +45,102 @@ import org.apache.wicket.model.IModel;
  */
 public abstract class PageAbstract extends WebPage {
 
-	public static final String ID_MENU_LINK = "menuLink";
-	
-	private List<ComponentType> childComponentIds;
-	private PageParameters pageParameters;
-
-	public PageAbstract(PageParameters pageParameters, final ComponentType... childComponentIds) {
-		addApplicationActionsComponent();
-		this.childComponentIds = Collections.unmodifiableList(Arrays.asList(childComponentIds));
-		this.pageParameters = pageParameters;
-	}
-	
-	
-	/**
-	 * As provided in the {@link #PageAbstract(ComponentType) constructor}.
-	 * 
-	 * <p>
-	 * This superclass doesn't do anything with this property directly, but requiring it to
-	 * be provided enforces standardization of the implementation of the subclasses.
-	 */
-	public List<ComponentType> getChildModelTypes() {
-		return childComponentIds;
-	}
-	
-
-	@Override
-	public PageParameters getPageParameters() {
-		return pageParameters;
-	}
-	
-
-	private void addApplicationActionsComponent() {
-		ApplicationActionsModel model = new ApplicationActionsModel();
-		addComponent(ComponentType.APPLICATION_ACTIONS, model);
-	}
-
-	/**
-	 * For subclasses to call.
-	 * 
-	 * <p>
-	 * Should be called in the subclass' constructor.
-	 * 
-	 * @param model - used to find the best matching {@link ComponentFactory} to render the model.
-	 */
-	protected void addChildComponents(IModel<?> model) {
-		for (ComponentType componentType : getChildModelTypes()) {
-			addComponent(componentType, model);
-		}
-	}
-
-	private void addComponent(ComponentType componentType, IModel<?> model) {
-		getComponentFactoryRegistry().addOrReplaceComponent(this, componentType, model);
-	}
-
-	
-	@Override
-	protected void onRender(MarkupStream markupStream) {
-		super.onRender(markupStream);
-	}
-	
-	/**
-	 * Renders the application-supplied CSS, if any.
-	 */
-	@Override
-	public void renderHead(HtmlHeaderContainer container) {
-		super.renderHead(container);
-		final ApplicationCssRenderer applicationCssRenderer = getApplicationCssRenderer();
-        applicationCssRenderer.renderApplicationCss(container);
-	}
+    public static final String ID_MENU_LINK = "menuLink";
+
+    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;
+    }
+
+    /**
+     * As provided in the {@link #PageAbstract(ComponentType) constructor}.
+     * 
+     * <p>
+     * This superclass doesn't do anything with this property directly, but requiring it to be provided enforces
+     * standardization of the implementation of the subclasses.
+     */
+    public List<ComponentType> getChildModelTypes() {
+        return childComponentIds;
+    }
+
+    @Override
+    public PageParameters getPageParameters() {
+        return pageParameters;
+    }
+
+    private void addApplicationActionsComponent() {
+        final ApplicationActionsModel model = new ApplicationActionsModel();
+        addComponent(ComponentType.APPLICATION_ACTIONS, model);
+    }
+
+    /**
+     * For subclasses to call.
+     * 
+     * <p>
+     * Should be called in the subclass' constructor.
+     * 
+     * @param model
+     *            - used to find the best matching {@link ComponentFactory} to render the model.
+     */
+    protected void addChildComponents(final IModel<?> model) {
+        for (final ComponentType componentType : getChildModelTypes()) {
+            addComponent(componentType, model);
+        }
+    }
+
+    private void addComponent(final ComponentType componentType, final IModel<?> model) {
+        getComponentFactoryRegistry().addOrReplaceComponent(this, componentType, model);
+    }
 
+    @Override
+    protected void onRender(final MarkupStream markupStream) {
+        super.onRender(markupStream);
+    }
 
-	/////////////////////////////////////////////////////////////////////
-	// Convenience
-	/////////////////////////////////////////////////////////////////////
+    /**
+     * Renders the application-supplied CSS, if any.
+     */
+    @Override
+    public void renderHead(final HtmlHeaderContainer container) {
+        super.renderHead(container);
+        final ApplicationCssRenderer applicationCssRenderer = getApplicationCssRenderer();
+        applicationCssRenderer.renderApplicationCss(container);
+    }
 
-	protected ComponentFactoryRegistry getComponentFactoryRegistry() {
-		final ComponentFactoryRegistryAccessor cfra = (ComponentFactoryRegistryAccessor) getApplication();
+    // ///////////////////////////////////////////////////////////////////
+    // Convenience
+    // ///////////////////////////////////////////////////////////////////
+
+    protected ComponentFactoryRegistry getComponentFactoryRegistry() {
+        final ComponentFactoryRegistryAccessor cfra = (ComponentFactoryRegistryAccessor) getApplication();
         return cfra.getComponentFactoryRegistry();
-	}
+    }
 
     protected ApplicationCssRenderer getApplicationCssRenderer() {
         return (ApplicationCssRenderer) getApplication();
     }
-    
 
-	/////////////////////////////////////////////////////
-	// System components
-	/////////////////////////////////////////////////////
-
-	protected ServicesInjector getServicesInjector() {
-		return getPersistenceSession().getServicesInjector();
-	}
-	
-	protected PersistenceSession getPersistenceSession() {
-		return IsisContext.getPersistenceSession();
-	}
-
-	protected OidStringifier getOidStringifier() {
-		return getPersistenceSession().getOidGenerator().getOidStringifier();
-	}
-	
-	protected SpecificationLoader getSpecificationLoader() {
-		return IsisContext.getSpecificationLoader();
-	}
+    // ///////////////////////////////////////////////////
+    // System components
+    // ///////////////////////////////////////////////////
+
+    protected ServicesInjector getServicesInjector() {
+        return getPersistenceSession().getServicesInjector();
+    }
+
+    protected PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    protected OidStringifier getOidStringifier() {
+        return getPersistenceSession().getOidGenerator().getOidStringifier();
+    }
+
+    protected SpecificationLoader getSpecificationLoader() {
+        return IsisContext.getSpecificationLoader();
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassList.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassList.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassList.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassList.java Tue May  3 07:44:41 2011
@@ -17,21 +17,18 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages;
 
-
 /**
  * Specify the pages to use for each {@link PageType}.
- *
+ * 
  * <p>
- * The <tt>PageClassListDefault</tt> default implementation returns pages that all
- * inherit from {@link PageAbstract} and which (by component markup inheritance) therefore
- * define a set of CSS, along with the overall layout of each pages.  This interface
- * can be used to selectively replace some or all of these pages.
+ * The <tt>PageClassListDefault</tt> default implementation returns pages that all inherit from {@link PageAbstract} and
+ * which (by component markup inheritance) therefore define a set of CSS, along with the overall layout of each pages.
+ * This interface can be used to selectively replace some or all of these pages.
  */
 public interface PageClassList {
 
-	void registerPages(PageRegistrySpi pageRegistry);
+    void registerPages(PageRegistrySpi pageRegistry);
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistry.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistry.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistry.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistry.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages;
 
 import org.apache.wicket.Page;
@@ -27,9 +26,9 @@ import org.apache.wicket.Page;
  */
 public interface PageClassRegistry {
 
-	/**
-	 * Used by <tt>WicketObjectsApplication</tt> to lookup pages from the registry.
-	 */
-	public Class<? extends Page> getPageClass(PageType pageType);
-	
+    /**
+     * Used by <tt>WicketObjectsApplication</tt> to lookup pages from the registry.
+     */
+    public Class<? extends Page> getPageClass(PageType pageType);
+
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistryAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistryAccessor.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistryAccessor.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageClassRegistryAccessor.java Tue May  3 07:44:41 2011
@@ -17,12 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages;
 
 import java.io.Serializable;
 
-
 /**
  * API to obtain the {@link PageClassRegistry}.
  */

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageRegistrySpi.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages;
 
 import org.apache.wicket.Page;
@@ -27,7 +26,6 @@ import org.apache.wicket.Page;
  */
 public interface PageRegistrySpi {
 
-	public void registerPage(PageType pageType, Class<? extends Page> pageClass);
+    public void registerPage(PageType pageType, Class<? extends Page> pageClass);
 
-	
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageType.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages;
 
 import org.apache.isis.viewer.wicket.ui.pages.action.ActionPage;
@@ -30,33 +29,30 @@ import org.apache.wicket.markup.html.Web
  * Enumerates the different types of pages that can be rendered.
  * 
  * <p>
- * Is used by {@link PageClassRegistry} to lookup the concrete page to render
- * different types of pages. This allows the large-scale structure of page
- * layout (eg headers, footers) to be altered.
+ * Is used by {@link PageClassRegistry} to lookup the concrete page to render different types of pages. This allows the
+ * large-scale structure of page layout (eg headers, footers) to be altered.
  */
 public enum PageType {
-	SIGN_IN(WebPage.class), HOME(HomePage.class), ENTITY(EntityPage.class), ACTION(
-			ActionPage.class), SIGN_OUT(WebPage.class);
+    SIGN_IN(WebPage.class), HOME(HomePage.class), ENTITY(EntityPage.class), ACTION(ActionPage.class),
+    SIGN_OUT(WebPage.class);
 
-	private Class<? extends Page> superClass;
+    private Class<? extends Page> superClass;
 
-	private PageType() {
-		this(Page.class);
-	}
-
-	private PageType(final Class<? extends Page> pageClass) {
-		this.superClass = pageClass;
-	}
-
-	/**
-	 * The class that pages registered against this page type must be assignable
-	 * from (ie have as their superclass).
-	 * 
-	 * <p>
-	 * This allows us to perform fail-fast checking when pages are registered,
-	 * rather than when they are used.
-	 */
-	public Class<? extends Page> getPageClass() {
-		return superClass;
-	}
+    private PageType() {
+        this(Page.class);
+    }
+
+    private PageType(final Class<? extends Page> pageClass) {
+        this.superClass = pageClass;
+    }
+
+    /**
+     * The class that pages registered against this page type must be assignable from (ie have as their superclass).
+     * 
+     * <p>
+     * This allows us to perform fail-fast checking when pages are registered, rather than when they are used.
+     */
+    public Class<? extends Page> getPageClass() {
+        return superClass;
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages.action;
 
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
@@ -29,30 +28,30 @@ import org.apache.wicket.markup.html.lin
 import org.apache.wicket.model.IModel;
 
 /**
- * Web page representing an action invocation. 
+ * Web page representing an action invocation.
  */
 @AuthorizeInstantiation("org.starobjects.wicket.roles.USER")
 public class ActionPage extends PageAbstract {
 
-	/**
-	 * For use with {@link Component#setResponsePage(org.apache.wicket.Page)}
-	 */
-	public ActionPage(ActionModel actionModel) {
-		super(new PageParameters(), ComponentType.ACTION);
-		addChildComponents(actionModel);
-	}
-
-	/**
-	 * For use through {@link BookmarkablePageLink}s.
-	 */
-	public ActionPage(PageParameters pageParameters) {
-		super(pageParameters, ComponentType.ACTION);
-		IModel<?> model = buildModel();
-		addChildComponents(model);
-	}
-	
-	private IModel<?> buildModel() {
-		return ActionModel.createForPersistent(getPageParameters(), getOidStringifier());
-	}
-	
+    /**
+     * For use with {@link Component#setResponsePage(org.apache.wicket.Page)}
+     */
+    public ActionPage(final ActionModel actionModel) {
+        super(new PageParameters(), ComponentType.ACTION);
+        addChildComponents(actionModel);
+    }
+
+    /**
+     * For use through {@link BookmarkablePageLink}s.
+     */
+    public ActionPage(final PageParameters pageParameters) {
+        super(pageParameters, ComponentType.ACTION);
+        final IModel<?> model = buildModel();
+        addChildComponents(model);
+    }
+
+    private IModel<?> buildModel() {
+        return ActionModel.createForPersistent(getPageParameters(), getOidStringifier());
+    }
+
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages.entity;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -29,21 +28,21 @@ import org.apache.wicket.authorization.s
 import org.apache.wicket.model.IModel;
 
 /**
- * Web page representing an entity. 
+ * Web page representing an entity.
  */
 @AuthorizeInstantiation("org.starobjects.wicket.roles.USER")
 public class EntityPage extends PageAbstract {
 
-	public EntityPage(PageParameters pageParameters) {
-		super(pageParameters, ComponentType.ENTITY);
-		IModel<?> model = new EntityModel(getPageParameters(), getOidStringifier());
-		addChildComponents(model);
-	}
-
-	public EntityPage(ObjectAdapter adapter) {
-		super(new PageParameters(), ComponentType.ENTITY);
-		IModel<?> model = new EntityModel(adapter);
-		addChildComponents(model);
-	}
+    public EntityPage(final PageParameters pageParameters) {
+        super(pageParameters, ComponentType.ENTITY);
+        final IModel<?> model = new EntityModel(getPageParameters(), getOidStringifier());
+        addChildComponents(model);
+    }
+
+    public EntityPage(final ObjectAdapter adapter) {
+        super(new PageParameters(), ComponentType.ENTITY);
+        final IModel<?> model = new EntityModel(adapter);
+        addChildComponents(model);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.pages.home;
 
 import org.apache.isis.viewer.wicket.model.models.WelcomeModel;
@@ -27,23 +26,20 @@ import org.apache.wicket.PageParameters;
 import org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstantiation;
 import org.apache.wicket.model.IModel;
 
-
 /**
- * Web page representing the home page (showing a welcome message). 
+ * Web page representing the home page (showing a welcome message).
  */
 @AuthorizeInstantiation("org.starobjects.wicket.roles.USER")
 public class HomePage extends PageAbstract {
-	
-	
-	public HomePage() {
-		super(new PageParameters(), ComponentType.WELCOME);
-		IModel<?> model = buildModel();
-		addChildComponents(model);
-	}
-
-	private IModel<?> buildModel() {
-		return new WelcomeModel();
-	}
-	
+
+    public HomePage() {
+        super(new PageParameters(), ComponentType.WELCOME);
+        final IModel<?> model = buildModel();
+        addChildComponents(model);
+    }
+
+    private IModel<?> buildModel() {
+        return new WelcomeModel();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.panels;
 
 import java.util.List;
@@ -39,78 +38,78 @@ import org.apache.wicket.markup.html.IHe
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.IModel;
 
-public abstract class FormAbstract<T> extends Form<T> implements IHeaderContributor, ComponentFactoryRegistryAccessor, PageClassRegistryAccessor, AuthenticationSessionAccessor, PersistenceSessionAccessor {
+public abstract class FormAbstract<T> extends Form<T> implements IHeaderContributor, ComponentFactoryRegistryAccessor,
+    PageClassRegistryAccessor, AuthenticationSessionAccessor, PersistenceSessionAccessor {
 
-	private static final long serialVersionUID = 1L;
-	
-	public FormAbstract(String id) {
-		super(id);
-	}
-
-	public FormAbstract(String id, IModel<T> model) {
-		super(id, model);
-	}
+    private static final long serialVersionUID = 1L;
 
+    public FormAbstract(final String id) {
+        super(id);
+    }
 
+    public FormAbstract(final String id, final IModel<T> model) {
+        super(id, model);
+    }
 
     // ///////////////////////////////////////////////////////////////////
     // IHeaderContributor
     // ///////////////////////////////////////////////////////////////////
 
-	/**
-	 * Automatically reference any corresponding CSS.
-	 */
-	@Override
-	public void renderHead(IHeaderResponse response) {
-	    super.renderHead(response);
-	    renderHead(response, this.getClass());
-	}
-	
-   /**
-     * Factored out to allow non-concrete subclasses to additionally render
-     * their own CSS if required.
+    /**
+     * Automatically reference any corresponding CSS.
+     */
+    @Override
+    public void renderHead(final IHeaderResponse response) {
+        super.renderHead(response);
+        renderHead(response, this.getClass());
+    }
+
+    /**
+     * Factored out to allow non-concrete subclasses to additionally render their own CSS if required.
      */
-    protected void renderHead(IHeaderResponse response, final Class<?> cls) {
-        String url = cls.getSimpleName() + ".css";
+    protected void renderHead(final IHeaderResponse response, final Class<?> cls) {
+        final String url = cls.getSimpleName() + ".css";
         response.renderCSSReference(new ResourceReference(cls, url));
     }
 
+    // ///////////////////////////////////////////////////////////////////
+    // Convenience
+    // ///////////////////////////////////////////////////////////////////
+
+    @Override
+    public ComponentFactoryRegistry getComponentFactoryRegistry() {
+        return ((ComponentFactoryRegistryAccessor) getApplication()).getComponentFactoryRegistry();
+    }
 
-	// ///////////////////////////////////////////////////////////////////
-	// Convenience
-	// ///////////////////////////////////////////////////////////////////
-
-	public ComponentFactoryRegistry getComponentFactoryRegistry() {
-		return ((ComponentFactoryRegistryAccessor)getApplication()).getComponentFactoryRegistry();
-	}
-
-	public PageClassRegistry getPageClassRegistry() {
-		return ((PageClassRegistryAccessor) getApplication()).getPageClassRegistry();
-	}
-
-	// ///////////////////////////////////////////////////////////////////
-	// Dependencies (from IsisContext)
-	// ///////////////////////////////////////////////////////////////////
-
-	public IsisContext getIsisContext() {
-		return IsisContext.getInstance();
-	}
-	
-	public PersistenceSession getPersistenceSession() {
-		return IsisContext.getPersistenceSession();
-	}
-	
-	public AuthenticationSession getAuthenticationSession() {
-	    return IsisContext.getAuthenticationSession();
-	}
-
-	protected List<ObjectAdapter> getServiceAdapters() {
-		return getPersistenceSession().getServices();
-	}
-
-	protected OidStringifier getOidStringifier() {
-		return getPersistenceSession().getOidGenerator().getOidStringifier();
-	}
+    @Override
+    public PageClassRegistry getPageClassRegistry() {
+        return ((PageClassRegistryAccessor) getApplication()).getPageClassRegistry();
+    }
 
+    // ///////////////////////////////////////////////////////////////////
+    // Dependencies (from IsisContext)
+    // ///////////////////////////////////////////////////////////////////
+
+    public IsisContext getIsisContext() {
+        return IsisContext.getInstance();
+    }
+
+    @Override
+    public PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    @Override
+    public AuthenticationSession getAuthenticationSession() {
+        return IsisContext.getAuthenticationSession();
+    }
+
+    protected List<ObjectAdapter> getServiceAdapters() {
+        return getPersistenceSession().getServices();
+    }
+
+    protected OidStringifier getOidStringifier() {
+        return getPersistenceSession().getOidGenerator().getOidStringifier();
+    }
 
 }



Mime
View raw message