myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject [myfaces-tobago] branch master updated: improve demo * updated 'new in 4.0' and some pages linked to
Date Fri, 01 Dec 2017 18:07:21 GMT
This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 74baa24  improve demo * updated 'new in 4.0' and some pages linked to
74baa24 is described below

commit 74baa24a681154b2d97bd0dab1a4d42e59abc2cf
Author: Henning Noeth <hnoeth@apache.org>
AuthorDate: Fri Dec 1 19:07:14 2017 +0100

    improve demo
    * updated 'new in 4.0' and some pages linked to
---
 .../10-intro/28-new+in+4+0/new+in+4+0.xhtml        | 144 +++++++++++++++------
 .../50-migration/96-migration/migration40.xhtml    |  19 ---
 .../010-input/20-suggest/suggest.xhtml             |   2 +-
 .../040-command/00-button+link/button+link.xhtml   |  17 ++-
 .../20-component/050-container/60-bar/bar.xhtml    |   2 +-
 .../content/20-component/060-popup/popup.xhtml     |   2 +-
 .../90-message-layout/message-Layout.xhtml         |  51 ++++++++
 .../30-concept/80-security/20-roles/roles.xhtml    |   4 +-
 8 files changed, 175 insertions(+), 66 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/28-new+in+4+0/new+in+4+0.xhtml
b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/28-new+in+4+0/new+in+4+0.xhtml
index 301dc84..8596714 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/28-new+in+4+0/new+in+4+0.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/28-new+in+4+0/new+in+4+0.xhtml
@@ -45,6 +45,7 @@
         <li>Update to Bootstrap 4 beta 2</li>
         <li>Reimplementation of grid layout mananger and split layout manager</li>
         <li>Security enhancements</li>
+        <li>Java 8 or 9</li>
       </ul>
 
       The full list is available in
@@ -54,10 +55,17 @@
 
     <tc:section label="Layout Managers">
       <ul>
-        <li>Grid Layout was reimplemented with use of the modern CSS grid</li>
-        <li>Split Layout was reimplemented (was not available in Tobago 3)</li>
-        <li>Flex Layout was optimized (works now without JavaScript)</li>
-        <li>Segment Layout was enhanced. New attributes "offset" and "margin".
+        <li><tc:link label="Grid Layout" outcome="/content/30-concept/16-layout/50-grid/grid-layout.xhtml"/>
+          was reimplemented with use of the modern CSS grid
+        </li>
+        <li><tc:link label="Split Layout" outcome="/content/30-concept/16-layout/60-split/split-layout.xhtml"/>
+          was reimplemented (was not available in Tobago 3)
+        </li>
+        <li><tc:link label="Flex Layout" outcome="/content/30-concept/16-layout/20-flex/flex-layout.xhtml"/>
+          was optimized (works now without JavaScript)
+        </li>
+        <li><tc:link label="Segment Layout" outcome="/content/30-concept/16-layout/30-segment/segment-layout.xhtml"/>
+          was enhanced. New attributes "offset" and "margin".
           Also it's possible to use "auto" and "1fr" as with of the children.
         </li>
         <li>
@@ -69,13 +77,46 @@
     </tc:section>
 
     <tc:section label="CSS Styles">
-      <tc:section label="Reimplementation of Inline Styles">
+      <p><b>Reimplementation of Inline Styles</b><br/>
         Is better and faster, because not use of JavaScript is needed now.
-        Background: This is possible with CSP Level 2.
-      </tc:section>
-      <tc:section label="Inline Style for Rows ans Columns">
+        Background: This is possible with CSP Level 2.</p>
+      <p><b>Inline Style for Rows ans Columns</b><br/>
         &lt;tc:style> can now be used as subtag of &lt;tc:row> and &lt;tc:column>.
-      </tc:section>
+        The styles are set dynamically, so different styling of rows is possible.</p>
+      <p><b>New components supported</b><br/>
+        Styles can be used in:</p>
+      <ul>
+        <li><tc:link label="&lt;tc:bar>" outcome="/content/20-component/050-container/60-bar/bar.xhtml"/></li>
+        <li><tc:link label="&lt;tc:link>"
+                     outcome="/content/20-component/040-command/00-button+link/button+link.xhtml"/></li>
+        <li><tc:link label="&lt;tc:tab>" outcome="/content/20-component/070-tab/tab.xhtml"/></li>
+      </ul>
+    </tc:section>
+
+    <tc:section label="Markups">
+      <p>Markups are now easily accessable by JavaScript.
+        The markup could be found on component root in the attribute <code>data-tobago-markup</code>.</p>
+
+      <p>New markups:</p>
+      <ul>
+        <li><tc:link label="&lt;tc:bar>" outcome="/content/20-component/050-container/60-bar/bar.xhtml"
+                     fragment="page:mainForm:backgroundColor"/>: <code>light</code>,
<code>dark</code></li>
+        <li><tc:link label="&lt;tc:button>" outcome="/content/20-component/040-command/00-button+link/button+link.xhtml"
+                     fragment="page:mainForm:markup"/>:
+          <code>primary</code>,
+          <code>secondary</code>,
+          <code>success</code>,
+          <code>danger</code>,
+          <code>warning</code>,
+          <code>info</code>,
+          <code>light</code>,
+          <code>dark</code>,
+          <code>none</code></li>
+        <li><tc:link label="&lt;tc:in>" outcome="/content/20-component/010-input/20-suggest/suggest.xhtml"
+                     fragment="page:mainForm:localMenu"/> with &lt;tc:suggest>:
<code>localMenu</code></li>
+        <li><tc:link label="&lt;tc:popup>" outcome="/content/20-component/060-popup/popup.xhtml"
+                     fragment="page:mainForm:markup"/>: <code>small</code>,
<code>large</code></li>
+      </ul>
     </tc:section>
 
     <tc:section label="Messages near the input fields">
@@ -88,48 +129,48 @@
           </tc:button>
         </f:facet>
       </tc:in>
+      <p>For more information have a look at
+        <tc:link label="Message Layout"
+                 outcome="/content/30-concept/16-layout/90-message-layout/message-Layout.xhtml"/></p>
     </tc:section>
 
     <tc:section label="Tag library">
-      <tc:section label="Image tag">
-        The &lt;tc:image> tag now supports a Font Awesome string as value.
-      </tc:section>
-      <tc:section label="Event tag">
-        The &lt;tc:event> tag now supports the rendered attribute.
-      </tc:section>
-      <tc:section label="AJAX tag">
-        The &lt;f:ajax> tag now supports the disabled attribute.
-      </tc:section>
+      <ul>
+        <li>&lt;tc:image> now supports a Font Awesome string as value.</li>
+        <li>&lt;tc:event> now supports the <code>rendered</code>
attribute.</li>
+        <li>&lt;f:ajax> now supports the <code>disabled</code> attribute.</li>
+        <li>&lt;tc:link> now supports <code>outcome</code> and <code>fragment</code>
attribute.</li>
+        <li>&lt;tc:style> now supports the <code>rendered</code>
attribute.</li>
+        <li>New tag &lt;tc:meta> implemented.</li>
+      </ul>
     </tc:section>
 
     <tc:section label="Theming">
-      <tc:section label="Optimize the theme builder">
-        Faster loading the Bootstrap theme and using same base _tobago.scss for all theme.
-      </tc:section>
-      <tc:section label="Speyside Theme">
-        <p>
-          The Speyside theme is now part of the distribution. I looks a bit more condensed
and the
-          menu is full viewable for all submenus.
-        </p>
-        <p>
-          You can switch the theme here in the demo menu under Configuration → Theme
-        </p>
-      </tc:section>
-      <tc:section label="Scarborough Theme">
-        The Scarborough theme is now part of the distribution. I look quite same
-        as the bootstrap theme, but a bit more nice.
-      </tc:section>
-      <tc:section label="Roxborough Theme">
-        The Scarborough theme is now part of the distribution.
-        I has a nice dark look for ambient light situations or photo galleries.
-      </tc:section>
+      <ul>
+        <li><b>Optimize the theme builder</b><br/>
+          Faster loading the Bootstrap theme and using same base _tobago.scss for all theme.
+        </li>
+        <li><b>Speyside Theme</b><br/>
+          The Speyside theme is now part of the distribution.
+          I looks a bit more condensed and the menu is full viewable for all submenus.
+          You can switch the theme here in the demo menu under Configuration → Theme.
+        </li>
+        <li><b>Scarborough Theme</b><br/>
+          The Scarborough theme is now part of the distribution.
+          I look quite same as the bootstrap theme, but a bit more nice.
+        </li>
+        <li><b>Roxborough Theme</b><br/>
+          The Scarborough theme is now part of the distribution.
+          I has a nice dark look for ambient light situations or photo galleries.
+        </li>
+      </ul>
     </tc:section>
 
     <tc:section label="Security enhancements">
       <ul>
         <li>CSP level 2</li>
         <li>Frame attack protection via headers instead of JavaScript</li>
-        <li></li>
+        <li><tc:link label="Roles" outcome="/content/30-concept/80-security/20-roles/roles.xhtml"/></li>
       </ul>
     </tc:section>
 
@@ -140,5 +181,30 @@
       icon library.
     </tc:section>
 
+    <tc:section id="xsd" label="New XSD Version">
+      <p>With Tobago4 there is a new XSD version for the tobago-confix.xml.</p>
+      <ul>
+        <li><code>decode-line-feed</code> added<br/>
+          Default value is 'false'. If set to 'true' control characters are not decoded on
ajax requests.
+        </li>
+        <li><code>security-annotation</code> added<br/>
+          It determines what happen to the according component if - for example - @RolesAllowed()
+          is not 'true'.
+          Posible values are 'hide', 'disable' and 'ignore'.
+        </li>
+        <li><code>renderers</code>, <code>renderer</code>,
<code>supported-markup-type</code> removed<br/>
+          It is not longer needed to specify which markups are allowed on specific components.<br/>
+          'renderers' only contains the 'supported-markup-type' element. So it was also removed.
+        </li>
+      </ul>
+    </tc:section>
+
+    <tc:section label="More improvements">
+      <ul>
+        <li><tc:link label="#{demoBundle.exception_handler}"
+                     outcome="/content/30-concept/22-exception-handler/exception-handler.xhtml"/></li>
+        <li><p>The page is now loadable by ajax.</p></li>
+      </ul>
+    </tc:section>
   </tc:section>
 </ui:composition>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/50-migration/96-migration/migration40.xhtml
b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/50-migration/96-migration/migration40.xhtml
index d141939..0a0d3f6 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/50-migration/96-migration/migration40.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/50-migration/96-migration/migration40.xhtml
@@ -39,7 +39,6 @@
       <li><tc:link link="" fragment="page:mainForm:crlf" label="CRLF in textarea"/></li>
       <li><tc:link link="" fragment="page:mainForm:resourceResolver"
                    label="Removed class: MetaInfResourcesClasspathResourceResolver"/></li>
-      <li><tc:link link="" fragment="page:mainForm:xsd" label="New XSD"/></li>
     </ul>
 
     <tc:section id="taglib" label="Tag Library">
@@ -206,24 +205,6 @@
 
     </tc:section>
 
-    <tc:section id="xsd" label="New XSD Version">
-      <p>With Tobago4 there is a new XSD version for the tobago-confix.xml.</p>
-      <ul>
-        <li><code>decode-line-feed</code> added<br/>
-          Default value is 'false'. If set to 'true' control characters are not decoded on
ajax requests.
-        </li>
-        <li><code>security-annotation</code> added<br/>
-          It determines what happen to the according component if - for example - @RolesAllowed()
-          is not 'true'.
-          Posible values are 'hide', 'disable' and 'ignore'.
-        </li>
-        <li><code>renderers</code>, <code>renderer</code>,
<code>supported-markup-type</code> removed<br/>
-          It is not longer needed to specify which markups are allowed on specific components.<br/>
-          'renderers' only contains the 'supported-markup-type' element. So it was also removed.
-        </li>
-      </ul>
-    </tc:section>
-
   </tc:section>
 
 </ui:composition>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/20-suggest/suggest.xhtml
b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/20-suggest/suggest.xhtml
index a27b9a3..c8f47c4 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/20-suggest/suggest.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/20-suggest/suggest.xhtml
@@ -85,7 +85,7 @@
     </tc:in>
   </tc:section>
 
-  <tc:section label="Render local menu">
+  <tc:section id="localMenu" label="Render local menu">
     <p>By default, the suggest menu is rendered in the <code>.tobago-page-menuStore</code>
       and positioned relative to the page. The suggest menu will be scrolled with the page.</p>
     <p>Sometimes this behavior causes problems. For example if tc:suggest is used in
a fixed header.
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button+link/button+link.xhtml
b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button+link/button+link.xhtml
index 7d8398c..b5834e8 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button+link/button+link.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button+link/button+link.xhtml
@@ -27,9 +27,11 @@
     You can also set a link by <code class="language-markup">&lt;tc:button/></code>.
     The behavior of a link and a button is the same, it differs in the appearance.</p>
   <p>Tag Library Documentation:
-    <tc:link label="&lt;tc:link/>" image="#{request.contextPath}/image/feather-leaf.png"
link="#{demoBundle.tagDocUrl}/#{info.stableVersion}/tld/tc/link.html"/>
+    <tc:link label="&lt;tc:link/>" image="#{request.contextPath}/image/feather-leaf.png"
+             link="#{demoBundle.tagDocUrl}/#{info.stableVersion}/tld/tc/link.html"/>
     |
-    <tc:link label="&lt;tc:button/>" image="#{request.contextPath}/image/feather-leaf.png"
link="#{demoBundle.tagDocUrl}/#{info.stableVersion}/tld/tc/button.html"/></p>
+    <tc:link label="&lt;tc:button/>" image="#{request.contextPath}/image/feather-leaf.png"
+             link="#{demoBundle.tagDocUrl}/#{info.stableVersion}/tld/tc/button.html"/></p>
 
   <tc:section label="Basics">
     <p>The next two sections show how a link and a button is set.</p>
@@ -52,7 +54,8 @@
       |
       <tc:link id="l4" label="Action" action="#{buttonLinkController.linkToComponentsRoot}"/>
       |
-      <tc:link id="l5" label="Link with an image" image="#{request.contextPath}/image/feather-leaf.png"
link="https://www.apache.org/"/>
+      <tc:link id="l5" label="Link with an image" image="#{request.contextPath}/image/feather-leaf.png"
+               link="https://www.apache.org/"/>
     </tc:section>
     <tc:section label="&lt;tc:button>">
       <pre><code class="language-markup">&lt;tc:button label="apache.org"
link="https://www.apache.org/"/></code></pre>
@@ -63,6 +66,12 @@
     </tc:section>
   </tc:section>
 
+  <tc:section label="outcome, link, fragment">
+    <p>Use the <code>outcome</code> attribute for internal links to a viewId.</p>
+    <p>Use the <code>link</code> attribute for links to resources or external
URLs.</p>
+    <p>Use the <code>fragment</code> to jump to an ID on the linked site.</p>
+  </tc:section>
+
   <tc:section label="Dropdown">
     <p>Links and buttons can also be dropdown elements.
       You can just put a link tag in another link or button tag
@@ -131,7 +140,7 @@
     </tc:section>
   </tc:section>
 
-  <tc:section label="Markups">
+  <tc:section id="markup" label="Markups">
     <p>Colors can be set with markups. Markup <code>none</code> unset the
color.</p>
     <pre><code class="language-markup">&lt;tc:button label="Primary" markup="primary"/>
 &lt;tc:button label="Secondary" markup="secondary"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/60-bar/bar.xhtml
b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/60-bar/bar.xhtml
index 3e9565b..b1807b1 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/60-bar/bar.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/60-bar/bar.xhtml
@@ -120,7 +120,7 @@
     </tc:bar>
   </tc:section>
 
-  <tc:section label="Background Color">
+  <tc:section id="backgroundColor" label="Background Color">
     <p>Some examples with different background colors.</p>
     <p>For dark backgrounds, add the <code>dark</code> markup value.<br/>
       For light background choose <code>light</code> markup.</p>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml
b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml
index 1f437b3..c06fb2c 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml
@@ -107,7 +107,7 @@
     </tc:form>
   </tc:section>
 
-  <tc:section label="Markup">
+  <tc:section id="markup" label="Markup">
     <p>The width of the popups can be changed by markups.</p>
     <p><code class="language-markup">&lt;tc:popup ... markup="large"></code>
or
       <code class="language-markup">&lt;tc:popup ... markup="small"></code></p>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/90-message-layout/message-Layout.xhtml
b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/90-message-layout/message-Layout.xhtml
new file mode 100644
index 0000000..10918cd
--- /dev/null
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/90-message-layout/message-Layout.xhtml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * 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.
+-->
+
+<ui:composition template="/main.xhtml"
+                xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="http://java.sun.com/jsf/facelets">
+  <ui:param name="title" value="messages"/>
+  <p>The message layout renders messages directly on the component.</p>
+
+  <tc:section label="Basics">
+    <tc:form>
+      <p><tc:button label="Submit"/></p>
+      <tc:in required="true"/>
+    </tc:form>
+  </tc:section>
+
+  <tc:section label="Severity">
+    <tc:form>
+      <p><tc:button label="Submit"/></p>
+      <tc:in label="Fatal" validator="#{severityController.addFatal}"/>
+      <tc:in label="Error" validator="#{severityController.addError}"/>
+      <tc:in label="Warn" validator="#{severityController.addWarn}"/>
+      <tc:in label="Info" validator="#{severityController.addInfo}"/>
+    </tc:form>
+  </tc:section>
+
+  <tc:section label="More components">
+    <tc:form>
+      <p><tc:button label="Submit"/></p>
+      <tc:textarea label="Textarea" required="true"/>
+      <tc:selectBooleanCheckbox label="Checkbox" required="true"/>
+    </tc:form>
+  </tc:section>
+</ui:composition>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/20-roles/roles.xhtml
b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/20-roles/roles.xhtml
index 5732e3d..546978e 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/20-roles/roles.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/20-roles/roles.xhtml
@@ -23,7 +23,9 @@
                 xmlns:ui="http://java.sun.com/jsf/facelets">
   <ui:param name="title" value="#{demoBundle.roles}"/>
   <p>It is possible to define roles for users. Based on this roles, components with
an <code>action</code> attribute
-    like a button are enabled or disabled for the current user.</p>
+    like a button can be hidden or disabled for the current user.</p>
+  <p>The behavior can be defined in the <code>security-annotation</code>
element in the 'tobago-config.xml'.
+    Posible values are 'hide', 'disable' and 'ignore'.</p>
 
   <tc:section label="Basics">
     <p>To allow an action only for a specific role, you have to annotate a method with

-- 
To stop receiving notification emails like this one, please contact
['"commits@myfaces.apache.org" <commits@myfaces.apache.org>'].

Mime
View raw message