Author: jpapouse
Date: 2011-07-26 07:26:58 -0400 (Tue, 26 Jul 2011)
New Revision: 22567
Added:
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/moreStacks.xhtml
Modified:
modules/tests/metamer/branches/sandbox-components/application/src/main/java/org/richfaces/tests/metamer/bean/NotifyBean.java
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/list.xhtml
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/simple.xhtml
Log:
RFPL-1504:
- created page with two stacks for notify component
- updated simple page
Modified:
modules/tests/metamer/branches/sandbox-components/application/src/main/java/org/richfaces/tests/metamer/bean/NotifyBean.java
===================================================================
---
modules/tests/metamer/branches/sandbox-components/application/src/main/java/org/richfaces/tests/metamer/bean/NotifyBean.java 2011-07-26
08:28:28 UTC (rev 22566)
+++
modules/tests/metamer/branches/sandbox-components/application/src/main/java/org/richfaces/tests/metamer/bean/NotifyBean.java 2011-07-26
11:26:58 UTC (rev 22567)
@@ -53,7 +53,8 @@
private static Logger logger;
private Attributes attributesNotify;
private Attributes attributesNotifyMessages;
- private Attributes attributesNotifyStack;
+ private Attributes attributesNotifyStackFirst;
+ private Attributes attributesNotifyStackSecond;
private Attributes attributesBean;
/**
@@ -65,21 +66,34 @@
logger.debug("initializing bean " + getClass().getName());
attributesNotify =
Attributes.getComponentAttributesFromClass(AbstractNotify.class, getClass());
attributesNotifyMessages =
Attributes.getComponentAttributesFromClass(AbstractNotifyMessages.class, getClass());
- attributesNotifyStack =
Attributes.getComponentAttributesFromClass(AbstractNotifyStack.class, getClass());
+ attributesNotifyStackFirst =
Attributes.getComponentAttributesFromClass(AbstractNotifyStack.class, getClass());
+ attributesNotifyStackSecond =
Attributes.getComponentAttributesFromClass(AbstractNotifyStack.class, getClass());
attributesBean = Attributes.getEmptyAttributes(getClass());
attributesNotify.putAll(getGeneralAttributes());
attributesNotify.setAttribute("text", DEFAULT_TEXT);
attributesNotify.setAttribute("title", DEFAULT_TITLE);
+ attributesNotify.setAttribute("rendered", true);
attributesNotifyMessages.putAll(getGeneralAttributes());
attributesNotifyMessages.setAttribute("interval", 800);
attributesNotifyMessages.setAttribute("showSummary", true);
+ attributesNotifyMessages.setAttribute("rendered", true);
+ attributesNotifyMessages.remove("for");
+ attributesNotifyMessages.remove("ajaxRendered");
- attributesNotifyStack.setAttribute("push", "bottom");
- attributesNotifyStack.setAttribute("stackDir1", "down");
- attributesNotifyStack.setAttribute("stackDir2", "left");
+ attributesNotifyStackFirst.setAttribute("push", "bottom");
+ attributesNotifyStackFirst.setAttribute("stackDir1",
"down");
+ attributesNotifyStackFirst.setAttribute("stackDir2",
"left");
+ attributesNotifyStackFirst.setAttribute("rendered", true);
+ attributesNotifyStackFirst.setAttribute("styleClass",
"topRight");
+ attributesNotifyStackSecond.setAttribute("push", "bottom");
+ attributesNotifyStackSecond.setAttribute("stackDir1",
"down");
+ attributesNotifyStackSecond.setAttribute("stackDir2",
"left");
+ attributesNotifyStackSecond.setAttribute("rendered", true);
+ attributesNotifyStackSecond.setAttribute("styleClass",
"bottomRight");
+
attributesBean.setAttribute("messageCount", "1");
attributesBean.setAttribute("messageDetail", DEFAULT_DETAIL);
attributesBean.setAttribute("messageText", DEFAULT_TEXT);
@@ -115,10 +129,14 @@
}
- public Attributes getAttributesNotifyStack() {
- return attributesNotifyStack;
+ public Attributes getAttributesNotifyStackFirst() {
+ return attributesNotifyStackFirst;
}
+ public Attributes getAttributesNotifyStackSecond() {
+ return attributesNotifyStackSecond;
+ }
+
public void setAttributesBean(Attributes attributesBean) {
this.attributesBean = attributesBean;
}
@@ -131,11 +149,14 @@
this.attributesNotifyMessages = attributesNotifyMessages;
}
-
- public void setAttributesNotifyStack(Attributes attributesNotifyStack) {
- this.attributesNotifyStack = attributesNotifyStack;
+ public void setAttributesNotifyStackFirst(Attributes attributesNotifyStack) {
+ this.attributesNotifyStackFirst = attributesNotifyStack;
}
+ public void setAttributesNotifyStackSecond(Attributes attributesNotifyStack) {
+ this.attributesNotifyStackSecond = attributesNotifyStack;
+ }
+
private void produceMessage(FacesMessage.Severity severity) {
int messageCount =
Integer.valueOf((String)attributesBean.get("messageCount").getValue());
String text = (String) attributesBean.get("messageText").getValue();
@@ -153,8 +174,8 @@
attributes.setAttribute("appearAnimation", "fade");
attributes.setAttribute("hideAnimation", "show");
attributes.setAttribute("showCloseButton", true);
- attributes.setAttribute("stack", "exampleNotifyStack");
attributes.setAttribute("stayTime", 100000);
+ attributes.remove("stack");
return attributes;
}
}
Modified:
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/list.xhtml
===================================================================
---
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/list.xhtml 2011-07-26
08:28:28 UTC (rev 22566)
+++
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/list.xhtml 2011-07-26
11:26:58 UTC (rev 22567)
@@ -35,6 +35,10 @@
<metamer:testPageLink id="simple" outcome="simple"
value="Simple">
Simple page that contains <b>notify:notify</b> and input
boxes for all its attributes.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="moreStacks"
outcome="moreStacks" value="More Stacks">
+ Simple page that contains stacks for <b>notify:notify</b> and
input boxes for all its attributes.
+ </metamer:testPageLink>
</ui:define>
Added:
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/moreStacks.xhtml
===================================================================
---
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/moreStacks.xhtml
(rev 0)
+++
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/moreStacks.xhtml 2011-07-26
11:26:58 UTC (rev 22567)
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:notify="http://richfaces.org/sandbox/notify"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <style>
+ .topLeft {
+ bottom: auto;
+ left: 10px;
+ top: 10px;
+ right: auto;
+ }
+
+ .topRight {
+ bottom: auto;
+ right: 10px;
+ top: 10px;
+ left: auto;
+ }
+
+ .bottomLeft {
+ bottom: 10px;
+ left: 10px;
+ top: auto;
+ right: auto;
+ }
+
+ .bottomRight {
+ bottom: 10px;
+ right: 10px;
+ top: auto;
+ left: auto;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="component">
+ <h:form>
+ <notify:notifyMessages ajaxRendered="true"
+
animationSpeed="#{notifyBean.attributesNotifyMessages['animationSpeed'].value}"
+
appearAnimation="#{notifyBean.attributesNotifyMessages['appearAnimation'].value}"
+
delay="#{notifyBean.attributesNotifyMessages['delay'].value}"
+ execute="{@form}"
+ for="number1"
+
globalOnly="#{notifyBean.attributesNotifyMessages['delay'].value}"
+
hideAnimation="#{notifyBean.attributesNotifyMessages['hideAnimation'].value}"
+
keepTransient="#{notifyBean.attributesNotifyMessages['keepTransient'].value}"
+
interval="#{notifyBean.attributesNotifyMessages['interval'].value}"
+
nonblocking="#{notifyBean.attributesNotifyMessages['nonBlocking'].value}"
+
nonblockingOpacity="#{notifyBean.attributesNotifyMessages['nonBlockingOpacity'].value}"
+
rendered="#{notifyBean.attributesNotifyMessages['rendered'].value}"
+
showCloseButton="#{notifyBean.attributesNotifyMessages['showCloseButton'].value}"
+
showDetail="#{notifyBean.attributesNotifyMessages['showDetail'].value}"
+
showHistory="#{notifyBean.attributesNotifyMessages['showHistory'].value}"
+
showShadow="#{notifyBean.attributesNotifyMessages['showShadow'].value}"
+
showSummary="#{notifyBean.attributesNotifyMessages['showSummary'].value}"
+ stack="topRightStack"
+
stayTime="#{notifyBean.attributesNotifyMessages['stayTime'].value}"
+
sticky="#{notifyBean.attributesNotifyMessages['sticky'].value}"
+
styleClass="#{notifyBean.attributesNotifyMessages['styleClass'].value}"
+ />
+ <notify:notifyMessages ajaxRendered="true"
+
animationSpeed="#{notifyBean.attributesNotifyMessages['animationSpeed'].value}"
+
appearAnimation="#{notifyBean.attributesNotifyMessages['appearAnimation'].value}"
+
delay="#{notifyBean.attributesNotifyMessages['delay'].value}"
+ execute="{@form}"
+ for="number2"
+
globalOnly="#{notifyBean.attributesNotifyMessages['delay'].value}"
+
hideAnimation="#{notifyBean.attributesNotifyMessages['hideAnimation'].value}"
+
keepTransient="#{notifyBean.attributesNotifyMessages['keepTransient'].value}"
+
interval="#{notifyBean.attributesNotifyMessages['interval'].value}"
+
nonblocking="#{notifyBean.attributesNotifyMessages['nonBlocking'].value}"
+
nonblockingOpacity="#{notifyBean.attributesNotifyMessages['nonBlockingOpacity'].value}"
+
rendered="#{notifyBean.attributesNotifyMessages['rendered'].value}"
+
showCloseButton="#{notifyBean.attributesNotifyMessages['showCloseButton'].value}"
+
showDetail="#{notifyBean.attributesNotifyMessages['showDetail'].value}"
+
showHistory="#{notifyBean.attributesNotifyMessages['showHistory'].value}"
+
showShadow="#{notifyBean.attributesNotifyMessages['showShadow'].value}"
+
showSummary="#{notifyBean.attributesNotifyMessages['showSummary'].value}"
+ stack="bottomRightStack"
+
stayTime="#{notifyBean.attributesNotifyMessages['stayTime'].value}"
+
sticky="#{notifyBean.attributesNotifyMessages['sticky'].value}"
+
styleClass="#{notifyBean.attributesNotifyMessages['styleClass'].value}"
+ />
+
+ <notify:notify
animationSpeed="#{notifyBean.attributesNotify['animationSpeed'].value}"
+
appearAnimation="#{notifyBean.attributesNotify['appearAnimation'].value}"
+
delay="#{notifyBean.attributesNotify['delay'].value}"
+
hideAnimation="#{notifyBean.attributesNotify['hideAnimation'].value}"
+
nonblocking="#{notifyBean.attributesNotify['nonBlocking'].value}"
+
nonblockingOpacity="#{notifyBean.attributesNotify['nonBlockingOpacity'].value}"
+
rendered="#{notifyBean.attributesNotify['rendered'].value}"
+
showCloseButton="#{notifyBean.attributesNotify['showCloseButton'].value}"
+
showHistory="#{notifyBean.attributesNotify['showHistory'].value}"
+
showShadow="#{notifyBean.attributesNotify['showShadow'].value}"
+ stack="topRightStack"
+
stayTime="#{notifyBean.attributesNotify['stayTime'].value}"
+
sticky="#{notifyBean.attributesNotify['sticky'].value}"
+
styleClass="#{notifyBean.attributesNotify['styleClass'].value}"
+ text="Stack 1 -
#{notifyBean.attributesNotify['text'].value}"
+ title="Stack 1 -
#{notifyBean.attributesNotify['title'].value}"
+ />
+ <notify:notify
animationSpeed="#{notifyBean.attributesNotify['animationSpeed'].value}"
+
appearAnimation="#{notifyBean.attributesNotify['appearAnimation'].value}"
+
delay="#{notifyBean.attributesNotify['delay'].value}"
+
hideAnimation="#{notifyBean.attributesNotify['hideAnimation'].value}"
+
nonblocking="#{notifyBean.attributesNotify['nonBlocking'].value}"
+
nonblockingOpacity="#{notifyBean.attributesNotify['nonBlockingOpacity'].value}"
+
rendered="#{notifyBean.attributesNotify['rendered'].value}"
+
showCloseButton="#{notifyBean.attributesNotify['showCloseButton'].value}"
+
showHistory="#{notifyBean.attributesNotify['showHistory'].value}"
+
showShadow="#{notifyBean.attributesNotify['showShadow'].value}"
+ stack="bottomRightStack"
+
stayTime="#{notifyBean.attributesNotify['stayTime'].value}"
+
sticky="#{notifyBean.attributesNotify['sticky'].value}"
+
styleClass="#{notifyBean.attributesNotify['styleClass'].value}"
+ text="Stack 2 -
#{notifyBean.attributesNotify['text'].value}"
+ title="Stack 2 -
#{notifyBean.attributesNotify['title'].value}"
+ />
+
+ <notify:notifyStack id="topRightStack"
+
push="#{notifyBean.attributesNotifyStackFirst['push'].value}"
+
rendered="#{notifyBean.attributesNotifyStackFirst['rendered'].value}"
+
stackDir1="#{notifyBean.attributesNotifyStackFirst['stackDir1'].value}"
+
stackDir2="#{notifyBean.attributesNotifyStackFirst['stackDir2'].value}"
+
styleClass="#{notifyBean.attributesNotifyStackFirst['styleClass'].value}"
+ />
+
+ <notify:notifyStack id="bottomRightStack"
+
push="#{notifyBean.attributesNotifyStackSecond['push'].value}"
+
rendered="#{notifyBean.attributesNotifyStackSecond['rendered'].value}"
+
stackDir1="#{notifyBean.attributesNotifyStackSecond['stackDir1'].value}"
+
stackDir2="#{notifyBean.attributesNotifyStackSecond['stackDir2'].value}"
+
styleClass="#{notifyBean.attributesNotifyStackSecond['styleClass'].value}"
+ />
+
+ <h:outputLabel for="number1" value="Number for Stack
1"/>
+ <h:inputText id="number1" required="true">
+ <f:validateLongRange minimum="5"
maximum="10"/>
+ <a4j:ajax event="change" execute="@form"/>
+ </h:inputText>
+ <br />
+ <h:outputLabel for="number2" value="Number for Stack
2"/>
+ <h:inputText id="number2" required="true">
+ <f:validateLongRange minimum="5"
maximum="10"/>
+ <a4j:ajax event="change" execute="@form"/>
+ </h:inputText>
+
+ </h:form>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <h2>Attributes - Notify</h2>
+ <metamer:attributes value="#{notifyBean.attributesNotify}"
id="attributesNotify" render="panel"/>
+ <h2>Attributes - Notify Messages</h2>
+ <metamer:attributes
value="#{notifyBean.attributesNotifyMessages}"
id="attributesNotifyMessages" render="panel"/>
+ <h2>Attributes - Notify Stack 1</h2>
+ <metamer:attributes
value="#{notifyBean.attributesNotifyStackFirst}"
id="attributesNotifyStack1" render="panel"/>
+ <h2>Attributes - Notify Stack 2</h2>
+ <metamer:attributes
value="#{notifyBean.attributesNotifyStackSecond}"
id="attributesNotifyStack2" render="panel"/>
+ <h2>Attributes - Bean</h2>
+ <metamer:attributes value="#{notifyBean.attributesBean}"
id="attributesBean" render="panel"/>
+ </ui:define>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/simple.xhtml
===================================================================
---
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/simple.xhtml 2011-07-26
08:28:28 UTC (rev 22566)
+++
modules/tests/metamer/branches/sandbox-components/application/src/main/webapp/components/notify/simple.xhtml 2011-07-26
11:26:58 UTC (rev 22567)
@@ -32,10 +32,11 @@
<h:form>
<a4j:outputPanel ajaxRendered="true">
<notify:notifyStack id="exampleNotifyStack"
-
push="#{notifyBean.attributesNotifyStack['push'].value}"
-
stackDir1="#{notifyBean.attributesNotifyStack['stackDir1'].value}"
-
stackDir2="#{notifyBean.attributesNotifyStack['stackDir2'].value}"
-
styleClass="#{notifyBean.attributesNotifyStack['styleClass'].value}"
+
push="#{notifyBean.attributesNotifyStackFirst['push'].value}"
+
rendered="#{notifyBean.attributesNotifyStackFirst['rendered'].value}"
+
stackDir1="#{notifyBean.attributesNotifyStackFirst['stackDir1'].value}"
+
stackDir2="#{notifyBean.attributesNotifyStackFirst['stackDir2'].value}"
+
styleClass="#{notifyBean.attributesNotifyStackFirst['styleClass'].value}"
/>
<notify:notify
animationSpeed="#{notifyBean.attributesNotify['animationSpeed'].value}"
appearAnimation="#{notifyBean.attributesNotify['appearAnimation'].value}"
@@ -43,18 +44,18 @@
hideAnimation="#{notifyBean.attributesNotify['hideAnimation'].value}"
nonblocking="#{notifyBean.attributesNotify['nonBlocking'].value}"
nonblockingOpacity="#{notifyBean.attributesNotify['nonBlockingOpacity'].value}"
+
rendered="#{notifyBean.attributesNotify['rendered'].value}"
showCloseButton="#{notifyBean.attributesNotify['showCloseButton'].value}"
showHistory="#{notifyBean.attributesNotify['showHistory'].value}"
showShadow="#{notifyBean.attributesNotify['showShadow'].value}"
-
stack="#{notifyBean.attributesNotify['stack'].value}"
+ stack="exampleNotifyStack"
stayTime="#{notifyBean.attributesNotify['stayTime'].value}"
sticky="#{notifyBean.attributesNotify['sticky'].value}"
styleClass="#{notifyBean.attributesNotify['styleClass'].value}"
text="#{notifyBean.attributesNotify['text'].value}"
title="#{notifyBean.attributesNotify['title'].value}"
/>
- <notify:notifyMessages
ajaxRendered="#{notifyBean.attributesNotifyMessages['ajaxRendered'].value}"
-
animationSpeed="#{notifyBean.attributesNotifyMessages['animationSpeed'].value}"
+ <notify:notifyMessages
animationSpeed="#{notifyBean.attributesNotifyMessages['animationSpeed'].value}"
appearAnimation="#{notifyBean.attributesNotifyMessages['appearAnimation'].value}"
delay="#{notifyBean.attributesNotifyMessages['delay'].value}"
execute="{@form}"
@@ -65,12 +66,13 @@
interval="#{notifyBean.attributesNotifyMessages['interval'].value}"
nonblocking="#{notifyBean.attributesNotifyMessages['nonBlocking'].value}"
nonblockingOpacity="#{notifyBean.attributesNotifyMessages['nonBlockingOpacity'].value}"
+
rendered="#{notifyBean.attributesNotifyMessages['rendered'].value}"
showCloseButton="#{notifyBean.attributesNotifyMessages['showCloseButton'].value}"
showDetail="#{notifyBean.attributesNotifyMessages['showDetail'].value}"
showHistory="#{notifyBean.attributesNotifyMessages['showHistory'].value}"
showShadow="#{notifyBean.attributesNotifyMessages['showShadow'].value}"
showSummary="#{notifyBean.attributesNotifyMessages['showSummary'].value}"
-
stack="#{notifyBean.attributesNotifyMessages['stack'].value}"
+ stack="exampleNotifyStack"
stayTime="#{notifyBean.attributesNotifyMessages['stayTime'].value}"
sticky="#{notifyBean.attributesNotifyMessages['sticky'].value}"
styleClass="#{notifyBean.attributesNotifyMessages['styleClass'].value}"
@@ -89,7 +91,7 @@
<h2>Attributes - Notify Messages</h2>
<metamer:attributes
value="#{notifyBean.attributesNotifyMessages}"
id="attributesNotifyMessages" render="panel"/>
<h2>Attributes - Notify Stack</h2>
- <metamer:attributes value="#{notifyBean.attributesNotifyStack}"
id="attributesNotifyStack" render="panel"/>
+ <metamer:attributes
value="#{notifyBean.attributesNotifyStackFirst}"
id="attributesNotifyStack" render="panel"/>
<h2>Attributes - Bean</h2>
<metamer:attributes value="#{notifyBean.attributesBean}"
id="attributesBean" render="panel"/>
</ui:define>