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/08/25 08:35:58 UTC
svn commit: r1757625 - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/
tobago-example/tobago-example-demo/src/main...
Author: lofwyr
Date: Thu Aug 25 08:35:58 2016
New Revision: 1757625
URL: http://svn.apache.org/viewvc?rev=1757625&view=rev
Log:
TOBAGO-1591: Popup: Change the default for collapsed from false to true
Modified:
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/IsCollapsible.java
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml
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=1757625&r1=1757624&r2=1757625&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 Thu Aug 25 08:35:58 2016
@@ -20,13 +20,14 @@
package org.apache.myfaces.tobago.internal.taglib.component;
import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+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.IsCollapsible;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
/**
@@ -41,5 +42,13 @@ import org.apache.myfaces.tobago.interna
rendererType = RendererTypes.POPUP
)
public interface PopupTagDeclaration
- extends HasIdBindingAndRendered, IsVisual, IsCollapsible, HasCollapsedMode, HasTip {
+ extends HasIdBindingAndRendered, IsVisual, HasCollapsedMode, HasTip {
+
+ /**
+ * Indicating the collapsed state of this component.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
+ void setCollapsed(String collapsed);
+
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/IsCollapsible.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/IsCollapsible.java?rev=1757625&r1=1757624&r2=1757625&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/IsCollapsible.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/IsCollapsible.java Thu Aug 25 08:35:58 2016
@@ -25,7 +25,7 @@ import org.apache.myfaces.tobago.apt.ann
public interface IsCollapsible {
/**
- * Enum indicating the collapsed state of this component.
+ * Indicating the collapsed state of this component.
*/
@TagAttribute
@UIComponentTagAttribute(type = "boolean", defaultValue = "false")
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=1757625&r1=1757624&r2=1757625&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 Thu Aug 25 08:35:58 2016
@@ -77,11 +77,12 @@
If <code>collapsedMode="absent"</code>, which is default, a hidden popup dialog will no be rendered.
If <code>collapsedMode="hidden"</code>, a hidden popup dialog will be rendered ob the page, but hidden by CSS.
</p>
- <p>Be careful with validations. For example, hidden required inputfields will be validated after submit.</p>
+ <p>Be careful with validations. For example, hidden required input fields will be validated after submit.</p>
<p>So to create the popup, use
- <code class="language-markup"><tc:popup collapsed="true" collapsedMode="hidden"></code>.
- This is because the popup should not be opened after reloading the page
- and the hidden popup must be already rendered, so the client don't have to send any requests to the server.</p>
+ <code class="language-markup"><tc:popup collapsedMode="hidden"></code>.
+ The attribute <code class="language-markup">collapsed="true"</code> is default,
+ because the popup should normally not be opened after loading the page.
+ The hidden popup must be already rendered, so the client don't have to send any requests to the server.</p>
<p>Client sided opening and closing can be done with the
<code class="language-markup"><tc:operation name="show|hide" for="[ID]"/></code> tag.
The attribute <code>name</code> must be set and can have the value 'show' and 'hide'
@@ -97,7 +98,7 @@
</tc:button>
<tc:out id="out" label="Text from Popup" value="#{popupController.popup2Text}"/>
- <tc:popup id="clientPopup" collapsed="true" collapsedMode="hidden">
+ <tc:popup id="clientPopup" collapsedMode="hidden">
<tc:box label="Client Sided Popup">
<tc:panel id="clientPopupMessages">
<tc:messages id="messages"/>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml?rev=1757625&r1=1757624&r2=1757625&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml Thu Aug 25 08:35:58 2016
@@ -32,13 +32,13 @@
The attribute <code>collapsedMode="absent"</code> is set,
so the 'Submit'-button outside the popup could be executed while popup is hidden.
Even if the required inputfield is empty.</p>
- <tc:button id="open" label="Open" action="#{collapsiblePopupController.open}"/>
- <tc:button id="submitOnPage" label="Submit"/>
+ <tc:button id="open1" label="Open" action="#{collapsiblePopupController.open}"/>
+ <tc:button id="submitOnPage1" label="Submit"/>
<tc:popup id="controllerPopup" collapsed="#{collapsiblePopupController.collapsed}">
<tc:box label="Simple Popup">
- <tc:in id="in" label="Required" required="true"/>
- <tc:button id="submitOnPopup" label="Submit"/>
- <tc:button id="close" label="Close" immediate="true" action="#{collapsiblePopupController.close}"/>
+ <tc:in id="in1" label="Required" required="true"/>
+ <tc:button id="submitOnPopup1" label="Submit"/>
+ <tc:button id="close1" label="Close" immediate="true" action="#{collapsiblePopupController.close}"/>
</tc:box>
</tc:popup>
</tc:form>
@@ -50,15 +50,15 @@
The attribute <code>collapsedMode="absent"</code> is set by default.
If you press the 'Submit'-button in the popup, the popup remains open,
because the server know the current state.</p>
- <tc:button id="open" label="Open">
+ <tc:button id="open2" label="Open">
<tc:operation name="show" for="fullServerRequestPopup"/>
</tc:button>
- <tc:button id="submitOnPage" label="Submit"/>
- <tc:popup id="fullServerRequestPopup" collapsed="true">
+ <tc:button id="submitOnPage2" label="Submit"/>
+ <tc:popup id="fullServerRequestPopup">
<tc:box label="Full Server Request">
- <tc:in id="in" label="Required" required="true"/>
- <tc:button id="submitOnPopup" label="Submit"/>
- <tc:button id="close" label="Close" immediate="true">
+ <tc:in id="in2" label="Required" required="true"/>
+ <tc:button id="submitOnPopup2" label="Submit"/>
+ <tc:button id="close2" label="Close" immediate="true">
<tc:operation name="hide" for="fullServerRequestPopup"/>
</tc:button>
</tc:box>
@@ -76,17 +76,17 @@
<p>The 'Submit'-button in the popup will close the popup, because the server didn't know the current state.</p>
<p>To avoid server request, the attribute <code>omit="true"</code>
is added to the 'Open'-button and the 'Close'-button.</p>
- <tc:button id="open" label="Open" omit="true">
+ <tc:button id="open3" label="Open" omit="true">
<tc:operation name="show" for="clientPopup"/>
</tc:button>
- <tc:button id="submitOnPage" label="Submit"/>
- <tc:popup id="clientPopup" collapsed="true" collapsedMode="hidden">
+ <tc:button id="submitOnPage3" label="Submit"/>
+ <tc:popup id="clientPopup" collapsedMode="hidden">
<tc:box label="Full Server Request">
<p>The opening of the popup is client sided.
Therefor the popup will be closed after pressing the 'Submit'-button which reload the page.</p>
- <tc:in id="in" label="Required" required="true"/>
- <tc:button id="submitOnPopup" label="Submit"/>
- <tc:button id="close" label="Close" omit="true">
+ <tc:in id="in3" label="Required" required="true"/>
+ <tc:button id="submitOnPopup3" label="Submit"/>
+ <tc:button id="close3" label="Close" omit="true">
<tc:operation name="hide" for="clientPopup"/>
</tc:button>
</tc:box>