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 [8/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/isi...
Date Tue, 03 May 2011 07:44:50 GMT
Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/WelcomeModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/WelcomeModel.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/WelcomeModel.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/WelcomeModel.java Tue May  3 07:44:41 2011
@@ -17,44 +17,40 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.models;
 
-
 /**
  * Model providing welcome text.
  */
 public class WelcomeModel extends ModelAbstract<String> {
-	
-	private static final long serialVersionUID = 1L;
 
-	private static final String DEFAULT_MESSAGE = 
-		"Apache Isis' Wicket Viewer combines the power of Apache Wicket " +
-		"for web UIs with Apache Isis for domain modelling.  " +
-		"Out-of-the box you get a fully-functional webapp just from " +
-		"your domain objects; you can then customize the UI by " +
-		"writing custom Wicket components, replacing the page layouts or " +
-		"simply by altering the CSS";
-	
-	private String welcomeMessage;
-
-	public WelcomeModel(final String welcomeMessage) {
-		this.welcomeMessage = welcomeMessage;
-	}
-
-	public WelcomeModel() {
-		this(DEFAULT_MESSAGE);
-	}
-
-	@Override
-	protected String load() {
-		return welcomeMessage;
-	}
-
-	@Override
-	public void setObject(String welcomeMessage) {
-		super.setObject(welcomeMessage);
-		this.welcomeMessage = welcomeMessage;
-	}
-	
+    private static final long serialVersionUID = 1L;
+
+    private static final String DEFAULT_MESSAGE = "Apache Isis' Wicket Viewer combines the power of Apache Wicket "
+        + "for web UIs with Apache Isis for domain modelling.  "
+        + "Out-of-the box you get a fully-functional webapp just from "
+        + "your domain objects; you can then customize the UI by "
+        + "writing custom Wicket components, replacing the page layouts or " + "simply by altering the CSS";
+
+    private String welcomeMessage;
+
+    public WelcomeModel(final String welcomeMessage) {
+        this.welcomeMessage = welcomeMessage;
+    }
+
+    public WelcomeModel() {
+        this(DEFAULT_MESSAGE);
+    }
+
+    @Override
+    protected String load() {
+        return welcomeMessage;
+    }
+
+    @Override
+    public void setObject(final String welcomeMessage) {
+        super.setObject(welcomeMessage);
+        this.welcomeMessage = welcomeMessage;
+    }
+
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/AuthenticationSessionAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/AuthenticationSessionAccessor.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/AuthenticationSessionAccessor.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/AuthenticationSessionAccessor.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.nof;
 
 import java.io.Serializable;
@@ -26,5 +25,5 @@ import org.apache.isis.core.commons.auth
 
 public interface AuthenticationSessionAccessor extends Serializable {
 
-	AuthenticationSession getAuthenticationSession();
+    AuthenticationSession getAuthenticationSession();
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/PersistenceSessionAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/PersistenceSessionAccessor.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/PersistenceSessionAccessor.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/PersistenceSessionAccessor.java Tue May  3 07:44:41 2011
@@ -17,12 +17,11 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.nof;
 
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 
 public interface PersistenceSessionAccessor {
 
-	PersistenceSession getPersistenceSession();
+    PersistenceSession getPersistenceSession();
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/SpecificationLoaderAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/SpecificationLoaderAccessor.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/SpecificationLoaderAccessor.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/nof/SpecificationLoaderAccessor.java Tue May  3 07:44:41 2011
@@ -17,12 +17,11 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.nof;
 
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 
 public interface SpecificationLoaderAccessor {
 
-	SpecificationLoader getSpecificationLoader();
+    SpecificationLoader getSpecificationLoader();
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java Tue May  3 07:44:41 2011
@@ -17,23 +17,18 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
 
-
-
-
 public final class ActionParams {
 
-	private ActionParams(){}
+    private ActionParams() {
+    }
 
-    public static boolean compatibleWith(ObjectAdapter contextAdapter,
-            ObjectActionParameter actionParam) {
-        return contextAdapter != null && contextAdapter.getSpecification().isOfType(
-                actionParam.getSpecification());
+    public static boolean compatibleWith(final ObjectAdapter contextAdapter, final ObjectActionParameter actionParam) {
+        return contextAdapter != null && contextAdapter.getSpecification().isOfType(actionParam.getSpecification());
     }
-	
+
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java Tue May  3 07:44:41 2011
@@ -17,33 +17,32 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
-
-import com.google.common.base.Predicate;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.named.NamedFacet;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
 
+import com.google.common.base.Predicate;
+
 public final class Actions {
 
-	private Actions(){}
-	
-	public static Predicate<ObjectAction> ofType(
-			final ActionType type) {
-		return new Predicate<ObjectAction>(){
-			@Override
-            public boolean apply(ObjectAction input) {
-				return input.getType() == type;
-			}};
-	}
+    private Actions() {
+    }
+
+    public static Predicate<ObjectAction> ofType(final ActionType type) {
+        return new Predicate<ObjectAction>() {
+            @Override
+            public boolean apply(final ObjectAction input) {
+                return input.getType() == type;
+            }
+        };
+    }
 
     public static String labelFor(final ObjectAction noAction) {
-        String actionName = Actions.nameFor(noAction);
+        final String actionName = Actions.nameFor(noAction);
         String actionLabel = actionName;
         if (noAction.getParameterCount() > 0) {
             actionLabel += "...";
@@ -51,9 +50,8 @@ public final class Actions {
         return actionLabel;
     }
 
-    public static String labelFor(ObjectAction action,
-            final ObjectAdapter contextAdapter) {
-        if(action.getParameterCount() == 1) {
+    public static String labelFor(final ObjectAction action, final ObjectAdapter contextAdapter) {
+        if (action.getParameterCount() == 1) {
             final ObjectActionParameter actionParam = action.getParameters().get(0);
             if (ActionParams.compatibleWith(contextAdapter, actionParam)) {
                 return nameFor(action);
@@ -61,17 +59,17 @@ public final class Actions {
         }
         return labelFor(action);
     }
-    
+
     private static String nameFor(final ObjectAction noAction) {
-        String actionName = noAction.getName();
+        final String actionName = noAction.getName();
         if (actionName != null) {
             return actionName;
-        } 
-        NamedFacet namedFacet = noAction.getFacet(NamedFacet.class);
+        }
+        final NamedFacet namedFacet = noAction.getFacet(NamedFacet.class);
         if (namedFacet != null) {
             return namedFacet.value();
         }
-        return  "(no name)";
+        return "(no name)";
     }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
 import java.util.Arrays;
@@ -30,42 +29,44 @@ import com.google.common.collect.Maps;
 
 public final class ClassLoaders {
 
-	private static Map<String, Class<?>> primitives = Maps.newHashMap();
-	
-	static {
-		@SuppressWarnings("unchecked")
-		List<Class> primitiveClasses = Arrays.<Class>asList(boolean.class, byte.class, short.class, int.class, long.class, float.class, double.class, char.class);
-		for (Class<?> cls : primitiveClasses) {
-			primitives.put(cls.getName(), cls);
-		}
-	}
-	
-	public static Class<?> forName(ObjectSpecification noSpec) {
-		String fullName = noSpec.getFullIdentifier();
-		return forName(fullName);
-	}
-
-	public static Class<?> forName(String fullName) {
-		Class<?> primitiveCls = primitives.get(fullName);
-		if (primitiveCls != null) {
-			return primitiveCls;
-		}
-		try {
-			return Thread.currentThread().getContextClassLoader().loadClass(fullName);
-		} catch (ClassNotFoundException e) {
-			throw new RuntimeException(e);
-		}
-	}
-
-	public static Class<?> forNameElseNull(String fullName) {
-		if (fullName == null) {
-			return null;
-		}
-		try {
-			return Thread.currentThread().getContextClassLoader().loadClass(fullName);
-		} catch (ClassNotFoundException e) {
-			return null;
-		}
-	}
+    private static Map<String, Class<?>> primitives = Maps.newHashMap();
+
+    static {
+        @SuppressWarnings("unchecked")
+        final List<Class> primitiveClasses =
+            Arrays.<Class> asList(boolean.class, byte.class, short.class, int.class, long.class, float.class,
+                double.class, char.class);
+        for (final Class<?> cls : primitiveClasses) {
+            primitives.put(cls.getName(), cls);
+        }
+    }
+
+    public static Class<?> forName(final ObjectSpecification noSpec) {
+        final String fullName = noSpec.getFullIdentifier();
+        return forName(fullName);
+    }
+
+    public static Class<?> forName(final String fullName) {
+        final Class<?> primitiveCls = primitives.get(fullName);
+        if (primitiveCls != null) {
+            return primitiveCls;
+        }
+        try {
+            return Thread.currentThread().getContextClassLoader().loadClass(fullName);
+        } catch (final ClassNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static Class<?> forNameElseNull(final String fullName) {
+        if (fullName == null) {
+            return null;
+        }
+        try {
+            return Thread.currentThread().getContextClassLoader().loadClass(fullName);
+        } catch (final ClassNotFoundException e) {
+            return null;
+        }
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Classes.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Classes.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Classes.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Classes.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
 import org.hamcrest.BaseMatcher;
@@ -26,20 +25,20 @@ import org.hamcrest.Matcher;
 
 public final class Classes {
 
-	@SuppressWarnings("unchecked")
-	public static Matcher isSubclassOf(final Class superClass) {
-		return new BaseMatcher(){
-			@Override
-			public boolean matches(Object item) {
-				Class cls = (Class) item;
-				return superClass.isAssignableFrom(cls);
-			}
-	
-			@Override
-			public void describeTo(Description description) {
-				description.appendText("is subclass of " + superClass.getName());
-			}
-		};	
-	}
+    @SuppressWarnings("unchecked")
+    public static Matcher isSubclassOf(final Class superClass) {
+        return new BaseMatcher() {
+            @Override
+            public boolean matches(final Object item) {
+                final Class cls = (Class) item;
+                return superClass.isAssignableFrom(cls);
+            }
+
+            @Override
+            public void describeTo(final Description description) {
+                description.appendText("is subclass of " + superClass.getName());
+            }
+        };
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Generics.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Generics.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Generics.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Generics.java Tue May  3 07:44:41 2011
@@ -17,22 +17,20 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
-
 public final class Generics {
-	
-	private Generics(){}
 
-	public static <T> T coalesce(T... candidates) {
-		for (T t : candidates) {
-			if (t != null) {
-				return t;
-			}
-		}
-		return null;
-	}
+    private Generics() {
+    }
+
+    public static <T> T coalesce(final T... candidates) {
+        for (final T t : candidates) {
+            if (t != null) {
+                return t;
+            }
+        }
+        return null;
+    }
 
-	
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Mementos.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Mementos.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Mementos.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Mementos.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -39,74 +38,76 @@ import com.google.common.base.Function;
 
 public final class Mementos {
 
-	private Mementos(){}
+    private Mementos() {
+    }
+
+    public static Function<ObjectSpecification, SpecMemento> fromSpec() {
+        return new Function<ObjectSpecification, SpecMemento>() {
 
-	public static Function<ObjectSpecification, SpecMemento> fromSpec() {
-		return new Function<ObjectSpecification, SpecMemento>() {
-			
-			public SpecMemento apply(ObjectSpecification from) {
-				return new SpecMemento(from);
-			}
-		};
-	}
-
-	public static Function<OneToOneAssociation, PropertyMemento> fromProperty() {
-		return new Function<OneToOneAssociation, PropertyMemento>() {
-			public PropertyMemento apply(
-					OneToOneAssociation from) {
-				return new PropertyMemento(from);
-			}
-		};
-	}
-	
-	public static Function<OneToManyAssociation, CollectionMemento> fromCollection() {
-		return new Function<OneToManyAssociation, CollectionMemento>() {
-			public CollectionMemento apply(
-					OneToManyAssociation from) {
-				return new CollectionMemento(from);
-			}
-		};
-	}
-	
-	public static Function<ObjectAction, ActionMemento> fromAction() {
-		return new Function<ObjectAction, ActionMemento>() {
-			public ActionMemento apply(
-					ObjectAction from) {
-				return new ActionMemento(from);
-			}
-		};
-	}
-	
-	public static Function<ObjectActionParameter, ActionParameterMemento> fromActionParameter() {
-		return new Function<ObjectActionParameter, ActionParameterMemento>() {
-			public ActionParameterMemento apply(
-					ObjectActionParameter from) {
-				return new ActionParameterMemento(from);
-			}
-		};
-	}
-
-	public static Function<Object, ObjectAdapterMemento> fromPojo() {
-		return new Function<Object, ObjectAdapterMemento>() {
-			public ObjectAdapterMemento apply(Object pojo) {
-				ObjectAdapter adapter = getAdapterManager().adapterFor(pojo);
-				return ObjectAdapterMemento.createOrNull(adapter);
-			}
-		};
-	}
-
-
-	   public static Function<ObjectAdapter, ObjectAdapterMemento> fromAdapter() {
-	        return new Function<ObjectAdapter, ObjectAdapterMemento>() {
-	            public ObjectAdapterMemento apply(ObjectAdapter adapter) {
-	                return ObjectAdapterMemento.createOrNull(adapter);
-	            }
-	        };
-	    }
-
-
-	private static AdapterManager getAdapterManager() {
-		return IsisContext.getPersistenceSession().getAdapterManager();
-	}
+            @Override
+            public SpecMemento apply(final ObjectSpecification from) {
+                return new SpecMemento(from);
+            }
+        };
+    }
+
+    public static Function<OneToOneAssociation, PropertyMemento> fromProperty() {
+        return new Function<OneToOneAssociation, PropertyMemento>() {
+            @Override
+            public PropertyMemento apply(final OneToOneAssociation from) {
+                return new PropertyMemento(from);
+            }
+        };
+    }
+
+    public static Function<OneToManyAssociation, CollectionMemento> fromCollection() {
+        return new Function<OneToManyAssociation, CollectionMemento>() {
+            @Override
+            public CollectionMemento apply(final OneToManyAssociation from) {
+                return new CollectionMemento(from);
+            }
+        };
+    }
+
+    public static Function<ObjectAction, ActionMemento> fromAction() {
+        return new Function<ObjectAction, ActionMemento>() {
+            @Override
+            public ActionMemento apply(final ObjectAction from) {
+                return new ActionMemento(from);
+            }
+        };
+    }
+
+    public static Function<ObjectActionParameter, ActionParameterMemento> fromActionParameter() {
+        return new Function<ObjectActionParameter, ActionParameterMemento>() {
+            @Override
+            public ActionParameterMemento apply(final ObjectActionParameter from) {
+                return new ActionParameterMemento(from);
+            }
+        };
+    }
+
+    public static Function<Object, ObjectAdapterMemento> fromPojo() {
+        return new Function<Object, ObjectAdapterMemento>() {
+            @Override
+            public ObjectAdapterMemento apply(final Object pojo) {
+                final ObjectAdapter adapter = getAdapterManager().adapterFor(pojo);
+                return ObjectAdapterMemento.createOrNull(adapter);
+            }
+        };
+    }
+
+    public static Function<ObjectAdapter, ObjectAdapterMemento> fromAdapter() {
+        return new Function<ObjectAdapter, ObjectAdapterMemento>() {
+            @Override
+            public ObjectAdapterMemento apply(final ObjectAdapter adapter) {
+                return ObjectAdapterMemento.createOrNull(adapter);
+            }
+        };
+    }
+
+    private static AdapterManager getAdapterManager() {
+        return IsisContext.getPersistenceSession().getAdapterManager();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAdapters.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAdapters.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAdapters.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAdapters.java Tue May  3 07:44:41 2011
@@ -17,10 +17,8 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -32,39 +30,42 @@ import com.google.common.base.Function;
 
 public final class ObjectAdapters {
 
-	private ObjectAdapters(){}
-	
-	public static Function<Object, ObjectAdapter> fromPojo() {
-		return new Function<Object, ObjectAdapter>() {
-			public ObjectAdapter apply(Object pojo) {
-				return getAdapterManager().getAdapterFor(pojo);
-			}
-		};
-	}
-
-	public static Function<ObjectAdapterMemento, ObjectAdapter> fromMemento() {
-		return new Function<ObjectAdapterMemento, ObjectAdapter>() {
-			public ObjectAdapter apply(ObjectAdapterMemento from) {
-				return from.getObjectAdapter();
-			}
-		};
-	}
-
-	public static Function<Oid, ObjectAdapter> fromOid() {
-		return new Function<Oid, ObjectAdapter>() {
-			public ObjectAdapter apply(Oid from) {
-				final ObjectAdapter adapterFor = getAdapterManager().getAdapterFor(from);
-				return adapterFor;
-			}
-		};
-	}
-
-	private static AdapterManager getAdapterManager() {
-		return getPersistenceSession().getAdapterManager();
-	}
-
-	private static PersistenceSession getPersistenceSession() {
-		return IsisContext.getPersistenceSession();
-	}
-}
+    private ObjectAdapters() {
+    }
 
+    public static Function<Object, ObjectAdapter> fromPojo() {
+        return new Function<Object, ObjectAdapter>() {
+            @Override
+            public ObjectAdapter apply(final Object pojo) {
+                return getAdapterManager().getAdapterFor(pojo);
+            }
+        };
+    }
+
+    public static Function<ObjectAdapterMemento, ObjectAdapter> fromMemento() {
+        return new Function<ObjectAdapterMemento, ObjectAdapter>() {
+            @Override
+            public ObjectAdapter apply(final ObjectAdapterMemento from) {
+                return from.getObjectAdapter();
+            }
+        };
+    }
+
+    public static Function<Oid, ObjectAdapter> fromOid() {
+        return new Function<Oid, ObjectAdapter>() {
+            @Override
+            public ObjectAdapter apply(final Oid from) {
+                final ObjectAdapter adapterFor = getAdapterManager().getAdapterFor(from);
+                return adapterFor;
+            }
+        };
+    }
+
+    private static AdapterManager getAdapterManager() {
+        return getPersistenceSession().getAdapterManager();
+    }
+
+    private static PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+}

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -27,15 +26,16 @@ import com.google.common.base.Function;
 
 public final class ObjectAssociations {
 
-	private ObjectAssociations(){}
+    private ObjectAssociations() {
+    }
 
-	public static Function<String, OneToOneAssociation> fromId(final ObjectSpecification noSpec) {
-		return new Function<String, OneToOneAssociation>() {
-			@Override
-			public OneToOneAssociation apply(String from) {
-				return (OneToOneAssociation) noSpec.getAssociation(from);
-			}
-		};
-	}
+    public static Function<String, OneToOneAssociation> fromId(final ObjectSpecification noSpec) {
+        return new Function<String, OneToOneAssociation>() {
+            @Override
+            public OneToOneAssociation apply(final String from) {
+                return (OneToOneAssociation) noSpec.getAssociation(from);
+            }
+        };
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Oids.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Oids.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Oids.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Oids.java Tue May  3 07:44:41 2011
@@ -17,50 +17,46 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
-
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.hamcrest.Description;
 import org.hamcrest.Matcher;
 import org.hamcrest.TypeSafeMatcher;
 
-
 public final class Oids {
 
-	private Oids(){}
+    private Oids() {
+    }
 
-	public static Matcher<Oid> isTransient() {
-		return new TypeSafeMatcher<Oid>() {
-	
-			@Override
-			public boolean matchesSafely(Oid item) {
-				return item.isTransient();
-			}
-	
-			@Override
-			public void describeTo(Description description) {
-				description.appendText("is transient");
-			}
-		};
-	}
-
-	public static Matcher<Oid> isPersistent() {
-		return new TypeSafeMatcher<Oid>() {
-	
-			@Override
-			public boolean matchesSafely(Oid item) {
-				return !item.isTransient();
-			}
-	
-			@Override
-			public void describeTo(Description description) {
-				description.appendText("is persistent");
-			}
-		};
-	}
-	
+    public static Matcher<Oid> isTransient() {
+        return new TypeSafeMatcher<Oid>() {
 
+            @Override
+            public boolean matchesSafely(final Oid item) {
+                return item.isTransient();
+            }
+
+            @Override
+            public void describeTo(final Description description) {
+                description.appendText("is transient");
+            }
+        };
+    }
+
+    public static Matcher<Oid> isPersistent() {
+        return new TypeSafeMatcher<Oid>() {
+
+            @Override
+            public boolean matchesSafely(final Oid item) {
+                return !item.isTransient();
+            }
+
+            @Override
+            public void describeTo(final Description description) {
+                description.appendText("is persistent");
+            }
+        };
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Pojos.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Pojos.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Pojos.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Pojos.java Tue May  3 07:44:41 2011
@@ -17,10 +17,8 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -30,30 +28,32 @@ import com.google.common.base.Function;
 
 public final class Pojos {
 
-	private Pojos(){}
-
-	public static Function<Object, Oid> toOid() {
-		return new Function<Object, Oid>() {
-			public Oid apply(Object pojo) {
-				ObjectAdapter adapter = getAdapterManager().adapterFor(pojo);
-				return adapter.getOid();
-			}
-
-		};
-	}
-	
-	public static Function<ObjectAdapter, Object> forAdapter() {
-		return new Function<ObjectAdapter, Object>() {
-			
-			public Object apply(ObjectAdapter from) {
-				return from.getObject();
-			}
-		};
-	}
-
-	private static AdapterManager getAdapterManager() {
-		return IsisContext.getPersistenceSession().getAdapterManager();
-	}
+    private Pojos() {
+    }
 
+    public static Function<Object, Oid> toOid() {
+        return new Function<Object, Oid>() {
+            @Override
+            public Oid apply(final Object pojo) {
+                final ObjectAdapter adapter = getAdapterManager().adapterFor(pojo);
+                return adapter.getOid();
+            }
+
+        };
+    }
+
+    public static Function<ObjectAdapter, Object> forAdapter() {
+        return new Function<ObjectAdapter, Object>() {
+
+            @Override
+            public Object apply(final ObjectAdapter from) {
+                return from.getObject();
+            }
+        };
+    }
+
+    private static AdapterManager getAdapterManager() {
+        return IsisContext.getPersistenceSession().getAdapterManager();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Strings.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Strings.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Strings.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/util/Strings.java Tue May  3 07:44:41 2011
@@ -17,33 +17,31 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.util;
 
-
 public final class Strings {
-	
-	private Strings(){}
 
-	public static String toCamelCase(String name) {
-		String nameLower = name.toLowerCase();
-		StringBuilder buf = new StringBuilder();
-		boolean capitalizeNext = false;
-		for (int i = 0; i < nameLower.length(); i++) {
-			char ch = nameLower.charAt(i);
-			if (ch == '_') {
-				capitalizeNext = true;
-			} else {
-				if (capitalizeNext) {
-					buf.append(Character.toUpperCase(ch));
-				} else {
-					buf.append(ch);
-				}
-				capitalizeNext = false;
-			}
-		}
-		return buf.toString();
-	}
+    private Strings() {
+    }
+
+    public static String toCamelCase(final String name) {
+        final String nameLower = name.toLowerCase();
+        final StringBuilder buf = new StringBuilder();
+        boolean capitalizeNext = false;
+        for (int i = 0; i < nameLower.length(); i++) {
+            final char ch = nameLower.charAt(i);
+            if (ch == '_') {
+                capitalizeNext = true;
+            } else {
+                if (capitalizeNext) {
+                    buf.append(Character.toUpperCase(ch));
+                } else {
+                    buf.append(ch);
+                }
+                capitalizeNext = false;
+            }
+        }
+        return buf.toString();
+    }
 
-	
 }

Modified: incubator/isis/trunk/viewer/wicket/model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java (original)
+++ incubator/isis/trunk/viewer/wicket/model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.model.models;
 
 import static org.hamcrest.Matchers.is;
@@ -27,17 +26,15 @@ import static org.junit.Assert.assertTha
 
 import java.util.Map;
 
-import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.junit.Test;
 
-
 public class ActionModelTest {
 
-	@Test
-	public void whenParseThenParses() throws Exception {
-		Map.Entry<Integer, String> parsed = ActionModel.parse("3=OBJECT_OID:123");
-		assertThat(parsed, is(not(nullValue())));
-		assertThat(parsed.getKey(), is(3));
-		assertThat(parsed.getValue(), is("OBJECT_OID:123"));
-	}
+    @Test
+    public void whenParseThenParses() throws Exception {
+        final Map.Entry<Integer, String> parsed = ActionModel.parse("3=OBJECT_OID:123");
+        assertThat(parsed, is(not(nullValue())));
+        assertThat(parsed.getKey(), is(3));
+        assertThat(parsed.getValue(), is("OBJECT_OID:123"));
+    }
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentFactory.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui;
 
 import java.io.Serializable;
@@ -27,64 +26,66 @@ import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
 /**
- * Creates {@link Component}s of a specified {@link ComponentType}, optionally
- * {@link #appliesTo(ComponentType, IModel) dependent on} the provided {@link IModel model}.
+ * Creates {@link Component}s of a specified {@link ComponentType}, optionally {@link #appliesTo(ComponentType, IModel)
+ * dependent on} the provided {@link IModel model}.
  * 
  * <p>
- * This interface is at the very heart of the Wicket Objects' model, being an usage of the
- * chain-of-responsibility design pattern.  The available {@link ComponentFactory}s are
- * registered through {@link ComponentFactoryRegistry} (bootstrapped from the <tt>WicketObjectsApplication</tt>);
- * various adapters make it easy to lookup {@link Component}s from this registry.
+ * This interface is at the very heart of the Wicket Objects' model, being an usage of the chain-of-responsibility
+ * design pattern. The available {@link ComponentFactory}s are registered through {@link ComponentFactoryRegistry}
+ * (bootstrapped from the <tt>WicketObjectsApplication</tt>); various adapters make it easy to lookup {@link Component}s
+ * from this registry.
  */
 public interface ComponentFactory extends Serializable {
 
-	/**
-	 * The {@link ComponentType} with which this component factory has been registered.
-	 */
-	ComponentType getComponentType();
-
-	public enum ApplicationAdvice {
-		APPLIES(true,false),
-		APPLIES_EXCLUSIVELY(true,true),
-		DOES_NOT_APPLY(false,false);
-		private final boolean applies;
-		private final boolean exclusively;
-		private ApplicationAdvice(boolean applies, boolean exclusively) {
-			this.applies = applies;
-			this.exclusively = exclusively;
-		}
-		public boolean applies() {
-			return applies;
-		}
-		/**
-		 * Whether no other {@link ComponentFactory}s should apply (ie stop searching for other views).
-		 */
-		public boolean exclusively() {
-			return exclusively;
-		}
-	}
-	
-	/**
-	 * Whether the {@link Component} created by this factory applies to the
-	 * specified {@link ComponentType} and {@link IModel}.
-	 */
-	ApplicationAdvice appliesTo(ComponentType componentType, IModel<?> model);
-
-	/**
-	 * Creates component, with id being derived from the {@link #getComponentType() component type} for this factory.
-	 * @param model
-	 * @return
-	 */
-	Component createComponent(IModel<?> model);
-
-	/**
-	 * Creates component, with specified id.
-	 */
-	Component createComponent(String id, IModel<?> model);
-
-	/**
-	 * Used for rendering in drop-downs.
-	 */
-	String getName();
+    /**
+     * The {@link ComponentType} with which this component factory has been registered.
+     */
+    ComponentType getComponentType();
+
+    public enum ApplicationAdvice {
+        APPLIES(true, false), APPLIES_EXCLUSIVELY(true, true), DOES_NOT_APPLY(false, false);
+        private final boolean applies;
+        private final boolean exclusively;
+
+        private ApplicationAdvice(final boolean applies, final boolean exclusively) {
+            this.applies = applies;
+            this.exclusively = exclusively;
+        }
+
+        public boolean applies() {
+            return applies;
+        }
+
+        /**
+         * Whether no other {@link ComponentFactory}s should apply (ie stop searching for other views).
+         */
+        public boolean exclusively() {
+            return exclusively;
+        }
+    }
+
+    /**
+     * Whether the {@link Component} created by this factory applies to the specified {@link ComponentType} and
+     * {@link IModel}.
+     */
+    ApplicationAdvice appliesTo(ComponentType componentType, IModel<?> model);
+
+    /**
+     * Creates component, with id being derived from the {@link #getComponentType() component type} for this factory.
+     * 
+     * @param model
+     * @return
+     */
+    Component createComponent(IModel<?> model);
+
+    /**
+     * Creates component, with specified id.
+     */
+    Component createComponent(String id, IModel<?> model);
+
+    /**
+     * Used for rendering in drop-downs.
+     */
+    String getName();
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentFactoryAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentFactoryAbstract.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentFactoryAbstract.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentFactoryAbstract.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui;
 
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
@@ -31,76 +30,78 @@ import org.apache.wicket.model.IModel;
  */
 public abstract class ComponentFactoryAbstract implements ComponentFactory, SpecificationLoaderAccessor {
 
-	private static final long serialVersionUID = 1L;
-	
-	private ComponentType componentType;
-	private String name;
-
-	public ComponentFactoryAbstract(ComponentType componentType) {
-		this.componentType = componentType;
-		this.name = getClass().getSimpleName();
-	}
-
-	public ComponentFactoryAbstract(ComponentType componentType, String name) {
-		this.componentType = componentType;
-		this.name = name;
-	}
-
-	public ComponentType getComponentType() {
-		return componentType;
-	}
-
-
-	/**
-	 * Applies if {@link #getComponentType()} matches; disregards the provided {@link IModel}.
-	 * 
-	 * @see #appliesTo(IModel)
-	 */
-	public final ApplicationAdvice appliesTo(ComponentType componentType, IModel<?> model) {
-		if (componentType != getComponentType()) {
-			return ApplicationAdvice.DOES_NOT_APPLY;
-		}
-		return appliesTo(model);
-	}
-
-	/**
-	 * Hook for subclasses to check the {@link IModel}.
-	 */
-	protected abstract ApplicationAdvice appliesTo(IModel<?> model);
-
-	/**
-	 * Convenenience for subclasses to call from {@link #appliesTo(IModel)}
-	 */
-	protected final ApplicationAdvice appliesIf(boolean b) {
-		return b?ApplicationAdvice.APPLIES:ApplicationAdvice.DOES_NOT_APPLY;
-	}
-
-	/**
-	 * Convenenience for subclasses to call from {@link #appliesTo(IModel)}
-	 */
-	protected final ApplicationAdvice appliesExclusivelyIf(boolean b) {
-		return b?ApplicationAdvice.APPLIES_EXCLUSIVELY:ApplicationAdvice.DOES_NOT_APPLY;
-	}
-
-
-	public final Component createComponent(IModel<?> model) {
-		return createComponent(getComponentType().toString(), model);
-	}
-
-	public abstract Component createComponent(String id, IModel<?> model);
-
-	public String getName() {
-		return name;
-	}
-
-	
-	/////////////////////////////////////////////////////////////////
-	// Dependencies
-	/////////////////////////////////////////////////////////////////
-	
-	public SpecificationLoader getSpecificationLoader() {
-		return IsisContext.getSpecificationLoader();
-	}
+    private static final long serialVersionUID = 1L;
+
+    private final ComponentType componentType;
+    private final String name;
 
+    public ComponentFactoryAbstract(final ComponentType componentType) {
+        this.componentType = componentType;
+        this.name = getClass().getSimpleName();
+    }
+
+    public ComponentFactoryAbstract(final ComponentType componentType, final String name) {
+        this.componentType = componentType;
+        this.name = name;
+    }
+
+    @Override
+    public ComponentType getComponentType() {
+        return componentType;
+    }
+
+    /**
+     * Applies if {@link #getComponentType()} matches; disregards the provided {@link IModel}.
+     * 
+     * @see #appliesTo(IModel)
+     */
+    @Override
+    public final ApplicationAdvice appliesTo(final ComponentType componentType, final IModel<?> model) {
+        if (componentType != getComponentType()) {
+            return ApplicationAdvice.DOES_NOT_APPLY;
+        }
+        return appliesTo(model);
+    }
+
+    /**
+     * Hook for subclasses to check the {@link IModel}.
+     */
+    protected abstract ApplicationAdvice appliesTo(IModel<?> model);
+
+    /**
+     * Convenenience for subclasses to call from {@link #appliesTo(IModel)}
+     */
+    protected final ApplicationAdvice appliesIf(final boolean b) {
+        return b ? ApplicationAdvice.APPLIES : ApplicationAdvice.DOES_NOT_APPLY;
+    }
+
+    /**
+     * Convenenience for subclasses to call from {@link #appliesTo(IModel)}
+     */
+    protected final ApplicationAdvice appliesExclusivelyIf(final boolean b) {
+        return b ? ApplicationAdvice.APPLIES_EXCLUSIVELY : ApplicationAdvice.DOES_NOT_APPLY;
+    }
+
+    @Override
+    public final Component createComponent(final IModel<?> model) {
+        return createComponent(getComponentType().toString(), model);
+    }
+
+    @Override
+    public abstract Component createComponent(String id, IModel<?> model);
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    // ///////////////////////////////////////////////////////////////
+    // Dependencies
+    // ///////////////////////////////////////////////////////////////
+
+    @Override
+    public SpecificationLoader getSpecificationLoader() {
+        return IsisContext.getSpecificationLoader();
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java Tue May  3 07:44:41 2011
@@ -17,126 +17,124 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui;
 
 import org.apache.isis.viewer.wicket.model.util.Strings;
 import org.apache.wicket.Component;
 
 /**
- * Enumerates the different types of {@link Component}s that can be constructed using
- * {@link ComponentFactory}.
+ * Enumerates the different types of {@link Component}s that can be constructed using {@link ComponentFactory}.
  * 
  * <p>
- * Some are fine-grained (such as {@link ComponentType#SCALAR_NAME_AND_VALUE}, a panel to represent a
- * single scalar property or parameter), but others are somewhat
- * larger (such as {@link ComponentType#ENTITY}, representing an entity, with its actions,
- * properties and collections).
+ * Some are fine-grained (such as {@link ComponentType#SCALAR_NAME_AND_VALUE}, a panel to represent a single scalar
+ * property or parameter), but others are somewhat larger (such as {@link ComponentType#ENTITY}, representing an entity,
+ * with its actions, properties and collections).
  */
 public enum ComponentType {
-	
-	/**
-	 * Welcome page.
-	 */
-	WELCOME,
-	/**
-	 * List of services and their actions.
-	 * 
-	 * <p>
-	 * Could be rendered using a JavaScript or DHTML menu, an accordion, or a tree view.
-	 */
-	APPLICATION_ACTIONS,
-	/**
-	 * A single domain entity.
-	 */
-	ENTITY,
-	/**
-	 * Title, icon and action list for a single entity.
-	 */
-	ENTITY_SUMMARY,
-	/**
-	 * The set of properties for a single entity.
-	 */
-	ENTITY_PROPERTIES,
-	/**
-	 * The set of collections of a single entity.
-	 */
-	ENTITY_COLLECTIONS,
-	/**
-	 * The set of properties and collections for a single entity.
-	 */
-	ENTITY_PROPERTIES_AND_COLLECTIONS,
-	/**
-	 * A single standalone value, as might be returned from an action.
-	 */
-	VALUE,
-	/**
-	 * The name and value of a single property or parameter, ie a scalar.
-	 */
-	SCALAR_NAME_AND_VALUE,
+
+    /**
+     * Welcome page.
+     */
+    WELCOME,
+    /**
+     * List of services and their actions.
+     * 
+     * <p>
+     * Could be rendered using a JavaScript or DHTML menu, an accordion, or a tree view.
+     */
+    APPLICATION_ACTIONS,
+    /**
+     * A single domain entity.
+     */
+    ENTITY,
+    /**
+     * Title, icon and action list for a single entity.
+     */
+    ENTITY_SUMMARY,
     /**
-     * The name and contents of a single collection of an entity; {@link Component}s are expected to use 
+     * The set of properties for a single entity.
+     */
+    ENTITY_PROPERTIES,
+    /**
+     * The set of collections of a single entity.
+     */
+    ENTITY_COLLECTIONS,
+    /**
+     * The set of properties and collections for a single entity.
+     */
+    ENTITY_PROPERTIES_AND_COLLECTIONS,
+    /**
+     * A single standalone value, as might be returned from an action.
+     */
+    VALUE,
+    /**
+     * The name and value of a single property or parameter, ie a scalar.
+     */
+    SCALAR_NAME_AND_VALUE,
+    /**
+     * The name and contents of a single collection of an entity; {@link Component}s are expected to use
      * {@link #COLLECTION_CONTENTS} to actually render the contents.
      */
     COLLECTION_NAME_AND_CONTENTS,
-	/**
-	 * The parameter form (dialog box) of an action.
-	 */
-	PARAMETERS,
-	/**
-	 * Info details for an action, eg to display the target, a resubmit button, any
-	 * description or help text, and so on.
-	 */
-	ACTION_INFO,
-	/**
-	 * Used for two different (but related) types of components:
-	 * <ul>
-	 * <li>For a menu panel, to display list of available actions ('find using').</li>
-	 * <li>The parameters or results of an action; the model indicates which to display.</li>
-	 * </ul>
-	 * 
-	 * <p>
-	 * If showing results, then provides a level of indirection around another view (eg {@link #ACTION_PARAMETERS}, {@link #ENTITY} or {@link #COLLECTION_NAME_AND_CONTENTS}).
-	 */
-	ACTION,
-	/**
-	 * A collection of entities (the value of)
-	 */
-	COLLECTION_CONTENTS,
-	/**
-	 * A link to an entity.
-	 */
-	ENTITY_LINK,
-	/**
-	 * A collection of entities, from an action, but none returned.
-	 */
-	EMPTY_COLLECTION,
-	/**
-	 * A void result from an action.
-	 */
-	VOID_RETURN;
-	
-	/**
-	 * Returns the {@link #name()} formatted as {@link Strings#camelCase(String) camel case}.
-	 * 
-	 * <p>
-	 * For example, <tt>OBJECT_EDIT</tt> becomes <tt>objectEdit</tt>. 
-	 */
-	public String toString() {
-		return getWicketId();
-	}
-
-	public String getWicketId() {
-		return Strings.toCamelCase(name());
-	}
-
-	public static ComponentType lookup(String id) {
-		for (ComponentType componentType : values()) {
-			if (componentType.getWicketId().equals(id)) {
-				return componentType;
-			}
-		}
-		return null;
-	}
+    /**
+     * The parameter form (dialog box) of an action.
+     */
+    PARAMETERS,
+    /**
+     * Info details for an action, eg to display the target, a resubmit button, any description or help text, and so on.
+     */
+    ACTION_INFO,
+    /**
+     * Used for two different (but related) types of components:
+     * <ul>
+     * <li>For a menu panel, to display list of available actions ('find using').</li>
+     * <li>The parameters or results of an action; the model indicates which to display.</li>
+     * </ul>
+     * 
+     * <p>
+     * If showing results, then provides a level of indirection around another view (eg {@link #ACTION_PARAMETERS},
+     * {@link #ENTITY} or {@link #COLLECTION_NAME_AND_CONTENTS}).
+     */
+    ACTION,
+    /**
+     * A collection of entities (the value of)
+     */
+    COLLECTION_CONTENTS,
+    /**
+     * A link to an entity.
+     */
+    ENTITY_LINK,
+    /**
+     * A collection of entities, from an action, but none returned.
+     */
+    EMPTY_COLLECTION,
+    /**
+     * A void result from an action.
+     */
+    VOID_RETURN;
+
+    /**
+     * Returns the {@link #name()} formatted as {@link Strings#camelCase(String) camel case}.
+     * 
+     * <p>
+     * For example, <tt>OBJECT_EDIT</tt> becomes <tt>objectEdit</tt>.
+     */
+    @Override
+    public String toString() {
+        return getWicketId();
+    }
+
+    public String getWicketId() {
+        return Strings.toCamelCase(name());
+    }
+
+    public static ComponentType lookup(final String id) {
+        for (final ComponentType componentType : values()) {
+            if (componentType.getWicketId().equals(id)) {
+                return componentType;
+            }
+        }
+        return null;
+    }
 
 }
\ No newline at end of file

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actions/params/ActionParametersFormPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actions/params/ActionParametersFormPanel.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actions/params/ActionParametersFormPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actions/params/ActionParametersFormPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.actions.params;
 
 import static org.hamcrest.CoreMatchers.is;
@@ -26,13 +25,6 @@ import static org.hamcrest.CoreMatchers.
 
 import java.util.List;
 
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.form.Button;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.repeater.RepeatingView;
-
-import com.google.common.collect.Lists;
-
 import org.apache.isis.core.commons.ensure.Ensure;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
@@ -45,92 +37,94 @@ import org.apache.isis.viewer.wicket.mod
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.components.widgets.formcomponent.FormFeedbackPanel;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.repeater.RepeatingView;
+
+import com.google.common.collect.Lists;
 
 /**
  * {@link PanelAbstract Panel} to capture the arguments for an action invocation.
  */
 public class ActionParametersFormPanel extends PanelAbstract<ActionModel> {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
+
+    private static final String ID_OK_BUTTON = "okButton";
+    private static final String ID_ACTION_PARAMETERS = "parameters";
+
+    private final ActionExecutor actionExecutor;
+
+    public ActionParametersFormPanel(final String id, final ActionModel model) {
+        super(id, model);
+
+        Ensure.ensureThatArg(model.getExecutor(), is(not(nullValue())));
+
+        this.actionExecutor = model.getExecutor();
+        buildGui();
+    }
+
+    private void buildGui() {
+        add(new ActionParameterForm("inputForm", getModel()));
+    }
+
+    class ActionParameterForm extends Form<ObjectAdapter> {
+
+        private static final long serialVersionUID = 1L;
+
+        private static final String ID_FEEDBACK = "feedback";
+
+        public ActionParameterForm(final String id, final ActionModel actionModel) {
+            super(id, actionModel);
+
+            addParameters();
+
+            addOrReplace(new FormFeedbackPanel(ID_FEEDBACK));
+            addOkButton();
+        }
+
+        private ActionModel getActionModel() {
+            return (ActionModel) super.getModel();
+        }
+
+        private void addParameters() {
+            final ActionModel actionModel = getActionModel();
+            final ObjectAction ObjectAction = actionModel.getActionMemento().getAction();
+
+            final List<ObjectActionParameter> parameters = ObjectAction.getParameters();
+
+            final RepeatingView rv = new RepeatingView(ID_ACTION_PARAMETERS);
+            add(rv);
+            final List<ActionParameterMemento> mementos = buildParameterMementos(parameters);
+            for (final ActionParameterMemento apm : mementos) {
+                final WebMarkupContainer container = new WebMarkupContainer(rv.newChildId());
+                rv.add(container);
+
+                final ScalarModel argumentModel = actionModel.getArgumentModel(apm);
+                getComponentFactoryRegistry().addOrReplaceComponent(container, ComponentType.SCALAR_NAME_AND_VALUE,
+                    argumentModel);
+            }
+        }
 
-	private static final String ID_OK_BUTTON = "okButton";
-	private static final String ID_ACTION_PARAMETERS = "parameters";
-	
-	private final ActionExecutor actionExecutor;
-
-	public ActionParametersFormPanel(String id, ActionModel model) {
-		super(id, model);
-
-		Ensure.ensureThatArg(model.getExecutor(), is(not(nullValue())));
-		
-		this.actionExecutor = model.getExecutor();
-		buildGui();
-	}
-
-	private void buildGui() {
-		add(new ActionParameterForm("inputForm", getModel()));
-	}
-
-	class ActionParameterForm extends Form<ObjectAdapter> {
-
-		private static final long serialVersionUID = 1L;
-		
-		private static final String ID_FEEDBACK = "feedback";
-
-		public ActionParameterForm(String id, ActionModel actionModel) {
-			super(id, actionModel);
-
-			addParameters();
-
-			addOrReplace(new FormFeedbackPanel(ID_FEEDBACK));
-			addOkButton();
-		}
-
-		private ActionModel getActionModel() {
-			return (ActionModel) super.getModel();
-		}
-
-		private void addParameters() {
-			ActionModel actionModel = getActionModel();
-			final ObjectAction ObjectAction = actionModel
-					.getActionMemento().getAction();
-
-			List<ObjectActionParameter> parameters = ObjectAction
-					.getParameters();
-
-			RepeatingView rv = new RepeatingView(ID_ACTION_PARAMETERS);
-			add(rv);
-			List<ActionParameterMemento> mementos = buildParameterMementos(parameters);
-			for (ActionParameterMemento apm : mementos) {
-				WebMarkupContainer container = new WebMarkupContainer(rv
-						.newChildId());
-				rv.add(container);
-
-				ScalarModel argumentModel = actionModel.getArgumentModel(apm);
-				getComponentFactoryRegistry().addOrReplaceComponent(container,
-						ComponentType.SCALAR_NAME_AND_VALUE, argumentModel);
-			}
-		}
-
-		private void addOkButton() {
-			add(new Button(ID_OK_BUTTON) {
-				private static final long serialVersionUID = 1L;
+        private void addOkButton() {
+            add(new Button(ID_OK_BUTTON) {
+                private static final long serialVersionUID = 1L;
 
-				@Override
+                @Override
                 public void onSubmit() {
-					actionExecutor.executeActionAndProcessResults();
-				};
-			});
-		}
-
-		private List<ActionParameterMemento> buildParameterMementos(
-				List<ObjectActionParameter> parameters) {
-			List<ActionParameterMemento> parameterMementoList = Lists.transform(parameters, Mementos.fromActionParameter());
-			// we copy into a new array list otherwise we get lazy evaluation =
-			// reference to a non-serializable object
-			return Lists.newArrayList(parameterMementoList);
-		}
-	}
-	
+                    actionExecutor.executeActionAndProcessResults();
+                };
+            });
+        }
+
+        private List<ActionParameterMemento> buildParameterMementos(final List<ObjectActionParameter> parameters) {
+            final List<ActionParameterMemento> parameterMementoList =
+                Lists.transform(parameters, Mementos.fromActionParameter());
+            // we copy into a new array list otherwise we get lazy evaluation =
+            // reference to a non-serializable object
+            return Lists.newArrayList(parameterMementoList);
+        }
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actions/params/ActionParametersFormPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actions/params/ActionParametersFormPanelFactory.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actions/params/ActionParametersFormPanelFactory.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actions/params/ActionParametersFormPanelFactory.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.actions.params;
 
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
@@ -32,20 +31,21 @@ import org.apache.wicket.model.IModel;
  */
 public class ActionParametersFormPanelFactory extends ComponentFactoryAbstract {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public ActionParametersFormPanelFactory() {
-		super(ComponentType.PARAMETERS);
-	}
-
-	@Override
-	public ApplicationAdvice appliesTo(IModel<?> model) {
-		return appliesIf(model instanceof ActionModel);
-	}
-
-	public Component createComponent(String id, IModel<?> model) {
-		ActionModel actionModel = (ActionModel) model;
-		return new ActionParametersFormPanel(id, actionModel);
-	}
+    public ActionParametersFormPanelFactory() {
+        super(ComponentType.PARAMETERS);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        return appliesIf(model instanceof ActionModel);
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        final ActionModel actionModel = (ActionModel) model;
+        return new ActionParametersFormPanel(id, actionModel);
+    }
 
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/cssrenderer/ApplicationCssRenderer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/cssrenderer/ApplicationCssRenderer.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/cssrenderer/ApplicationCssRenderer.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/cssrenderer/ApplicationCssRenderer.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.app.cssrenderer;
 
 import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/imagecache/ImageCache.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/imagecache/ImageCache.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/imagecache/ImageCache.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/imagecache/ImageCache.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.app.imagecache;
 
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/imagecache/ImageCacheAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/imagecache/ImageCacheAccessor.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/imagecache/ImageCacheAccessor.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/imagecache/ImageCacheAccessor.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.app.imagecache;
 
 public interface ImageCacheAccessor {

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/registry/ComponentFactoryList.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/registry/ComponentFactoryList.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/registry/ComponentFactoryList.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/registry/ComponentFactoryList.java Tue May  3 07:44:41 2011
@@ -17,14 +17,12 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.app.registry;
 
 import java.util.List;
 
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 
-
 /**
  * Defines an API for registering {@link ComponentFactory}s.
  * 
@@ -32,5 +30,5 @@ import org.apache.isis.viewer.wicket.ui.
  * As used by {@link ComponentFactoryListDefault}.
  */
 public interface ComponentFactoryList {
-	void addComponentFactories(List<ComponentFactory> componentFactories);
+    void addComponentFactories(List<ComponentFactory> componentFactories);
 }

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/registry/ComponentFactoryRegistry.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/registry/ComponentFactoryRegistry.java?rev=1098948&r1=1098947&r2=1098948&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/registry/ComponentFactoryRegistry.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/app/registry/ComponentFactoryRegistry.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.app.registry;
 
 import java.util.List;
@@ -28,68 +27,55 @@ import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
 import org.apache.wicket.model.IModel;
 
-
 /**
  * API for finding registered {@link ComponentFactory}s.
  * 
  * <p>
- * Ultimately all requests to locate {@link ComponentFactory}s are routed through to
- * an object implementing this interface.
+ * Ultimately all requests to locate {@link ComponentFactory}s are routed through to an object implementing this
+ * interface.
  */
 public interface ComponentFactoryRegistry {
 
-	List<ComponentFactory> findComponentFactories(ComponentType componentType, IModel<?> model);
-
-	/**
-	 * Finds the "best" {@link ComponentFactory} for the viewId.
-	 */
-	ComponentFactory findComponentFactory(ComponentType componentType, IModel<?> model);
-
-	
-	/**
-	 * As per {@link #addOrReplaceComponent(MarkupContainer, ComponentType, IModel)}, but 
-	 * with the wicket id derived from the {@link ComponentType}.
-	 */
-	Component addOrReplaceComponent(
-			MarkupContainer markupContainer, ComponentType componentType,
-			IModel<?> model);
-
-	/**
-	 * {@link #createComponent(ComponentType, String, IModel) Creates} the relevant {@link Component} for
-	 * the provided arguments, and adds to the provided {@link MarkupContainer}; the
-	 * wicket id is as specified.
-	 * 
-	 * <p>
-	 * If none can be found, will fail fast.
-	 */
-	Component addOrReplaceComponent(
-			MarkupContainer markupContainer, String id, ComponentType componentType,
-			IModel<?> model);
-
-
-	/**
-	 * As per {@link #createComponent(ComponentType, String, IModel)}, but with the
-	 * wicket id derived from the {@link ComponentType}.
-	 * 
-	 * @see #createComponent(ComponentType, String, IModel)
-	 */
-	Component createComponent(ComponentType componentType,
-			IModel<?> model);
-
-	/**
-	 * Create the {@link Component} matching the specified {@link ComponentType} and
-	 * {@link IModel} to the provided {@link MarkupContainer}; the id is specified explicitly.
-	 * 
-	 * <p>
-	 * If none can be found, will fail fast.
-	 */
-	Component createComponent(ComponentType componentType,
-			String id, IModel<?> model);
-
-
+    List<ComponentFactory> findComponentFactories(ComponentType componentType, IModel<?> model);
 
-	ComponentFactory findComponentFactoryElseFailFast(
-			ComponentType componentType, IModel<?> model);
+    /**
+     * Finds the "best" {@link ComponentFactory} for the viewId.
+     */
+    ComponentFactory findComponentFactory(ComponentType componentType, IModel<?> model);
+
+    /**
+     * As per {@link #addOrReplaceComponent(MarkupContainer, ComponentType, IModel)}, but with the wicket id derived
+     * from the {@link ComponentType}.
+     */
+    Component addOrReplaceComponent(MarkupContainer markupContainer, ComponentType componentType, IModel<?> model);
+
+    /**
+     * {@link #createComponent(ComponentType, String, IModel) Creates} the relevant {@link Component} for the provided
+     * arguments, and adds to the provided {@link MarkupContainer}; the wicket id is as specified.
+     * 
+     * <p>
+     * If none can be found, will fail fast.
+     */
+    Component addOrReplaceComponent(MarkupContainer markupContainer, String id, ComponentType componentType,
+        IModel<?> model);
+
+    /**
+     * As per {@link #createComponent(ComponentType, String, IModel)}, but with the wicket id derived from the
+     * {@link ComponentType}.
+     * 
+     * @see #createComponent(ComponentType, String, IModel)
+     */
+    Component createComponent(ComponentType componentType, IModel<?> model);
+
+    /**
+     * Create the {@link Component} matching the specified {@link ComponentType} and {@link IModel} to the provided
+     * {@link MarkupContainer}; the id is specified explicitly.
+     * 
+     * <p>
+     * If none can be found, will fail fast.
+     */
+    Component createComponent(ComponentType componentType, String id, IModel<?> model);
 
+    ComponentFactory findComponentFactoryElseFailFast(ComponentType componentType, IModel<?> model);
 
 }
\ No newline at end of file

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

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionInfoPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionInfoPanel.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/actions/ActionInfoPanel.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionInfoPanel.java Tue May  3 07:44:41 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.actions;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -30,20 +29,20 @@ import org.apache.wicket.markup.html.bas
  * Renders a panel providing summary information about an action.
  */
 public class ActionInfoPanel extends PanelAbstract<ActionModel> {
-	
-	private static final long serialVersionUID = 1L;
-	
-	private static final String ID_ACTION_NAME = "actionName";
-	private static final String ID_TARGET = "target";
-
-	public ActionInfoPanel(String id, ActionModel actionModel) {
-		super(id, actionModel);
-
-		final ObjectAdapter targetAdapter = getModel().getTargetAdapter();
-		final ObjectAction objectAction = getModel().getActionMemento().getAction();
-		
-		// TODO: render instead as links (providing isn't a service; provide a component for this?)
-		add(new Label(ID_TARGET, targetAdapter.titleString()));
-		add(new Label(ID_ACTION_NAME, objectAction.getName()));
-	}
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String ID_ACTION_NAME = "actionName";
+    private static final String ID_TARGET = "target";
+
+    public ActionInfoPanel(final String id, final ActionModel actionModel) {
+        super(id, actionModel);
+
+        final ObjectAdapter targetAdapter = getModel().getTargetAdapter();
+        final ObjectAction objectAction = getModel().getActionMemento().getAction();
+
+        // TODO: render instead as links (providing isn't a service; provide a component for this?)
+        add(new Label(ID_TARGET, targetAdapter.titleString()));
+        add(new Label(ID_ACTION_NAME, objectAction.getName()));
+    }
 }

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

Modified: incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionInvokeHandler.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionInvokeHandler.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/actions/ActionInvokeHandler.java (original)
+++ incubator/isis/trunk/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionInvokeHandler.java Tue May  3 07:44:41 2011
@@ -17,12 +17,11 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.wicket.ui.components.actions;
 
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 
 public interface ActionInvokeHandler {
 
-	void onClick(ActionModel actionModel);
+    void onClick(ActionModel actionModel);
 }



Mime
View raw message