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/11/08 06:30:42 UTC

[13/15] isis-site git commit: ISIS-1766: updates docs for menubars, and fixes an NPE

http://git-wip-us.apache.org/repos/asf/isis-site/blob/022f8844/content/guides/rgcms/rgcms.html
----------------------------------------------------------------------
diff --git a/content/guides/rgcms/rgcms.html b/content/guides/rgcms/rgcms.html
index c1bf126..bd99847 100644
--- a/content/guides/rgcms/rgcms.html
+++ b/content/guides/rgcms/rgcms.html
@@ -6381,74 +6381,85 @@ table.CodeRay td.code>pre{padding:0}
           </ul>
          </div> 
          <div class="paragraph"> 
-          <p>The <code>org.apache.isis.applib.layout.menus</code> package defines a number of classes that allow the layout of domain service actions to be organised across menu bars, menus and menu sections.</p> 
+          <p>The <code>org.apache.isis.applib.layout.menubars</code> package and subpackages define a number of interfaces classes that allow the layout of domain service actions to be organised across menu bars, menus and menu sections.</p> 
          </div> 
          <div class="paragraph"> 
-          <p>These classes fall into two main categories:</p> 
-         </div> 
-         <div class="ulist"> 
-          <ul> 
-           <li> <p>menu classes, that define a hierarchical structure of menu bars, menus and menu sections, and;</p> 
-            <div class="paragraph"> 
-             <p>Unlike the <a href="#_rgcms_classes_layout">object layout</a> classes, the menu classes have no dependency on any particular layout architecture (that is, they don’t attempt to model some particular grid system such as bootstrap3).</p> 
-            </div> </li> 
-           <li> <p>a component class <code>(ServiceActionLayoutData</code>) that captures the layout metadata for a domain services action. These are grouped into menu sections.</p> 
-            <div class="paragraph"> 
-             <p>The component class is broadly equivalent to the "layout" annotations for actions, ie <a href="../rgant/rgant.html#_rgant-ActionLayout"><code>@ActionLayout</code></a>.</p> 
-            </div> </li> 
-          </ul> 
+          <p>The classes define a hierarchical structure of menu bars, menus and menu sections. Similar to the <a href="#_rgcms_classes_layout">object layout</a> classes, the concrete menu classes support bootstrap3; support for other layout systems is possible.</p> 
          </div> 
          <div class="paragraph"> 
-          <p>The menu classes and the component class should be reusable across all any and all UI implementations, so this is a less abstract (though equally general) design as compared to the <a href="#_rgcms_classes_layout">object layout</a> design.</p> 
+          <p>The component class <code>ServiceActionLayoutData</code> defines action metadata, being broadly equivalent to the "layout" annotations for actions, ie <a href="../rgant/rgant.html#_rgant-ActionLayout"><code>@ActionLayout</code></a>. This is similar to the <code>ActionLayoutData</code> component class used for object layouts, but also captures the identity of the "owning" domain service. Service actions are grouped into menu sections.</p> 
          </div> 
          <div class="paragraph"> 
-          <p>All of the classes in this package are JAXB-annotated, meaning that they can be serialized to/from XML (in the <code><a href="http://isis.apache.org/applib/layout/menus" class="bare">http://isis.apache.org/applib/layout/menus</a></code> XSD namespace). This ability to serialize to/from XML is used by the <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_MenuBarsLoaderService"><code>MenuBarsLoaderService</code></a>, the default implementation of which reads the grid layout for a domain class from a <code>.layout.xml</code> file on the classpath. It also allows the menu bars to be exposed through the REST API provided by the <a href="../ugvro/ugvro.html">Restful Objects viewer</a>, as either XML or JSON.</p> 
+          <p>All of the classes in this package are JAXB-annotated, meaning that they can be serialized to/from XML (in the <code><a href="http://isis.apache.org/applib/layout/menubars/bootstrap3" class="bare">http://isis.apache.org/applib/layout/menubars/bootstrap3</a></code> XSD namespace). This ability to serialize to/from XML is used by the <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_MenuBarsLoaderService"><code>MenuBarsLoaderService</code></a>, the default implementation of which reads the grid layout for a domain class from a <code>.layout.xml</code> file on the classpath. It also allows the menu bars to be exposed through the REST API provided by the <a href="../ugvro/ugvro.html">Restful Objects viewer</a>, as either XML or JSON.</p> 
          </div> 
          <div class="paragraph"> 
-          <p>The service action component also allow a link to be associated with it. Each such link is populated by the framework automatically when exposing the menu bars layout through the REST API, pointing back to the standard Restful Objects resources. This design greatly assists in the implementation of generic REST clients.</p> 
+          <p>The service action component also allows a link to be associated with it. Each such link is populated by the framework automatically when exposing the menu bars layout through the REST API, pointing back to the standard Restful Objects resources. This design greatly assists in the implementation of generic REST clients.</p> 
          </div> 
          <div class="sect3"> 
-          <h4 id="_rgcms_classes_menubars">3.14.1. Menus</h4>
+          <h4 id="_rgcms_classes_menubars_menus">3.14.1. Menus</h4>
           <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
-           <button type="button" class="btn btn-xs btn-default" onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars.adoc&quot;"><i class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+           <button type="button" class="btn btn-xs btn-default" onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_menus.adoc&quot;"><i class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
            <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
            <ul class="dropdown-menu">
-            <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i>&nbsp; Edit</a></li>
-            <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; History</a></li>
-            <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i>&nbsp; Raw</a></li>
-            <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i>&nbsp; Blame</a></li>
+            <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_menus.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i>&nbsp; Edit</a></li>
+            <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_menus.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; History</a></li>
+            <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_menus.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i>&nbsp; Raw</a></li>
+            <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_menus.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i>&nbsp; Blame</a></li>
            </ul>
           </div> 
           <div class="paragraph"> 
-           <p>Both the menu and component classes reside in the <code>org.apache.isis.applib.layout.menus</code> package, consisting of:</p> 
+           <p>The menu classes reside in the <code>org.apache.isis.applib.layout.menubars.bootstrap3</code> package, consisting of:</p> 
           </div> 
           <div class="ulist"> 
            <ul> 
-            <li> <p><code>MenuBars</code></p> 
+            <li> <p><code>BS3MenuBars</code></p> 
              <div class="paragraph"> 
-              <p>The top-level structure that define three fields: a primary <code>MenuBar</code>, secondary <code>MenuBar</code> and tertiary <code>MenuBar</code>. The <a href="../ugvw/ugvw.html">Wicket viewer</a> places the primary bar to the left, the secondary bar aligned right, and the tertiary bar (expected to consist of just one <code>Menu</code>) under the user names.</p> 
+              <p>The top-level structure that define three fields: a primary <code>BS3MenuBar</code>, secondary <code>BS3MenuBar</code> and tertiary <code>BS3MenuBar</code>. The <a href="../ugvw/ugvw.html">Wicket viewer</a> places the primary bar to the left, the secondary bar aligned right, and the tertiary bar (expected to consist of just one <code>BS3Menu</code>) under the user names.</p> 
              </div> </li> 
-            <li> <p><code>MenuBar</code></p> 
+            <li> <p><code>BS3MenuBar</code></p> 
              <div class="paragraph"> 
-              <p>consisting of one or many <code>Menu</code>s.</p> 
+              <p>consisting of one or many <code>BS3Menu</code>s.</p> 
              </div> </li> 
-            <li> <p><code>Menu</code></p> 
+            <li> <p><code>BS3Menu</code></p> 
              <div class="paragraph"> 
-              <p>consisting of one or many <code>MenuSection</code>s. The <a href="../ugvw/ugvw.html">Wicket viewer</a> renders a separator between each section.</p> 
+              <p>consisting of one or many <code>BS3MenuSection</code>s. The <a href="../ugvw/ugvw.html">Wicket viewer</a> renders a separator between each section.</p> 
              </div> </li> 
-            <li> <p><code>MenuSection</code></p> 
+            <li> <p><code>BS3MenuSection</code></p> 
              <div class="paragraph"> 
               <p>consisting of one or many actions (<code>ServiceActionLayoutData</code>s)</p> 
              </div> </li> 
-            <li> <p><code>ServiceActionLayoutData</code> class, which correspond to the <a href="../rgant/rgant.html#_rgant-ActionLayout"><code>@ActionLayout</code></a> annotation.</p> 
+           </ul> 
+          </div> 
+         </div> 
+         <div class="sect3"> 
+          <h4 id="_rgcms_classes_menubars_components">3.14.2. Components</h4>
+          <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
+           <button type="button" class="btn btn-xs btn-default" onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_components.adoc&quot;"><i class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+           <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
+           <ul class="dropdown-menu">
+            <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_components.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i>&nbsp; Edit</a></li>
+            <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_components.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; History</a></li>
+            <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_components.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i>&nbsp; Raw</a></li>
+            <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars_components.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i>&nbsp; Blame</a></li>
+           </ul>
+          </div> 
+          <div class="paragraph"> 
+           <p>The service action class reside in the <code>org.apache.isis.applib.layout.component</code> package, consisting of just:</p> 
+          </div> 
+          <div class="ulist"> 
+           <ul> 
+            <li> <p><code>ServiceActionLayoutData</code> class</p> 
              <div class="paragraph"> 
-              <p>This is similar to <code>ActionLayoutData</code> (of the <a href="#_rgcms_classes_layout">object layout</a> classes), however it also identifies the domain service to which it belongs. (This isn’t required for the object layouts because that is implicit).</p> 
+              <p>which correspond to the <a href="../rgant/rgant.html#_rgant-ActionLayout"><code>@ActionLayout</code></a> annotation.</p> 
              </div> </li> 
            </ul> 
           </div> 
+          <div class="paragraph"> 
+           <p>This is similar to <code>ActionLayoutData</code> (of the <a href="#_rgcms_classes_layout">object layout</a> classes), however it also identifies the domain service to which it belongs. (This isn’t required for the object layouts because the owner in that case is implicit).</p> 
+          </div> 
          </div> 
          <div class="sect3"> 
-          <h4 id="__rgcms_classes_layout_link">3.14.2. Link</h4> 
+          <h4 id="__rgcms_classes_layout_link">3.14.3. Link</h4> 
           <div class="paragraph"> 
            <p>The link classes reside in the <code>org.apache.isis.applib.layout.links</code> package, and consist of just the <code>Link</code> class:</p> 
           </div> 

http://git-wip-us.apache.org/repos/asf/isis-site/blob/022f8844/content/guides/ugvw/images/menubars/010-download.png
----------------------------------------------------------------------
diff --git a/content/guides/ugvw/images/menubars/010-download.png b/content/guides/ugvw/images/menubars/010-download.png
new file mode 100644
index 0000000..4c79f73
Binary files /dev/null and b/content/guides/ugvw/images/menubars/010-download.png differ

http://git-wip-us.apache.org/repos/asf/isis-site/blob/022f8844/content/guides/ugvw/images/menubars/020-download.png
----------------------------------------------------------------------
diff --git a/content/guides/ugvw/images/menubars/020-download.png b/content/guides/ugvw/images/menubars/020-download.png
new file mode 100644
index 0000000..52100ec
Binary files /dev/null and b/content/guides/ugvw/images/menubars/020-download.png differ