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 [12/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/scalars/primitive/BytePanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BytePanelFactory.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/scalars/primitive/BytePanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BytePanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -30,14 +29,15 @@ import org.apache.wicket.Component;
  */
 public class BytePanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public BytePanelFactory() {
-		super(byte.class, Byte.class);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new BytePanel(id, scalarModel);
-	}
+    public BytePanelFactory() {
+        super(byte.class, Byte.class);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new BytePanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanel.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/scalars/primitive/CharacterPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -28,16 +27,16 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public class CharacterPanel extends ScalarPanelTextFieldParseableAbstract {
 
-	private static final long serialVersionUID = 1L;
-	private static final String ID_SCALAR_VALUE = "scalarValue";
+    private static final long serialVersionUID = 1L;
+    private static final String ID_SCALAR_VALUE = "scalarValue";
 
-	public CharacterPanel(String id, final ScalarModel scalarModel) {
-		super(id, ID_SCALAR_VALUE, scalarModel);
-	}
-	
-	@Override
-	protected void addSemantics() {
-		super.addSemantics();
-	}
+    public CharacterPanel(final String id, final ScalarModel scalarModel) {
+        super(id, ID_SCALAR_VALUE, scalarModel);
+    }
+
+    @Override
+    protected void addSemantics() {
+        super.addSemantics();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanelFactory.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/scalars/primitive/CharacterPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/CharacterPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -30,14 +29,15 @@ import org.apache.wicket.Component;
  */
 public class CharacterPanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public CharacterPanelFactory() {
-		super(char.class, Character.class);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new CharacterPanel(id, scalarModel);
-	}
+    public CharacterPanelFactory() {
+        super(char.class, Character.class);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new CharacterPanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/DoublePanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/DoublePanel.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/scalars/primitive/DoublePanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/DoublePanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -28,16 +27,16 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public class DoublePanel extends ScalarPanelTextFieldParseableAbstract {
 
-	private static final long serialVersionUID = 1L;
-	private static final String ID_SCALAR_VALUE = "scalarValue";
+    private static final long serialVersionUID = 1L;
+    private static final String ID_SCALAR_VALUE = "scalarValue";
 
-	public DoublePanel(String id, final ScalarModel scalarModel) {
-		super(id, ID_SCALAR_VALUE, scalarModel);
-	}
-	
-	@Override
-	protected void addSemantics() {
-		super.addSemantics();
-	}
+    public DoublePanel(final String id, final ScalarModel scalarModel) {
+        super(id, ID_SCALAR_VALUE, scalarModel);
+    }
+
+    @Override
+    protected void addSemantics() {
+        super.addSemantics();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/DoublePanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/DoublePanelFactory.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/scalars/primitive/DoublePanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/DoublePanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -30,14 +29,15 @@ import org.apache.wicket.Component;
  */
 public class DoublePanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public DoublePanelFactory() {
-		super(double.class, Double.class);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new DoublePanel(id, scalarModel);
-	}
+    public DoublePanelFactory() {
+        super(double.class, Double.class);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new DoublePanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/FloatPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/FloatPanel.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/scalars/primitive/FloatPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/FloatPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -28,16 +27,16 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public class FloatPanel extends ScalarPanelTextFieldParseableAbstract {
 
-	private static final long serialVersionUID = 1L;
-	private static final String ID_SCALAR_VALUE = "scalarValue";
+    private static final long serialVersionUID = 1L;
+    private static final String ID_SCALAR_VALUE = "scalarValue";
 
-	public FloatPanel(String id, final ScalarModel scalarModel) {
-		super(id, ID_SCALAR_VALUE, scalarModel);
-	}
-	
-	@Override
-	protected void addSemantics() {
-		super.addSemantics();
-	}
+    public FloatPanel(final String id, final ScalarModel scalarModel) {
+        super(id, ID_SCALAR_VALUE, scalarModel);
+    }
+
+    @Override
+    protected void addSemantics() {
+        super.addSemantics();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/FloatPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/FloatPanelFactory.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/scalars/primitive/FloatPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/FloatPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -30,14 +29,15 @@ import org.apache.wicket.Component;
  */
 public class FloatPanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public FloatPanelFactory() {
-		super(float.class, Float.class);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new FloatPanel(id, scalarModel);
-	}
+    public FloatPanelFactory() {
+        super(float.class, Float.class);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new FloatPanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/IntegerPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/IntegerPanel.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/scalars/primitive/IntegerPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/IntegerPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -28,16 +27,16 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public class IntegerPanel extends ScalarPanelTextFieldParseableAbstract {
 
-	private static final long serialVersionUID = 1L;
-	private static final String ID_SCALAR_VALUE = "scalarValue";
+    private static final long serialVersionUID = 1L;
+    private static final String ID_SCALAR_VALUE = "scalarValue";
 
-	public IntegerPanel(String id, final ScalarModel scalarModel) {
-		super(id, ID_SCALAR_VALUE, scalarModel);
-	}
-	
-	@Override
-	protected void addSemantics() {
-		super.addSemantics();
-	}
+    public IntegerPanel(final String id, final ScalarModel scalarModel) {
+        super(id, ID_SCALAR_VALUE, scalarModel);
+    }
+
+    @Override
+    protected void addSemantics() {
+        super.addSemantics();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/IntegerPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/IntegerPanelFactory.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/scalars/primitive/IntegerPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/IntegerPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -30,14 +29,15 @@ import org.apache.wicket.Component;
  */
 public class IntegerPanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public IntegerPanelFactory() {
-		super(int.class, Integer.class);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new IntegerPanel(id, scalarModel);
-	}
+    public IntegerPanelFactory() {
+        super(int.class, Integer.class);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new IntegerPanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/LongPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/LongPanel.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/scalars/primitive/LongPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/LongPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -28,16 +27,16 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public class LongPanel extends ScalarPanelTextFieldParseableAbstract {
 
-	private static final long serialVersionUID = 1L;
-	private static final String ID_SCALAR_VALUE = "scalarValue";
+    private static final long serialVersionUID = 1L;
+    private static final String ID_SCALAR_VALUE = "scalarValue";
 
-	public LongPanel(String id, final ScalarModel scalarModel) {
-		super(id, ID_SCALAR_VALUE, scalarModel);
-	}
-	
-	@Override
-	protected void addSemantics() {
-		super.addSemantics();
-	}
+    public LongPanel(final String id, final ScalarModel scalarModel) {
+        super(id, ID_SCALAR_VALUE, scalarModel);
+    }
+
+    @Override
+    protected void addSemantics() {
+        super.addSemantics();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/LongPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/LongPanelFactory.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/scalars/primitive/LongPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/LongPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -30,14 +29,15 @@ import org.apache.wicket.Component;
  */
 public class LongPanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public LongPanelFactory() {
-		super(long.class, Long.class);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new LongPanel(id, scalarModel);
-	}
+    public LongPanelFactory() {
+        super(long.class, Long.class);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new LongPanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/ShortPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/ShortPanel.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/scalars/primitive/ShortPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/ShortPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -28,17 +27,16 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public class ShortPanel extends ScalarPanelTextFieldParseableAbstract {
 
-	private static final long serialVersionUID = 1L;
-	private static final String ID_SCALAR_VALUE = "scalarValue";
-
-	public ShortPanel(String id, final ScalarModel scalarModel) {
-		super(id, ID_SCALAR_VALUE, scalarModel);
-	}
-
-	@Override
-	protected void addSemantics() {
-		super.addSemantics();
-	}
+    private static final long serialVersionUID = 1L;
+    private static final String ID_SCALAR_VALUE = "scalarValue";
 
+    public ShortPanel(final String id, final ScalarModel scalarModel) {
+        super(id, ID_SCALAR_VALUE, scalarModel);
+    }
+
+    @Override
+    protected void addSemantics() {
+        super.addSemantics();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/ShortPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/ShortPanelFactory.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/scalars/primitive/ShortPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/ShortPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.primitive;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -30,14 +29,15 @@ import org.apache.wicket.Component;
  */
 public class ShortPanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public ShortPanelFactory() {
-		super(short.class, Short.class);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new ShortPanel(id, scalarModel);
-	}
+    public ShortPanelFactory() {
+        super(short.class, Short.class);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new ShortPanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.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/scalars/reference/ReferencePanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.reference;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -39,116 +38,110 @@ import org.apache.wicket.validation.Vali
  */
 public class ReferencePanel extends ScalarPanelAbstract {
 
-	private static final long serialVersionUID = 1L;
-	
-	private static final String ID_SCALAR_IF_REGULAR = "scalarIfRegular";
-	private static final String ID_SCALAR_NAME = "scalarName";
-	private static final String ID_FEEDBACK = "feedback";
-	
-	private static final String ID_SCALAR_IF_COMPACT = "scalarIfCompact";
-
-	private EntityLink entityLink;
-
-
-	public ReferencePanel(String id, final ScalarModel scalarModel) {
-		super(id, scalarModel);
-	}
-
-
-	@Override
-	protected void onBeforeRenderWhenEnabled() {
-		super.onBeforeRenderWhenEnabled();
-		entityLink.setEnabled(true);
-		entityLink.syncFindUsingVisibility();
-	}
-	
-	@Override
-	protected void onBeforeRenderWhenViewMode() {
-		super.onBeforeRenderWhenViewMode();
-		entityLink.setEnabled(false);
-		entityLink.syncFindUsingVisibility();
-	}
-	
-	@Override
-	protected void onBeforeRenderWhenDisabled(String disableReason) {
-		super.onBeforeRenderWhenDisabled(disableReason);
-		entityLink.setEnabled(false);
-		entityLink.syncFindUsingVisibility();
-	}
-
-	protected FormComponentLabel addComponentForRegular() {
-		ScalarModel scalarModel = getModel();
-		String name = scalarModel.getName();
-
-		
-		entityLink = (EntityLink) getComponentFactoryRegistry().createComponent(ComponentType.ENTITY_LINK, getModel());
-		
-		entityLink.setOutputMarkupId(true);
-		entityLink.setLabel(Model.of(name));
-
-		FormComponentLabel labelIfRegular = new FormComponentLabel(ID_SCALAR_IF_REGULAR,entityLink);
-
-		labelIfRegular.add(entityLink);
-		Label scalarName = new Label(ID_SCALAR_NAME, getFormat().getLabelCaption(entityLink));
-		labelIfRegular.add(scalarName);
-
-		addOrReplace(labelIfRegular);
-		
-		addOrReplace(new ComponentFeedbackPanel(ID_FEEDBACK, entityLink));
-
-		
-		addStandardSemantics();
-		addSemantics();
-
-		return labelIfRegular;
-	}
-
-
-	protected void addStandardSemantics() {
-		setRequiredIfSpecified();
-	}
-
-	private void setRequiredIfSpecified() {
-		ScalarModel scalarModel = getModel();
-		boolean required = scalarModel.isRequired();
-		entityLink.setRequired(required);
-	}
-
-	protected void addSemantics() {
-		
-		addObjectAdapterValidator();
-	}
-	
-	private void addObjectAdapterValidator() {
-		final ScalarModel scalarModel = getModel();
-
-		entityLink.add(new IValidator<ObjectAdapter>() {
-			
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			public void validate(IValidatable<ObjectAdapter> validatable) {
-				ObjectAdapter proposedAdapter = validatable.getValue();
-				String reasonIfAny = scalarModel.validate(proposedAdapter);
-				if (reasonIfAny != null) {
-					ValidationError error = new ValidationError();
-					error.setMessage(reasonIfAny);
-					validatable.error(error);
-				}
-			}
-		});
-	}
-
-
-	/**
-	 * Mandatory hook method to build the component to render the model
-	 * when in {@link Format#COMPACT compact} format.
-	 */
-	protected Component addComponentForCompact() {
-		Label labelIfCompact = new Label(ID_SCALAR_IF_COMPACT, getModel().getObjectAsString());
-		addOrReplace(labelIfCompact);
-		return labelIfCompact;
-	}
+    private static final long serialVersionUID = 1L;
 
+    private static final String ID_SCALAR_IF_REGULAR = "scalarIfRegular";
+    private static final String ID_SCALAR_NAME = "scalarName";
+    private static final String ID_FEEDBACK = "feedback";
+
+    private static final String ID_SCALAR_IF_COMPACT = "scalarIfCompact";
+
+    private EntityLink entityLink;
+
+    public ReferencePanel(final String id, final ScalarModel scalarModel) {
+        super(id, scalarModel);
+    }
+
+    @Override
+    protected void onBeforeRenderWhenEnabled() {
+        super.onBeforeRenderWhenEnabled();
+        entityLink.setEnabled(true);
+        entityLink.syncFindUsingVisibility();
+    }
+
+    @Override
+    protected void onBeforeRenderWhenViewMode() {
+        super.onBeforeRenderWhenViewMode();
+        entityLink.setEnabled(false);
+        entityLink.syncFindUsingVisibility();
+    }
+
+    @Override
+    protected void onBeforeRenderWhenDisabled(final String disableReason) {
+        super.onBeforeRenderWhenDisabled(disableReason);
+        entityLink.setEnabled(false);
+        entityLink.syncFindUsingVisibility();
+    }
+
+    @Override
+    protected FormComponentLabel addComponentForRegular() {
+        final ScalarModel scalarModel = getModel();
+        final String name = scalarModel.getName();
+
+        entityLink = (EntityLink) getComponentFactoryRegistry().createComponent(ComponentType.ENTITY_LINK, getModel());
+
+        entityLink.setOutputMarkupId(true);
+        entityLink.setLabel(Model.of(name));
+
+        final FormComponentLabel labelIfRegular = new FormComponentLabel(ID_SCALAR_IF_REGULAR, entityLink);
+
+        labelIfRegular.add(entityLink);
+        final Label scalarName = new Label(ID_SCALAR_NAME, getFormat().getLabelCaption(entityLink));
+        labelIfRegular.add(scalarName);
+
+        addOrReplace(labelIfRegular);
+
+        addOrReplace(new ComponentFeedbackPanel(ID_FEEDBACK, entityLink));
+
+        addStandardSemantics();
+        addSemantics();
+
+        return labelIfRegular;
+    }
+
+    protected void addStandardSemantics() {
+        setRequiredIfSpecified();
+    }
+
+    private void setRequiredIfSpecified() {
+        final ScalarModel scalarModel = getModel();
+        final boolean required = scalarModel.isRequired();
+        entityLink.setRequired(required);
+    }
+
+    protected void addSemantics() {
+
+        addObjectAdapterValidator();
+    }
+
+    private void addObjectAdapterValidator() {
+        final ScalarModel scalarModel = getModel();
+
+        entityLink.add(new IValidator<ObjectAdapter>() {
+
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public void validate(final IValidatable<ObjectAdapter> validatable) {
+                final ObjectAdapter proposedAdapter = validatable.getValue();
+                final String reasonIfAny = scalarModel.validate(proposedAdapter);
+                if (reasonIfAny != null) {
+                    final ValidationError error = new ValidationError();
+                    error.setMessage(reasonIfAny);
+                    validatable.error(error);
+                }
+            }
+        });
+    }
+
+    /**
+     * Mandatory hook method to build the component to render the model when in {@link Format#COMPACT compact} format.
+     */
+    @Override
+    protected Component addComponentForCompact() {
+        final Label labelIfCompact = new Label(ID_SCALAR_IF_COMPACT, getModel().getObjectAsString());
+        addOrReplace(labelIfCompact);
+        return labelIfCompact;
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanelFactory.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/scalars/reference/ReferencePanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.reference;
 
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
@@ -34,24 +33,25 @@ import org.apache.wicket.model.IModel;
  */
 public class ReferencePanelFactory extends ComponentFactoryAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public ReferencePanelFactory() {
-		super(ComponentType.SCALAR_NAME_AND_VALUE);
-	}
-
-	@Override
-	public ApplicationAdvice appliesTo(IModel<?> model) {
-		if (!(model instanceof ScalarModel)) {
-			return ApplicationAdvice.DOES_NOT_APPLY;
-		}
-		ScalarModel scalarModel = (ScalarModel) model;
-		ObjectSpecification specification = scalarModel.getTypeOfSpecification();
-		return appliesIf(!specification.containsFacet(ValueFacet.class));
-	}
-
-	public Component createComponent(String id, IModel<?> model) {
-		ScalarModel scalarModel = (ScalarModel) model;
-		return new ReferencePanel(id, scalarModel);
-	}
+    public ReferencePanelFactory() {
+        super(ComponentType.SCALAR_NAME_AND_VALUE);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        if (!(model instanceof ScalarModel)) {
+            return ApplicationAdvice.DOES_NOT_APPLY;
+        }
+        final ScalarModel scalarModel = (ScalarModel) model;
+        final ObjectSpecification specification = scalarModel.getTypeOfSpecification();
+        return appliesIf(!specification.containsFacet(ValueFacet.class));
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        final ScalarModel scalarModel = (ScalarModel) model;
+        return new ReferencePanel(id, scalarModel);
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/StringPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/StringPanel.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/scalars/string/StringPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/StringPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.string;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -28,16 +27,16 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public class StringPanel extends ScalarPanelTextFieldParseableAbstract {
 
-	private static final long serialVersionUID = 1L;
-	private static final String ID_SCALAR_VALUE = "scalarValue";
+    private static final long serialVersionUID = 1L;
+    private static final String ID_SCALAR_VALUE = "scalarValue";
 
-	public StringPanel(String id, final ScalarModel scalarModel) {
-		super(id, ID_SCALAR_VALUE, scalarModel);
-	}
-
-	@Override
-	protected void addSemantics() {
-		super.addSemantics();
-	}
+    public StringPanel(final String id, final ScalarModel scalarModel) {
+        super(id, ID_SCALAR_VALUE, scalarModel);
+    }
+
+    @Override
+    protected void addSemantics() {
+        super.addSemantics();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/StringPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/StringPanelFactory.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/scalars/string/StringPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/StringPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.string;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -26,14 +25,15 @@ import org.apache.wicket.Component;
 
 public class StringPanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public StringPanelFactory() {
-		super(String.class);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new StringPanel(id, scalarModel);
-	}
+    public StringPanelFactory() {
+        super(String.class);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new StringPanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/value/ValuePanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/value/ValuePanel.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/scalars/value/ValuePanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/value/ValuePanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.value;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -25,25 +24,25 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldParseableAbstract;
 
 /**
- * Panel for rendering any value types that do not have their own custom {@link ScalarPanelAbstract panel}
- * to render them.
- *
+ * Panel for rendering any value types that do not have their own custom {@link ScalarPanelAbstract panel} to render
+ * them.
+ * 
  * <p>
- * This is a fallback panel; values are expected to be {@link Parser parseable} (typically
- * through the Isis' {@link Value} annotation.
+ * This is a fallback panel; values are expected to be {@link Parser parseable} (typically through the Isis'
+ * {@link Value} annotation.
  */
 public class ValuePanel extends ScalarPanelTextFieldParseableAbstract {
 
-	private static final long serialVersionUID = 1L;
-	private static final String ID_SCALAR_VALUE = "scalarValue";
+    private static final long serialVersionUID = 1L;
+    private static final String ID_SCALAR_VALUE = "scalarValue";
 
-	public ValuePanel(String id, final ScalarModel scalarModel) {
-		super(id, ID_SCALAR_VALUE, scalarModel);
-	}
-
-	@Override
-	protected void addSemantics() {
-		super.addSemantics();
-	}
+    public ValuePanel(final String id, final ScalarModel scalarModel) {
+        super(id, ID_SCALAR_VALUE, scalarModel);
+    }
+
+    @Override
+    protected void addSemantics() {
+        super.addSemantics();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/value/ValuePanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/value/ValuePanelFactory.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/scalars/value/ValuePanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/value/ValuePanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.value;
 
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
@@ -33,25 +32,26 @@ import org.apache.wicket.model.IModel;
  */
 public class ValuePanelFactory extends ComponentFactoryAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public ValuePanelFactory() {
-		super(ComponentType.SCALAR_NAME_AND_VALUE);
-	}
-
-	@Override
-	public ApplicationAdvice appliesTo(IModel<?> model) {
-		if (!(model instanceof ScalarModel)) {
-			return ApplicationAdvice.DOES_NOT_APPLY;
-		}
-		ScalarModel scalarModel = (ScalarModel) model;
-		final ValueFacet facet = scalarModel.getTypeOfSpecification().getFacet(ValueFacet.class);
-		return appliesIf(facet != null);
-	}
-
-	public Component createComponent(String id, IModel<?> model) {
-		ScalarModel scalarModel = (ScalarModel) model;
-		return new ValuePanel(id, scalarModel);
-	}
+    public ValuePanelFactory() {
+        super(ComponentType.SCALAR_NAME_AND_VALUE);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        if (!(model instanceof ScalarModel)) {
+            return ApplicationAdvice.DOES_NOT_APPLY;
+        }
+        final ScalarModel scalarModel = (ScalarModel) model;
+        final ValueFacet facet = scalarModel.getTypeOfSpecification().getFacet(ValueFacet.class);
+        return appliesIf(facet != null);
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        final ScalarModel scalarModel = (ScalarModel) model;
+        return new ValuePanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/wizardpagedesc/WizardPageDescriptionPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/wizardpagedesc/WizardPageDescriptionPanel.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/scalars/wizardpagedesc/WizardPageDescriptionPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/wizardpagedesc/WizardPageDescriptionPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.wizardpagedesc;
 
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -30,13 +29,13 @@ import org.apache.wicket.model.Model;
  */
 public class WizardPageDescriptionPanel extends PanelAbstract<ScalarModel> {
 
-	private static final long serialVersionUID = 1L;
-	
-	private static final String ID_VALUE = "value";
-	
-	public WizardPageDescriptionPanel(String id, ScalarModel scalarModel) {
-		super(id, scalarModel);
-		final String objectAsString = scalarModel.getObjectAsString();
-		addOrReplace(new Label(ID_VALUE, Model.of(objectAsString)));
-	}
+    private static final long serialVersionUID = 1L;
+
+    private static final String ID_VALUE = "value";
+
+    public WizardPageDescriptionPanel(final String id, final ScalarModel scalarModel) {
+        super(id, scalarModel);
+        final String objectAsString = scalarModel.getObjectAsString();
+        addOrReplace(new Label(ID_VALUE, Model.of(objectAsString)));
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/wizardpagedesc/WizardPageDescriptionPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/wizardpagedesc/WizardPageDescriptionPanelFactory.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/scalars/wizardpagedesc/WizardPageDescriptionPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/wizardpagedesc/WizardPageDescriptionPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.scalars.wizardpagedesc;
 
 import org.apache.isis.viewer.wicket.metamodel.wizardpagedesc.WizardPageDescriptionFacet;
@@ -32,24 +31,25 @@ import org.apache.wicket.model.IModel;
  */
 public class WizardPageDescriptionPanelFactory extends ComponentFactoryScalarAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public WizardPageDescriptionPanelFactory() {
-		super(String.class);
-	}
-
-	@Override
-	public ApplicationAdvice appliesTo(IModel<?> model) {
-		final ApplicationAdvice applicationAdvice = super.appliesTo(model);
-		if (!applicationAdvice.applies()) {
-			return applicationAdvice;
-		}
-		ScalarModel scalarModel = (ScalarModel) model;
-		return appliesExclusivelyIf(scalarModel.getFacet(WizardPageDescriptionFacet.class) != null);
-	}
-
-	public Component createComponent(String id, ScalarModel scalarModel) {
-		return new WizardPageDescriptionPanel(id, scalarModel);
-	}
+    public WizardPageDescriptionPanelFactory() {
+        super(String.class);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        final ApplicationAdvice applicationAdvice = super.appliesTo(model);
+        if (!applicationAdvice.applies()) {
+            return applicationAdvice;
+        }
+        final ScalarModel scalarModel = (ScalarModel) model;
+        return appliesExclusivelyIf(scalarModel.getFacet(WizardPageDescriptionFacet.class) != null);
+    }
+
+    @Override
+    public Component createComponent(final String id, final ScalarModel scalarModel) {
+        return new WizardPageDescriptionPanel(id, scalarModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/value/StandaloneValuePanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/value/StandaloneValuePanelFactory.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/value/StandaloneValuePanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/value/StandaloneValuePanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.value;
 
 import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
@@ -36,20 +35,20 @@ import org.apache.wicket.model.IModel;
  */
 public class StandaloneValuePanelFactory extends ComponentFactoryAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public StandaloneValuePanelFactory() {
-		super(ComponentType.VALUE);
-	}
-
-	@Override
-	public ApplicationAdvice appliesTo(IModel<?> model) {
-		return ApplicationAdvice.APPLIES;
-	}
-
-	@Override
-	public Component createComponent(String id, IModel<?> model) {
-		throw new NotYetImplementedException();
-	}
+    public StandaloneValuePanelFactory() {
+        super(ComponentType.VALUE);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        return ApplicationAdvice.APPLIES;
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        throw new NotYetImplementedException();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanelFactory.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/voidreturn/VoidReturnPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.voidreturn;
 
 import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
@@ -31,25 +30,25 @@ import org.apache.wicket.model.IModel;
  * {@link ComponentFactory} to represent an action that returns void.
  * 
  * <p>
- * TODO: not yet implemented; what should we do here? Perhaps render the object on
- * which the action was invoked, along with an informational message?
+ * TODO: not yet implemented; what should we do here? Perhaps render the object on which the action was invoked, along
+ * with an informational message?
  */
 public class VoidReturnPanelFactory extends ComponentFactoryAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public VoidReturnPanelFactory() {
-		super(ComponentType.VOID_RETURN);
-	}
-
-	@Override
-	public ApplicationAdvice appliesTo(IModel<?> model) {
-		return ApplicationAdvice.APPLIES;
-	}
-
-	@Override
-	public Component createComponent(String id, IModel<?> model) {
-		throw new NotYetImplementedException();
-	}
+    public VoidReturnPanelFactory() {
+        super(ComponentType.VOID_RETURN);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        return ApplicationAdvice.APPLIES;
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        throw new NotYetImplementedException();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/welcome/WelcomePanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/welcome/WelcomePanel.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/welcome/WelcomePanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/welcome/WelcomePanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.welcome;
 
 import org.apache.isis.viewer.wicket.model.models.WelcomeModel;
@@ -30,13 +29,13 @@ import org.apache.wicket.markup.html.bas
  */
 public class WelcomePanel extends PanelAbstract<WelcomeModel> {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private static final String ID_MESSAGE = "message";
+    private static final String ID_MESSAGE = "message";
 
-	public WelcomePanel(String id, WelcomeModel model) {
-		super(id, model);
-		add(new Label(ID_MESSAGE, model.getObject()));
-	}
+    public WelcomePanel(final String id, final WelcomeModel model) {
+        super(id, model);
+        add(new Label(ID_MESSAGE, model.getObject()));
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/welcome/WelcomePanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/welcome/WelcomePanelFactory.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/welcome/WelcomePanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/welcome/WelcomePanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.welcome;
 
 import org.apache.isis.viewer.wicket.model.models.WelcomeModel;
@@ -32,19 +31,20 @@ import org.apache.wicket.model.IModel;
  */
 public class WelcomePanelFactory extends ComponentFactoryAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
+
+    public WelcomePanelFactory() {
+        super(ComponentType.WELCOME);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        return appliesIf(model instanceof WelcomeModel);
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        return new WelcomePanel(id, (WelcomeModel) model);
+    }
 
-	public WelcomePanelFactory() {
-		super(ComponentType.WELCOME);
-	}
-
-	@Override
-	public ApplicationAdvice appliesTo(IModel<?> model) {
-		return appliesIf(model instanceof WelcomeModel);
-	}
-
-	public Component createComponent(String id, IModel<?> model) {
-		return new WelcomePanel(id, (WelcomeModel)model);
-	}
-	
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/buttons/ContainedButton.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/buttons/ContainedButton.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/buttons/ContainedButton.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/buttons/ContainedButton.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.buttons;
 
 import java.util.List;
@@ -39,60 +38,60 @@ import com.google.common.collect.Lists;
  */
 public class ContainedButton extends PanelAbstract<Model<String>> {
 
-	private static final long serialVersionUID = 1L;
-	
-	private static final String ID_CONTAINER = "container";
-	private static final String ID_FORM = "form";
-	private static final String ID_BUTTON = "button";
-
-	private Button button;
-	private List<Component> componentsToRerender = Lists.newArrayList();
-
-	public ContainedButton(String id, final String caption) {
-		super(id);
-
-		final WebMarkupContainer markupContainer = new WebMarkupContainer(ID_CONTAINER);
-		add(markupContainer);
-		Form<Object> form = new Form<Object>(ID_FORM);
-		markupContainer.add(form);
-		button = new AjaxButton(ID_BUTTON, Model.of(caption)){
-			private static final long serialVersionUID = 1L;
-			
-			@Override
-			protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
-				setDefaultFormProcessing(false);
-				ContainedButton.this.onSubmit();
-				if (target != null) {
-					for (Component component : componentsToRerender) {
-						target.addComponent(component);
-					}
-				}
-			}};
-		form.add(button);
-	}
-	
-
-	public void addComponentToRerender(Component component) {
-		component.setOutputMarkupPlaceholderTag(true);
-		componentsToRerender.add(component);
-	}
-	
-	public void setCaption(String string) {
-		button.setModelValue(new String[]{string});
-	}
-
-	public void setLabel(Model<String> labelModel) {
-		button.setLabel(labelModel);
-	}
-
-	/**
-	 * Hook method for (typically anonymous) subclasses to override.
-	 */
-	public void onSubmit() {
-	}
-	
-	@Override
-	public void renderHead(HtmlHeaderContainer container) {
-		super.renderHead(container);
-	}
+    private static final long serialVersionUID = 1L;
+
+    private static final String ID_CONTAINER = "container";
+    private static final String ID_FORM = "form";
+    private static final String ID_BUTTON = "button";
+
+    private final Button button;
+    private final List<Component> componentsToRerender = Lists.newArrayList();
+
+    public ContainedButton(final String id, final String caption) {
+        super(id);
+
+        final WebMarkupContainer markupContainer = new WebMarkupContainer(ID_CONTAINER);
+        add(markupContainer);
+        final Form<Object> form = new Form<Object>(ID_FORM);
+        markupContainer.add(form);
+        button = new AjaxButton(ID_BUTTON, Model.of(caption)) {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+                setDefaultFormProcessing(false);
+                ContainedButton.this.onSubmit();
+                if (target != null) {
+                    for (final Component component : componentsToRerender) {
+                        target.addComponent(component);
+                    }
+                }
+            }
+        };
+        form.add(button);
+    }
+
+    public void addComponentToRerender(final Component component) {
+        component.setOutputMarkupPlaceholderTag(true);
+        componentsToRerender.add(component);
+    }
+
+    public void setCaption(final String string) {
+        button.setModelValue(new String[] { string });
+    }
+
+    public void setLabel(final Model<String> labelModel) {
+        button.setLabel(labelModel);
+    }
+
+    /**
+     * Hook method for (typically anonymous) subclasses to override.
+     */
+    public void onSubmit() {
+    }
+
+    @Override
+    public void renderHead(final HtmlHeaderContainer container) {
+        super.renderHead(container);
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/buttons/ToggleButtonsPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/buttons/ToggleButtonsPanel.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/buttons/ToggleButtonsPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/buttons/ToggleButtonsPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.widgets.buttons;
 
 import java.io.Serializable;
@@ -31,116 +30,118 @@ import org.apache.wicket.Component;
  */
 public class ToggleButtonsPanel extends PanelAbstract<EntityModel> {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private static final String ID_BUTTON_1 = "button1";
-	private static final String ID_BUTTON_2 = "button2";
+    private static final String ID_BUTTON_1 = "button1";
+    private static final String ID_BUTTON_2 = "button2";
 
-	private boolean flag;
-	private Toggler toggler;
+    private boolean flag;
+    private Toggler toggler;
 
-	private ContainedButton button1;
-
-	private ContainedButton button2;
-
-	public ToggleButtonsPanel(String id, String button1Caption, String button2Caption) {
-		super(id, null);
-		this.flag = false;
-		buildGui(button1Caption, button2Caption);
-		onInit();
-	}
-
-	private void buildGui(String button1Caption, String button2Caption) {
-		button1 = new ContainedButton(ID_BUTTON_1, button1Caption) {
-			private static final long serialVersionUID = 1L;
-			@Override
-			public void onSubmit() {
-				toggler.toggle();
-			}		
-		};
-		addOrReplace(button1);
-
-		button2 = new ContainedButton(ID_BUTTON_2, button2Caption) {
-			private static final long serialVersionUID = 1L;
-			@Override
-			public void onSubmit() {
-				toggler.toggle();
-			}
-		};
-		toggler = new Toggler(button1, button2);
-		addOrReplace(button2);
-	}
-
-	public void addComponentToRerender(Component... components) {
-		for (Component component : components) {
-			button1.addComponentToRerender(component);
-			button2.addComponentToRerender(component);
-		}
-	}
-	
-	/**
-	 * Hook method to override.
-	 */
-	protected void onInit() {
-	}
-
-	/**
-	 * Hook method to override.
-	 */
-	protected void onButton1() {
-	}
-	
-	/**
-	 * Hook method to override.
-	 */
-	protected void onButton2() {
-	}
-
-	/**
-	 * For subclasses to use.
-	 */
-	protected final void hideButton1() {
-		flag = true;
-		toggler.syncButtonVisibility();
-	}
-
-	/**
-	 * For subclasses to use.
-	 */
-	protected final void hideButton2() {
-		flag = false;
-		toggler.syncButtonVisibility();
-	}
-
-	private class Toggler implements Serializable {
-		private static final long serialVersionUID = 1L;
-
-		private Component component1;
-		private Component component2;
-		
-		public Toggler(Component component1, Component component2) {
-			this.component1 = component1;
-			this.component2 = component2;
-			syncButtonVisibility();
-		}
-
-		public void toggle() {
-			fireHooks();
-			syncButtonVisibility();
-		}
-
-		private void fireHooks() {
-			flag = !flag;
-			if (flag) {
-				onButton1();
-			} else {
-				onButton2();
-			}
-		}
-
-		private void syncButtonVisibility() {
-			component1.setVisible(!flag);
-			component2.setVisible(flag);
-		}
-	}
+    private ContainedButton button1;
+
+    private ContainedButton button2;
+
+    public ToggleButtonsPanel(final String id, final String button1Caption, final String button2Caption) {
+        super(id, null);
+        this.flag = false;
+        buildGui(button1Caption, button2Caption);
+        onInit();
+    }
+
+    private void buildGui(final String button1Caption, final String button2Caption) {
+        button1 = new ContainedButton(ID_BUTTON_1, button1Caption) {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public void onSubmit() {
+                toggler.toggle();
+            }
+        };
+        addOrReplace(button1);
+
+        button2 = new ContainedButton(ID_BUTTON_2, button2Caption) {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public void onSubmit() {
+                toggler.toggle();
+            }
+        };
+        toggler = new Toggler(button1, button2);
+        addOrReplace(button2);
+    }
+
+    public void addComponentToRerender(final Component... components) {
+        for (final Component component : components) {
+            button1.addComponentToRerender(component);
+            button2.addComponentToRerender(component);
+        }
+    }
+
+    /**
+     * Hook method to override.
+     */
+    protected void onInit() {
+    }
+
+    /**
+     * Hook method to override.
+     */
+    protected void onButton1() {
+    }
+
+    /**
+     * Hook method to override.
+     */
+    protected void onButton2() {
+    }
+
+    /**
+     * For subclasses to use.
+     */
+    protected final void hideButton1() {
+        flag = true;
+        toggler.syncButtonVisibility();
+    }
+
+    /**
+     * For subclasses to use.
+     */
+    protected final void hideButton2() {
+        flag = false;
+        toggler.syncButtonVisibility();
+    }
+
+    private class Toggler implements Serializable {
+        private static final long serialVersionUID = 1L;
+
+        private final Component component1;
+        private final Component component2;
+
+        public Toggler(final Component component1, final Component component2) {
+            this.component1 = component1;
+            this.component2 = component2;
+            syncButtonVisibility();
+        }
+
+        public void toggle() {
+            fireHooks();
+            syncButtonVisibility();
+        }
+
+        private void fireHooks() {
+            flag = !flag;
+            if (flag) {
+                onButton1();
+            } else {
+                onButton2();
+            }
+        }
+
+        private void syncButtonVisibility() {
+            component1.setVisible(!flag);
+            component2.setVisible(flag);
+        }
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuBuilder.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/CssMenuBuilder.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/CssMenuBuilder.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuBuilder.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,10 +24,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.wicket.Application;
-
-import com.google.common.collect.Collections2;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -38,53 +33,51 @@ import org.apache.isis.viewer.wicket.mod
 import org.apache.isis.viewer.wicket.model.util.Actions;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuItem.Builder;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuPanel.Style;
+import org.apache.wicket.Application;
+
+import com.google.common.collect.Collections2;
 
 /**
- * Used to build a {@link CssMenuItem} hierarchy from a {@link ObjectAdapterMemento object adapter}'s
- * actions and any contributed actions from services.
+ * Used to build a {@link CssMenuItem} hierarchy from a {@link ObjectAdapterMemento object adapter}'s actions and any
+ * contributed actions from services.
  */
-public class CssMenuBuilder  {
+public class CssMenuBuilder {
+
+    private final ObjectAdapterMemento adapterMemento;
+    private final List<ObjectAdapter> serviceAdapters;
+    private final List<ObjectAction> actions;
+
+    private final CssMenuLinkFactory cssMenuLinkFactory;
+
+    public CssMenuBuilder(final ObjectAdapterMemento adapterMemento, final List<ObjectAdapter> serviceAdapters,
+        final List<ObjectAction> actions, final CssMenuLinkFactory cssMenuLinkFactory) {
+        this.adapterMemento = adapterMemento;
+        this.serviceAdapters = serviceAdapters;
+        this.actions = actions;
+        this.cssMenuLinkFactory = cssMenuLinkFactory;
+    }
 
-	private ObjectAdapterMemento adapterMemento;
-	private List<ObjectAdapter> serviceAdapters;
-	private List<ObjectAction> actions;
-
-	private CssMenuLinkFactory cssMenuLinkFactory;
-	
-	public CssMenuBuilder(ObjectAdapterMemento adapterMemento, List<ObjectAdapter> serviceAdapters, List<ObjectAction> actions, CssMenuLinkFactory cssMenuLinkFactory) {
-		this.adapterMemento = adapterMemento;
-		this.serviceAdapters = serviceAdapters;
-		this.actions = actions;
-		this.cssMenuLinkFactory = cssMenuLinkFactory;
-	}
-
-	public CssMenuPanel buildPanel(String wicketId, String rootName) {
-		CssMenuItem findUsing = CssMenuItem.newMenuItem(rootName).build();
-		addMenuItems(findUsing, actions);
-		CssMenuPanel cssMenuPanel = new CssMenuPanel(wicketId,
-				Style.SMALL, Collections.singletonList(findUsing));
-		return cssMenuPanel;
-	}
-
-
-	private void addMenuItems(CssMenuItem parent,
-			List<ObjectAction> actions) {
-		addMenuItemsForActionsOfType(parent, actions, ActionType.SET);
-		addMenuItemsForActionsOfType(parent, actions,
-				ActionType.USER);
-		if (isExplorationMode()) {
-			addMenuItemsForActionsOfType(parent, actions,
-					ActionType.EXPLORATION);
-		}
-		if (isDebugMode()) {
-			addMenuItemsForActionsOfType(parent, actions,
-					ActionType.DEBUG);
-		}
-	}
-
-	/**
-	 * Protected so can be overridden in testing if required.
-	 */
+    public CssMenuPanel buildPanel(final String wicketId, final String rootName) {
+        final CssMenuItem findUsing = CssMenuItem.newMenuItem(rootName).build();
+        addMenuItems(findUsing, actions);
+        final CssMenuPanel cssMenuPanel = new CssMenuPanel(wicketId, Style.SMALL, Collections.singletonList(findUsing));
+        return cssMenuPanel;
+    }
+
+    private void addMenuItems(final CssMenuItem parent, final List<ObjectAction> actions) {
+        addMenuItemsForActionsOfType(parent, actions, ActionType.SET);
+        addMenuItemsForActionsOfType(parent, actions, ActionType.USER);
+        if (isExplorationMode()) {
+            addMenuItemsForActionsOfType(parent, actions, ActionType.EXPLORATION);
+        }
+        if (isDebugMode()) {
+            addMenuItemsForActionsOfType(parent, actions, ActionType.DEBUG);
+        }
+    }
+
+    /**
+     * Protected so can be overridden in testing if required.
+     */
     protected boolean isExplorationMode() {
         return Application.get().getConfigurationType().equalsIgnoreCase(Application.DEVELOPMENT);
     }
@@ -98,75 +91,72 @@ public class CssMenuBuilder  {
         return true;
     }
 
-    private void addMenuItemsForActionsOfType(CssMenuItem parent,
-			List<ObjectAction> actions, final ActionType type) {
-		Collection<ObjectAction> filterActionsOfType = Collections2.filter(actions, Actions.ofType(type));
-		for (ObjectAction action : filterActionsOfType) {
-			addMenuItem(parent, action);
-		}
-	}
-
-	private void addMenuItems(CssMenuItem parent, ObjectAction[] actions) {
-		addMenuItems(parent, Arrays.asList(actions));
-	}
-
-	private void addMenuItem(CssMenuItem parent, ObjectAction action) {
-		if (action.getType() == ActionType.SET) {
-			addMenuItemForActionSet(parent, action);
-		} else {
-			addMenuItemForAction(parent, action);
-		}
-	}
-
-	private void addMenuItemForActionSet(CssMenuItem parent,
-			ObjectAction action) {
-		Builder builder = parent.newSubMenuItem(action.getName());
-		List<ObjectAction> actions = action.getActions();
-		addMenuItems(builder.itemBeingBuilt(), actions);
-		if (builder.itemBeingBuilt().hasSubMenuItems()) {
-			builder.build();
-		}
-	}
+    private void addMenuItemsForActionsOfType(final CssMenuItem parent, final List<ObjectAction> actions,
+        final ActionType type) {
+        final Collection<ObjectAction> filterActionsOfType = Collections2.filter(actions, Actions.ofType(type));
+        for (final ObjectAction action : filterActionsOfType) {
+            addMenuItem(parent, action);
+        }
+    }
+
+    private void addMenuItems(final CssMenuItem parent, final ObjectAction[] actions) {
+        addMenuItems(parent, Arrays.asList(actions));
+    }
+
+    private void addMenuItem(final CssMenuItem parent, final ObjectAction action) {
+        if (action.getType() == ActionType.SET) {
+            addMenuItemForActionSet(parent, action);
+        } else {
+            addMenuItemForAction(parent, action);
+        }
+    }
+
+    private void addMenuItemForActionSet(final CssMenuItem parent, final ObjectAction action) {
+        final Builder builder = parent.newSubMenuItem(action.getName());
+        final List<ObjectAction> actions = action.getActions();
+        addMenuItems(builder.itemBeingBuilt(), actions);
+        if (builder.itemBeingBuilt().hasSubMenuItems()) {
+            builder.build();
+        }
+    }
 
-	private void addMenuItemForAction(CssMenuItem parent,
-			ObjectAction contributedAction) {
+    private void addMenuItemForAction(final CssMenuItem parent, final ObjectAction contributedAction) {
 
         // skip if annotated to not be contributed
         if (contributedAction.getFacet(NotContributedFacet.class) != null) {
             return;
         }
 
-	    ObjectAdapterMemento serviceAdapterMemento = determineAdapterFor(contributedAction);
+        final ObjectAdapterMemento serviceAdapterMemento = determineAdapterFor(contributedAction);
 
-		final Builder subMenuItemBuilder = parent.newSubMenuItem(serviceAdapterMemento, contributedAction, cssMenuLinkFactory);
-		if (subMenuItemBuilder != null) {
-		    // could be null if invisible
-		    subMenuItemBuilder.build();
-		}
-	}
-
-	/**
-	 * It's a bit hokey to have to do this, but the
-	 * {@link ObjectSpecification#getServiceActionsReturning(ActionType...)
-	 * method we call} on {@link ObjectSpecification}, while nicely
-	 * traversing the services for us, unfortunately does not pass us back the
-	 * service adapters also.
-	 */
-	private ObjectAdapterMemento determineAdapterFor(
-			ObjectAction action) {
-		// search through service adapters first
-		ObjectSpecification onType = action.getOnType();
-		for (ObjectAdapter serviceAdapter : getServiceAdapters()) {
-			if (serviceAdapter.getSpecification() == onType) {
-				return ObjectAdapterMemento.createOrNull(serviceAdapter);
-			}
-		}
-		// otherwise, specified adapter
-		return adapterMemento;
-	}
-
-	protected List<ObjectAdapter> getServiceAdapters() {
-		return serviceAdapters;
-	}
+        final Builder subMenuItemBuilder =
+            parent.newSubMenuItem(serviceAdapterMemento, contributedAction, cssMenuLinkFactory);
+        if (subMenuItemBuilder != null) {
+            // could be null if invisible
+            subMenuItemBuilder.build();
+        }
+    }
+
+    /**
+     * It's a bit hokey to have to do this, but the
+     * {@link ObjectSpecification#getServiceActionsReturning(ActionType...) method we call} on
+     * {@link ObjectSpecification}, while nicely traversing the services for us, unfortunately does not pass us back the
+     * service adapters also.
+     */
+    private ObjectAdapterMemento determineAdapterFor(final ObjectAction action) {
+        // search through service adapters first
+        final ObjectSpecification onType = action.getOnType();
+        for (final ObjectAdapter serviceAdapter : getServiceAdapters()) {
+            if (serviceAdapter.getSpecification() == onType) {
+                return ObjectAdapterMemento.createOrNull(serviceAdapter);
+            }
+        }
+        // otherwise, specified adapter
+        return adapterMemento;
+    }
+
+    protected List<ObjectAdapter> getServiceAdapters() {
+        return serviceAdapters;
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItem.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/CssMenuItem.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/CssMenuItem.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItem.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 static org.hamcrest.CoreMatchers.is;
@@ -26,18 +25,6 @@ import java.io.Serializable;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.wicket.Application;
-import org.apache.wicket.AttributeModifier;
-import org.apache.wicket.Component;
-import org.apache.wicket.MarkupContainer;
-import org.apache.wicket.Page;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.model.Model;
-
-import com.google.common.collect.Lists;
-
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.ensure.Ensure;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -49,229 +36,241 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.pages.PageAbstract;
 import org.apache.isis.viewer.wicket.ui.util.Components;
 import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
+import org.apache.wicket.Application;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.Component;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.Page;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.model.Model;
+
+import com.google.common.collect.Lists;
 
 public class CssMenuItem implements Serializable {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
     public static final String ID_MENU_LINK = "menuLink";
 
-	public static class Builder {
-		private CssMenuItem cssMenuItem;
-		private Builder(String name) {
-			cssMenuItem = new CssMenuItem(name);
-		}
-		public Builder parent(CssMenuItem parent) {
-			cssMenuItem.setParent(parent);
-			return this;
-		}
-		public <T extends Page> Builder link(Class<T> pageClass) {
-			return link(new BookmarkablePageLink<T>(
-					ID_MENU_LINK, pageClass));
-		}
-		public <T extends Page> Builder link(Link<?> link) {
-			Ensure.ensureThatArg(link.getId(), is(ID_MENU_LINK));
-			cssMenuItem.setLink(link);
-			return this;
-		}
-		public <T extends Page> Builder enabled(String disabledReasonIfAny) {
-			cssMenuItem.setEnabled(disabledReasonIfAny == null);
-			cssMenuItem.setDisabledReason(disabledReasonIfAny);
-			return this;
-		}
-		
-		/**
-		 * Access the {@link CssMenuItem} before it is attached to its parent.
-		 * @see #build()
-		 */
-		public CssMenuItem itemBeingBuilt() {
-			return cssMenuItem;
-		}
-		/**
-		 * Returns the built {@link CssMenuItem}, associating with {@link #parent(CssMenuItem) parent} (if specified). 
-		 */
-		public CssMenuItem build() {
-			if (cssMenuItem.parent != null) {
-				cssMenuItem.parent.subMenuItems.add(cssMenuItem);
-			}
-			return cssMenuItem;
-		}
-	}
-	
-
-
-	private String name;
-	private List<CssMenuItem> subMenuItems = Lists.newArrayList();
-	private CssMenuItem parent;
-	
-	private Link<?> link;
-	private boolean enabled = true; // unless disabled
-	
-	private String disabledReason;
+    public static class Builder {
+        private final CssMenuItem cssMenuItem;
+
+        private Builder(final String name) {
+            cssMenuItem = new CssMenuItem(name);
+        }
+
+        public Builder parent(final CssMenuItem parent) {
+            cssMenuItem.setParent(parent);
+            return this;
+        }
+
+        public <T extends Page> Builder link(final Class<T> pageClass) {
+            return link(new BookmarkablePageLink<T>(ID_MENU_LINK, pageClass));
+        }
+
+        public <T extends Page> Builder link(final Link<?> link) {
+            Ensure.ensureThatArg(link.getId(), is(ID_MENU_LINK));
+            cssMenuItem.setLink(link);
+            return this;
+        }
+
+        public <T extends Page> Builder enabled(final String disabledReasonIfAny) {
+            cssMenuItem.setEnabled(disabledReasonIfAny == null);
+            cssMenuItem.setDisabledReason(disabledReasonIfAny);
+            return this;
+        }
+
+        /**
+         * Access the {@link CssMenuItem} before it is attached to its parent.
+         * 
+         * @see #build()
+         */
+        public CssMenuItem itemBeingBuilt() {
+            return cssMenuItem;
+        }
+
+        /**
+         * Returns the built {@link CssMenuItem}, associating with {@link #parent(CssMenuItem) parent} (if specified).
+         */
+        public CssMenuItem build() {
+            if (cssMenuItem.parent != null) {
+                cssMenuItem.parent.subMenuItems.add(cssMenuItem);
+            }
+            return cssMenuItem;
+        }
+    }
+
+    private final String name;
+    private final List<CssMenuItem> subMenuItems = Lists.newArrayList();
+    private CssMenuItem parent;
+
+    private Link<?> link;
+    private boolean enabled = true; // unless disabled
+
+    private String disabledReason;
 
     static final String ID_MENU_LABEL = "menuLabel";
 
     static final String ID_SUB_MENU_ITEMS = "subMenuItems";
-	
-	/**
-	 * Factory method returning {@link Builder builder}.
-	 */
-	public static Builder newMenuItem(String name) {
-		return new Builder(name);
-	}
-	
-	private CssMenuItem(String name) {
-		this.name = name;
-	}
-	
-	public String getName() {
-		return name;
-	}
-	
-	public boolean hasParent() {
-		return parent != null;
-	}
-	
-	private void setParent(CssMenuItem parent) {
-		this.parent = parent;
-	}
-	
-	public Builder newSubMenuItem(String name) {
-		Builder builder = CssMenuItem.newMenuItem(name).parent(this);
-		return builder;
-	}
-	
-	public List<CssMenuItem> getSubMenuItems() {
-		return Collections.unmodifiableList(subMenuItems);
-	}
-	
-	public boolean hasSubMenuItems() {
-		return subMenuItems.size()>0;
-	}
-
-	public Link<?> getLink() {
-		return link;
-	}
-	
-	private void setLink(Link<?> link) {
-		this.link = link;
-	}
-
-	public boolean isEnabled() {
-		return enabled;
-	}
-
-	private void setEnabled(boolean enabled) {
-		this.enabled = enabled;
-	}
-
-	/**
-	 * Only populated if not {@link #isEnabled() enabled}. 
-	 */
-	public String getDisabledReason() {
-		return disabledReason;
-	}
-	
-	public void setDisabledReason(String disabledReason) {
-		this.disabledReason = disabledReason;
-	}
-	
-	
-	////////////////////////////////////////////////////////////////
-	// To add submenu items
-	////////////////////////////////////////////////////////////////
-	
-	/**
-	 * @return the builder, else <tt>null</tt> if the action is not visible for the current user.
-	 */
-	public Builder newSubMenuItem(final ObjectAdapterMemento adapterMemento, final ObjectAction noAction,
-			CssMenuLinkFactory cssMenuLinkFactory) {
-	    
-	    AuthenticationSession session = getAuthenticationSession();
-		
-		final CssMenuItem parentMenuItem = this;
-
-		final ObjectAdapter adapter = adapterMemento.getObjectAdapter();
-		Consent visibility = noAction.isVisible(session, adapter);
-		if (visibility.isVetoed()) {
-			return null;
-		}
-
-		final LinkAndLabel linkAndLabel = cssMenuLinkFactory.newLink(adapterMemento, noAction, PageAbstract.ID_MENU_LINK);
-		
-		Link<?> link = linkAndLabel.getLink();
-		String actionLabel = linkAndLabel.getLabel();
-		
-		final Consent usability = noAction.isUsable(session, adapter);
-		final String reasonDisabledIfAny = usability.getReason();
-	
-		return parentMenuItem.newSubMenuItem(actionLabel).link(link).enabled(reasonDisabledIfAny);
-	}
-
-
-	////////////////////////////////////////////////////////////////
-	// Build wicket components from the menu item. 
-	////////////////////////////////////////////////////////////////
-	
-	void addTo(MarkupContainer markupContainer) {
-		
-		final Component menuItemComponent = addMenuItemComponentTo(markupContainer);
-		addSubMenuItemComponentsIfAnyTo(markupContainer);
-		
-		addCssClassAttributesIfRequired(menuItemComponent);
-	}
-
-	private Component addMenuItemComponentTo(MarkupContainer markupContainer) {
-		Link<?> link = getLink();
-		Label label = new Label(CssMenuItem.ID_MENU_LABEL, Model.of(this.getName()));
-		
-		if (this.isEnabled() && link != null) {
-			// show link...
-			markupContainer.add(link);
-			link.add(label);
-			// .. and hide label
-			Components.permanentlyHide(markupContainer, CssMenuItem.ID_MENU_LABEL);
-			return link;
-		} else {
-			// hide link...
-			Components.permanentlyHide(markupContainer, ID_MENU_LINK);
-			// ... and show label, along with disabled reason
-			label.add(new AttributeModifier("title", true, Model.of(this.getDisabledReason())));
-			label.add(new AttributeModifier("class", true, Model.of("disabled")));
-			markupContainer.add(label);
-			
-			return label;
-		}
-	}
-
-	private void addSubMenuItemComponentsIfAnyTo(MarkupContainer menuItemMarkup) {
-		List<CssMenuItem> subMenuItems = getSubMenuItems();
-		if(subMenuItems.isEmpty()) {
-			Components.permanentlyHide(menuItemMarkup, CssMenuItem.ID_SUB_MENU_ITEMS);
-		} else {
-			menuItemMarkup.add(new CssSubMenuItemsPanel(CssMenuItem.ID_SUB_MENU_ITEMS, subMenuItems));
-		}
-	}
-	
-	private void addCssClassAttributesIfRequired(Component linkComponent) {
-		if (!hasSubMenuItems()) {
-			return;
-		} 
-		if (this.hasParent()) {
-			linkComponent.add(new CssClassAppender("parent"));
-		} else {
-			linkComponent.add(new CssClassAppender("top-parent"));
-		}
-	}
-
-    ////////////////////////////////////////////////////////////////
-    // Build wicket components from the menu item. 
-    ////////////////////////////////////////////////////////////////
 
-   protected AuthenticationSession getAuthenticationSession() {
-        return ((AuthenticationSessionAccessor)Application.get()).getAuthenticationSession();
+    /**
+     * Factory method returning {@link Builder builder}.
+     */
+    public static Builder newMenuItem(final String name) {
+        return new Builder(name);
+    }
+
+    private CssMenuItem(final String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public boolean hasParent() {
+        return parent != null;
+    }
+
+    private void setParent(final CssMenuItem parent) {
+        this.parent = parent;
+    }
+
+    public Builder newSubMenuItem(final String name) {
+        final Builder builder = CssMenuItem.newMenuItem(name).parent(this);
+        return builder;
+    }
+
+    public List<CssMenuItem> getSubMenuItems() {
+        return Collections.unmodifiableList(subMenuItems);
+    }
+
+    public boolean hasSubMenuItems() {
+        return subMenuItems.size() > 0;
+    }
+
+    public Link<?> getLink() {
+        return link;
+    }
+
+    private void setLink(final Link<?> link) {
+        this.link = link;
+    }
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    private void setEnabled(final boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    /**
+     * Only populated if not {@link #isEnabled() enabled}.
+     */
+    public String getDisabledReason() {
+        return disabledReason;
+    }
+
+    public void setDisabledReason(final String disabledReason) {
+        this.disabledReason = disabledReason;
+    }
+
+    // //////////////////////////////////////////////////////////////
+    // To add submenu items
+    // //////////////////////////////////////////////////////////////
+
+    /**
+     * @return the builder, else <tt>null</tt> if the action is not visible for the current user.
+     */
+    public Builder newSubMenuItem(final ObjectAdapterMemento adapterMemento, final ObjectAction noAction,
+        final CssMenuLinkFactory cssMenuLinkFactory) {
+
+        final AuthenticationSession session = getAuthenticationSession();
+
+        final CssMenuItem parentMenuItem = this;
+
+        final ObjectAdapter adapter = adapterMemento.getObjectAdapter();
+        final Consent visibility = noAction.isVisible(session, adapter);
+        if (visibility.isVetoed()) {
+            return null;
+        }
+
+        final LinkAndLabel linkAndLabel =
+            cssMenuLinkFactory.newLink(adapterMemento, noAction, PageAbstract.ID_MENU_LINK);
+
+        final Link<?> link = linkAndLabel.getLink();
+        final String actionLabel = linkAndLabel.getLabel();
+
+        final Consent usability = noAction.isUsable(session, adapter);
+        final String reasonDisabledIfAny = usability.getReason();
+
+        return parentMenuItem.newSubMenuItem(actionLabel).link(link).enabled(reasonDisabledIfAny);
+    }
+
+    // //////////////////////////////////////////////////////////////
+    // Build wicket components from the menu item.
+    // //////////////////////////////////////////////////////////////
+
+    void addTo(final MarkupContainer markupContainer) {
+
+        final Component menuItemComponent = addMenuItemComponentTo(markupContainer);
+        addSubMenuItemComponentsIfAnyTo(markupContainer);
+
+        addCssClassAttributesIfRequired(menuItemComponent);
+    }
+
+    private Component addMenuItemComponentTo(final MarkupContainer markupContainer) {
+        final Link<?> link = getLink();
+        final Label label = new Label(CssMenuItem.ID_MENU_LABEL, Model.of(this.getName()));
+
+        if (this.isEnabled() && link != null) {
+            // show link...
+            markupContainer.add(link);
+            link.add(label);
+            // .. and hide label
+            Components.permanentlyHide(markupContainer, CssMenuItem.ID_MENU_LABEL);
+            return link;
+        } else {
+            // hide link...
+            Components.permanentlyHide(markupContainer, ID_MENU_LINK);
+            // ... and show label, along with disabled reason
+            label.add(new AttributeModifier("title", true, Model.of(this.getDisabledReason())));
+            label.add(new AttributeModifier("class", true, Model.of("disabled")));
+            markupContainer.add(label);
+
+            return label;
+        }
+    }
+
+    private void addSubMenuItemComponentsIfAnyTo(final MarkupContainer menuItemMarkup) {
+        final List<CssMenuItem> subMenuItems = getSubMenuItems();
+        if (subMenuItems.isEmpty()) {
+            Components.permanentlyHide(menuItemMarkup, CssMenuItem.ID_SUB_MENU_ITEMS);
+        } else {
+            menuItemMarkup.add(new CssSubMenuItemsPanel(CssMenuItem.ID_SUB_MENU_ITEMS, subMenuItems));
+        }
+    }
+
+    private void addCssClassAttributesIfRequired(final Component linkComponent) {
+        if (!hasSubMenuItems()) {
+            return;
+        }
+        if (this.hasParent()) {
+            linkComponent.add(new CssClassAppender("parent"));
+        } else {
+            linkComponent.add(new CssClassAppender("top-parent"));
+        }
+    }
+
+    // //////////////////////////////////////////////////////////////
+    // Build wicket components from the menu item.
+    // //////////////////////////////////////////////////////////////
+
+    protected AuthenticationSession getAuthenticationSession() {
+        return ((AuthenticationSessionAccessor) Application.get()).getAuthenticationSession();
     }
-	    
 
-	
 }
\ No newline at end of file



Mime
View raw message