You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/04/21 08:42:29 UTC

[3/4] isis git commit: ISIS-1603: adds new editStyle attribute for @Property, and corresponding facets.

ISIS-1603: adds new editStyle attribute for @Property, and corresponding facets.

Also
- removes an unused method in PanelAbstract


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/3b734415
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/3b734415
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/3b734415

Branch: refs/heads/ISIS-1603
Commit: 3b734415be531ad7e2eead1c6c388b4f75b3657d
Parents: 13e9f55
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Apr 20 15:13:06 2017 +0200
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Apr 20 15:13:06 2017 +0200

----------------------------------------------------------------------
 .../asciidoc/guides/rgant/_rgant-Property.adoc  |   7 +
 .../guides/rgant/_rgant-Property_editStyle.adoc |  25 +++
 .../guides/rgcfg/_rgcfg_configuring-core.adoc   |   8 +
 .../apache/isis/applib/annotation/Property.java |  37 ++---
 .../applib/annotation/PropertyEditStyle.java    |  45 ++++++
 .../PropertyEditStyleConfiguration.java         |  42 +++++
 .../editstyle/PropertyEditStyleFacet.java       |  32 ++++
 .../PropertyEditStyleFacetAbstract.java         |  39 +++++
 .../PropertyEditStyleFacetAsConfigured.java     |  37 +++++
 .../PropertyEditStyleFacetFallBack.java         |  35 +++++
 ...rtyEditStyleFacetFromPropertyAnnotation.java |  76 +++++++++
 .../PropertyAnnotationFacetFactory.java         |  54 ++++++-
 .../PropertyEditStyleConfiguration_Test.java    |  73 +++++++++
 ...itStyleFacetFromPropertyAnnotation_Test.java | 154 +++++++++++++++++++
 .../viewer/wicket/ui/panels/PanelAbstract.java  |   5 -
 15 files changed, 635 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property.adoc
index 3bcb1a1..2c73405 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property.adoc
@@ -32,6 +32,12 @@ It is also possible to apply the annotation to actions of domain services that a
 |whether a property can be modified or cleared from within the UI
 
 
+|xref:../rgant/rgant.adoc#_rgant-Property_editStyle[`editStyle()`]
+|`DIALOG`, `INLINE`, `AS_CONFIGURED` +
+(`AS_CONFIGURED`)
+|(`1.15.0-SNAPSHOT`) how a property should be edited within the UI
+
+
 |xref:../rgant/rgant.adoc#_rgant-Property_fileAccept[`fileAccept()`]
 |Media type or file extension
 |Hints the files to be uploaded to a xref:../rgcms/rgcms.adoc#_rgcms_classes_value-types_Blob[`Blob`]
@@ -131,6 +137,7 @@ so that boilerplate-busting tools such as link:https://projectlombok.org/[Projec
 
 include::_rgant-Property_domainEvent.adoc[leveloffset=+1]
 include::_rgant-Property_editing.adoc[leveloffset=+1]
+include::_rgant-Property_editStyle.adoc[leveloffset=+1]
 include::_rgant-Property_fileAccept.adoc[leveloffset=+1]
 include::_rgant-Property_hidden.adoc[leveloffset=+1]
 include::_rgant-Property_maxLength.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_editStyle.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_editStyle.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_editStyle.adoc
new file mode 100644
index 0000000..70342de
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_editStyle.adoc
@@ -0,0 +1,25 @@
+[[_rgant-Property_editStyle]]
+= `editStyle()` (`1.15.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+:_basedir: ../../
+:_imagesdir: images/
+
+
+The `editStyle()` attribute is used to specify whether a domain object property is edited through a dialog box (similar to an action parameter form) or using an inline edit.
+
+If the attribute is not set, then thevalue of the xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration property] `isis.properties.editStyle` is used.
+If this is itself not set, then a dialog box is used.
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    @Property(
+        editStyle=PropertyEditStyle.INLINE
+    )
+    public int getNotes(){ ... }
+    public void setNotes(String notes) { ... }
+}
+----
+

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
index bacff5d..af617ab 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
@@ -582,6 +582,14 @@ If enabled, this configuration property will ensure that domain services only de
 |Whether objects' properties and collections can be edited directly (for objects annotated with xref:../rgant/rgant.adoc#_rgant-DomainObject_editing[`@DomainObject#editing()`]); see xref:../rgcfg/rgcfg.adoc#__rgcfg_configuring-core_isis-objects-editing[below] for further discussion.
 
 
+|`isis.properties.` +
+`editStyle`
+|`dialog`,`inline` +
+(`dialog`)
+|(`1.15.0-SNAPSHOT`) whether a domain object property is edited through a dialog box (similar to an action parameter form) or using an inline edit.
+Can be overridden on a property-by-property basis using xref:../rgant/rgant.adoc#_rgant-Property_editStyle[`@Property#editStyle()`]).
+
+
 |`isis.persistor.` +
 `disable` +
 `ConcurrencyChecking`

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
index 52cac59..00ca5f8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
@@ -19,14 +19,19 @@
 
 package org.apache.isis.applib.annotation;
 
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.jdo.annotations.NotPersistent;
+
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
 import org.apache.isis.applib.spec.Specification;
 import org.apache.isis.applib.value.Blob;
 import org.apache.isis.applib.value.Clob;
 
-import javax.jdo.annotations.NotPersistent;
-import java.lang.annotation.*;
-
 /**
  * Domain semantics for domain object property.
  */
@@ -63,18 +68,12 @@ public @interface Property {
     Class<? extends PropertyDomainEvent<?,?>> domainEvent() default PropertyDomainEvent.Default.class;
 
 
-
-
-
     /**
      * Indicates where the property is not visible to the user.
      */
     Where hidden() default Where.NOWHERE;
 
 
-
-
-
     /**
      * Whether the properties of this domain object can be edited, or collections of this object be added to/removed from.
      *
@@ -91,7 +90,10 @@ public @interface Property {
     String editingDisabledReason() default "";
 
 
-
+    /**
+     * How the properties of this domain object are be edited, either {@link PropertyEditStyle#DIALOG dialog} or {@link PropertyEditStyle#INLINE inline}.
+     */
+    PropertyEditStyle editStyle() default PropertyEditStyle.AS_CONFIGURED;
 
 
     /**
@@ -118,8 +120,6 @@ public @interface Property {
 
 
 
-
-
     /**
      * Whether the property edit should be published.
      *
@@ -132,8 +132,6 @@ public @interface Property {
 
 
 
-
-
     /**
      * The maximum entry length of a field.
      *
@@ -145,8 +143,6 @@ public @interface Property {
 
 
 
-
-
     /**
      * The {@link org.apache.isis.applib.spec.Specification}(s) to be satisfied by this property.
      *
@@ -157,7 +153,6 @@ public @interface Property {
     Class<? extends Specification>[] mustSatisfy() default {};
 
 
-    // //////////////////////////////////////
 
     /**
      * Indicates that the property should be excluded from snapshots.
@@ -170,8 +165,6 @@ public @interface Property {
 
 
 
-
-
     /**
      * Whether this property is optional or is mandatory (ie required).
      *
@@ -185,8 +178,6 @@ public @interface Property {
 
 
 
-
-
     /**
      * Regular expression pattern that a value should conform to, and can be formatted as.
      */
@@ -208,8 +199,6 @@ public @interface Property {
 
 
 
-
-
     /**
      * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
      *
@@ -221,4 +210,6 @@ public @interface Property {
      */
     String fileAccept() default "";
 
+
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyEditStyle.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyEditStyle.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyEditStyle.java
new file mode 100644
index 0000000..e059cdb
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyEditStyle.java
@@ -0,0 +1,45 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+/**
+ * How editing of properties should be performed
+ */
+public enum PropertyEditStyle {
+    /**
+     * Edit the property according to the default edit style policy configured in <tt>isis.properties</tt>.
+     *
+     * <p>
+     *      If no editing style is configured, then {@link #DIALOG} is assumed.
+     * </p>
+     */
+    AS_CONFIGURED,
+    /**
+     * Edit the property using a dialog (similar to action parameter, but just a single property being changed)
+     */
+    DIALOG,
+    /**
+     * Edit the property inline.
+     *
+     * <p>
+     *     In the Wicket viewer this is implemented using the <code>x-editable</code> library
+     * </p>
+     */
+    INLINE
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleConfiguration.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleConfiguration.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleConfiguration.java
new file mode 100644
index 0000000..86f89f0
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleConfiguration.java
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.metamodel.facets.properties.editstyle;
+
+import org.apache.isis.applib.annotation.PropertyEditStyle;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+
+
+public class PropertyEditStyleConfiguration {
+
+    private PropertyEditStyleConfiguration() {}
+
+    public static final String EDIT_STYLE_KEY = "isis.properties.editStyle";
+
+    public static PropertyEditStyle parse(final IsisConfiguration configuration) {
+        final String configuredValue = configuration.getString(EDIT_STYLE_KEY);
+        return PropertyEditStyleConfiguration.parse(configuredValue);
+    }
+
+    private static PropertyEditStyle parse(final String value) {
+        return value != null && value.trim().equalsIgnoreCase(PropertyEditStyle.INLINE.name())
+                ? PropertyEditStyle.INLINE
+                : PropertyEditStyle.DIALOG;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacet.java
new file mode 100644
index 0000000..6cd0c0c
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacet.java
@@ -0,0 +1,32 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.metamodel.facets.properties.editstyle;
+
+import org.apache.isis.applib.annotation.PropertyEditStyle;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+
+/**
+ * Indicates that the editing of the property should be published.
+ */
+public interface PropertyEditStyleFacet extends Facet {
+
+    PropertyEditStyle editStyle();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetAbstract.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetAbstract.java
new file mode 100644
index 0000000..daa26e4
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetAbstract.java
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.metamodel.facets.properties.editstyle;
+
+import org.apache.isis.applib.annotation.PropertyEditStyle;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+
+public abstract class PropertyEditStyleFacetAbstract extends FacetAbstract
+        implements PropertyEditStyleFacet {
+
+
+    public static Class<? extends Facet> type() {
+        return PropertyEditStyleFacetAbstract.class;
+    }
+
+    public PropertyEditStyleFacetAbstract(final FacetHolder holder) {
+        super( type(), holder, Derivation.NOT_DERIVED);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetAsConfigured.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetAsConfigured.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetAsConfigured.java
new file mode 100644
index 0000000..fe3e3d8
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetAsConfigured.java
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.metamodel.facets.properties.editstyle;
+
+import org.apache.isis.applib.annotation.PropertyEditStyle;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+
+public class PropertyEditStyleFacetAsConfigured extends PropertyEditStyleFacetAbstract {
+
+    private final PropertyEditStyle editStyle;
+
+    public PropertyEditStyleFacetAsConfigured(final PropertyEditStyle editStyle, final FacetHolder holder) {
+        super(holder);
+        this.editStyle = editStyle;
+    }
+
+    @Override public PropertyEditStyle editStyle() {
+        return editStyle;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFallBack.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFallBack.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFallBack.java
new file mode 100644
index 0000000..f649dce
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFallBack.java
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.metamodel.facets.properties.editstyle;
+
+import org.apache.isis.applib.annotation.PropertyEditStyle;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+
+public class PropertyEditStyleFacetFallBack extends PropertyEditStyleFacetAbstract {
+
+    public PropertyEditStyleFacetFallBack(final FacetHolder holder) {
+        super(holder);
+    }
+
+    @Override
+    public PropertyEditStyle editStyle() {
+        return PropertyEditStyle.DIALOG;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFromPropertyAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFromPropertyAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFromPropertyAnnotation.java
new file mode 100644
index 0000000..0209b57
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFromPropertyAnnotation.java
@@ -0,0 +1,76 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.metamodel.facets.properties.editstyle;
+
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyEditStyle;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+
+public class PropertyEditStyleFacetFromPropertyAnnotation extends PropertyEditStyleFacetAbstract {
+
+    private final PropertyEditStyle editStyle;
+
+    public PropertyEditStyleFacetFromPropertyAnnotation(final PropertyEditStyle editStyle, final FacetHolder holder) {
+        super( holder );
+        this.editStyle = editStyle;
+    }
+
+    public static PropertyEditStyleFacet create(
+            final Property property,
+            final IsisConfiguration configuration,
+            final FacetHolder holder) {
+
+        PropertyEditStyle editStyle = property != null? property.editStyle() : null;
+
+        if(editStyle == null) {
+                if (holder.containsDoOpFacet(PropertyEditStyleFacet.class)) {
+                    // do not replace
+                    return null;
+                }
+
+                return new PropertyEditStyleFacetFallBack(holder);
+        } else {
+
+            switch (editStyle) {
+                case DIALOG:
+                case INLINE:
+                    return new PropertyEditStyleFacetFromPropertyAnnotation(editStyle, holder);
+
+                case AS_CONFIGURED:
+                default:
+
+                    // do not replace
+                    if (holder.containsDoOpFacet(PropertyEditStyleFacet.class)) {
+                        return null;
+                    }
+
+                    editStyle = PropertyEditStyleConfiguration.parse(configuration);
+                    return new PropertyEditStyleFacetAsConfigured(editStyle, holder);
+            }
+        }
+
+    }
+
+    @Override
+    public PropertyEditStyle editStyle() {
+        return editStyle;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
index 489ed15..f59d216 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
@@ -19,12 +19,30 @@
 
 package org.apache.isis.core.metamodel.facets.properties.property;
 
-import org.apache.isis.applib.annotation.*;
+import java.lang.reflect.Method;
+
+import javax.annotation.Nullable;
+
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.Mandatory;
+import org.apache.isis.applib.annotation.MaxLength;
+import org.apache.isis.applib.annotation.MustSatisfy;
+import org.apache.isis.applib.annotation.NotPersisted;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.PostsPropertyChangedEvent;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyInteraction;
+import org.apache.isis.applib.annotation.RegEx;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.eventbus.PropertyChangedEvent;
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
 import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.metamodel.facetapi.*;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facetapi.FacetUtil;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facetapi.MetaModelValidatorRefiner;
 import org.apache.isis.core.metamodel.facets.Annotations;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
@@ -38,6 +56,8 @@ import org.apache.isis.core.metamodel.facets.objectvalue.regex.RegExFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.regex.TitleFacetFormattedByRegex;
 import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
 import org.apache.isis.core.metamodel.facets.propcoll.notpersisted.NotPersistedFacet;
+import org.apache.isis.core.metamodel.facets.properties.editstyle.PropertyEditStyleFacet;
+import org.apache.isis.core.metamodel.facets.properties.editstyle.PropertyEditStyleFacetFromPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.command.CommandFacetForPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.disabled.DisabledFacetForDisabledAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.disabled.DisabledFacetForPropertyAnnotation;
@@ -50,7 +70,18 @@ import org.apache.isis.core.metamodel.facets.properties.property.mandatory.Manda
 import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetInvertedByOptionalAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForMaxLengthAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForPropertyAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.modify.*;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromDefault;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForPostsPropertyChangedEventAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetAbstract;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetDefault;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyInteractionAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromDefault;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForPostsPropertyChangedEventAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.mustsatisfy.MustSatisfySpecificationFacetForMustSatisfyAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.mustsatisfy.MustSatisfySpecificationFacetForPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.NotPersistedFacetForNotPersistedAnnotationOnProperty;
@@ -67,9 +98,6 @@ import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorFor
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorForDeprecatedAnnotation;
 import org.apache.isis.core.metamodel.util.EventUtil;
 
-import javax.annotation.Nullable;
-import java.lang.reflect.Method;
-
 public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner {
 
     private final MetaModelValidatorForDeprecatedAnnotation postsPropertyChangedEventValidator = new MetaModelValidatorForDeprecatedAnnotation(PostsPropertyChangedEvent.class);
@@ -102,6 +130,7 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
         processOptional(processMethodContext);
         processRegEx(processMethodContext);
         processFileAccept(processMethodContext);
+        processEditStyle(processMethodContext);
     }
 
 
@@ -440,6 +469,19 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
         FacetUtil.addFacet(facet);
     }
 
+    void processEditStyle(final ProcessMethodContext processMethodContext) {
+        final Method method = processMethodContext.getMethod();
+        final FacetHolder holder = processMethodContext.getFacetHolder();
+
+
+        // else search for @Property(maxLength=...)
+        final Property property = Annotations.getAnnotation(method, Property.class);
+        PropertyEditStyleFacet facet =
+                PropertyEditStyleFacetFromPropertyAnnotation.create(property, getConfiguration(), holder);
+
+        FacetUtil.addFacet(facet);
+    }
+
 
     // //////////////////////////////////////
 

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleConfiguration_Test.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleConfiguration_Test.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleConfiguration_Test.java
new file mode 100644
index 0000000..882f2e3
--- /dev/null
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleConfiguration_Test.java
@@ -0,0 +1,73 @@
+package org.apache.isis.core.metamodel.facets.properties.editstyle;
+
+import org.jmock.Expectations;
+import org.jmock.auto.Mock;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.applib.annotation.PropertyEditStyle;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+
+import static org.hamcrest.CoreMatchers.is;
+
+public class PropertyEditStyleConfiguration_Test {
+
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(JUnitRuleMockery2.Mode.INTERFACES_AND_CLASSES);
+
+    @Mock
+    IsisConfiguration mockIsisConfiguration;
+
+    @Test
+    public void when_none() throws Exception {
+        context.checking(new Expectations() {{
+            oneOf(mockIsisConfiguration).getString("isis.properties.editStyle");
+            will(returnValue(null));
+        }});
+        PropertyEditStyle editStyle = PropertyEditStyleConfiguration.parse(mockIsisConfiguration);
+        Assert.assertThat(editStyle, is(PropertyEditStyle.DIALOG));
+    }
+
+    @Test
+    public void when_inline() throws Exception {
+        context.checking(new Expectations() {{
+            oneOf(mockIsisConfiguration).getString("isis.properties.editStyle");
+            will(returnValue("inline"));
+        }});
+        PropertyEditStyle editStyle = PropertyEditStyleConfiguration.parse(mockIsisConfiguration);
+        Assert.assertThat(editStyle, is(PropertyEditStyle.INLINE));
+    }
+
+    @Test
+    public void when_inline_mixed_case_and_superfluous_characters() throws Exception {
+        context.checking(new Expectations() {{
+            oneOf(mockIsisConfiguration).getString("isis.properties.editStyle");
+            will(returnValue(" inLIne "));
+        }});
+        PropertyEditStyle editStyle = PropertyEditStyleConfiguration.parse(mockIsisConfiguration);
+        Assert.assertThat(editStyle, is(PropertyEditStyle.INLINE));
+    }
+
+    @Test
+    public void when_dialog() throws Exception {
+        context.checking(new Expectations() {{
+            oneOf(mockIsisConfiguration).getString("isis.properties.editStyle");
+            will(returnValue("dialog"));
+        }});
+        PropertyEditStyle editStyle = PropertyEditStyleConfiguration.parse(mockIsisConfiguration);
+        Assert.assertThat(editStyle, is(PropertyEditStyle.DIALOG));
+    }
+
+    @Test
+    public void when_invalid() throws Exception {
+        context.checking(new Expectations() {{
+            oneOf(mockIsisConfiguration).getString("isis.properties.editStyle");
+            will(returnValue("garbage"));
+        }});
+        PropertyEditStyle editStyle = PropertyEditStyleConfiguration.parse(mockIsisConfiguration);
+        Assert.assertThat(editStyle, is(PropertyEditStyle.DIALOG));
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFromPropertyAnnotation_Test.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFromPropertyAnnotation_Test.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFromPropertyAnnotation_Test.java
new file mode 100644
index 0000000..e34ac23
--- /dev/null
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/editstyle/PropertyEditStyleFacetFromPropertyAnnotation_Test.java
@@ -0,0 +1,154 @@
+package org.apache.isis.core.metamodel.facets.properties.editstyle;
+
+import org.hamcrest.Matcher;
+import org.jmock.Expectations;
+import org.jmock.auto.Mock;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyEditStyle;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+
+public class PropertyEditStyleFacetFromPropertyAnnotation_Test {
+
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(JUnitRuleMockery2.Mode.INTERFACES_AND_CLASSES);
+
+    @Mock
+    IsisConfiguration mockConfiguration;
+
+    @Mock
+    FacetHolder mockFacetHolder;
+
+    @Mock
+    Property mockProperty;
+
+
+    public static class Create_Test extends PropertyEditStyleFacetFromPropertyAnnotation_Test {
+
+        @Test
+        public void when_annotated_with_dialog() throws Exception {
+
+            context.checking(new Expectations() {{
+                allowing(mockProperty).editStyle();
+                will(returnValue(PropertyEditStyle.DIALOG));
+
+                never(mockConfiguration);
+            }});
+
+            PropertyEditStyleFacet facet = PropertyEditStyleFacetFromPropertyAnnotation
+                    .create(mockProperty, mockConfiguration, mockFacetHolder);
+
+            Assert.assertThat(facet, is((Matcher) IsisMatchers.anInstanceOf(PropertyEditStyleFacetFromPropertyAnnotation.class)));
+            Assert.assertThat(facet.editStyle(), is(PropertyEditStyle.DIALOG));
+        }
+
+        @Test
+        public void when_annotated_with_inline() throws Exception {
+
+            context.checking(new Expectations() {{
+                allowing(mockProperty).editStyle();
+                will(returnValue(PropertyEditStyle.INLINE));
+
+                never(mockConfiguration);
+            }});
+
+
+            PropertyEditStyleFacet facet = PropertyEditStyleFacetFromPropertyAnnotation
+                    .create(mockProperty, mockConfiguration, mockFacetHolder);
+
+            Assert.assertThat(facet, is((Matcher) IsisMatchers.anInstanceOf(PropertyEditStyleFacetFromPropertyAnnotation.class)));
+            Assert.assertThat(facet.editStyle(), is(PropertyEditStyle.INLINE));
+        }
+
+        @Test
+        public void when_annotated_with_as_configured() throws Exception {
+
+            context.checking(new Expectations() {{
+                allowing(mockProperty).editStyle();
+                will(returnValue(PropertyEditStyle.AS_CONFIGURED));
+
+                oneOf(mockConfiguration).getString("isis.properties.editStyle");
+                will(returnValue(PropertyEditStyle.INLINE.name()));
+
+                allowing(mockFacetHolder).containsDoOpFacet(PropertyEditStyleFacet.class);
+                will(returnValue(false));
+            }});
+
+            PropertyEditStyleFacet facet = PropertyEditStyleFacetFromPropertyAnnotation
+                    .create(mockProperty, mockConfiguration, mockFacetHolder);
+
+            Assert.assertThat(facet, is((Matcher) IsisMatchers.anInstanceOf(PropertyEditStyleFacetAsConfigured.class)));
+            Assert.assertThat(facet.editStyle(), is(PropertyEditStyle.INLINE));
+        }
+
+        @Test
+        public void when_annotated_with_as_configured_but_already_has_doop_facet() throws Exception {
+
+            context.checking(new Expectations() {{
+                allowing(mockProperty).editStyle();
+                will(returnValue(PropertyEditStyle.AS_CONFIGURED));
+
+                oneOf(mockFacetHolder).containsDoOpFacet(PropertyEditStyleFacet.class);
+                will(returnValue(true));
+
+                never(mockConfiguration);
+            }});
+
+            PropertyEditStyleFacet facet = PropertyEditStyleFacetFromPropertyAnnotation
+                    .create(mockProperty, mockConfiguration, mockFacetHolder);
+
+            Assert.assertThat(facet, is(nullValue()));
+        }
+
+        @Test
+        public void when_not_annotated() throws Exception {
+
+            context.checking(new Expectations() {{
+                allowing(mockProperty).editStyle();
+                will(returnValue(null));
+
+                allowing(mockFacetHolder).containsDoOpFacet(PropertyEditStyleFacet.class);
+                will(returnValue(false));
+
+                never(mockConfiguration);
+            }});
+
+            PropertyEditStyleFacet facet = PropertyEditStyleFacetFromPropertyAnnotation
+                    .create(mockProperty, mockConfiguration, mockFacetHolder);
+
+            Assert.assertThat(facet.editStyle(), is(PropertyEditStyle.DIALOG));
+            Assert.assertThat(facet, is((Matcher) IsisMatchers.anInstanceOf(PropertyEditStyleFacetFallBack.class)));
+        }
+
+        @Test
+        public void when_not_annotated_but_already_has_doop_facet() throws Exception {
+
+            context.checking(new Expectations() {{
+                allowing(mockProperty).editStyle();
+                will(returnValue(null));
+
+                allowing(mockFacetHolder).containsDoOpFacet(PropertyEditStyleFacet.class);
+                will(returnValue(true));
+
+                never(mockConfiguration);
+            }});
+
+            PropertyEditStyleFacet facet = PropertyEditStyleFacetFromPropertyAnnotation
+                    .create(mockProperty, mockConfiguration, mockFacetHolder);
+
+            Assert.assertThat(facet, is(nullValue()));
+        }
+
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/3b734415/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java
index 0995a80..4b43e78 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java
@@ -116,11 +116,6 @@ public abstract class PanelAbstract<T extends IModel<?>> extends Panel {
         return UiHintContainer.Util.hintContainerOf(this);
     }
 
-    // seemes to be unused
-    public <T extends UiHintContainer> T getUiHintContainer(final Class<T> additionalConstraint) {
-        return UiHintContainer.Util.hintContainerOf(this, additionalConstraint);
-    }
-
 
     // ///////////////////////////////////////////////////////////////////
     // Convenience