myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1772314 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ tobago-core/src/main/java/org/apache/myface...
Date Fri, 02 Dec 2016 08:40:44 GMT
Author: lofwyr
Date: Fri Dec  2 08:40:43 2016
New Revision: 1772314

URL: http://svn.apache.org/viewvc?rev=1772314&view=rev
Log:
TOBAGO-1627: Make activation/deactivation of collapsible concept possible
* implement the collapsibleMode 'none', which is now default for tc:box, tc:panel and tc:section;
With collapsibleMode=none, the hidden inputfield for the collapsible feature is not rendered
[developed by hnoeth]

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PanelRenderer.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SectionRenderer.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasCollapsedMode.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/model/CollapseMode.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.test.js
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.test.js
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.test.js
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java
Fri Dec  2 08:40:43 2016
@@ -22,6 +22,7 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.internal.component.AbstractUIBox;
 import org.apache.myfaces.tobago.internal.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.internal.util.RenderUtils;
+import org.apache.myfaces.tobago.model.CollapseMode;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.TobagoClass;
@@ -62,7 +63,9 @@ public class BoxRenderer extends PanelRe
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, box);
     writer.writeStyleAttribute(box.getStyle());
 
-    encodeHidden(writer, clientId, collapsed);
+    if (box.getCollapsedMode() != CollapseMode.none) {
+      encodeHidden(writer, clientId, collapsed);
+    }
 
     if (label != null || labelString != null || bar != null) {
       writer.startElement(HtmlElements.DIV);

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PanelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PanelRenderer.java?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PanelRenderer.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PanelRenderer.java
Fri Dec  2 08:40:43 2016
@@ -22,14 +22,15 @@ package org.apache.myfaces.tobago.intern
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UIPanel;
 import org.apache.myfaces.tobago.component.UIReload;
+import org.apache.myfaces.tobago.internal.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.internal.util.JsonUtils;
+import org.apache.myfaces.tobago.internal.util.RenderUtils;
+import org.apache.myfaces.tobago.model.CollapseMode;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.TobagoClass;
 import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
-import org.apache.myfaces.tobago.internal.util.JsonUtils;
-import org.apache.myfaces.tobago.internal.util.HtmlRendererUtils;
-import org.apache.myfaces.tobago.internal.util.RenderUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
@@ -69,7 +70,9 @@ public class PanelRenderer extends Panel
 
     writer.writeCommandMapAttribute(JsonUtils.encode(RenderUtils.getBehaviorCommands(facesContext,
panel)));
 
-    encodeHidden(writer, clientId, collapsed);
+    if (panel.getCollapsedMode() != CollapseMode.none) {
+      encodeHidden(writer, clientId, collapsed);
+    }
   }
 
   @Override

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java
Fri Dec  2 08:40:43 2016
@@ -20,6 +20,7 @@
 package org.apache.myfaces.tobago.internal.renderkit.renderer;
 
 import org.apache.myfaces.tobago.internal.component.AbstractUIPopup;
+import org.apache.myfaces.tobago.model.CollapseMode;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -68,7 +69,9 @@ public class PopupRenderer extends Panel
     writer.startElement(HtmlElements.DIV);
     writer.writeClassAttribute(BootstrapClass.MODAL_CONTENT);
 
-    encodeHidden(writer, clientId, collapsed);
+    if (popup.getCollapsedMode() != CollapseMode.none) {
+      encodeHidden(writer, clientId, collapsed);
+    }
   }
 
   @Override

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SectionRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SectionRenderer.java?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SectionRenderer.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SectionRenderer.java
Fri Dec  2 08:40:43 2016
@@ -21,6 +21,7 @@ package org.apache.myfaces.tobago.intern
 
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.internal.component.AbstractUISection;
+import org.apache.myfaces.tobago.model.CollapseMode;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.TobagoClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -73,7 +74,9 @@ public class SectionRenderer extends Pan
         tag = HtmlElements.H6;
     }
 
-    encodeHidden(writer, clientId, collapsed);
+    if (section.getCollapsedMode() != CollapseMode.none) {
+      encodeHidden(writer, clientId, collapsed);
+    }
 
     writer.startElement(HtmlElements.DIV);
     writer.writeClassAttribute(TobagoClass.SECTION__HEADER);

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupTagDeclaration.java?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupTagDeclaration.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PopupTagDeclaration.java
Fri Dec  2 08:40:43 2016
@@ -25,10 +25,10 @@ import org.apache.myfaces.tobago.apt.ann
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.component.AbstractUIPopup;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasCollapsedMode;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
+import org.apache.myfaces.tobago.model.CollapseMode;
 
 /**
  * Renders a popup panel.
@@ -42,7 +42,7 @@ import org.apache.myfaces.tobago.interna
     rendererType = RendererTypes.POPUP
 )
 public interface PopupTagDeclaration
-    extends HasIdBindingAndRendered, IsVisual, HasCollapsedMode, HasTip {
+    extends HasIdBindingAndRendered, IsVisual, HasTip {
 
   /**
    * Indicating the collapsed state of this component.
@@ -51,4 +51,10 @@ public interface PopupTagDeclaration
   @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
   void setCollapsed(String collapsed);
 
+  @TagAttribute
+  @UIComponentTagAttribute(
+      type = "org.apache.myfaces.tobago.model.CollapseMode",
+      defaultValue = CollapseMode.ABSENT,
+      defaultCode = "org.apache.myfaces.tobago.model.CollapseMode.absent")
+  void setCollapsedMode(String collapsed);
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasCollapsedMode.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasCollapsedMode.java?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasCollapsedMode.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasCollapsedMode.java
Fri Dec  2 08:40:43 2016
@@ -31,7 +31,7 @@ public interface HasCollapsedMode {
   @TagAttribute
   @UIComponentTagAttribute(
           type = "org.apache.myfaces.tobago.model.CollapseMode",
-          defaultValue = CollapseMode.ABSENT,
-          defaultCode = "org.apache.myfaces.tobago.model.CollapseMode.absent")
+          defaultValue = CollapseMode.NONE,
+          defaultCode = "org.apache.myfaces.tobago.model.CollapseMode.none")
   void setCollapsedMode(String collapsed);
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/model/CollapseMode.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/model/CollapseMode.java?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/model/CollapseMode.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/model/CollapseMode.java
Fri Dec  2 08:40:43 2016
@@ -22,8 +22,10 @@ package org.apache.myfaces.tobago.model;
 public enum CollapseMode {
 
   hidden,
-  absent;
+  absent,
+  none;
 
   public static final String HIDDEN = "hidden";
   public static final String ABSENT = "absent";
+  public static final String NONE = "none";
 }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.test.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.test.js?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.test.js
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.test.js
Fri Dec  2 08:40:43 2016
@@ -234,8 +234,8 @@ QUnit.test("Full Server Request: close b
 QUnit.test("Client Sided: show -> hide transition", function (assert) {
   assert.expect(2);
 
-  var $show = jQueryFrame("#page\\:mainForm\\:client\\:show");
-  var $hide = jQueryFrame("#page\\:mainForm\\:client\\:hide");
+  var $show = jQueryFrame("#page\\:mainForm\\:client\\:showNoRequestBox");
+  var $hide = jQueryFrame("#page\\:mainForm\\:client\\:hideNoRequestBox");
   var $box = jQueryFrame("#page\\:mainForm\\:client\\:noRequestBox");
 
   $show.click();
@@ -248,8 +248,8 @@ QUnit.test("Client Sided: show -> hide t
 QUnit.test("Client Sided: hide -> show transition", function (assert) {
   assert.expect(2);
 
-  var $show = jQueryFrame("#page\\:mainForm\\:client\\:show");
-  var $hide = jQueryFrame("#page\\:mainForm\\:client\\:hide");
+  var $show = jQueryFrame("#page\\:mainForm\\:client\\:showNoRequestBox");
+  var $hide = jQueryFrame("#page\\:mainForm\\:client\\:hideNoRequestBox");
   var $box = jQueryFrame("#page\\:mainForm\\:client\\:noRequestBox");
 
   $hide.click();
@@ -264,11 +264,11 @@ QUnit.test("Client Sided: hide content a
   var done = assert.async();
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $show = jQueryFrame("#page\\:mainForm\\:client\\:show");
-  var $hide = jQueryFrame("#page\\:mainForm\\:client\\:hide");
+  var $show = jQueryFrame("#page\\:mainForm\\:client\\:showNoRequestBox");
+  var $hide = jQueryFrame("#page\\:mainForm\\:client\\:hideNoRequestBox");
   var $box = jQueryFrame("#page\\:mainForm\\:client\\:noRequestBox");
-  var $in = jQueryFrame("#page\\:mainForm\\:client\\:in\\:\\:field");
-  var $submit = jQueryFrame("#page\\:mainForm\\:client\\:submit");
+  var $in = jQueryFrame("#page\\:mainForm\\:client\\:inNoRequestBox\\:\\:field");
+  var $submit = jQueryFrame("#page\\:mainForm\\:client\\:submitNoRequestBox");
 
   $hide.click();
   assert.equal($box.hasClass("tobago-collapsed"), true);
@@ -288,9 +288,9 @@ QUnit.test("Ajax: show -> hide transitio
   var done = assert.async(2);
   var step = 1;
 
-  var $show = jQueryFrame("#page\\:mainForm\\:ajax\\:show");
-  var $hide = jQueryFrame("#page\\:mainForm\\:ajax\\:hide");
-  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:in\\:\\:field");
+  var $show = jQueryFrame("#page\\:mainForm\\:ajax\\:showAjaxBox");
+  var $hide = jQueryFrame("#page\\:mainForm\\:ajax\\:hideAjaxBox");
+  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:inAjaxBox\\:\\:field");
 
   $show.click();
 
@@ -326,9 +326,9 @@ QUnit.test("Ajax: hide -> show transitio
   var done = assert.async(2);
   var step = 1;
 
-  var $show = jQueryFrame("#page\\:mainForm\\:ajax\\:show");
-  var $hide = jQueryFrame("#page\\:mainForm\\:ajax\\:hide");
-  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:in\\:\\:field");
+  var $show = jQueryFrame("#page\\:mainForm\\:ajax\\:showAjaxBox");
+  var $hide = jQueryFrame("#page\\:mainForm\\:ajax\\:hideAjaxBox");
+  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:inAjaxBox\\:\\:field");
 
   $hide.click();
 
@@ -356,16 +356,16 @@ QUnit.test("Ajax: hide -> show transitio
   });
 });
 
-QUnit.test("Client Sided: hide content and submit empty string", function (assert) {
+QUnit.test("Ajax: hide content and submit empty string", function (assert) {
   assert.expect(3);
   var done = assert.async(3);
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $show = jQueryFrame("#page\\:mainForm\\:ajax\\:show");
-  var $hide = jQueryFrame("#page\\:mainForm\\:ajax\\:hide");
-  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:in\\:\\:field");
-  var $submit = jQueryFrame("#page\\:mainForm\\:ajax\\:submit");
+  var $show = jQueryFrame("#page\\:mainForm\\:ajax\\:showAjaxBox");
+  var $hide = jQueryFrame("#page\\:mainForm\\:ajax\\:hideAjaxBox");
+  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:inAjaxBox\\:\\:field");
+  var $submit = jQueryFrame("#page\\:mainForm\\:ajax\\:submitAjaxBox");
 
   $show.click();
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml
Fri Dec  2 08:40:43 2016
@@ -46,13 +46,13 @@
   <tc:section label="Full Server Request">
     <tc:form id="server">
       <p>In this example, the operaction tag is used to change the state of the boxes.</p>
-      <pre><code class="language-markup">&lt;tc:box id="box1" label="Full
Request Box 1">
+      <pre><code class="language-markup">&lt;tc:box id="box1" label="Full
Request Box 1" collapsedMode="absent">
   &lt;f:facet name="bar">
     &lt;tc:buttons>
       &lt;tc:button label="show">
         &lt;tc:operation name="show" for="box1"/>
       ...</code></pre>
-      <tc:box id="box1" label="Full Request Box 1">
+      <tc:box id="box1" label="Full Request Box 1" collapsedMode="absent">
         <f:facet name="bar">
           <tc:buttons>
             <tc:button id="show1" label="show">
@@ -65,7 +65,7 @@
         </f:facet>
         <tc:out id="content1" value="Content"/>
       </tc:box>
-      <tc:box id="box2" label="Full Request Box 2">
+      <tc:box id="box2" label="Full Request Box 2" collapsedMode="absent">
         <f:facet name="bar">
           <tc:buttons>
             <tc:button id="show2" label="show">
@@ -98,17 +98,17 @@
       <tc:box id="noRequestBox" label="No Request Box" collapsed="true" collapsedMode="hidden">
         <f:facet name="bar">
           <tc:buttons>
-            <tc:button id="show" label="show" omit="true">
+            <tc:button id="showNoRequestBox" label="show" omit="true">
               <tc:operation name="show" for="noRequestBox"/>
             </tc:button>
-            <tc:button id="hide" label="hide" omit="true">
+            <tc:button id="hideNoRequestBox" label="hide" omit="true">
               <tc:operation name="hide" for="noRequestBox"/>
             </tc:button>
           </tc:buttons>
         </f:facet>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inNoRequestBox" label="Required" required="true"/>
       </tc:box>
-      <tc:button id="submit" label="Submit"/>
+      <tc:button id="submitNoRequestBox" label="Submit"/>
     </tc:form>
   </tc:section>
 
@@ -131,19 +131,19 @@
       <tc:box id="ajaxBox" label="Ajax Box" collapsedMode="absent">
         <f:facet name="bar">
           <tc:buttons>
-            <tc:button id="show" label="show" immediate="true">
+            <tc:button id="showAjaxBox" label="show" immediate="true">
               <f:ajax execute="ajaxBox" render="ajaxBox"/>
               <tc:operation name="show" for="ajaxBox"/>
             </tc:button>
-            <tc:button id="hide" label="hide" immediate="true">
+            <tc:button id="hideAjaxBox" label="hide" immediate="true">
               <f:ajax execute="ajaxBox" render="ajaxBox"/>
               <tc:operation name="hide" for="ajaxBox"/>
             </tc:button>
           </tc:buttons>
         </f:facet>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inAjaxBox" label="Required" required="true"/>
       </tc:box>
-      <tc:button id="submit" label="Submit"/>
+      <tc:button id="submitAjaxBox" label="Submit"/>
     </tc:form>
   </tc:section>
 </ui:composition>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.test.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.test.js?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.test.js
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.test.js
Fri Dec  2 08:40:43 2016
@@ -21,11 +21,11 @@ QUnit.test("Simple Panel", function (ass
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $show = jQueryFrame("#\\page\\:mainForm\\:simple\\:show");
-  var $hide = jQueryFrame("#\\page\\:mainForm\\:simple\\:hide");
-  var $submit = jQueryFrame("#\\page\\:mainForm\\:simple\\:submit");
+  var $show = jQueryFrame("#\\page\\:mainForm\\:simple\\:showSimple");
+  var $hide = jQueryFrame("#\\page\\:mainForm\\:simple\\:hideSimple");
+  var $submit = jQueryFrame("#\\page\\:mainForm\\:simple\\:submitSimple");
   var $panelCollapsed = jQueryFrame("#page\\:mainForm\\:simple\\:simplePanel\\:\\:collapse");
-  var $in = jQueryFrame("#page\\:mainForm\\:simple\\:in\\:\\:field");
+  var $in = jQueryFrame("#page\\:mainForm\\:simple\\:inSimple\\:\\:field");
 
   $show.click();
 
@@ -102,11 +102,11 @@ QUnit.test("Full Server Request", functi
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $show = jQueryFrame("#\\page\\:mainForm\\:server\\:show");
-  var $hide = jQueryFrame("#\\page\\:mainForm\\:server\\:hide");
-  var $submit = jQueryFrame("#\\page\\:mainForm\\:server\\:submit");
+  var $show = jQueryFrame("#\\page\\:mainForm\\:server\\:showServer");
+  var $hide = jQueryFrame("#\\page\\:mainForm\\:server\\:hideServer");
+  var $submit = jQueryFrame("#\\page\\:mainForm\\:server\\:submitServer");
   var $panelCollapsed = jQueryFrame("#page\\:mainForm\\:server\\:serverPanel\\:\\:collapse");
-  var $in = jQueryFrame("#page\\:mainForm\\:server\\:in\\:\\:field");
+  var $in = jQueryFrame("#page\\:mainForm\\:server\\:inServer\\:\\:field");
 
   $show.click();
 
@@ -183,11 +183,11 @@ QUnit.test("Client Sided", function (ass
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $show = jQueryFrame("#\\page\\:mainForm\\:client\\:show");
-  var $hide = jQueryFrame("#\\page\\:mainForm\\:client\\:hide");
-  var $submit = jQueryFrame("#\\page\\:mainForm\\:client\\:submit");
+  var $show = jQueryFrame("#\\page\\:mainForm\\:client\\:showClient");
+  var $hide = jQueryFrame("#\\page\\:mainForm\\:client\\:hideClient");
+  var $submit = jQueryFrame("#\\page\\:mainForm\\:client\\:submitClient");
   var $panelCollapsed = jQueryFrame("#page\\:mainForm\\:client\\:clientPanel\\:\\:collapse");
-  var $in = jQueryFrame("#page\\:mainForm\\:client\\:in\\:\\:field");
+  var $in = jQueryFrame("#page\\:mainForm\\:client\\:inClient\\:\\:field");
 
   $show.click();
   assert.equal($panelCollapsed.val(), "false");
@@ -249,11 +249,11 @@ QUnit.test("Ajax", function (assert) {
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $show = jQueryFrame("#\\page\\:mainForm\\:ajax\\:show");
-  var $hide = jQueryFrame("#\\page\\:mainForm\\:ajax\\:hide");
-  var $submit = jQueryFrame("#\\page\\:mainForm\\:ajax\\:submit");
+  var $show = jQueryFrame("#\\page\\:mainForm\\:ajax\\:showAjax");
+  var $hide = jQueryFrame("#\\page\\:mainForm\\:ajax\\:hideAjax");
+  var $submit = jQueryFrame("#\\page\\:mainForm\\:ajax\\:submitAjax");
   var $panelCollapsed = jQueryFrame("#page\\:mainForm\\:ajax\\:ajaxPanel\\:\\:collapse");
-  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:in\\:\\:field");
+  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:inAjax\\:\\:field");
 
   $show.click();
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml
Fri Dec  2 08:40:43 2016
@@ -31,17 +31,17 @@
     <p>A simple panel using an controller for the collapsible state.
       For the 'hide'-Button is the attribute <code>immediate="true"</code> set
to submitting without validation.
       So the panel could be hide even if the inputfield is empty.</p>
-    <p>The <code>collapsibleMode</code> is not set.
+    <p>For the panel <code>collapsibleMode="absent"</code> is set.
       The 'Submit'-button can be executed without violation if the panel is in the hidden
state.</p>
     <tc:form id="simple">
       <tc:buttons>
-        <tc:button id="show" label="show" action="#{collapsiblePanelController.showPanel}"/>
-        <tc:button id="hide" label="hide" action="#{collapsiblePanelController.hidePanel}"
immediate="true"/>
+        <tc:button id="showSimple" label="show" action="#{collapsiblePanelController.showPanel}"/>
+        <tc:button id="hideSimple" label="hide" action="#{collapsiblePanelController.hidePanel}"
immediate="true"/>
       </tc:buttons>
-      <tc:button id="submit" label="Submit"/>
-      <tc:panel id="simplePanel" collapsed="#{collapsiblePanelController.panelCollapsed}">
+      <tc:button id="submitSimple" label="Submit"/>
+      <tc:panel id="simplePanel" collapsed="#{collapsiblePanelController.panelCollapsed}"
collapsedMode="absent">
         <tc:style customClass="demo-data-attribute"/>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inSimple" label="Required" required="true"/>
       </tc:panel>
     </tc:form>
   </tc:section>
@@ -49,22 +49,22 @@
   <tc:section label="Full Server Request">
     <p>In this example the collapsible state is changed by <code class="language-markup">&lt;tc:operation/></code>
       with full server request. So the server get the current state.</p>
-    <p>The <code>collapsibleMode</code> is not set.
+    <p>The <code>collapsibleMode="absent"</code> is set.
       The 'Submit'-button can be executed without violation if the panel is hidden.</p>
     <p>For the 'hide'-Button the attribute <code>immediate="true"</code>
is set to submitting without validation.</p>
     <tc:form id="server">
       <tc:buttons>
-        <tc:button id="show" label="show">
+        <tc:button id="showServer" label="show">
           <tc:operation name="show" for="serverPanel"/>
         </tc:button>
-        <tc:button id="hide" label="hide" immediate="true">
+        <tc:button id="hideServer" label="hide" immediate="true">
           <tc:operation name="hide" for="serverPanel"/>
         </tc:button>
       </tc:buttons>
-      <tc:button id="submit" label="Submit"/>
-      <tc:panel id="serverPanel">
+      <tc:button id="submitServer" label="Submit"/>
+      <tc:panel id="serverPanel" collapsedMode="absent">
         <tc:style customClass="demo-data-attribute"/>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inServer" label="Required" required="true"/>
       </tc:panel>
     </tc:form>
   </tc:section>
@@ -78,17 +78,17 @@
       So, if the inputfield is empty and the panel is hidden, a violation occur when pressing
the 'Submit'-button.</p>
     <tc:form id="client">
       <tc:buttons>
-        <tc:button id="show" label="show" omit="true">
+        <tc:button id="showClient" label="show" omit="true">
           <tc:operation name="show" for="clientPanel"/>
         </tc:button>
-        <tc:button id="hide" label="hide" omit="true" immediate="true">
+        <tc:button id="hideClient" label="hide" omit="true" immediate="true">
           <tc:operation name="hide" for="clientPanel"/>
         </tc:button>
       </tc:buttons>
-      <tc:button id="submit" label="Submit"/>
+      <tc:button id="submitClient" label="Submit"/>
       <tc:panel id="clientPanel" collapsedMode="hidden">
         <tc:style customClass="demo-data-attribute"/>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inClient" label="Required" required="true"/>
       </tc:panel>
     </tc:form>
   </tc:section>
@@ -96,7 +96,7 @@
   <tc:section label="Ajax">
     <p>Here we have the transitions <code>show</code> and <code>hide</code>
with AJAX request.
       The buttons have set <code>immediate="true"</code> to execute the transition
without validation.</p>
-    <p>The <code>collapsibleMode</code> is not set.
+    <p>The <code>collapsibleMode="absent"</code> is set.
       The 'Submit'-button can be executed without violation if the panel is hidden.</p>
     <pre><code class="language-markup">&lt;tc:button label="show" immediate="true">
   &lt;f:ajax execute="ajaxPanel" render="ajaxPanel"/>
@@ -104,19 +104,19 @@
 &lt;/tc:button></code></pre>
     <tc:form id="ajax">
       <tc:buttons>
-        <tc:button id="show" label="show" immediate="true">
+        <tc:button id="showAjax" label="show" immediate="true">
           <f:ajax execute="ajaxPanel" render="ajaxPanel"/>
           <tc:operation name="show" for="ajaxPanel"/>
         </tc:button>
-        <tc:button id="hide" label="hide" immediate="true">
+        <tc:button id="hideAjax" label="hide" immediate="true">
           <f:ajax execute="ajaxPanel" render="ajaxPanel"/>
           <tc:operation name="hide" for="ajaxPanel"/>
         </tc:button>
       </tc:buttons>
-      <tc:button id="submit" label="Submit"/>
-      <tc:panel id="ajaxPanel">
+      <tc:button id="submitAjax" label="Submit"/>
+      <tc:panel id="ajaxPanel" collapsedMode="absent">
         <tc:style customClass="demo-data-attribute"/>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inAjax" label="Required" required="true"/>
       </tc:panel>
     </tc:form>
   </tc:section>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.test.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.test.js?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.test.js
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.test.js
Fri Dec  2 08:40:43 2016
@@ -21,11 +21,11 @@ QUnit.test("Simple Panel", function (ass
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $submit = jQueryFrame("#\\page\\:mainForm\\:simple\\:submit");
-  var $show = jQueryFrame("#\\page\\:mainForm\\:simple\\:show");
-  var $hide = jQueryFrame("#\\page\\:mainForm\\:simple\\:hide");
+  var $submit = jQueryFrame("#\\page\\:mainForm\\:simple\\:submitSimple");
+  var $show = jQueryFrame("#\\page\\:mainForm\\:simple\\:showSimple");
+  var $hide = jQueryFrame("#\\page\\:mainForm\\:simple\\:hideSimple");
   var $sectionCollapsed = jQueryFrame("#page\\:mainForm\\:simple\\:simpleSection\\:\\:collapse");
-  var $in = jQueryFrame("#page\\:mainForm\\:simple\\:in\\:\\:field");
+  var $in = jQueryFrame("#page\\:mainForm\\:simple\\:inSimple\\:\\:field");
 
   $show.click();
 
@@ -102,11 +102,11 @@ QUnit.test("Full Server Request", functi
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $submit = jQueryFrame("#\\page\\:mainForm\\:server\\:submit");
-  var $show = jQueryFrame("#\\page\\:mainForm\\:server\\:show");
-  var $hide = jQueryFrame("#\\page\\:mainForm\\:server\\:hide");
+  var $submit = jQueryFrame("#\\page\\:mainForm\\:server\\:submitServer");
+  var $show = jQueryFrame("#\\page\\:mainForm\\:server\\:showServer");
+  var $hide = jQueryFrame("#\\page\\:mainForm\\:server\\:hideServer");
   var $sectionCollapsed = jQueryFrame("#page\\:mainForm\\:server\\:fullRequestSection\\:\\:collapse");
-  var $in = jQueryFrame("#page\\:mainForm\\:server\\:in\\:\\:field");
+  var $in = jQueryFrame("#page\\:mainForm\\:server\\:inServer\\:\\:field");
 
   $show.click();
 
@@ -183,11 +183,11 @@ QUnit.test("Client Sided", function (ass
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $submit = jQueryFrame("#\\page\\:mainForm\\:client\\:submit");
-  var $show = jQueryFrame("#\\page\\:mainForm\\:client\\:show");
-  var $hide = jQueryFrame("#\\page\\:mainForm\\:client\\:hide");
+  var $submit = jQueryFrame("#\\page\\:mainForm\\:client\\:submitClient");
+  var $show = jQueryFrame("#\\page\\:mainForm\\:client\\:showClient");
+  var $hide = jQueryFrame("#\\page\\:mainForm\\:client\\:hideClient");
   var $sectionCollapsed = jQueryFrame("#page\\:mainForm\\:client\\:clientSection\\:\\:collapse");
-  var $in = jQueryFrame("#page\\:mainForm\\:client\\:in\\:\\:field");
+  var $in = jQueryFrame("#page\\:mainForm\\:client\\:inClient\\:\\:field");
 
   $show.click();
   assert.equal($sectionCollapsed.val(), "false");
@@ -249,11 +249,11 @@ QUnit.test("Ajax", function (assert) {
   var step = 1;
 
   var $messages = jQueryFrame("#page\\:messages .tobago-messages");
-  var $submit = jQueryFrame("#\\page\\:mainForm\\:ajax\\:submit");
-  var $show = jQueryFrame("#\\page\\:mainForm\\:ajax\\:show");
-  var $hide = jQueryFrame("#\\page\\:mainForm\\:ajax\\:hide");
+  var $submit = jQueryFrame("#\\page\\:mainForm\\:ajax\\:submitAjax");
+  var $show = jQueryFrame("#\\page\\:mainForm\\:ajax\\:showAjax");
+  var $hide = jQueryFrame("#\\page\\:mainForm\\:ajax\\:hideAjax");
   var $sectionCollapsed = jQueryFrame("#page\\:mainForm\\:ajax\\:ajaxSection\\:\\:collapse");
-  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:in\\:\\:field");
+  var $in = jQueryFrame("#page\\:mainForm\\:ajax\\:inAjax\\:\\:field");
 
   $show.click();
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml?rev=1772314&r1=1772313&r2=1772314&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml
Fri Dec  2 08:40:43 2016
@@ -28,18 +28,19 @@
   <tc:section label="Simple Section">
     <p>A simple collapsible section. The <code>collapsed</code> attribute
is set by a controller.
       The 'hide'-button got <code>immediate="true"</code> to submitting without
validation.</p>
-    <p>The <code>collapsedMode</code> is not set.
+    <p>The <code>collapsedMode="absent"</code> is set.
       The 'Submit'-button can be executed without violation if the content of section is
hidden.</p>
     <tc:form id="simple">
-      <tc:button id="submit" label="Submit"/>
-      <tc:section id="simpleSection" label="Collapsible Section" collapsed="#{collapsibleSectionController.collapsed}">
+      <tc:button id="submitSimple" label="Submit"/>
+      <tc:section id="simpleSection" label="Collapsible Section" collapsed="#{collapsibleSectionController.collapsed}"
+                  collapsedMode="absent">
         <f:facet name="bar">
           <tc:buttons>
-            <tc:button id="show" label="show" action="#{collapsibleSectionController.show}"/>
-            <tc:button id="hide" label="hide" action="#{collapsibleSectionController.hide}"
immediate="true"/>
+            <tc:button id="showSimple" label="show" action="#{collapsibleSectionController.show}"/>
+            <tc:button id="hideSimple" label="hide" action="#{collapsibleSectionController.hide}"
immediate="true"/>
           </tc:buttons>
         </f:facet>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inSimple" label="Required" required="true"/>
       </tc:section>
     </tc:form>
   </tc:section>
@@ -48,22 +49,22 @@
     <p>The state is changed by <code class="language-markup">&lt;tc:operation/></code>
with a full server request.
       The attribute <code>immediate="true"</code> is set for the 'hide'-button
       to change the state without validating the inputfield.</p>
-    <p>The <code>collapsedMode</code> is not set.
+    <p>The <code>collapsedMode="absent"</code> is set.
       The 'Submit'-button can be executed without violation if the content of section is
hidden.</p>
     <tc:form id="server">
-      <tc:button id="submit" label="Submit"/>
-      <tc:section id="fullRequestSection" label="Collapsible Section">
+      <tc:button id="submitServer" label="Submit"/>
+      <tc:section id="fullRequestSection" label="Collapsible Section" collapsedMode="absent">
         <f:facet name="bar">
           <tc:buttons>
-            <tc:button id="show" label="show">
+            <tc:button id="showServer" label="show">
               <tc:operation name="show" for="fullRequestSection"/>
             </tc:button>
-            <tc:button id="hide" label="hide" immediate="true">
+            <tc:button id="hideServer" label="hide" immediate="true">
               <tc:operation name="hide" for="fullRequestSection"/>
             </tc:button>
           </tc:buttons>
         </f:facet>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inServer" label="Required" required="true"/>
       </tc:section>
     </tc:form>
   </tc:section>
@@ -76,19 +77,19 @@
       The hidden content of the section will also be validated.<br/>
       If the 'Submit'-button is pressed while the inputfield is empty, a violation occurs.</p>
     <tc:form id="client">
-      <tc:button id="submit" label="Submit"/>
+      <tc:button id="submitClient" label="Submit"/>
       <tc:section id="clientSection" label="Collapsible Section" collapsedMode="hidden">
         <f:facet name="bar">
           <tc:buttons>
-            <tc:button id="show" label="show" omit="true">
+            <tc:button id="showClient" label="show" omit="true">
               <tc:operation name="show" for="clientSection"/>
             </tc:button>
-            <tc:button id="hide" label="hide" omit="true">
+            <tc:button id="hideClient" label="hide" omit="true">
               <tc:operation name="hide" for="clientSection"/>
             </tc:button>
           </tc:buttons>
         </f:facet>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inClient" label="Required" required="true"/>
       </tc:section>
     </tc:form>
   </tc:section>
@@ -96,24 +97,24 @@
   <tc:section label="Ajax">
     <p>The show and hide transitions are run with an ajax request.
       The 'hide'-button got <code>immediate="true"</code> to submitting without
validation.</p>
-    <p>The <code>collapsedMode</code> is not set.
+    <p>The <code>collapsedMode="absent"</code> is set.
       The 'Submit'-button can be executed without violation if the content of section is
hidden.</p>
     <tc:form id="ajax">
-      <tc:button id="submit" label="Submit"/>
-      <tc:section id="ajaxSection" label="Collapsible Section">
+      <tc:button id="submitAjax" label="Submit"/>
+      <tc:section id="ajaxSection" label="Collapsible Section" collapsedMode="absent">
         <f:facet name="bar">
           <tc:buttons>
-            <tc:button id="show" label="show">
+            <tc:button id="showAjax" label="show">
               <f:ajax execute="ajaxSection" render="ajaxSection"/>
               <tc:operation name="show" for="ajaxSection"/>
             </tc:button>
-            <tc:button id="hide" label="hide" immediate="true">
+            <tc:button id="hideAjax" label="hide" immediate="true">
               <f:ajax execute="ajaxSection" render="ajaxSection"/>
               <tc:operation name="hide" for="ajaxSection"/>
             </tc:button>
           </tc:buttons>
         </f:facet>
-        <tc:in id="in" label="Required" required="true"/>
+        <tc:in id="inAjax" label="Required" required="true"/>
       </tc:section>
     </tc:form>
   </tc:section>




Mime
View raw message