You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/04/29 11:35:44 UTC

svn commit: r1741597 - /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml

Author: lofwyr
Date: Fri Apr 29 09:35:44 2016
New Revision: 1741597

URL: http://svn.apache.org/viewvc?rev=1741597&view=rev
Log:
Revert: TOBAGO-1544: Revise Demo Application for Tobago 3.0 
[developed by hnoeth]

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml?rev=1741597&r1=1741596&r2=1741597&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml Fri Apr 29 09:35:44 2016
@@ -20,11 +20,11 @@
 <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">
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
   <ui:param name="title" value="#{overviewBundle.popup} &lt;tc:popup>"/>
   <p>A popup dialog is created with <code class="language-markup">&lt;tc:popup/></code>.
-    It can be filled with components like other container.
-    To open the popup dialog, use <code class="language-markup">&lt;tc:popupReference/></code>.</p>
+    It can be filled with components like other container.</p>
   <p>Tag Library Documentation:
     <tc:link label="&lt;tc:popup/>" image="image/feather-leaf.png"
              link="#{overviewBundle.tagDocUrl}/popup.html"/>
@@ -39,18 +39,31 @@
              link="#{overviewBundle.tagDocUrl}/attribute.html"/></p>
 
   <tc:section label="Basics">
-    <p>Press the button or click the link to open a popup dialog.
-      Both button and link contain a <code class="language-markup">&lt;tc:popupReference for="popup1"/></code> tag.
-      The value of the <code>for</code> attribute has to be the ID of a popup dialog.</p>
-    <tc:popup id="popup1">
-      <p>This is a popup dialog.</p>
-    </tc:popup>
-    <tc:button id="b1" label="Open Popup 1">
-      <tc:popupReference for="popup1"/>
-    </tc:button>
-    <tc:link id="l1" label="Open Popup 1">
-      <tc:popupReference for="popup1"/>
-    </tc:link>
+    <p>There are basically two ways to open a popup dialog.
+      First, put the <code class="language-markup">&lt;tc:popup/></code> tag within an opening component,
+      like a button or a link. The second one is to use the
+      <code class="language-markup">&lt;tc:popupReference/></code> tag.</p>
+    <tc:section label="Popup within button">
+      <p>In this example, the popup should be within a button. To make this happen, the facet-tag is also needed.
+        In detail:<br/>
+        The <code class="language-markup">&lt;tc:button label="Open Popup 1"></code> contain
+        <code class="language-markup">&lt;f:facet name="popup"></code>, which contain
+        <code class="language-markup">&lt;tc:popup id="popup1"></code>.</p>
+      <tc:button id="b1" label="Open Popup 1">
+        <f:facet name="popup">
+          <tc:popup id="popup1">
+            <p>This is a popup dialog.</p>
+          </tc:popup>
+        </f:facet>
+      </tc:button>
+    </tc:section>
+    <tc:section label="Reference to popup">
+      <p>The link tag contain a <code class="language-markup">&lt;tc:popupReference for="popup1"/></code>.
+        The value of the <code>for</code> attribute has to be the ID of a popup dialog.</p>
+      <tc:link id="l1" label="Open Popup 1">
+        <tc:popupReference for="popup1"/>
+      </tc:link>
+    </tc:section>
   </tc:section>
 
   <tc:section label="Close Popup">