Author: buildbot
Date: Sat Feb 28 16:16:34 2015
New Revision: 941751

Log:
Staging update by buildbot for isis

Added:
    
websites/staging/isis/trunk/content/more-advanced-topics/how-to-suppress-contributions-to-action-parameter.html
Removed:
    
websites/staging/isis/trunk/content/more-advanced-topics/How-to-suppress-contributions.html
Modified:
    websites/staging/isis/trunk/cgi-bin/   (props changed)
    websites/staging/isis/trunk/content/   (props changed)
    
websites/staging/isis/trunk/content/more-advanced-topics/how-to-01-062-How-to-decouple-dependencies-using-contributions.html

Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Feb 28 16:16:34 2015
@@ -1 +1 @@
-1661859
+1662956

Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Feb 28 16:16:34 2015
@@ -1 +1 @@
-1661859
+1662956

Modified: 
websites/staging/isis/trunk/content/more-advanced-topics/how-to-01-062-How-to-decouple-dependencies-using-contributions.html
==============================================================================
--- 
websites/staging/isis/trunk/content/more-advanced-topics/how-to-01-062-How-to-decouple-dependencies-using-contributions.html
 (original)
+++ 
websites/staging/isis/trunk/content/more-advanced-topics/how-to-01-062-How-to-decouple-dependencies-using-contributions.html
 Sat Feb 28 16:16:34 2015
@@ -437,9 +437,11 @@ dependencies between entities, but as yo
 
 <p>For both <code>Customer</code> and <code>FixedAsset</code> (and any other 
future implementation) we would want to have some means to add and remove 
<code>CommunicationChannel</code>s).  Rather than having very similar 
collections and actions in each, we can implement the requirement by defining 
the behaviour in the <code>communicationChannels</code> module, through a 
domain service.  It would look something like:</p>
 
-<pre><code>public class CommunicationChannelContributions {
+<pre><code>@DomainService(
+    nature=NatureOfService.VIEW_CONTRIBUTIONS_ONLY
+)
+public class CommunicationChannelContributions {
 
-    @NotInServiceMenu
     public CommunicationChannelOwner addPostalAddress(
                     final CommunicationChannelOwner owner,
                     final @Named("Address line 1") String addressLine1,
@@ -448,17 +450,28 @@ dependencies between entities, but as yo
         ...
     }
 
-    @NotInServiceMenu
-    @NotContributed(As.ACTION)
+    @Action(
+        semantics=SemanticsOf.SAFE
+    )
+    @ActionLayout(
+        contributed=Contributed.AS_ASSOCIATION)
+    }
+    @CollectionLayout(
+        render=RenderType.EAGERLY
+    )
     public Collection&lt;CommunicationChannel&gt; communicationChannels(
-                    final CommunicationOwner owner) {
+                    final CommunicationChannelOwner owner) {
         ...
     }
 
-    @NotInServiceMenu
-    @NotContributed(As.ACTION)
+    @Action(
+        semantics=SemanticsOf.SAFE
+    )
+    @ActionLayout(
+        contributed=Contributed.AS_ASSOCIATION)
+    }
     public CommunicationChannel preferredCommunicationChannels(
-                    final CommunicationOwner owner) {
+                    final CommunicationChannelOwner owner) {
         ...
     }
 
@@ -467,13 +480,13 @@ dependencies between entities, but as yo
 
 <p>The first action, <code>addPostalAddress</code> will be rendered seemingly 
as a regular action for all implementations of 
<code>CommunicationChannelOwner</code>, but with that parameter omitted.  This 
is a contributed action.</p>
 
-<p>The second action - whose implementation will be some repository query to 
search for all <code>CommunicationChannel</code>s for the given owner - will be 
rendered as a collection of the owner; this is a contributed collection.  The 
<code>@NotContributed(As.ACTION)</code> suppresses the action from being 
contributed as an action also.</p>
+<p>The second action - whose implementation will be some repository query to 
search for all <code>CommunicationChannel</code>s for the given owner - will be 
rendered as a collection of the owner; this is a contributed collection.  The 
<code>@ActionLayout(contributed=Contributed.AS_ASSOCIATION)</code> suppresses 
the action from being contributed as an action also.  Note that the action must 
have safe semantics, specified using 
<code>@Action(semantics=SemanticsOf.SAFE)</code>; otherwise the rendering of 
the collection could cause unwanted side-effects.  Note also that it is valid 
to apply a <code>@CollectionLayout</code> annotation; or this could be 
specified using a <code>Xxx.layout.json</code> file for each contributee 
(implementing <code>CommunicationChannelOwner</code>).</p>
 
-<p>Finally, the third action - that again will be some sort of repository 
query - will be rendered as a property o fhte owner; this is a contributed 
property.  Again, the <code>@NotContributed(As.ACTION)</code> suppresses the 
action from being contributed as an action also.</p>
+<p>Finally, the third action - that again will be some sort of repository 
query - will be rendered as a property of hte owner; this is a contributed 
property.  Again, the action must have safe semantics, specified using 
<code>@Action(semantics=SemanticsOf.SAFE)</code>.  And, again, , the 
<code>@ActionLayout(contributed=Contributed.AS_ASSOCIATION)</code> suppresses 
the action from being contributed as an action also.  Analogously to the 
contributed collection, a <code>@PropertyLayout</code> annotation could be also 
be specified.</p>
 
 <h2>See also</h2>
 
-<p>For another example of contributions, see <a 
href="./how-to-suppress-contributions.html">this page</a> describing how to 
suppress contributions for one action parameter but not another.</p>
+<p>See also: how to <a 
href="./how-to-suppress-contributions-to-action-parameter.html">suppress 
contributions for one action parameter</a> but not another.</p>
 
 
 

Added: 
websites/staging/isis/trunk/content/more-advanced-topics/how-to-suppress-contributions-to-action-parameter.html
==============================================================================
--- 
websites/staging/isis/trunk/content/more-advanced-topics/how-to-suppress-contributions-to-action-parameter.html
 (added)
+++ 
websites/staging/isis/trunk/content/more-advanced-topics/how-to-suppress-contributions-to-action-parameter.html
 Sat Feb 28 16:16:34 2015
@@ -0,0 +1,592 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+
+    <meta charset="utf-8">
+      <title></title>
+    <meta name="description" content="">
+    <meta name="author" content="">
+
+    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
+    <!--[if lt IE 9]>
+      <script 
src="http://html5shim.googlecode.com/svn/trunk/html5.js";></script>
+    <![endif]-->
+
+    
+    <!-- Le styles -->
+    <link href="./../bootstrap-3.0.0/css/bootstrap.css" rel="stylesheet">
+    <link href="./../prettify.css" rel="stylesheet">
+
+    <style type="text/css">
+        body {
+          padding-top: 60px;
+        }
+        .sprite {
+            display: inline-block;
+            height: 20px;
+            margin: 0 auto 4px;
+            outline: medium none;
+            text-indent: -999em;
+            width: 24px;
+            background-image: url('./../images/sprites.png');
+            background-repeat: no-repeat;
+            overflow: hidden;
+            cursor: pointer;
+        }
+        .edit-page {
+            display: inline-block;
+            height: 20px;
+            margin: 0 auto 4px;
+            outline: medium none;
+            text-indent: -999em;
+            width: 24px;
+            background-image: url('./../images/edit.png');
+            background-repeat: no-repeat;
+            overflow: hidden;
+            cursor: pointer;
+        }
+        .fb-share {
+            background-position: 0px -40px;
+        }
+        .gp-share {
+            background-position: 0px 0px;
+        }
+        .tw-share {
+            background-position: 0px -80px;
+        }
+        .markdown-content {
+            min-height: 500px;
+        }
+        .book-image img {
+          border: 1px;
+          border-style: solid;
+        }
+        .release-matrix .heading {
+            background-color: #eeeeee;
+        }
+        .release-matrix .new {
+            color: #dd0000;
+            font-weight: bolder;
+        }
+        .stub,.note {
+            position: relative;
+            padding: 7px 15px;
+            margin-bottom: 18px;
+            color: #404040;
+            background-color: #eedc94;
+            background-repeat: repeat-x;
+            background-image: -khtml-gradient(linear, left top, left bottom, 
from(#fceec1), to(#eedc94));
+            background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
+            background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
+            background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(0%, #fceec1), color-stop(100%, #eedc94));
+            background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
+            background-image: -o-linear-gradient(top, #fceec1, #eedc94);
+            background-image: linear-gradient(top, #fceec1, #eedc94);
+            filter: 
progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', 
endColorstr='#eedc94', GradientType=0);
+            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+            border-color: #eedc94 #eedc94 #e4c652;
+            border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 
0.25);
+            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+            border-width: 1px;
+            border-style: solid;
+            -webkit-border-radius: 4px;
+            -moz-border-radius: 4px;
+            border-radius: 4px;
+            -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+            -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+        }
+        
+        div.XXXisis-tweak form {
+            margin-top: 6px;
+            margin-bottom: -2px;
+        }
+        
+        div.row div.col-md-12 {
+          border-top: 1px solid #eeeeee;
+       }
+        
+        
+        /* Isis specific stuff */
+
+        div.row div.col-md-12 {
+          margin-top: 20px;
+        }
+
+        .container {
+          width: 940px;
+        }
+
+        .markdown-content .documentation .span-one-third p {
+          margin-bottom: 0px;
+        }
+
+        .container .markdown-content .group,
+        .markdown-content .documentation .group {
+          margin-top: 9px;
+        }
+
+        .container .group h2,
+        .documentation .group h2 {
+          border-bottom: 1px solid #DDD
+        }
+
+        .container h2 a[name],
+        .documentation h2 a[name] {
+            padding-top: 50px;
+            margin-top: -50px;
+        }
+
+        .apacheconeu2014 h2 {
+          margin-top: 80px;
+        }
+        
+        .container h2 a[name],
+        .container h3 a[name],
+        .container h4 a[name],
+        .documentation h2 a[name],
+        .documentation h3 a[name],
+        .documentation h4 a[name] {
+            color: black;
+            display: inline-block; 
+        }
+        .container h2 a[name]:hover,
+        .container h3 a[name]:hover,
+        .container h4 a[name]:hover,
+        .documentation h2 a[name]:hover,
+        .documentation h3 a[name]:hover,
+        .documentation h4 a[name]:hover {
+            text-decoration: none;
+        }
+
+        .documentation h2 a:not([name]),
+        .documentation h3 a:not([name]),
+        .documentation h4 a:not([name]) {
+          /* same as code style */
+          padding: 0 3px 2px;
+          font-family: Monaco, Andale Mono, Courier New, monospace;
+          font-size: 12px;
+          -webkit-border-radius: 3px;
+          -moz-border-radius: 3px;
+          border-radius: 3px;
+          padding: 1px 3px;
+        }
+        
+        .carousel-indicators li {
+          border: 1px solid rgb(192,70,1);
+        }
+
+        .carousel-indicators li.active {
+          background-color: rgb(192,70,1);
+        }
+        
+        .carousel-control .icon-prev,
+        .carousel-control .icon-next {
+          color: rgb(192,70,1);
+          font-size: 60px;
+        }
+        
+        .page-header {
+          margin-top: 0px;
+        }
+
+        .container blockquote p {
+            font-size: small;
+        }
+
+        .container blockquote p:not([author]) {
+            font-style: italic;
+        }
+
+        .container blockquote p {
+            font-size: small;
+            font-style: italic;
+            font-weight: bold;
+        }
+        
+        footer hr {
+            margin-top: 100px;
+        }
+
+        .markdown-content img {
+            margin-top: 10px;
+            margin-bottom: 20px;
+        }
+
+        .markdown-content a img {
+            margin-top: 0px;
+            margin-bottom: 0px;
+        }
+
+        
+        #forkongithub a{
+            display: none;
+            background:#090;
+            color:#fff;
+            text-decoration:none;
+            font-family:arial, sans-serif;
+            text-align:center;
+            font-weight:bold;
+            padding:5px 40px;
+            font-size:1rem;
+            line-height:2rem;
+            position:relative;
+            transition:0.5s;
+        }
+        #forkongithub a:hover{
+            background:#0D0;
+            color:#fff;
+        }
+        #forkongithub a::before,
+        #forkongithub a::after{
+            content:"";width:100%;
+            display:block;
+            position:fixed;
+            top:1px;
+            left:0;
+            height:1px;
+            background:#fff;
+            z-index: 9999;
+        }
+        #forkongithub a::after{
+            bottom:1px;
+            top:auto;
+        }
+        @media screen and (min-width:768px){
+            #forkongithub{
+                position:fixed;
+                display:block;
+                top:0;
+                right:0;
+                width:250px;
+                overflow:hidden;
+                height:250px;
+                z-index: 9999;
+            }
+            #forkongithub a{
+                display:inherit;
+                width:250px;
+                position:fixed;
+                font-size:small;
+                top:40px;
+                right:-60px;
+                transform:rotate(45deg);
+                -webkit-transform:rotate(45deg);
+                -ms-transform:rotate(45deg);
+                box-shadow:4px 4px 10px rgba(0,0,0,0.8);
+            }
+        }        
+    </style>
+
+    <!-- courtesy of http://codepo8.github.io/css-fork-on-github-ribbon/ -->
+    <span id="forkongithub">
+        <a href="https://github.com/apache/isis";>Fork me on GitHub</a>
+    </span>
+
+    <script type="text/javascript">
+      function fbshare () {
+          window.open(
+                  "http://www.facebook.com/sharer/sharer.php?u="+document.URL,
+                  'Share on Facebook',
+                  'width=640,height=426');
+      };
+      function gpshare () {
+          window.open(
+                  "https://plus.google.com/share?url="+document.URL,
+                  'Share on Google+',
+                  'width=584,height=385');
+      };
+      function twshare () {
+          window.open(
+                  
"https://twitter.com/intent/tweet?url="+document.URL+"&text=";,
+                  'Share on Twitter',
+                  'width=800,height=526');
+      };
+    </script>
+
+    <!-- Le fav and touch icons -->
+    <link rel="shortcut icon" href="./../images/favicon.ico">
+
+    <script src="./../javascript/prettify.js" type="text/javascript"></script>
+    
+    <script src="//code.jquery.com/jquery.js"></script>
+    <script src="./../javascript/prettyprint.js"></script>
+    <script src="./../bootstrap-3.0.0/js/bootstrap.js"></script>
+
+
+    <script src="http://platform.twitter.com/widgets.js"; 
type="text/javascript"></script>
+    <!--
+    <DISABLEDscript src="./../javascript/common.js"></DISABLEDscript>
+    -->
+
+    
+    
+    
+
+    <script>
+    $(function () { prettyPrint() })
+    $().dropdown()
+    </script>
+
+    
+  </head>
+
+  <body>
+
+    <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
+      <div class="container">
+        <a class="navbar-brand" href="./../index.html">Apache Isis&trade;</a>
+        <ul class="nav navbar-nav">
+
+          <li class="dropdown">
+            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Demos<b 
class="caret"></b></a>
+            <ul class="dropdown-menu">
+              <li><a 
href="./../intro/elevator-pitch/isis-in-pictures.html">Screenshots</a></li>
+              <li><a 
href="./../intro/tutorials/screencasts.html">Screencasts&nbsp;<img 
src="./../images/tv_show-25.png"></a></li>
+              <li><a href="./../intro/powered-by/powered-by.html">Powered 
by</a></li>
+              <li><a href="http://isisdemo.mmyco.co.uk/"; 
target="_blank">Online Demo</a></li>
+            </ul>
+          </li>
+
+          <li><a href="./../documentation.html">Documentation</a></li>
+
+          <li class="dropdown">
+            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">Downloads<b class="caret"></b></a>
+            <ul class="dropdown-menu">
+              <li><a 
href="./../intro/getting-started/simpleapp-archetype.html">Isis (Maven 
archetype)</a></li>
+              <li><a href="./../download.html">Isis (downloads)</a></li>
+              <li><a href="http://www.isisaddons.org"; target="_blank">Isis 
Add-ons (not ASF)</a></li>
+            </ul>
+          </li>
+
+          <li class="dropdown">
+            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Help<b 
class="caret"></b></a>
+            <ul class="dropdown-menu">
+              <li><a href="./../support.html">Mailing Lists</a></li>
+              <li><a href="http://isis.markmail.org/search/?q="; 
target="_blank">Mailing List Archives</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/ISIS"; 
target="_blank">JIRA</a></li>
+              <li><a href="http://github.com/apache/isis"; 
target="_blank">Github mirror</a></li>
+              <li><a href="http://stackoverflow.com/questions/tagged/isis"; 
target="_blank">Stack Overflow</a></li>
+              <li><a href="./../contributors/contributing.html">How to 
contribute</a></li>
+            </ul>
+          </li>
+
+
+          <li class="dropdown navbar-right">
+            <a href="#" class="dropdown-toggle" data-toggle="dropdown">@ASF<b 
class="caret"></b></a>
+            <ul class="dropdown-menu">
+              <li>
+                <a href="http://www.apache.org/"; target="_blank">Apache 
Homepage <i class="icon-share-alt"></i></a>
+              </li>
+              <li>
+                <a href="http://www.apache.org/licenses/"; 
target="_blank">Licenses <i class="icon-share-alt"></i></a>
+              </li>
+              <li>
+                <a href="http://www.apache.org/security/"; 
target="_blank">Security <i class="icon-share-alt"></i></a>
+              </li>
+              <li>
+                <a href="http://www.apache.org/foundation/sponsorship.html"; 
target="_blank">Sponsorship <i class="icon-share-alt"></i></a>
+              </li>
+              <li>
+                <a href="http://www.apache.org/foundation/thanks.html";>Thanks 
<i class="icon-share-alt"></i></a>
+              </li>
+              <li>
+                <a href="./../more-thanks.html">More thanks <i 
class="icon-share-alt"></i></a>
+              </li>
+            </ul>
+          </li>
+      </ul>
+
+        <FORM class="navbar-form navbar-right" 
id="searchbox_012614087480249044419:dn-q5gtwxya" 
action="http://www.google.com/cse";>
+        <div class="form-group">
+          <input type="hidden" name="cx" 
value="012614087480249044419:dn-q5gtwxya">
+          <INPUT type="hidden" name="cof" value="FORID:0">
+          <INPUT class="form-control" name="q" type="text" 
placeholder="Search">
+        </div>
+      </FORM>
+
+
+      </div>
+
+
+  </nav>
+
+    <div class="container">
+      <div class="markdown-content">
+      
+
+<div class="page-header">
+<p><a href="./../documentation.html">Docs</a>&nbsp;&raquo&nbsp;<a 
href="./../more-advanced-topics/about.html">More Advanced Topics</a></p>
+<h1>
+
+</h1>
+</div>
+
+<h2>How to suppress contributions to action parameters</h2>
+
+<p>If a contributed action has multiple parameters, then that action will be 
contributed to each of the parameter types.
+While this will often be what you want (or at least harmless), on some 
occasions you may want to suppress the contributed
+action on one of those parameter types.</p>
+
+<p>The <a href="https://github.com/isisaddons/isis-app-kitchensink";>kitchen 
sink app</a> (part of <a href="http://www.isisaddons.org/";>isisaddons.org</a>, 
not ASF)
+includes an example showing how this can be done.</p>
+
+<p>In its <code>contributee</code> package there are two entities:</p>
+
+<ul>
+<li><a 
href="https://github.com/isisaddons/isis-app-kitchensink/blob/262e3bc149ac0d82757738339af9683668f44155/dom/src/main/java/org/isisaddons/app/kitchensink/dom/contrib/contributee/Person.java";>Person</a></li>
+<li><a 
href="https://github.com/isisaddons/isis-app-kitchensink/blob/262e3bc149ac0d82757738339af9683668f44155/dom/src/main/java/org/isisaddons/app/kitchensink/dom/contrib/contributee/FoodStuff.java";>FoodStuff</a></li>
+</ul>
+
+<p>and in its <code>contributed</code> package there is one entity:</p>
+
+<ul>
+<li><a 
href="https://github.com/isisaddons/isis-app-kitchensink/blob/262e3bc149ac0d82757738339af9683668f44155/dom/src/main/java/org/isisaddons/app/kitchensink/dom/contrib/contributed/Preference.java";>Preference</a></li>
+</ul>
+
+<p>eg Mary LIKEs Apple, Mungo HATEs Banana, Midge LOVEs Oranges</p>
+
+<p>Neither <code>Person</code> nor <code>FoodStuff</code> knows about 
<code>Preference</code>s; the <code>Preference</code> is the tuple that 
associates the two together.</p>
+
+<p>The <a 
href="https://github.com/isisaddons/isis-app-kitchensink/blob/262e3bc149ac0d82757738339af9683668f44155/dom/src/main/java/org/isisaddons/app/kitchensink/dom/contrib/contributed/PreferenceContributions.java";>PreferenceContributions</a>
 service contributes the following:</p>
+
+<ul>
+<li><code>likes(...)</code> - a contributed collection to 
<code>Person</code>:</li>
+</ul>
+
+<pre>
+    @Action(
+            semantics = SemanticsOf.SAFE
+    )
+    @ActionLayout(
+            contributed = Contributed.AS_ASSOCIATION
+    )
+    public List<FoodStuff> likes(final Person person) { ... }
+</pre>
+
+<ul>
+<li><code>firstLove(...)</code> - contributed property, also to 
<code>Person</code></li>
+</ul>
+
+<pre>
+    @Action(semantics = SemanticsOf.SAFE)
+    @ActionLayout(
+            contributed = Contributed.AS_ASSOCIATION
+    )
+    public FoodStuff firstLove(final Person person) { ... }
+</pre>
+
+<ul>
+<li><code>addPreference(...)</code> - a contributed action to both 
<code>Person</code> and <code>FoodStuff</code></li>
+</ul>
+
+<pre>
+    public Preference addPreference(
+            final Person person,
+            final @Named("Type") Preference.PreferenceType preferenceType,
+            final FoodStuff foodStuff) { ... }
+</pre>
+
+<ul>
+<li><code>removePreference(...)</code> - a contributed action to both 
<code>Person</code> and <code>FoodStuff</code></li>
+</ul>
+
+<pre>
+    public Person removePreference(final Person person, final FoodStuff 
foodStuff) {
+        final List<Preference> preferences1 = preferences.listAllPreferences();
+        for (Preference preference : preferences1) { ... }
+</pre>
+
+<p>While <code>addPreference(...)</code> and 
<code>removePreference(...)</code> are contributed to both <code>Person</code> 
and <code>FoodStuff</code>, each customizes the representation of those action 
(and in the case of <code>FoodStuff</code>, hides one of them completely).</p>
+
+<p>For the <code>Person</code> entity, the actions are associated with the 
(contributed) <code>likes</code> collection:</p>
+
+<p><img src="images/suppressing-contributions-person.png" width="800px"/></p>
+
+<p>which is accomplished using this <a 
href="https://github.com/isisaddons/isis-app-kitchensink/blob/262e3bc149ac0d82757738339af9683668f44155/dom/src/main/java/org/isisaddons/app/kitchensink/dom/contrib/contributee/Person.layout.json#L44-L61";>fragment</a>
 in the <code>Person.layout.json</code> file:</p>
+
+<pre><code>"collections": {
+  "likes": {
+    "collectionLayout": {
+      "render": "EAGERLY"
+    },
+    "actions": {
+      "addPreference": {
+        "actionLayout": {
+          "named": "Add"
+        }
+      },
+      "removePreference": {
+        "actionLayout": {
+          "named": "Remove"
+        }
+      }
+    }
+  }
+}
+</code></pre>
+
+<p>For the <code>FoodStuff</code> entity meanwhile, only the 
<code>addPreference</code> action is made available:</p>
+
+<p><img src="images/suppressing-contributions-foodstuff.png" 
width="800px"/></p>
+
+<p>which is accomplished using this <a 
href="https://github.com/isisaddons/isis-app-kitchensink/blob/262e3bc149ac0d82757738339af9683668f44155/dom/src/main/java/org/isisaddons/app/kitchensink/dom/contrib/contributee/FoodStuff.layout.json#L48-L59";>fragment</a>
 in the <code>FoodStuff.layout.json</code> file: we have:</p>
+
+<pre><code>"actions": {
+  "addPreference": {
+    "actionLayout": {
+      "cssClass": "btn-success"
+    }
+  },
+  "removePreference": {
+    "actionLayout": {
+      "cssClass": "btn-warn",
+      "hidden": "EVERYWHERE" /* contributed action is hidden on one of its 
contributees */
+    }
+  }
+}
+</code></pre>
+
+
+
+      </div>
+
+        <div id="edit" class="modal hide fade in" style="xxxdisplay: none; ">
+            <div class="modal-header">
+                <a class="close" data-dismiss="modal">x</a>
+
+                <h3>Thank you for contributing to the documention!</h3>
+            </div>
+            <div class="modal-body">
+                <h4>Any help with the documentation is greatly 
appreciated.</h4>
+                <p>All edits are reviewed before going live, so feel free to 
do much more than fix typos or links.  If you see a page that could benefit 
from an entire rewrite, we'd be thrilled to review it.  Don't be surprised if 
we like it so much we ask you for help with other pages :)</p>
+                <small>NOTICE: unless indicated otherwise on the pages in 
question, all editable content available from apache.org is presumed to be 
licensed under the Apache License (AL) version 2.0 and hence all submissions to 
apache.org treated as formal Contributions under the license terms.</small>
+                <!--[if gt IE 6]>
+                <h4>Internet Explorer Users</h4>
+                <p>If you are not an Apache committer, click the Yes link and 
enter a <i>anonymous</i> for the username and leave the password empty</p>
+                <![endif]-->
+
+            </div>
+            <div class="modal-footer">
+                Do you have an Apache ID?
+                <a 
href="javascript:void(location.href='https://cms.apache.org/redirect?uri='+escape(location.href))"
 class="btn">Yes</a>
+                <a 
href="javascript:void(location.href='https://anonymous:@cms.apache.org/redirect?uri='+escape(location.href))"
 class="btn">No</a>
+            </div>
+        </div>
+        <!--
+        <script src="./../javascript/bootstrap-modal.js"></script>
+        -->
+
+      <footer>
+        <hr/>
+        <p>
+        Copyright &copy; 2010~2014 The Apache Software Foundation, Licensed 
under the Apache License, Version 2.0.
+        <br/>
+        Apache Isis, Isis, Apache, the Apache feather logo, and the Apache 
Isis project logo are trademarks of The Apache Software Foundation.
+        </p>
+      </footer>
+
+    </div> <!-- /container -->
+
+  </body>
+</html>


Reply via email to