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 2014/05/24 14:55:04 UTC

svn commit: r1597279 - in /isis/site/trunk/content: components/viewers/wicket/tips-and-workarounds.md documentation.md

Author: danhaywood
Date: Sat May 24 12:55:04 2014
New Revision: 1597279

URL: http://svn.apache.org/r1597279
Log:
ISIS-582 workaround page

Added:
    isis/site/trunk/content/components/viewers/wicket/tips-and-workarounds.md
Modified:
    isis/site/trunk/content/documentation.md

Added: isis/site/trunk/content/components/viewers/wicket/tips-and-workarounds.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/components/viewers/wicket/tips-and-workarounds.md?rev=1597279&view=auto
==============================================================================
--- isis/site/trunk/content/components/viewers/wicket/tips-and-workarounds.md (added)
+++ isis/site/trunk/content/components/viewers/wicket/tips-and-workarounds.md Sat May 24 12:55:04 2014
@@ -0,0 +1,36 @@
+Title: Tips and Workarounds
+
+
+##Rendering of abstract properties in tables ([ISIS-582]())
+
+Suppose you have a hierarchy of classes where a property is derived and abstract in the superclass, concrete implementations in the subclasses.  For example:
+
+    public abstract class LeaseTerm {
+        ...
+        public abstract BigDecimal getEffectiveValue(); 
+        ...
+    }
+    
+    public class LeaseTermForIndexableTerm extends LeaseTerm {
+        ...
+        public BigDecimal getEffectveValue() { ... }
+        ...
+    }
+
+Currently the Wicket viewer will not render the property in tables (though the property is correctly rendered in views):
+
+The work-around is simple enough; make the method concrete in the superclass and return a dummy implementation, eg:
+
+    public abstract class LeaseTerm {
+        ...
+        public BigDecimal getEffectiveValue() {
+            // workaround for ISIS-582
+            return null;
+        }
+        ...
+    }
+
+Alternatively the implementation could throw a `RuntimeException`, eg 
+
+    throw new RuntimeException("never called; workaround for ISIS-582");
+    
\ No newline at end of file

Modified: isis/site/trunk/content/documentation.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/documentation.md?rev=1597279&r1=1597278&r2=1597279&view=diff
==============================================================================
--- isis/site/trunk/content/documentation.md (original)
+++ isis/site/trunk/content/documentation.md Sat May 24 12:55:04 2014
@@ -428,6 +428,7 @@ For both:
 * [Bookmarked pages (sliding panel)](components/viewers/wicket/bookmarks.html)
 * [Recent pages (drop down)](components/viewers/wicket/recent-pages.html)
 * [Hints and copy URL](components/viewers/wicket/hints-and-copy-url.html)
+* [Tips and workarounds](components/viewers/wicket/tips-and-workarounds.html)
 
 #### Changing Pages