JBoss Rich Faces SVN: r22466 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richAutocomplete and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-05 06:38:34 -0400 (Thu, 05 May 2011)
New Revision: 22466
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml
Log:
Add support for verify RF-10862
There is issue with a4j:ajax tag, adding listener to component with
valueChangeLister - listener set in a4j:ajax is ignored.
Add now support to test this issue in metamer
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-05-04 15:39:51 UTC (rev 22465)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-05-05 10:38:34 UTC (rev 22466)
@@ -393,8 +393,20 @@
* an event representing the activation of a user interface component
*/
public void valueChangeListener(ValueChangeEvent event) {
- logToPage("* value changed: " + event.getOldValue() + " -> " + event.getNewValue());
+ logToPage("*1 value changed: " + event.getOldValue() + " -> " + event.getNewValue());
}
+
+ /**
+ * A change event listener that logs to the page old and new value.
+ * This is 2nd ValueChacgeListener. Use 2 different listeners is
+ * useful when testing more than one listener definition for one component
+ *
+ * @param event
+ * an event representing the activation of a user interface component
+ */
+ public void changeEventListener(ValueChangeEvent event) {
+ logToPage("*2 value changed: " + event.getOldValue() + " -> " + event.getNewValue());
+ }
public boolean getExecuteChecker() {
return true;
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml 2011-05-04 15:39:51 UTC (rev 22465)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml 2011-05-05 10:38:34 UTC (rev 22466)
@@ -93,7 +93,12 @@
<a4j:ajax event="change"
render="#{richAutocompleteBean.ajaxAttributes['render'].value}"
- execute="#{richAutocompleteBean.ajaxAttributes['execute'].value}" />
+ execute="#{richAutocompleteBean.ajaxAttributes['execute'].value}"
+ listener="#{richBean.changeEventListener}" />
+
+ <a4j:ajax event="selectitem" render="output"
+ listener="#{richBean.actionListener}"
+ />
</rich:autocomplete>
13 years, 7 months
JBoss Rich Faces SVN: r22465 - modules/tests/metamer/trunk/application/src/main/webapp/components/a4jActionListener.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-04 11:39:51 -0400 (Wed, 04 May 2011)
New Revision: 22465
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jActionListener/all.xhtml
Log:
sample for a4j:actionListener fixed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jActionListener/all.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jActionListener/all.xhtml 2011-05-04 12:49:58 UTC (rev 22464)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jActionListener/all.xhtml 2011-05-04 15:39:51 UTC (rev 22465)
@@ -47,7 +47,7 @@
<h:panelGrid columns="1">
<h:commandButton id="invokeByTypeButton" value="Invoke listener by type">
- <a4j:actionListener type="org.richfaces.tests.metamer.bean.A4JActionListenerBean$ActionListenerImpl" />
+ <a4j:actionListener type="org.richfaces.tests.metamer.bean.a4j.A4JActionListenerBean$ActionListenerImpl" />
<f:ajax render="messages" />
</h:commandButton>
13 years, 7 months
JBoss Rich Faces SVN: r22464 - in modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean: a4j and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-04 08:49:58 -0400 (Wed, 04 May 2011)
New Revision: 22464
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JCommandLinkBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JJSFunctionBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JLogBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JMediaOutputBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JOutputPanelBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JPollBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAccordionBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAccordionItemBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDataScrollerBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDataTableBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDropDownMenuBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichExtendedDataTableBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichInputNumberSliderBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichInputNumberSpinnerBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichListBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMenuGroupBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMenuItemBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.properties
Removed:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JAjaxBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JLogBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPollBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPushBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAutocompleteBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichComponentControlBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataScrollerBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataTableBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichFileUploadBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuGroupBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuItemBean.properties
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMessagesBean.properties
Log:
properties files moved to reflect changes in beans location
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JAjaxBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JAjaxBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JAjaxBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,6 +0,0 @@
-attr.listener.first6CharsListener=first6CharsListener
-attr.listener.doubleStringListener=doubleStringListener
-attr.listener.toUpperCaseListener=toUpperCaseListener
-attr.listener.causeErrorListener=causeErrorListener
-attr.listener.null=
-
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,16 +0,0 @@
-attr.action.first6CharsAction=first6CharsAction
-attr.action.doubleStringAction=doubleStringAction
-attr.action.toUpperCaseAction=toUpperCaseAction
-attr.action.null=
-
-attr.actionListener.first6CharsActionListener=first6CharsActionListener
-attr.actionListener.doubleStringActionListener=doubleStringActionListener
-attr.actionListener.toUpperCaseActionListener=toUpperCaseActionListener
-attr.actionListener.null=
-
-attr.type.submit=submit
-attr.type.button=button
-attr.type.reset=reset
-attr.type.image=image
-attr.type.nonvalid=nonvalid
-attr.type.null=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,7 +0,0 @@
-attr.action.first6CharsAction=first6CharsAction
-attr.action.doubleStringAction=doubleStringAction
-attr.action.toUpperCaseAction=toUpperCaseAction
-
-attr.actionListener.first6CharsActionListener=first6CharsActionListener
-attr.actionListener.doubleStringActionListener=doubleStringActionListener
-attr.actionListener.toUpperCaseActionListener=toUpperCaseActionListener
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,7 +0,0 @@
-attr.action.increaseYearAction=increaseYearAction
-attr.action.decreaseYearAction=decreaseYearAction
-attr.action.none=
-
-attr.actionListener.increaseYearActionListener=increaseYearActionListener
-attr.actionListener.decreaseYearActionListener=decreaseYearActionListener
-attr.actionListener.none=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JLogBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JLogBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JLogBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,10 +0,0 @@
-attr.level.error=error
-attr.level.debug=debug
-attr.level.info=info
-attr.level.warn=warn
-attr.level.null=
-
-attr.mode.popup=popup
-attr.mode.inline=inline
-attr.mode.console=console
-attr.mode.null=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,3 +0,0 @@
-attr.dir.lrt=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,7 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.none=
-
-attr.layout.block=block
-attr.layout.inline=inline
-attr.layout.none=none
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPollBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPollBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPollBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,7 +0,0 @@
-attr.action.increaseCounterAction=increaseCounterAction
-attr.action.decreaseCounterAction=decreaseCounterAction
-attr.action.none=
-
-attr.actionListener.increaseCounterActionListener=increaseCounterActionListener
-attr.actionListener.decreaseCounterActionListener=decreaseCounterActionListener
-attr.actionListener.none=
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPushBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPushBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPushBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,7 +0,0 @@
-attr.action.increaseCounterAction=increaseCounterAction
-attr.action.decreaseCounterAction=decreaseCounterAction
-attr.action.none=
-
-attr.actionListener.increaseCounterActionListener=increaseCounterActionListener
-attr.actionListener.decreaseCounterActionListener=decreaseCounterActionListener
-attr.actionListener.none=
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,87 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-
-attr.switchType.client=client
-attr.switchType.server=server
-attr.switchType.ajax=ajax
-attr.switchType.null=
-
-attr.itemActiveLeftIcon.none=none
-attr.itemActiveLeftIcon.grid=grid
-attr.itemActiveLeftIcon.disc=disc
-attr.itemActiveLeftIcon.chevron=chevron
-attr.itemActiveLeftIcon.chevronUp=chevronUp
-attr.itemActiveLeftIcon.chevronDown=chevronDown
-attr.itemActiveLeftIcon.triangle=triangle
-attr.itemActiveLeftIcon.triangleUp=triangleUp
-attr.itemActiveLeftIcon.triangleDown=triangleDown
-attr.itemActiveLeftIcon.star=/resources/images/star.png
-attr.itemActiveLeftIcon.nonexisting=nonexisting
-attr.itemActiveLeftIcon.null=
-
-attr.itemDisabledLeftIcon.none=none
-attr.itemDisabledLeftIcon.grid=grid
-attr.itemDisabledLeftIcon.disc=disc
-attr.itemDisabledLeftIcon.chevron=chevron
-attr.itemDisabledLeftIcon.chevronUp=chevronUp
-attr.itemDisabledLeftIcon.chevronDown=chevronDown
-attr.itemDisabledLeftIcon.triangle=triangle
-attr.itemDisabledLeftIcon.triangleUp=triangleUp
-attr.itemDisabledLeftIcon.triangleDown=triangleDown
-attr.itemDisabledLeftIcon.star=/resources/images/star.png
-attr.itemDisabledLeftIcon.nonexisting=nonexisting
-attr.itemDisabledLeftIcon.null=
-
-attr.itemInactiveLeftIcon.none=none
-attr.itemInactiveLeftIcon.grid=grid
-attr.itemInactiveLeftIcon.disc=disc
-attr.itemInactiveLeftIcon.chevron=chevron
-attr.itemInactiveLeftIcon.chevronUp=chevronUp
-attr.itemInactiveLeftIcon.chevronDown=chevronDown
-attr.itemInactiveLeftIcon.triangle=triangle
-attr.itemInactiveLeftIcon.triangleUp=triangleUp
-attr.itemInactiveLeftIcon.triangleDown=triangleDown
-attr.itemInactiveLeftIcon.star=/resources/images/star.png
-attr.itemInactiveLeftIcon.nonexisting=nonexisting
-attr.itemInactiveLeftIcon.null=
-
-attr.itemActiveRightIcon.none=none
-attr.itemActiveRightIcon.grid=grid
-attr.itemActiveRightIcon.disc=disc
-attr.itemActiveRightIcon.chevron=chevron
-attr.itemActiveRightIcon.chevronUp=chevronUp
-attr.itemActiveRightIcon.chevronDown=chevronDown
-attr.itemActiveRightIcon.triangle=triangle
-attr.itemActiveRightIcon.triangleUp=triangleUp
-attr.itemActiveRightIcon.triangleDown=triangleDown
-attr.itemActiveRightIcon.star=/resources/images/star.png
-attr.itemActiveRightIcon.nonexisting=nonexisting
-attr.itemActiveRightIcon.null=
-
-attr.itemDisabledRightIcon.none=none
-attr.itemDisabledRightIcon.grid=grid
-attr.itemDisabledRightIcon.disc=disc
-attr.itemDisabledRightIcon.chevron=chevron
-attr.itemDisabledRightIcon.chevronUp=chevronUp
-attr.itemDisabledRightIcon.chevronDown=chevronDown
-attr.itemDisabledRightIcon.triangle=triangle
-attr.itemDisabledRightIcon.triangleUp=triangleUp
-attr.itemDisabledRightIcon.triangleDown=triangleDown
-attr.itemDisabledRightIcon.star=/resources/images/star.png
-attr.itemDisabledRightIcon.nonexisting=nonexisting
-attr.itemDisabledRightIcon.null=
-
-attr.itemInactiveRightIcon.none=none
-attr.itemInactiveRightIcon.grid=grid
-attr.itemInactiveRightIcon.disc=disc
-attr.itemInactiveRightIcon.chevron=chevron
-attr.itemInactiveRightIcon.chevronUp=chevronUp
-attr.itemInactiveRightIcon.chevronDown=chevronDown
-attr.itemInactiveRightIcon.triangle=triangle
-attr.itemInactiveRightIcon.triangleUp=triangleUp
-attr.itemInactiveRightIcon.triangleDown=triangleDown
-attr.itemInactiveRightIcon.star=/resources/images/star.png
-attr.itemInactiveRightIcon.nonexisting=nonexisting
-attr.itemInactiveRightIcon.null=
-
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,86 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-
-attr.switchType.client=client
-attr.switchType.server=server
-attr.switchType.ajax=ajax
-attr.switchType.null=
-
-attr.leftActiveIcon.none=none
-attr.leftActiveIcon.grid=grid
-attr.leftActiveIcon.disc=disc
-attr.leftActiveIcon.chevron=chevron
-attr.leftActiveIcon.chevronUp=chevronUp
-attr.leftActiveIcon.chevronDown=chevronDown
-attr.leftActiveIcon.triangle=triangle
-attr.leftActiveIcon.triangleUp=triangleUp
-attr.leftActiveIcon.triangleDown=triangleDown
-attr.leftActiveIcon.star=/resources/images/star.png
-attr.leftActiveIcon.nonexisting=nonexisting
-attr.leftActiveIcon.null=
-
-attr.leftDisabledIcon.none=none
-attr.leftDisabledIcon.grid=grid
-attr.leftDisabledIcon.disc=disc
-attr.leftDisabledIcon.chevron=chevron
-attr.leftDisabledIcon.chevronUp=chevronUp
-attr.leftDisabledIcon.chevronDown=chevronDown
-attr.leftDisabledIcon.triangle=triangle
-attr.leftDisabledIcon.triangleUp=triangleUp
-attr.leftDisabledIcon.triangleDown=triangleDown
-attr.leftDisabledIcon.star=/resources/images/star.png
-attr.leftDisabledIcon.nonexisting=nonexisting
-attr.leftDisabledIcon.null=
-
-attr.leftInactiveIcon.none=none
-attr.leftInactiveIcon.grid=grid
-attr.leftInactiveIcon.disc=disc
-attr.leftInactiveIcon.chevron=chevron
-attr.leftInactiveIcon.chevronUp=chevronUp
-attr.leftInactiveIcon.chevronDown=chevronDown
-attr.leftInactiveIcon.triangle=triangle
-attr.leftInactiveIcon.triangleUp=triangleUp
-attr.leftInactiveIcon.triangleDown=triangleDown
-attr.leftInactiveIcon.star=/resources/images/star.png
-attr.leftInactiveIcon.nonexisting=nonexisting
-attr.leftInactiveIcon.null=
-
-attr.rightActiveIcon.none=none
-attr.rightActiveIcon.grid=grid
-attr.rightActiveIcon.disc=disc
-attr.rightActiveIcon.chevron=chevron
-attr.rightActiveIcon.chevronUp=chevronUp
-attr.rightActiveIcon.chevronDown=chevronDown
-attr.rightActiveIcon.triangle=triangle
-attr.rightActiveIcon.triangleUp=triangleUp
-attr.rightActiveIcon.triangleDown=triangleDown
-attr.rightActiveIcon.star=/resources/images/star.png
-attr.rightActiveIcon.nonexisting=nonexisting
-attr.rightActiveIcon.null=
-
-attr.rightDisabledIcon.none=none
-attr.rightDisabledIcon.grid=grid
-attr.rightDisabledIcon.disc=disc
-attr.rightDisabledIcon.chevron=chevron
-attr.rightDisabledIcon.chevronUp=chevronUp
-attr.rightDisabledIcon.chevronDown=chevronDown
-attr.rightDisabledIcon.triangle=triangle
-attr.rightDisabledIcon.triangleUp=triangleUp
-attr.rightDisabledIcon.triangleDown=triangleDown
-attr.rightDisabledIcon.star=/resources/images/star.png
-attr.rightDisabledIcon.nonexisting=nonexisting
-attr.rightDisabledIcon.null=
-
-attr.rightInactiveIcon.none=none
-attr.rightInactiveIcon.grid=grid
-attr.rightInactiveIcon.disc=disc
-attr.rightInactiveIcon.chevron=chevron
-attr.rightInactiveIcon.chevronUp=chevronUp
-attr.rightInactiveIcon.chevronDown=chevronDown
-attr.rightInactiveIcon.triangle=triangle
-attr.rightInactiveIcon.triangleUp=triangleUp
-attr.rightInactiveIcon.triangleDown=triangleDown
-attr.rightInactiveIcon.star=/resources/images/star.png
-attr.rightInactiveIcon.nonexisting=nonexisting
-attr.rightInactiveIcon.null=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAutocompleteBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAutocompleteBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAutocompleteBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,10 +0,0 @@
-attr.mode.client=client
-attr.mode.ajax=ajax
-attr.mode.cachedAjax=cachedAjax
-attr.mode.null=
-
-attr.layout.div=div
-attr.layout.list=list
-attr.layout.table=table
-attr.layout.grid=grid
-attr.layout.null=
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,43 +0,0 @@
-attr.boundaryDatesMode.inactive=inactive
-attr.boundaryDatesMode.scroll=scroll
-attr.boundaryDatesMode.select=select
-attr.boundaryDatesMode.null=
-
-attr.buttonDisabledIcon.star=/resources/images/star.png
-attr.buttonDisabledIcon.heart=/resources/images/heart.png
-attr.buttonDisabledIcon.null=
-
-attr.buttonIcon.star=/resources/images/star.png
-attr.buttonIcon.heart=/resources/images/heart.png
-attr.buttonIcon.null=
-
-attr.dayClassFunction.yellowTuesdays=yellowTuesdays
-attr.dayClassFunction.aquaWeekends=aquaWeekends
-attr.dayClassFunction.null=
-
-attr.dayDisableFunction.disableTuesdays=disableTuesdays
-attr.dayDisableFunction.disableWeekends=disableWeekends
-attr.dayDisableFunction.null=
-
-attr.direction.topLeft=topLeft
-attr.direction.topRight=topRight
-attr.direction.bottomLeft=bottomLeft
-attr.direction.bottomRight=bottomRight
-attr.direction.auto=auto
-attr.direction.null=
-
-attr.jointPoint.topLeft=topLeft
-attr.jointPoint.topRight=topRight
-attr.jointPoint.bottomLeft=bottomLeft
-attr.jointPoint.bottomRight=bottomRight
-attr.jointPoint.auto=auto
-attr.jointPoint.null=
-
-attr.mode.client=client
-attr.mode.ajax=ajax
-attr.mode.null=
-
-attr.todayControlMode.scroll=scroll
-attr.todayControlMode.select=select
-attr.todayControlMode.hidden=hidden
-attr.todayControlMode.null=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,60 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-
-attr.leftCollapsedIcon.none=none
-attr.leftCollapsedIcon.grid=grid
-attr.leftCollapsedIcon.disc=disc
-attr.leftCollapsedIcon.chevron=chevron
-attr.leftCollapsedIcon.chevronUp=chevronUp
-attr.leftCollapsedIcon.chevronDown=chevronDown
-attr.leftCollapsedIcon.triangle=triangle
-attr.leftCollapsedIcon.triangleUp=triangleUp
-attr.leftCollapsedIcon.triangleDown=triangleDown
-attr.leftCollapsedIcon.star=/resources/images/star.png
-attr.leftCollapsedIcon.nonexisting=nonexisting
-attr.leftCollapsedIcon.null=
-
-attr.leftExpandedIcon.none=none
-attr.leftExpandedIcon.grid=grid
-attr.leftExpandedIcon.disc=disc
-attr.leftExpandedIcon.chevron=chevron
-attr.leftExpandedIcon.chevronUp=chevronUp
-attr.leftExpandedIcon.chevronDown=chevronDown
-attr.leftExpandedIcon.triangle=triangle
-attr.leftExpandedIcon.triangleUp=triangleUp
-attr.leftExpandedIcon.triangleDown=triangleDown
-attr.leftExpandedIcon.star=/resources/images/star.png
-attr.leftExpandedIcon.nonexisting=nonexisting
-attr.leftExpandedIcon.null=
-
-attr.rightCollapsedIcon.none=none
-attr.rightCollapsedIcon.grid=grid
-attr.rightCollapsedIcon.disc=disc
-attr.rightCollapsedIcon.chevron=chevron
-attr.rightCollapsedIcon.chevronUp=chevronUp
-attr.rightCollapsedIcon.chevronDown=chevronDown
-attr.rightCollapsedIcon.triangle=triangle
-attr.rightCollapsedIcon.triangleUp=triangleUp
-attr.rightCollapsedIcon.triangleDown=triangleDown
-attr.rightCollapsedIcon.star=/resources/images/star.png
-attr.rightCollapsedIcon.nonexisting=nonexisting
-attr.rightCollapsedIcon.null=
-
-attr.rightExpandedIcon.none=none
-attr.rightExpandedIcon.grid=grid
-attr.rightExpandedIcon.disc=disc
-attr.rightExpandedIcon.chevron=chevron
-attr.rightExpandedIcon.chevronUp=chevronUp
-attr.rightExpandedIcon.chevronDown=chevronDown
-attr.rightExpandedIcon.triangle=triangle
-attr.rightExpandedIcon.triangleUp=triangleUp
-attr.rightExpandedIcon.triangleDown=triangleDown
-attr.rightExpandedIcon.star=/resources/images/star.png
-attr.rightExpandedIcon.nonexisting=nonexisting
-attr.rightExpandedIcon.null=
-
-attr.switchType.client=client
-attr.switchType.server=server
-attr.switchType.ajax=ajax
-attr.switchType.none=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,7 +0,0 @@
-attr.expandMode.server=server
-attr.expandMode.ajax=ajax
-attr.expandMode.client=client
-attr.expandMode.none=none
-attr.expandMode.null=
-attr.sortMode.single=single
-attr.sortMode.multi=multi
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichComponentControlBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichComponentControlBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichComponentControlBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,5 +0,0 @@
-attr.operation.none=
-attr.operation.first=first
-attr.operation.last=last
-attr.operation.previous=previous
-attr.operation.next=next
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataScrollerBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataScrollerBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataScrollerBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,14 +0,0 @@
-attr.boundaryControls.show=show
-attr.boundaryControls.auto=auto
-attr.boundaryControls.hide=hide
-
-attr.fastControls.show=show
-attr.fastControls.hide=hide
-attr.fastControls.auto=auto
-
-attr.lastPageMode.full=full
-attr.lastPageMode.short=short
-
-attr.stepControls.show=show
-attr.stepControls.hide=hide
-attr.stepControls.auto=auto
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataTableBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataTableBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataTableBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,2 +0,0 @@
-attr.sortMode.single=single
-attr.sortMode.multi=multi
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,30 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-
-attr.direction.topLeft=topLeft
-attr.direction.topRight=topRight
-attr.direction.bottomLeft=bottomLeft
-attr.direction.bottomRight=bottomRight
-attr.direction.autoLeft=autoLeft
-attr.direction.autoRight=autoRight
-attr.direction.topAuto=topAuto
-attr.direction.bottomAuto=bottomAuto
-attr.direction.auto=auto
-attr.direction.null=
-
-attr.jointPoint.topLeft=topLeft
-attr.jointPoint.topRight=topRight
-attr.jointPoint.bottomLeft=bottomLeft
-attr.jointPoint.bottomRight=bottomRight
-attr.jointPoint.autoLeft=autoLeft
-attr.jointPoint.autoRight=autoRight
-attr.jointPoint.topAuto=topAuto
-attr.jointPoint.bottomAuto=bottomAuto
-attr.jointPoint.auto=auto
-attr.jointPoint.null=
-
-attr.mode.client=client
-attr.mode.ajax=ajax
-attr.mode.server=server
-attr.mode.null=
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,9 +0,0 @@
-attr.sortMode.single=single
-attr.sortMode.multi=multi
-attr.sortMode.null=
-
-attr.selectionMode.none=none
-attr.selectionMode.single=single
-attr.selectionMode.multiple=multiple
-attr.selectionMode.multipleKeyboardFree=multipleKeyboardFree
-attr.selectionMode.null=
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichFileUploadBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichFileUploadBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichFileUploadBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,4 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,2 +0,0 @@
-attr.type.BeanValidator=org.richfaces.BeanValidator
-
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,9 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-
-attr.inputPosition.left=left
-attr.inputPosition.right=right
-attr.inputPosition.top=top
-attr.inputPosition.bottom=bottom
-attr.inputPosition.null=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,3 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,6 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-attr.type.ordered=ordered
-attr.type.unordered=unordered
-attr.type.definitions=definitions
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuGroupBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuGroupBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuGroupBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,37 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-
-attr.direction.topLeft=topLeft
-attr.direction.topRight=topRight
-attr.direction.bottomLeft=bottomLeft
-attr.direction.bottomRight=bottomRight
-attr.direction.autoLeft=autoLeft
-attr.direction.autoRight=autoRight
-attr.direction.topAuto=topAuto
-attr.direction.bottomAuto=bottomAuto
-attr.direction.auto=auto
-attr.direction.null=
-
-attr.icon.createdoc=/resources/images/icons/create_doc.gif
-attr.icon.star=/resources/images/star.png
-attr.icon.heart=/resources/images/heart.png
-attr.icon.nonexisting=nonexisting
-attr.icon.null=
-
-attr.iconDisabled.createdoc=/resources/images/icons/create_doc.gif
-attr.iconDisabled.star=/resources/images/star.png
-attr.iconDisabled.heart=/resources/images/heart.png
-attr.iconDisabled.nonexisting=nonexisting
-attr.iconDisabled.null=
-
-attr.jointPoint.topLeft=topLeft
-attr.jointPoint.topRight=topRight
-attr.jointPoint.bottomLeft=bottomLeft
-attr.jointPoint.bottomRight=bottomRight
-attr.jointPoint.autoLeft=autoLeft
-attr.jointPoint.autoRight=autoRight
-attr.jointPoint.topAuto=topAuto
-attr.jointPoint.bottomAuto=bottomAuto
-attr.jointPoint.auto=auto
-attr.jointPoint.null=
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuItemBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuItemBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuItemBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,20 +0,0 @@
-attr.dir.ltr=ltr
-attr.dir.rtl=rtl
-attr.dir.null=
-
-attr.icon.createdoc=/resources/images/icons/create_doc.gif
-attr.icon.star=/resources/images/star.png
-attr.icon.heart=/resources/images/heart.png
-attr.icon.nonexisting=nonexisting
-attr.icon.null=
-
-attr.iconDisabled.createdoc=/resources/images/icons/create_doc.gif
-attr.iconDisabled.star=/resources/images/star.png
-attr.iconDisabled.heart=/resources/images/heart.png
-attr.iconDisabled.nonexisting=nonexisting
-attr.iconDisabled.null=
-
-attr.mode.client=client
-attr.mode.ajax=ajax
-attr.mode.server=server
-attr.mode.null=
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMessagesBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMessagesBean.properties 2011-05-03 15:22:09 UTC (rev 22463)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMessagesBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -1,3 +0,0 @@
-attr.for.simpleInput1=simpleInput1
-attr.for.simpleInput2=simpleInput2
-attr.for.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JAjaxBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,6 @@
+attr.listener.first6CharsListener=first6CharsListener
+attr.listener.doubleStringListener=doubleStringListener
+attr.listener.toUpperCaseListener=toUpperCaseListener
+attr.listener.causeErrorListener=causeErrorListener
+attr.listener.null=
+
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,16 @@
+attr.action.first6CharsAction=first6CharsAction
+attr.action.doubleStringAction=doubleStringAction
+attr.action.toUpperCaseAction=toUpperCaseAction
+attr.action.null=
+
+attr.actionListener.first6CharsActionListener=first6CharsActionListener
+attr.actionListener.doubleStringActionListener=doubleStringActionListener
+attr.actionListener.toUpperCaseActionListener=toUpperCaseActionListener
+attr.actionListener.null=
+
+attr.type.submit=submit
+attr.type.button=button
+attr.type.reset=reset
+attr.type.image=image
+attr.type.nonvalid=nonvalid
+attr.type.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JCommandLinkBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JCommandLinkBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JCommandLinkBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,7 @@
+attr.action.first6CharsAction=first6CharsAction
+attr.action.doubleStringAction=doubleStringAction
+attr.action.toUpperCaseAction=toUpperCaseAction
+
+attr.actionListener.first6CharsActionListener=first6CharsActionListener
+attr.actionListener.doubleStringActionListener=doubleStringActionListener
+attr.actionListener.toUpperCaseActionListener=toUpperCaseActionListener
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JJSFunctionBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JJSFunctionBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JJSFunctionBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,7 @@
+attr.action.increaseYearAction=increaseYearAction
+attr.action.decreaseYearAction=decreaseYearAction
+attr.action.none=
+
+attr.actionListener.increaseYearActionListener=increaseYearActionListener
+attr.actionListener.decreaseYearActionListener=decreaseYearActionListener
+attr.actionListener.none=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JLogBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JLogBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JLogBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JLogBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,10 @@
+attr.level.error=error
+attr.level.debug=debug
+attr.level.info=info
+attr.level.warn=warn
+attr.level.null=
+
+attr.mode.popup=popup
+attr.mode.inline=inline
+attr.mode.console=console
+attr.mode.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JMediaOutputBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JMediaOutputBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JMediaOutputBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,3 @@
+attr.dir.lrt=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JOutputPanelBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JOutputPanelBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JOutputPanelBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,7 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.none=
+
+attr.layout.block=block
+attr.layout.inline=inline
+attr.layout.none=none
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JPollBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPollBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JPollBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JPollBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,7 @@
+attr.action.increaseCounterAction=increaseCounterAction
+attr.action.decreaseCounterAction=decreaseCounterAction
+attr.action.none=
+
+attr.actionListener.increaseCounterActionListener=increaseCounterActionListener
+attr.actionListener.decreaseCounterActionListener=decreaseCounterActionListener
+attr.actionListener.none=
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/A4JPushBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,7 @@
+attr.action.increaseCounterAction=increaseCounterAction
+attr.action.decreaseCounterAction=decreaseCounterAction
+attr.action.none=
+
+attr.actionListener.increaseCounterActionListener=increaseCounterActionListener
+attr.actionListener.decreaseCounterActionListener=decreaseCounterActionListener
+attr.actionListener.none=
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAccordionBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAccordionBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAccordionBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,87 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+
+attr.switchType.client=client
+attr.switchType.server=server
+attr.switchType.ajax=ajax
+attr.switchType.null=
+
+attr.itemActiveLeftIcon.none=none
+attr.itemActiveLeftIcon.grid=grid
+attr.itemActiveLeftIcon.disc=disc
+attr.itemActiveLeftIcon.chevron=chevron
+attr.itemActiveLeftIcon.chevronUp=chevronUp
+attr.itemActiveLeftIcon.chevronDown=chevronDown
+attr.itemActiveLeftIcon.triangle=triangle
+attr.itemActiveLeftIcon.triangleUp=triangleUp
+attr.itemActiveLeftIcon.triangleDown=triangleDown
+attr.itemActiveLeftIcon.star=/resources/images/star.png
+attr.itemActiveLeftIcon.nonexisting=nonexisting
+attr.itemActiveLeftIcon.null=
+
+attr.itemDisabledLeftIcon.none=none
+attr.itemDisabledLeftIcon.grid=grid
+attr.itemDisabledLeftIcon.disc=disc
+attr.itemDisabledLeftIcon.chevron=chevron
+attr.itemDisabledLeftIcon.chevronUp=chevronUp
+attr.itemDisabledLeftIcon.chevronDown=chevronDown
+attr.itemDisabledLeftIcon.triangle=triangle
+attr.itemDisabledLeftIcon.triangleUp=triangleUp
+attr.itemDisabledLeftIcon.triangleDown=triangleDown
+attr.itemDisabledLeftIcon.star=/resources/images/star.png
+attr.itemDisabledLeftIcon.nonexisting=nonexisting
+attr.itemDisabledLeftIcon.null=
+
+attr.itemInactiveLeftIcon.none=none
+attr.itemInactiveLeftIcon.grid=grid
+attr.itemInactiveLeftIcon.disc=disc
+attr.itemInactiveLeftIcon.chevron=chevron
+attr.itemInactiveLeftIcon.chevronUp=chevronUp
+attr.itemInactiveLeftIcon.chevronDown=chevronDown
+attr.itemInactiveLeftIcon.triangle=triangle
+attr.itemInactiveLeftIcon.triangleUp=triangleUp
+attr.itemInactiveLeftIcon.triangleDown=triangleDown
+attr.itemInactiveLeftIcon.star=/resources/images/star.png
+attr.itemInactiveLeftIcon.nonexisting=nonexisting
+attr.itemInactiveLeftIcon.null=
+
+attr.itemActiveRightIcon.none=none
+attr.itemActiveRightIcon.grid=grid
+attr.itemActiveRightIcon.disc=disc
+attr.itemActiveRightIcon.chevron=chevron
+attr.itemActiveRightIcon.chevronUp=chevronUp
+attr.itemActiveRightIcon.chevronDown=chevronDown
+attr.itemActiveRightIcon.triangle=triangle
+attr.itemActiveRightIcon.triangleUp=triangleUp
+attr.itemActiveRightIcon.triangleDown=triangleDown
+attr.itemActiveRightIcon.star=/resources/images/star.png
+attr.itemActiveRightIcon.nonexisting=nonexisting
+attr.itemActiveRightIcon.null=
+
+attr.itemDisabledRightIcon.none=none
+attr.itemDisabledRightIcon.grid=grid
+attr.itemDisabledRightIcon.disc=disc
+attr.itemDisabledRightIcon.chevron=chevron
+attr.itemDisabledRightIcon.chevronUp=chevronUp
+attr.itemDisabledRightIcon.chevronDown=chevronDown
+attr.itemDisabledRightIcon.triangle=triangle
+attr.itemDisabledRightIcon.triangleUp=triangleUp
+attr.itemDisabledRightIcon.triangleDown=triangleDown
+attr.itemDisabledRightIcon.star=/resources/images/star.png
+attr.itemDisabledRightIcon.nonexisting=nonexisting
+attr.itemDisabledRightIcon.null=
+
+attr.itemInactiveRightIcon.none=none
+attr.itemInactiveRightIcon.grid=grid
+attr.itemInactiveRightIcon.disc=disc
+attr.itemInactiveRightIcon.chevron=chevron
+attr.itemInactiveRightIcon.chevronUp=chevronUp
+attr.itemInactiveRightIcon.chevronDown=chevronDown
+attr.itemInactiveRightIcon.triangle=triangle
+attr.itemInactiveRightIcon.triangleUp=triangleUp
+attr.itemInactiveRightIcon.triangleDown=triangleDown
+attr.itemInactiveRightIcon.star=/resources/images/star.png
+attr.itemInactiveRightIcon.nonexisting=nonexisting
+attr.itemInactiveRightIcon.null=
+
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAccordionItemBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAccordionItemBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAccordionItemBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,86 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+
+attr.switchType.client=client
+attr.switchType.server=server
+attr.switchType.ajax=ajax
+attr.switchType.null=
+
+attr.leftActiveIcon.none=none
+attr.leftActiveIcon.grid=grid
+attr.leftActiveIcon.disc=disc
+attr.leftActiveIcon.chevron=chevron
+attr.leftActiveIcon.chevronUp=chevronUp
+attr.leftActiveIcon.chevronDown=chevronDown
+attr.leftActiveIcon.triangle=triangle
+attr.leftActiveIcon.triangleUp=triangleUp
+attr.leftActiveIcon.triangleDown=triangleDown
+attr.leftActiveIcon.star=/resources/images/star.png
+attr.leftActiveIcon.nonexisting=nonexisting
+attr.leftActiveIcon.null=
+
+attr.leftDisabledIcon.none=none
+attr.leftDisabledIcon.grid=grid
+attr.leftDisabledIcon.disc=disc
+attr.leftDisabledIcon.chevron=chevron
+attr.leftDisabledIcon.chevronUp=chevronUp
+attr.leftDisabledIcon.chevronDown=chevronDown
+attr.leftDisabledIcon.triangle=triangle
+attr.leftDisabledIcon.triangleUp=triangleUp
+attr.leftDisabledIcon.triangleDown=triangleDown
+attr.leftDisabledIcon.star=/resources/images/star.png
+attr.leftDisabledIcon.nonexisting=nonexisting
+attr.leftDisabledIcon.null=
+
+attr.leftInactiveIcon.none=none
+attr.leftInactiveIcon.grid=grid
+attr.leftInactiveIcon.disc=disc
+attr.leftInactiveIcon.chevron=chevron
+attr.leftInactiveIcon.chevronUp=chevronUp
+attr.leftInactiveIcon.chevronDown=chevronDown
+attr.leftInactiveIcon.triangle=triangle
+attr.leftInactiveIcon.triangleUp=triangleUp
+attr.leftInactiveIcon.triangleDown=triangleDown
+attr.leftInactiveIcon.star=/resources/images/star.png
+attr.leftInactiveIcon.nonexisting=nonexisting
+attr.leftInactiveIcon.null=
+
+attr.rightActiveIcon.none=none
+attr.rightActiveIcon.grid=grid
+attr.rightActiveIcon.disc=disc
+attr.rightActiveIcon.chevron=chevron
+attr.rightActiveIcon.chevronUp=chevronUp
+attr.rightActiveIcon.chevronDown=chevronDown
+attr.rightActiveIcon.triangle=triangle
+attr.rightActiveIcon.triangleUp=triangleUp
+attr.rightActiveIcon.triangleDown=triangleDown
+attr.rightActiveIcon.star=/resources/images/star.png
+attr.rightActiveIcon.nonexisting=nonexisting
+attr.rightActiveIcon.null=
+
+attr.rightDisabledIcon.none=none
+attr.rightDisabledIcon.grid=grid
+attr.rightDisabledIcon.disc=disc
+attr.rightDisabledIcon.chevron=chevron
+attr.rightDisabledIcon.chevronUp=chevronUp
+attr.rightDisabledIcon.chevronDown=chevronDown
+attr.rightDisabledIcon.triangle=triangle
+attr.rightDisabledIcon.triangleUp=triangleUp
+attr.rightDisabledIcon.triangleDown=triangleDown
+attr.rightDisabledIcon.star=/resources/images/star.png
+attr.rightDisabledIcon.nonexisting=nonexisting
+attr.rightDisabledIcon.null=
+
+attr.rightInactiveIcon.none=none
+attr.rightInactiveIcon.grid=grid
+attr.rightInactiveIcon.disc=disc
+attr.rightInactiveIcon.chevron=chevron
+attr.rightInactiveIcon.chevronUp=chevronUp
+attr.rightInactiveIcon.chevronDown=chevronDown
+attr.rightInactiveIcon.triangle=triangle
+attr.rightInactiveIcon.triangleUp=triangleUp
+attr.rightInactiveIcon.triangleDown=triangleDown
+attr.rightInactiveIcon.star=/resources/images/star.png
+attr.rightInactiveIcon.nonexisting=nonexisting
+attr.rightInactiveIcon.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAutocompleteBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,10 @@
+attr.mode.client=client
+attr.mode.ajax=ajax
+attr.mode.cachedAjax=cachedAjax
+attr.mode.null=
+
+attr.layout.div=div
+attr.layout.list=list
+attr.layout.table=table
+attr.layout.grid=grid
+attr.layout.null=
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,43 @@
+attr.boundaryDatesMode.inactive=inactive
+attr.boundaryDatesMode.scroll=scroll
+attr.boundaryDatesMode.select=select
+attr.boundaryDatesMode.null=
+
+attr.buttonDisabledIcon.star=/resources/images/star.png
+attr.buttonDisabledIcon.heart=/resources/images/heart.png
+attr.buttonDisabledIcon.null=
+
+attr.buttonIcon.star=/resources/images/star.png
+attr.buttonIcon.heart=/resources/images/heart.png
+attr.buttonIcon.null=
+
+attr.dayClassFunction.yellowTuesdays=yellowTuesdays
+attr.dayClassFunction.aquaWeekends=aquaWeekends
+attr.dayClassFunction.null=
+
+attr.dayDisableFunction.disableTuesdays=disableTuesdays
+attr.dayDisableFunction.disableWeekends=disableWeekends
+attr.dayDisableFunction.null=
+
+attr.direction.topLeft=topLeft
+attr.direction.topRight=topRight
+attr.direction.bottomLeft=bottomLeft
+attr.direction.bottomRight=bottomRight
+attr.direction.auto=auto
+attr.direction.null=
+
+attr.jointPoint.topLeft=topLeft
+attr.jointPoint.topRight=topRight
+attr.jointPoint.bottomLeft=bottomLeft
+attr.jointPoint.bottomRight=bottomRight
+attr.jointPoint.auto=auto
+attr.jointPoint.null=
+
+attr.mode.client=client
+attr.mode.ajax=ajax
+attr.mode.null=
+
+attr.todayControlMode.scroll=scroll
+attr.todayControlMode.select=select
+attr.todayControlMode.hidden=hidden
+attr.todayControlMode.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,60 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+
+attr.leftCollapsedIcon.none=none
+attr.leftCollapsedIcon.grid=grid
+attr.leftCollapsedIcon.disc=disc
+attr.leftCollapsedIcon.chevron=chevron
+attr.leftCollapsedIcon.chevronUp=chevronUp
+attr.leftCollapsedIcon.chevronDown=chevronDown
+attr.leftCollapsedIcon.triangle=triangle
+attr.leftCollapsedIcon.triangleUp=triangleUp
+attr.leftCollapsedIcon.triangleDown=triangleDown
+attr.leftCollapsedIcon.star=/resources/images/star.png
+attr.leftCollapsedIcon.nonexisting=nonexisting
+attr.leftCollapsedIcon.null=
+
+attr.leftExpandedIcon.none=none
+attr.leftExpandedIcon.grid=grid
+attr.leftExpandedIcon.disc=disc
+attr.leftExpandedIcon.chevron=chevron
+attr.leftExpandedIcon.chevronUp=chevronUp
+attr.leftExpandedIcon.chevronDown=chevronDown
+attr.leftExpandedIcon.triangle=triangle
+attr.leftExpandedIcon.triangleUp=triangleUp
+attr.leftExpandedIcon.triangleDown=triangleDown
+attr.leftExpandedIcon.star=/resources/images/star.png
+attr.leftExpandedIcon.nonexisting=nonexisting
+attr.leftExpandedIcon.null=
+
+attr.rightCollapsedIcon.none=none
+attr.rightCollapsedIcon.grid=grid
+attr.rightCollapsedIcon.disc=disc
+attr.rightCollapsedIcon.chevron=chevron
+attr.rightCollapsedIcon.chevronUp=chevronUp
+attr.rightCollapsedIcon.chevronDown=chevronDown
+attr.rightCollapsedIcon.triangle=triangle
+attr.rightCollapsedIcon.triangleUp=triangleUp
+attr.rightCollapsedIcon.triangleDown=triangleDown
+attr.rightCollapsedIcon.star=/resources/images/star.png
+attr.rightCollapsedIcon.nonexisting=nonexisting
+attr.rightCollapsedIcon.null=
+
+attr.rightExpandedIcon.none=none
+attr.rightExpandedIcon.grid=grid
+attr.rightExpandedIcon.disc=disc
+attr.rightExpandedIcon.chevron=chevron
+attr.rightExpandedIcon.chevronUp=chevronUp
+attr.rightExpandedIcon.chevronDown=chevronDown
+attr.rightExpandedIcon.triangle=triangle
+attr.rightExpandedIcon.triangleUp=triangleUp
+attr.rightExpandedIcon.triangleDown=triangleDown
+attr.rightExpandedIcon.star=/resources/images/star.png
+attr.rightExpandedIcon.nonexisting=nonexisting
+attr.rightExpandedIcon.null=
+
+attr.switchType.client=client
+attr.switchType.server=server
+attr.switchType.ajax=ajax
+attr.switchType.none=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,7 @@
+attr.expandMode.server=server
+attr.expandMode.ajax=ajax
+attr.expandMode.client=client
+attr.expandMode.none=none
+attr.expandMode.null=
+attr.sortMode.single=single
+attr.sortMode.multi=multi
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichComponentControlBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,5 @@
+attr.operation.none=
+attr.operation.first=first
+attr.operation.last=last
+attr.operation.previous=previous
+attr.operation.next=next
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDataScrollerBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataScrollerBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDataScrollerBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDataScrollerBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,14 @@
+attr.boundaryControls.show=show
+attr.boundaryControls.auto=auto
+attr.boundaryControls.hide=hide
+
+attr.fastControls.show=show
+attr.fastControls.hide=hide
+attr.fastControls.auto=auto
+
+attr.lastPageMode.full=full
+attr.lastPageMode.short=short
+
+attr.stepControls.show=show
+attr.stepControls.hide=hide
+attr.stepControls.auto=auto
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDataTableBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDataTableBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDataTableBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDataTableBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,2 @@
+attr.sortMode.single=single
+attr.sortMode.multi=multi
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDropDownMenuBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDropDownMenuBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichDropDownMenuBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,30 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+
+attr.direction.topLeft=topLeft
+attr.direction.topRight=topRight
+attr.direction.bottomLeft=bottomLeft
+attr.direction.bottomRight=bottomRight
+attr.direction.autoLeft=autoLeft
+attr.direction.autoRight=autoRight
+attr.direction.topAuto=topAuto
+attr.direction.bottomAuto=bottomAuto
+attr.direction.auto=auto
+attr.direction.null=
+
+attr.jointPoint.topLeft=topLeft
+attr.jointPoint.topRight=topRight
+attr.jointPoint.bottomLeft=bottomLeft
+attr.jointPoint.bottomRight=bottomRight
+attr.jointPoint.autoLeft=autoLeft
+attr.jointPoint.autoRight=autoRight
+attr.jointPoint.topAuto=topAuto
+attr.jointPoint.bottomAuto=bottomAuto
+attr.jointPoint.auto=auto
+attr.jointPoint.null=
+
+attr.mode.client=client
+attr.mode.ajax=ajax
+attr.mode.server=server
+attr.mode.null=
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichExtendedDataTableBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichExtendedDataTableBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichExtendedDataTableBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,9 @@
+attr.sortMode.single=single
+attr.sortMode.multi=multi
+attr.sortMode.null=
+
+attr.selectionMode.none=none
+attr.selectionMode.single=single
+attr.selectionMode.multiple=multiple
+attr.selectionMode.multipleKeyboardFree=multipleKeyboardFree
+attr.selectionMode.null=
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichFileUploadBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,4 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,2 @@
+attr.type.BeanValidator=org.richfaces.BeanValidator
+
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichInputNumberSliderBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichInputNumberSliderBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichInputNumberSliderBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,9 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+
+attr.inputPosition.left=left
+attr.inputPosition.right=right
+attr.inputPosition.top=top
+attr.inputPosition.bottom=bottom
+attr.inputPosition.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichInputNumberSpinnerBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichInputNumberSpinnerBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichInputNumberSpinnerBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,3 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichListBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichListBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichListBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,6 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+attr.type.ordered=ordered
+attr.type.unordered=unordered
+attr.type.definitions=definitions
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMenuGroupBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuGroupBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMenuGroupBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMenuGroupBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,37 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+
+attr.direction.topLeft=topLeft
+attr.direction.topRight=topRight
+attr.direction.bottomLeft=bottomLeft
+attr.direction.bottomRight=bottomRight
+attr.direction.autoLeft=autoLeft
+attr.direction.autoRight=autoRight
+attr.direction.topAuto=topAuto
+attr.direction.bottomAuto=bottomAuto
+attr.direction.auto=auto
+attr.direction.null=
+
+attr.icon.createdoc=/resources/images/icons/create_doc.gif
+attr.icon.star=/resources/images/star.png
+attr.icon.heart=/resources/images/heart.png
+attr.icon.nonexisting=nonexisting
+attr.icon.null=
+
+attr.iconDisabled.createdoc=/resources/images/icons/create_doc.gif
+attr.iconDisabled.star=/resources/images/star.png
+attr.iconDisabled.heart=/resources/images/heart.png
+attr.iconDisabled.nonexisting=nonexisting
+attr.iconDisabled.null=
+
+attr.jointPoint.topLeft=topLeft
+attr.jointPoint.topRight=topRight
+attr.jointPoint.bottomLeft=bottomLeft
+attr.jointPoint.bottomRight=bottomRight
+attr.jointPoint.autoLeft=autoLeft
+attr.jointPoint.autoRight=autoRight
+attr.jointPoint.topAuto=topAuto
+attr.jointPoint.bottomAuto=bottomAuto
+attr.jointPoint.auto=auto
+attr.jointPoint.null=
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMenuItemBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMenuItemBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMenuItemBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMenuItemBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,20 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+
+attr.icon.createdoc=/resources/images/icons/create_doc.gif
+attr.icon.star=/resources/images/star.png
+attr.icon.heart=/resources/images/heart.png
+attr.icon.nonexisting=nonexisting
+attr.icon.null=
+
+attr.iconDisabled.createdoc=/resources/images/icons/create_doc.gif
+attr.iconDisabled.star=/resources/images/star.png
+attr.iconDisabled.heart=/resources/images/heart.png
+attr.iconDisabled.nonexisting=nonexisting
+attr.iconDisabled.null=
+
+attr.mode.client=client
+attr.mode.ajax=ajax
+attr.mode.server=server
+attr.mode.null=
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.properties (from rev 22463, modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichMessagesBean.properties)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.properties 2011-05-04 12:49:58 UTC (rev 22464)
@@ -0,0 +1,3 @@
+attr.for.simpleInput1=simpleInput1
+attr.for.simpleInput2=simpleInput2
+attr.for.null=
13 years, 8 months
JBoss Rich Faces SVN: r22463 - modules/tests/metamer/trunk/application/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-03 11:22:09 -0400 (Tue, 03 May 2011)
New Revision: 22463
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml
Log:
padding of tab panel increased
Modified: modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml 2011-05-03 15:08:02 UTC (rev 22462)
+++ modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml 2011-05-03 15:22:09 UTC (rev 22463)
@@ -42,7 +42,7 @@
</h:panelGrid>
</h:form>
- <h:form id="linksForm" style="padding-top: 70px;">
+ <h:form id="linksForm" style="padding-top: 100px;">
<rich:tabPanel id="components" switchType="client">
<rich:tab id="a4jComponentsTab" header="A4J">
13 years, 8 months
JBoss Rich Faces SVN: r22462 - in modules/tests/metamer/trunk/application/src/main: webapp and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-03 11:08:02 -0400 (Tue, 03 May 2011)
New Revision: 22462
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml
Log:
list of components and landing page refactored
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-05-03 14:10:18 UTC (rev 22461)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-05-03 15:08:02 UTC (rev 22462)
@@ -25,7 +25,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.TreeMap;
import javax.annotation.PostConstruct;
@@ -67,7 +66,9 @@
private boolean reTests;
private boolean log;
private String component;
- private Map<String, String> components; // [a4jCommandLink; A4J Command Link]
+ private Map<String, String> a4jComponents; // [a4jCommandLink; A4J Command Link]
+ private Map<String, String> richComponents;
+ private Map<String, String> otherComponents;
private String container;
public enum Skinning {
@@ -95,78 +96,82 @@
}
private void createComponentsMap() {
- components = new TreeMap<String, String>();
+ a4jComponents = new TreeMap<String, String>();
+ richComponents = new TreeMap<String, String>();
+ otherComponents = new TreeMap<String, String>();
- components.put("a4jActionListener", "A4J Action Listener");
- components.put("a4jAjax", "A4J Ajax");
- components.put("a4jAttachQueue", "A4J Attach Queue");
- components.put("a4jCommandLink", "A4J Command Link");
- components.put("a4jCommandButton", "A4J Command Button");
- components.put("a4jJSFunction", "A4J JavaScript Function");
- components.put("a4jLog", "A4J Log");
- components.put("a4jMediaOutput", "A4J Media Output");
- components.put("a4jOutputPanel", "A4J Output Panel");
- components.put("a4jParam", "A4J Action Parameter");
- components.put("a4jPoll", "A4J Poll");
- components.put("a4jPush", "A4J Push");
- components.put("a4jQueue", "A4J Queue");
- components.put("a4jRegion", "A4J Region");
- components.put("a4jRepeat", "A4J Repeat");
- components.put("a4jStatus", "A4J Status");
- components.put("expressionLanguage", "Expression Language");
- components.put("commandButton", "JSF Command Button");
- components.put("hDataTable", "JSF Data Table");
- components.put("uiRepeat", "UI Repeat");
- components.put("richAccordion", "Rich Accordion");
- components.put("richAccordionItem", "Rich Accordion Item");
- components.put("richAutocomplete", "Rich Autocomplete");
- components.put("richCalendar", "Rich Calendar");
- components.put("richCollapsiblePanel", "Rich Collapsible Panel");
- components.put("richCollapsibleSubTable", "Rich Collapsible Sub Table");
- components.put("richCollapsibleSubTableToggler", "Rich Collapsible Sub Table Toggler");
- components.put("richColumn", "Rich Column");
- components.put("richColumnGroup", "Rich Column Group");
- components.put("richComponentControl", "Rich Component Control");
- components.put("richDataGrid", "Rich Data Grid");
- components.put("richDataScroller", "Rich Data Scroller");
- components.put("richDataTable", "Rich Data Table");
- components.put("richDragSource", "Rich Drag Source");
- components.put("richDragIndicator", "Rich Drag Indicator");
- components.put("richDropTarget", "Rich Drop Target");
- components.put("richDropDownMenu", "Rich Drop Down Menu");
- components.put("richExtendedDataTable", "Rich Extended Data Table");
- components.put("richFileUpload", "Rich File Upload");
- components.put("richFunctions", "Rich Functions");
- components.put("richGraphValidator", "Rich Graph Validator");
- components.put("richHashParam", "Rich Hash Parameter");
- components.put("richInplaceInput", "Rich Inplace Input");
- components.put("richInplaceSelect", "Rich Inplace Select");
- components.put("richInputNumberSlider", "Rich Input Number Slider");
- components.put("richInputNumberSpinner", "Rich Input Number Spinner");
- components.put("richJQuery", "Rich jQuery");
- components.put("richList", "Rich List");
- components.put("richMenuGroup", "Rich Menu Group");
- components.put("richMenuItem", "Rich Menu Item");
- components.put("richMenuSeparator", "Rich Menu Separator");
- components.put("richMessage", "Rich Message");
- components.put("richMessages", "Rich Messages");
- components.put("richPanel", "Rich Panel");
- components.put("richPanelMenu", "Rich Panel Menu");
- components.put("richPanelMenuGroup", "Rich Panel Menu Group");
- components.put("richPanelMenuItem", "Rich Panel Menu Item");
- components.put("richPopupPanel", "Rich Popup Panel");
- components.put("richProgressBar", "Rich Progress Bar");
- components.put("richSelect", "Rich Select");
- components.put("richTab", "Rich Tab");
- components.put("richTabPanel", "Rich Tab Panel");
- components.put("richToggleControl", "Rich Toggle Control");
- components.put("richTogglePanel", "Rich Toggle Panel");
- components.put("richTogglePanelItem", "Rich Toggle Panel Item");
- components.put("richToolbar", "Rich Toolbar");
- components.put("richToolbarGroup", "Rich Toolbar Group");
- components.put("richTooltip", "Rich Tooltip");
- components.put("richTree", "Rich Tree");
- components.put("richValidator", "Rich Validator");
+ a4jComponents.put("a4jActionListener", "A4J Action Listener");
+ a4jComponents.put("a4jAjax", "A4J Ajax");
+ a4jComponents.put("a4jAttachQueue", "A4J Attach Queue");
+ a4jComponents.put("a4jCommandLink", "A4J Command Link");
+ a4jComponents.put("a4jCommandButton", "A4J Command Button");
+ a4jComponents.put("a4jJSFunction", "A4J JavaScript Function");
+ a4jComponents.put("a4jLog", "A4J Log");
+ a4jComponents.put("a4jMediaOutput", "A4J Media Output");
+ a4jComponents.put("a4jOutputPanel", "A4J Output Panel");
+ a4jComponents.put("a4jParam", "A4J Action Parameter");
+ a4jComponents.put("a4jPoll", "A4J Poll");
+ a4jComponents.put("a4jPush", "A4J Push");
+ a4jComponents.put("a4jQueue", "A4J Queue");
+ a4jComponents.put("a4jRegion", "A4J Region");
+ a4jComponents.put("a4jRepeat", "A4J Repeat");
+ a4jComponents.put("a4jStatus", "A4J Status");
+
+ otherComponents.put("expressionLanguage", "Expression Language");
+ otherComponents.put("commandButton", "JSF Command Button");
+ otherComponents.put("hDataTable", "JSF Data Table");
+ otherComponents.put("uiRepeat", "UI Repeat");
+
+ richComponents.put("richAccordion", "Rich Accordion");
+ richComponents.put("richAccordionItem", "Rich Accordion Item");
+ richComponents.put("richAutocomplete", "Rich Autocomplete");
+ richComponents.put("richCalendar", "Rich Calendar");
+ richComponents.put("richCollapsiblePanel", "Rich Collapsible Panel");
+ richComponents.put("richCollapsibleSubTable", "Rich Collapsible Sub Table");
+ richComponents.put("richCollapsibleSubTableToggler", "Rich Collapsible Sub Table Toggler");
+ richComponents.put("richColumn", "Rich Column");
+ richComponents.put("richColumnGroup", "Rich Column Group");
+ richComponents.put("richComponentControl", "Rich Component Control");
+ richComponents.put("richDataGrid", "Rich Data Grid");
+ richComponents.put("richDataScroller", "Rich Data Scroller");
+ richComponents.put("richDataTable", "Rich Data Table");
+ richComponents.put("richDragSource", "Rich Drag Source");
+ richComponents.put("richDragIndicator", "Rich Drag Indicator");
+ richComponents.put("richDropTarget", "Rich Drop Target");
+ richComponents.put("richDropDownMenu", "Rich Drop Down Menu");
+ richComponents.put("richExtendedDataTable", "Rich Extended Data Table");
+ richComponents.put("richFileUpload", "Rich File Upload");
+ richComponents.put("richFunctions", "Rich Functions");
+ richComponents.put("richGraphValidator", "Rich Graph Validator");
+ richComponents.put("richHashParam", "Rich Hash Parameter");
+ richComponents.put("richInplaceInput", "Rich Inplace Input");
+ richComponents.put("richInplaceSelect", "Rich Inplace Select");
+ richComponents.put("richInputNumberSlider", "Rich Input Number Slider");
+ richComponents.put("richInputNumberSpinner", "Rich Input Number Spinner");
+ richComponents.put("richJQuery", "Rich jQuery");
+ richComponents.put("richList", "Rich List");
+ richComponents.put("richMenuGroup", "Rich Menu Group");
+ richComponents.put("richMenuItem", "Rich Menu Item");
+ richComponents.put("richMenuSeparator", "Rich Menu Separator");
+ richComponents.put("richMessage", "Rich Message");
+ richComponents.put("richMessages", "Rich Messages");
+ richComponents.put("richPanel", "Rich Panel");
+ richComponents.put("richPanelMenu", "Rich Panel Menu");
+ richComponents.put("richPanelMenuGroup", "Rich Panel Menu Group");
+ richComponents.put("richPanelMenuItem", "Rich Panel Menu Item");
+ richComponents.put("richPopupPanel", "Rich Popup Panel");
+ richComponents.put("richProgressBar", "Rich Progress Bar");
+ richComponents.put("richSelect", "Rich Select");
+ richComponents.put("richTab", "Rich Tab");
+ richComponents.put("richTabPanel", "Rich Tab Panel");
+ richComponents.put("richToggleControl", "Rich Toggle Control");
+ richComponents.put("richTogglePanel", "Rich Toggle Panel");
+ richComponents.put("richTogglePanelItem", "Rich Toggle Panel Item");
+ richComponents.put("richToolbar", "Rich Toolbar");
+ richComponents.put("richToolbarGroup", "Rich Toolbar Group");
+ richComponents.put("richTooltip", "Rich Tooltip");
+ richComponents.put("richTree", "Rich Tree");
+ richComponents.put("richValidator", "Rich Validator");
}
private void createSkinList() {
@@ -268,52 +273,15 @@
return component;
}
- public Set<String> getComponentList() {
- return components.keySet();
- }
-
- /**
- * @return the components
- */
- public Map<String, String> getComponents() {
- return components;
- }
-
- /**
- * @param components
- * the components to set
- */
- public void setComponents(Map<String, String> components) {
- this.components = components;
- }
-
- public List<String> getRichComponents() {
- List<String> richComponents = new ArrayList<String>();
- for (String aComponent : components.keySet()) {
- if (aComponent.startsWith("rich")) {
- richComponents.add(aComponent);
- }
- }
+ public Map<String, String> getRichComponents() {
return richComponents;
}
- public List<String> getA4JComponents() {
- List<String> a4jComponents = new ArrayList<String>();
- for (String aComponent : components.keySet()) {
- if (aComponent.startsWith("a4j")) {
- a4jComponents.add(aComponent);
- }
- }
+ public Map<String, String> getA4jComponents() {
return a4jComponents;
}
- public List<String> getOtherComponents() {
- List<String> otherComponents = new ArrayList<String>();
- for (String aComponent : components.keySet()) {
- if (!aComponent.startsWith("rich") && !aComponent.startsWith("a4j")) {
- otherComponents.add(aComponent);
- }
- }
+ public Map<String, String> getOtherComponents() {
return otherComponents;
}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml 2011-05-03 14:10:18 UTC (rev 22461)
+++ modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml 2011-05-03 15:08:02 UTC (rev 22462)
@@ -1,7 +1,7 @@
<?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:a4j="http://richfaces.org/a4j"
- xmlns:ui="http://java.sun.com/jsf/facelets">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" xmlns:ui="http://java.sun.com/jsf/facelets">
<!--
JBoss, Home of Professional Open Source
@@ -42,35 +42,71 @@
</h:panelGrid>
</h:form>
- <hr style="width: 1050px; margin-left: 0px; clear: both; " />
+ <h:form id="linksForm" style="padding-top: 70px;">
+ <rich:tabPanel id="components" switchType="client">
- <h:form id="linksForm">
- <h:panelGrid id="components" columns="3" columnClasses="valign-top,valign-top,valign-top">
- <h:panelGroup id="a4jComponents" layout="block" style="width: 350px;">
- <ul>
- <a4j:repeat value="#{richBean.a4JComponents}" var="comp">
- <li><h:link outcome="/components/#{comp}/list" value="#{richBean.components[comp]}" styleClass="link"/></li>
- </a4j:repeat>
- </ul>
- </h:panelGroup>
+ <rich:tab id="a4jComponentsTab" header="A4J">
+ <h:panelGrid id="a4jComponents" columns="3" columnClasses="valign-top,valign-top,valign-top">
- <h:panelGroup id="richComponents" layout="block" style="width: 350px;">
- <ul>
- <a4j:repeat value="#{richBean.richComponents}" var="comp">
- <li><h:link outcome="/components/#{comp}/list" value="#{richBean.components[comp]}" styleClass="link"/></li>
- </a4j:repeat>
- </ul>
- </h:panelGroup>
+ <rich:list id="a4jComponentsList1" value="#{richBean.a4jComponents.entrySet().toArray()}"
+ var="entry" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
- <h:panelGroup id="otherComponents" layout="block" style="width: 350px;">
- <ul>
- <a4j:repeat value="#{richBean.otherComponents}" var="comp">
- <li><h:link outcome="/components/#{comp}/list" value="#{richBean.components[comp]}" styleClass="link"/></li>
- </a4j:repeat>
- </ul>
- </h:panelGroup>
- </h:panelGrid>
+ <rich:list id="a4jComponentsList2" value="#{richBean.a4jComponents.entrySet().toArray()}"
+ var="entry" first="30" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
+ <rich:list id="a4jComponentsList3" value="#{richBean.a4jComponents.entrySet().toArray()}"
+ var="entry" first="60" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
+ </h:panelGrid>
+ </rich:tab>
+
+ <rich:tab id="richComponentsTab" header="Rich">
+ <h:panelGrid id="richComponents" columns="3" columnClasses="valign-top,valign-top,valign-top">
+
+ <rich:list id="richComponentsList1" value="#{richBean.richComponents.entrySet().toArray()}"
+ var="entry" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
+
+ <rich:list id="richComponentsList2" value="#{richBean.richComponents.entrySet().toArray()}"
+ var="entry" first="30" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
+
+ <rich:list id="richComponentsList3" value="#{richBean.richComponents.entrySet().toArray()}"
+ var="entry" first="60" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
+ </h:panelGrid>
+ </rich:tab>
+
+ <rich:tab id="otherComponentsTab" header="Other">
+ <h:panelGrid id="otherComponents" columns="3" columnClasses="valign-top,valign-top,valign-top">
+
+ <rich:list id="otherComponentsList1" value="#{richBean.otherComponents.entrySet().toArray()}"
+ var="entry" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
+
+ <rich:list id="otherComponentsList2" value="#{richBean.otherComponents.entrySet().toArray()}"
+ var="entry" first="30" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
+
+ <rich:list id="otherComponentsList3" value="#{richBean.otherComponents.entrySet().toArray()}"
+ var="entry" first="60" rows="30" style="width: 350px">
+ <h:link outcome="/components/#{entry.key}/list" value="#{entry.value}" styleClass="link"/>
+ </rich:list>
+ </h:panelGrid>
+ </rich:tab>
+
+ </rich:tabPanel>
+
<ui:decorate template="/templates/footer.xhtml" />
</h:form>
</h:body>
13 years, 8 months
JBoss Rich Faces SVN: r22461 - in modules/tests/metamer/trunk/application/src/main: java/org/richfaces/tests/metamer/listener and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-03 10:10:18 -0400 (Tue, 03 May 2011)
New Revision: 22461
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/HornetQInitializer.java
modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/faces-config.xml
Log:
JMS initialization refactored
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java 2011-05-03 11:12:59 UTC (rev 22460)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java 2011-05-03 14:10:18 UTC (rev 22461)
@@ -34,6 +34,8 @@
import org.richfaces.component.UIPush;
import org.richfaces.tests.metamer.Attributes;
import org.richfaces.tests.metamer.Message;
+import org.richfaces.tests.metamer.listener.HornetQInitializer;
+import org.richfaces.tests.metamer.listener.TopicsInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -62,6 +64,11 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
+ // TODO refactor
+ // set up messaging
+ new HornetQInitializer().processEvent(null);
+ new TopicsInitializer().processEvent(null);
+
topicsContext = TopicsContext.lookup();
attributes = Attributes.getComponentAttributesFromClass(UIPush.class, getClass());
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/HornetQInitializer.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/HornetQInitializer.java 2011-05-03 11:12:59 UTC (rev 22460)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/HornetQInitializer.java 2011-05-03 14:10:18 UTC (rev 22461)
@@ -26,7 +26,6 @@
import javax.faces.application.Application;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
-import javax.faces.event.PostConstructApplicationEvent;
import javax.faces.event.PreDestroyApplicationEvent;
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
@@ -75,7 +74,7 @@
serverType = e.getMessage();
}
- if (serverType != null && serverType.contains("Tomcat") && event instanceof PostConstructApplicationEvent) {
+ if (serverType != null && serverType.contains("Tomcat")) {
try {
startHornetQ();
} catch (Exception e) {
Modified: modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/faces-config.xml 2011-05-03 11:12:59 UTC (rev 22460)
+++ modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/faces-config.xml 2011-05-03 14:10:18 UTC (rev 22461)
@@ -4,6 +4,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<application>
+ <!--
<system-event-listener>
<system-event-listener-class>org.richfaces.tests.metamer.listener.HornetQInitializer</system-event-listener-class>
<system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
@@ -12,6 +13,7 @@
<system-event-listener-class>org.richfaces.tests.metamer.listener.TopicsInitializer</system-event-listener-class>
<system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
</system-event-listener>
+ -->
</application>
<lifecycle>
13 years, 8 months
JBoss Rich Faces SVN: r22460 - in modules/tests/metamer/trunk: application/src/main/java/org/richfaces/tests/metamer/bean and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-03 07:12:59 -0400 (Tue, 03 May 2011)
New Revision: 22460
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JActionListenerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAttachQueueBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandLinkBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JJSFunctionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JLogBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JMediaOutputBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JOutputPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JParamBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPollBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JQueueBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JRegionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JRepeatBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JStatusBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAccordionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAccordionItemBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableTogglerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichColumnBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichColumnGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataGridBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataScrollerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDragIndicatorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDragSourceBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropDownMenuBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropListenerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropTargetBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichExtendedDataTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHashParamBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInplaceInputBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInplaceSelectBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInputNumberSliderBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInputNumberSpinnerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichJQueryBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichListBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuItemBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuSeparatorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuItemBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPopupPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichProgressBarBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichSelectBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToggleControlBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTogglePanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTogglePanelItemBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToolbarBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToolbarGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeListenerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeModelAdaptorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeModelRecursiveAdaptorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeNodeBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichValidatorBean.java
Removed:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JParamBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichComponentControlBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragIndicatorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragSourceBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropTargetBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichHashParamBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToggleControlBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeListenerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelRecursiveAdaptorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeNodeBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java
Modified:
modules/tests/metamer/trunk/application/pom.xml
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/TopicsInitializer.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/AbstractNode.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/KeyConverter.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/RecursiveNodeImpl.java
modules/tests/metamer/trunk/application/src/test/java/org/richfaces/tests/metamer/TestRichTreeModelRecursiveAdaptorBeanSerialization.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/TestColumnFiltering.java
Log:
beans refactored - moved to subpackages
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/pom.xml 2011-05-03 11:12:59 UTC (rev 22460)
@@ -171,17 +171,6 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <!-- disable default (inherited) attach-souces execution, use war sources instead -->
- <execution>
- <id>attach-sources</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<attachClasses>true</attachClasses>
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.NoneScoped;
-import javax.faces.context.FacesContext;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.ActionListener;
-
-/**
- * Managed bean for a4j:ajax.
- *
- * @author Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jActionListenerBean")
-@NoneScoped
-public class A4JActionListenerBean {
-
- public static final class ActionListenerImpl implements ActionListener {
-
- public void processAction(ActionEvent event) throws AbortProcessingException {
- addFacesMessage("Implementation of ActionListener created and called: " + this);
- }
- }
-
- private static final class BoundActionListener implements ActionListener {
-
- public void processAction(ActionEvent event) throws AbortProcessingException {
- addFacesMessage("Bound listener called");
- }
- }
- private ActionListener actionListener = new BoundActionListener();
-
- private static void addFacesMessage(String messageText) {
- FacesContext context = FacesContext.getCurrentInstance();
- context.addMessage(null, new FacesMessage(messageText));
- }
-
- public void handleActionMethod(ActionEvent event) throws AbortProcessingException {
- addFacesMessage("Method expression listener called");
- }
-
- public void handleActionMethodComposite(ActionEvent event) throws AbortProcessingException {
- addFacesMessage("Method expression listener called from composite component");
- }
-
- public ActionListener getActionListener() {
- return actionListener;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.FacesException;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.event.AjaxBehaviorEvent;
-import javax.faces.model.SelectItem;
-
-import org.ajax4jsf.component.behavior.AjaxBehavior;
-import org.richfaces.tests.metamer.Attribute;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:ajax.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jAjaxBean")
-@ViewScoped
-public class A4JAjaxBean implements Serializable {
-
- private static final long serialVersionUID = -546567867L;
- private static final int ACTION_STRING_LENGTH = 6;
- private static Logger logger;
- private Attributes attributes;
- private String input;
- private List<String> cars;
- private String car;
- private boolean boolVal;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getBehaviorAttributesFromFacesConfig(AjaxBehavior.class, getClass());
-
- // the 'event' attribute for behavior tag must be a literal
- attributes.remove("event");
-
- attributes.setAttribute("render", "output1, output2");
- attributes.setAttribute("execute", "@form");
-
- // FIXME not found attribute
- Attribute listenerAttr = new Attribute("listener");
- List<SelectItem> selectOptions = new ArrayList<SelectItem>();
- selectOptions.add(new SelectItem("doubleStringListener", "doubleStringListener"));
- selectOptions.add(new SelectItem("first6CharsListener", "first6CharsListener"));
- selectOptions.add(new SelectItem("toUpperCaseListener", "toUpperCaseListener"));
- selectOptions.add(new SelectItem("causeErrorListener", "causeErrorListener"));
- selectOptions.add(new SelectItem(null, "null"));
- listenerAttr.setSelectOptions(selectOptions);
- attributes.put(listenerAttr.getName(), listenerAttr);
-
- cars = new ArrayList<String>();
- cars.add("Ferrari");
- cars.add("Lexus");
- car = "Ferrari";
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- /**
- * Getter for input.
- * @return content of the input field on the page
- */
- public String getInput() {
- return input;
- }
-
- /**
- * Setter for input.
- * @param input new content of the input field on the page
- */
- public void setInput(String input) {
- this.input = input;
- }
-
- public String getCar() {
- return car;
- }
-
- public void setCar(String car) {
- this.car = car;
- }
-
- public List<String> getCars() {
- return cars;
- }
-
- public void setCars(List<String> cars) {
- this.cars = cars;
- }
-
- public boolean isBoolVal() {
- return boolVal;
- }
-
- public void setBoolVal(boolean boolVal) {
- this.boolVal = boolVal;
- }
-
- /**
- * An action listener that takes the first six characters from input and stores it to input.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void first6CharsListener(AjaxBehaviorEvent event) {
- if (input == null) {
- input = "";
- } else {
- int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
- input = (String) input.subSequence(0, endIndex);
- }
- }
-
- /**
- * An action listener that takes user's input, doubles it and stores it to input.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void doubleStringListener(AjaxBehaviorEvent event) {
- if (input == null) {
- input = "";
- } else {
- input = input.concat(input);
- }
- }
-
- /**
- * An action listener that takes user's input, converts it to upper case and stores it to input3.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void toUpperCaseListener(AjaxBehaviorEvent event) {
- if (input == null) {
- input = "";
- } else {
- input = input.toUpperCase();
- }
- }
-
- /**
- * An action listener causing error. Suitable for testing onerror attribute.
- * @param event an event representing the activation of a user interface component (not used)
- */
- public void causeErrorListener(AjaxBehaviorEvent event) {
- throw new FacesException("Ajax request caused an error. This is intentional behavior.");
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIAttachQueue;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:attachQueue.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jAttachQueueBean")
-@ViewScoped
-public class A4JAttachQueueBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private Attributes attributes2;
- private String text1;
- private String text2;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- // initialize attributes
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIAttachQueue.class, getClass());
- initializeAttributes(attributes);
- attributes.setAttribute("requestDelay", 500);
-
- attributes2 = Attributes.getComponentAttributesFromFacesConfig(UIAttachQueue.class, getClass());
- initializeAttributes(attributes2);
- attributes2.setAttribute("requestDelay", 1500);
- }
-
- private void initializeAttributes(Attributes attributes) {
- attributes.setAttribute("rendered", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Attributes getAttributes2() {
- return attributes2;
- }
-
- public void setAttributes2(Attributes attributes2) {
- this.attributes2 = attributes2;
- }
-
- public String getText1() {
- return text1;
- }
-
- public void setText1(String text1) {
- this.text1 = text1;
- }
-
- public String getText2() {
- return text2;
- }
-
- public void setText2(String text2) {
- this.text2 = text2;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.event.ActionEvent;
-
-import org.richfaces.component.UICommandButton;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:commandButton.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jButtonBean")
-@ViewScoped
-public class A4JCommandButtonBean implements Serializable {
-
- private static final long serialVersionUID = -2556026843426776944L;
- private static final int ACTION_STRING_LENGTH = 6;
- private static Logger logger;
- private Attributes attributes;
- private String input;
- private String input2;
- private String input3;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UICommandButton.class, getClass());
-
- attributes.setAttribute("action", "first6CharsAction");
- attributes.setAttribute("actionListener", "toUpperCaseActionListener");
- attributes.setAttribute("disabled", false);
- attributes.get("disabled").setType(Boolean.class);
- attributes.setAttribute("render", "output1 output2 output3");
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("value", "command button");
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- /**
- * Getter for input.
- *
- * @return value entered by a user
- */
- public String getInput() {
- return input;
- }
-
- /**
- * Getter for input2.
- *
- * @return value entered by a user modified by selected action
- */
- public String getInput2() {
- return input2;
- }
-
- /**
- * Getter for input3.
- *
- * @return value entered by a user modified by selected action listener
- */
- public String getInput3() {
- return input3;
- }
-
- /**
- * Setter for input.
- *
- * @param input
- * value which user entered into text input on the page
- */
- public void setInput(String input) {
- this.input = input;
- }
-
- /**
- * An action that takes the first six characters from input and stores it to input2.
- *
- * @return null since no navigation should be performed
- */
- public String first6CharsAction() {
- if (input == null) {
- return "";
- } else {
- int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
- input2 = (String) input.subSequence(0, endIndex);
- return null;
- }
- }
-
- /**
- * An action that takes user's input, doubles it and stores it to input2.
- *
- * @return null since no navigation should be performed
- */
- public String doubleStringAction() {
- if (input == null) {
- input2 = "";
- } else {
- input2 = input.concat(input);
- }
-
- return null;
- }
-
- /**
- * An action that takes user's input, converts it to upper case and stores it to input2.
- *
- * @return null since no navigation should be performed
- */
- public String toUpperCaseAction() {
- if (input == null) {
- return "";
- } else {
- input2 = input.toUpperCase();
- return null;
- }
- }
-
- /**
- * An action listener that takes the first six characters from input and stores it to input3.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void first6CharsActionListener(ActionEvent event) {
- if (input == null) {
- input3 = "";
- } else {
- int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
- input3 = (String) input.subSequence(0, endIndex);
- }
- }
-
- /**
- * An action listener that takes user's input, doubles it and stores it to input3.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void doubleStringActionListener(ActionEvent event) {
- if (input == null) {
- input3 = "";
- } else {
- input3 = input.concat(input);
- }
- }
-
- /**
- * An action listener that takes user's input, converts it to upper case and stores it to input3.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void toUpperCaseActionListener(ActionEvent event) {
- if (input == null) {
- input3 = "";
- } else {
- input3 = input.toUpperCase();
- }
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.event.ActionEvent;
-
-import org.richfaces.component.UICommandLink;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:commandLink.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jLinkBean")
-@ViewScoped
-public class A4JCommandLinkBean implements Serializable {
-
- private static final long serialVersionUID = -2556076843426776944L;
- private static final int ACTION_STRING_LENGTH = 6;
- private static Logger logger;
- private Attributes attributes;
- private String input;
- private String input2;
- private String input3;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UICommandLink.class, getClass());
-
- attributes.setAttribute("value", "command link");
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("action", "first6CharsAction");
- attributes.setAttribute("actionListener", "toUpperCaseActionListener");
- attributes.setAttribute("render", "output1 output2 output3");
-
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- /**
- * Getter for input.
- *
- * @return value entered by a user
- */
- public String getInput() {
- return input;
- }
-
- /**
- * Getter for input2.
- *
- * @return value entered by a user modified by selected action
- */
- public String getInput2() {
- return input2;
- }
-
- /**
- * Getter for input3.
- *
- * @return value entered by a user modified by selected action listener
- */
- public String getInput3() {
- return input3;
- }
-
- /**
- * Setter for input.
- *
- * @param input
- * value which user entered into text input on the page
- */
- public void setInput(String input) {
- this.input = input;
- }
-
- /**
- * An action that takes the first six characters from input and stores it to input2.
- *
- * @return null since no navigation should be performed
- */
- public String first6CharsAction() {
- if (input == null) {
- return "";
- } else {
- int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
- input2 = (String) input.subSequence(0, endIndex);
- return null;
- }
- }
-
- /**
- * An action that takes user's input, doubles it and stores it to input2.
- *
- * @return null since no navigation should be performed
- */
- public String doubleStringAction() {
- if (input == null) {
- input2 = "";
- } else {
- input2 = input.concat(input);
- }
-
- return null;
- }
-
- /**
- * An action that takes user's input, converts it to upper case and stores it to input2.
- *
- * @return null since no navigation should be performed
- */
- public String toUpperCaseAction() {
- if (input == null) {
- return "";
- } else {
- input2 = input.toUpperCase();
- return null;
- }
- }
-
- /**
- * An action listener that takes the first six characters from input and stores it to input3.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void first6CharsActionListener(ActionEvent event) {
- if (input == null) {
- input3 = "";
- } else {
- int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
- input3 = (String) input.subSequence(0, endIndex);
- }
- }
-
- /**
- * An action listener that takes user's input, doubles it and stores it to input3.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void doubleStringActionListener(ActionEvent event) {
- if (input == null) {
- input3 = "";
- } else {
- input3 = input.concat(input);
- }
- }
-
- /**
- * An action listener that takes user's input, converts it to upper case and stores it to input3.
- *
- * @param event
- * an event representing the activation of a user interface component (not used)
- */
- public void toUpperCaseActionListener(ActionEvent event) {
- if (input == null) {
- input3 = "";
- } else {
- input3 = input.toUpperCase();
- }
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.event.ActionEvent;
-
-import org.richfaces.component.UIFunction;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:jsFunction.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jJSFunctionBean")
-// should not be view-scoped (see https://jira.jboss.org/browse/RF-9287)
-@ViewScoped
-public class A4JJSFunctionBean implements Serializable {
-
- private static final long serialVersionUID = 48333649809L;
- private static Logger logger;
- private Attributes attributes;
- private int year;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
- year = Integer.parseInt(new SimpleDateFormat("yyyy").format(new Date()));
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIFunction.class, getClass());
-
- attributes.setAttribute("name", "metamerFunction");
- attributes.setAttribute("render", "time1, time2, year");
- attributes.setAttribute("rendered", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public int getYear() {
- return year;
- }
-
- public void setYear(int year) {
- this.year = year;
- }
-
- public String increaseYearAction() {
- year++;
- return null;
- }
-
- public String decreaseYearAction() {
- year--;
- return null;
- }
-
- public void increaseYearActionListener(ActionEvent event) {
- year++;
- }
-
- public void decreaseYearActionListener(ActionEvent event) {
- year--;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIAjaxLog;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:log.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jLogBean")
-@ViewScoped
-public class A4JLogBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private String name;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- name = "John";
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIAjaxLog.class, getClass());
-
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("level", "debug");
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- /**
- * Getter for name.
- * @return content of the input field on the page
- */
- public String getName() {
- return name;
- }
-
- /**
- * Setter for name.
- * @param name new content of the input field on the page
- */
- public void setName(String name) {
- this.name = name;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.awt.Color;
-import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
-import javax.imageio.ImageIO;
-
-import org.richfaces.component.UIMediaOutput;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:mediaOutput.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jMediaOutputBean")
-@RequestScoped
-public class A4JMediaOutputBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIMediaOutput.class, getClass());
-
- attributes.setAttribute("session", true);
- attributes.setAttribute("rendered", true);
- attributes.remove("createContent");
- attributes.remove("element");
- attributes.remove("value");
- attributes.remove("mimeType");
- attributes.remove("uriAttribute");
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public void paint(OutputStream out, Object data) throws IOException {
- if (data instanceof MediaData) {
- MediaData paintData = (MediaData) data;
- BufferedImage img = new BufferedImage(paintData.getWidth(), paintData.getHeight(), BufferedImage.TYPE_INT_RGB);
- Graphics2D graphics2D = img.createGraphics();
- graphics2D.clearRect(0, 0, paintData.getWidth(), paintData.getHeight());
-
- graphics2D.setColor(Color.YELLOW);
- graphics2D.fillRect(0, 0, paintData.width / 2, paintData.height / 2);
-
- graphics2D.setColor(Color.RED);
- graphics2D.fillRect(paintData.width / 2, 0, paintData.width / 2, paintData.height / 2);
-
- graphics2D.setColor(Color.BLUE);
- graphics2D.fillRect(0, paintData.height / 2, paintData.width / 2, paintData.height / 2);
-
- graphics2D.setColor(Color.GREEN);
- graphics2D.fillRect(paintData.width / 2, paintData.height / 2, paintData.width / 2, paintData.height / 2);
-
- ImageIO.write(img, "png", out);
- }
- }
-
- private void copy(InputStream in, OutputStream out) throws IOException {
- byte[] buffer = new byte[2048];
- int read;
-
- while ((read = in.read(buffer)) != -1) {
- out.write(buffer, 0, read);
- }
- }
-
- public void paintFlash(OutputStream out, Object data) throws IOException {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
- if (loader == null) {
- loader = getClass().getClassLoader();
- }
-
- InputStream stream = loader.getResourceAsStream("resources/flash/text.swf");
-
- if (stream != null) {
- try {
- copy(stream, out);
- } finally {
- stream.close();
- }
- }
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIOutputPanel;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:outputPanel.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jOutputPanelBean")
-@ViewScoped
-public class A4JOutputPanelBean implements Serializable {
-
- private static final long serialVersionUID = 4814439475400649809L;
- private static Logger logger;
- private Attributes attributes;
- private int counter;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIOutputPanel.class, getClass());
-
- attributes.setAttribute("ajaxRendered", true);
- attributes.setAttribute("layout", "block");
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("styleClass", "");
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public int getCounter() {
- return counter;
- }
-
- public void setCounter(int counter) {
- this.counter = counter;
- }
-
- public String increaseCounterAction() {
- counter++;
- return null;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JParamBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JParamBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JParamBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.component.UIParameter;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:param.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jParamBean")
-@ViewScoped
-public class A4JParamBean implements Serializable {
-
- private static final long serialVersionUID = -23993426776944L;
- private static Logger logger;
- private Attributes attributes;
- private String parameter;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIParameter.class, getClass());
-
- attributes.setAttribute("name", "param");
- attributes.setAttribute("noEscape", true);
- attributes.get("noEscape").setType(Boolean.class);
- attributes.setAttribute("value", "screen.width");
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String getParameter() {
- return parameter;
- }
-
- public void setParameter(String parameter) {
- this.parameter = parameter;
- }
-
- public String getRequestParameter() {
- Map<String, String> requestParameterMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
- return requestParameterMap.get(attributes.get("name").getValue().toString());
- }
-
- public String reset() {
- parameter = null;
- return null;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.event.ActionEvent;
-
-import org.richfaces.component.UIPoll;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:poll.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jPollBean")
-@ViewScoped
-public class A4JPollBean implements Serializable {
-
- private static final long serialVersionUID = 4810889475400649809L;
- private static Logger logger;
- private Attributes attributes;
- private int counter;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIPoll.class, getClass());
-
- attributes.setAttribute("enabled", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("interval", 2500);
- attributes.setAttribute("action", "increaseCounterAction");
- attributes.setAttribute("actionListener", "increaseCounterActionListener");
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Date getDate() {
- return new Date();
- }
-
- public int getCounter() {
- return counter;
- }
-
- public void setCounter(int counter) {
- this.counter = counter;
- }
-
- public String increaseCounterAction() {
- counter++;
- return null;
- }
-
- public String decreaseCounterAction() {
- counter--;
- return null;
- }
-
- public void increaseCounterActionListener(ActionEvent event) {
- counter++;
- }
-
- public void decreaseCounterActionListener(ActionEvent event) {
- counter--;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-import org.richfaces.application.push.MessageException;
-import org.richfaces.application.push.TopicKey;
-
-import org.richfaces.application.push.TopicsContext;
-import org.richfaces.component.UIPush;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:push.
- *
- * @author Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jPushBean")
-@SessionScoped
-public class A4JPushBean implements Serializable {
-
- private static final long serialVersionUID = 4810889475400649809L;
- private static Logger logger;
- private transient TopicsContext topicsContext;
- private Attributes attributes;
- private String username;
- private String message;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- topicsContext = TopicsContext.lookup();
-
- attributes = Attributes.getComponentAttributesFromClass(UIPush.class, getClass());
-// attributes.setAttribute("interval", 1000);
-// attributes.setAttribute("action", "increaseCounterAction");
-// attributes.setAttribute("actionListener", "increaseCounterActionListener");
-// attributes.setAttribute("rendered", true);
-// attributes.setAttribute("enabled", true);
-//
-// // will be set on page and cannot be changed
-// attributes.remove("eventProducer");
- }
-
- /**
- * Getter for attributes.
- *
- * @return A map containing all attributes of tested component. Name of the component is key in the map.
- */
- public Attributes getAttributes() {
- return attributes;
- }
-
- /**
- * Setter for attributes.
- *
- * @param attributes
- * map containing all attributes of tested component. Name of the component is key in the map.
- */
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- this.username = username;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public void setTopicsContext(TopicsContext topicsContext) {
- this.topicsContext = topicsContext;
- }
-
- private TopicsContext getTopicsContext() {
- if (topicsContext == null) {
- topicsContext = TopicsContext.lookup();
- }
- return topicsContext;
- }
-
- public void send() {
- try {
- logger.info("sending message \"" + message + "\" by user " + username);
- Message msg = new Message(message, username, new Date().toString());
- getTopicsContext().publish(new TopicKey("metamer", "xxx"), msg);
- } catch (MessageException messageException) {
- logger.error("Could not send message \"" + message + "\" by user " + username + ".", messageException);
- }
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIQueue;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:queue.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jQueueBean")
-@ViewScoped
-public class A4JQueueBean implements Serializable {
-
- private static final long serialVersionUID = 486866943531809L;
- private static Logger logger;
- private Attributes attributes;
- private String text;
- private A4JQueueBean globalQueue;
- private A4JQueueBean formQueue1;
- private A4JQueueBean formQueue2;
- private boolean introduceDelay;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- // initialize attributes
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIQueue.class, getClass());
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("requestDelay", 750);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public A4JQueueBean getGlobalQueue() {
- if (globalQueue == null) {
- globalQueue = new A4JQueueBean();
- globalQueue.init();
- globalQueue.attributes.setAttribute("requestDelay", 10000);
- }
- return globalQueue;
- }
-
- public A4JQueueBean getFormQueue1() {
- if (formQueue1 == null) {
- formQueue1 = new A4JQueueBean();
- formQueue1.init();
- formQueue1.attributes.setAttribute("requestDelay", 500);
- }
- return formQueue1;
- }
-
- public A4JQueueBean getFormQueue2() {
- if (formQueue2 == null) {
- formQueue2 = new A4JQueueBean();
- formQueue2.init();
- formQueue2.attributes.setAttribute("requestDelay", 2000);
- }
- return formQueue2;
- }
-
- public A4JQueueBean[] getFormQueues() {
- return new A4JQueueBean[]{getFormQueue1(), getFormQueue2()};
- }
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- if (introduceDelay) {
- try {
- Thread.sleep(5000);
- } catch (InterruptedException e) {
- throw new IllegalStateException(e);
- }
- }
- this.text = text;
- }
-
- public boolean isIntroduceDelay() {
- return introduceDelay;
- }
-
- public void setIntroduceDelay(boolean introduceDelay) {
- this.introduceDelay = introduceDelay;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-import javax.faces.event.AjaxBehaviorEvent;
-import javax.faces.event.ValueChangeEvent;
-import javax.faces.model.SelectItem;
-
-import org.richfaces.component.UIRegion;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.Employee;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:region.
- *
- * @author Exadel, Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jRegionBean")
-@SessionScoped
-public class A4JRegionBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static final SelectItem[] AVAILABLE_EXECUTE_OPTIONS = new SelectItem[]{new SelectItem(null, "default"),
- new SelectItem("@all"), new SelectItem("@form"), new SelectItem("@region"), new SelectItem("@this"),
- new SelectItem("outerValueInput", "Outer"), new SelectItem("regionValueInput", "Region"),
- new SelectItem("nestedRegionValueInput", "Nested region"),
- new SelectItem("decorationValueInput", "Decoration"), new SelectItem("insertionValueInput", "Insertion")};
- private static Logger logger;
- // for page simple.xhtml
- private Attributes attributes;
- private Employee user1;
- private Employee user2;
- // for page nested.xhtml
- private String execute;
- private String nestedExecute;
- private String outerExecute;
- private String decorationExecute;
- private String decorationValue;
- private String insertionExecute;
- private String outerValue;
- private String regionValue;
- private String nestedRegionValue;
- private String lastExecutedButtonValue;
- private String insertionValue;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- user1 = new Employee();
- user2 = new Employee();
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIRegion.class, getClass());
- attributes.setAttribute("rendered", true);
- }
-
- // getters and setters for page simple.xhtml
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Employee getUser1() {
- return user1;
- }
-
- public void setUser1(Employee user1) {
- this.user1 = user1;
- }
-
- public Employee getUser2() {
- return user2;
- }
-
- public void setUser2(Employee user2) {
- this.user2 = user2;
- }
-
- // getters and setters for page nested.xhtml
- public SelectItem[] getExecuteOptions() {
- return AVAILABLE_EXECUTE_OPTIONS;
- }
-
- public String getOuterValue() {
- return outerValue;
- }
-
- public void setOuterValue(String outerValue) {
- this.outerValue = outerValue;
- }
-
- public String getRegionValue() {
- return regionValue;
- }
-
- public void setRegionValue(String value) {
- this.regionValue = value;
- }
-
- public String getNestedRegionValue() {
- return nestedRegionValue;
- }
-
- public void setNestedRegionValue(String nestedValue) {
- this.nestedRegionValue = nestedValue;
- }
-
- public String getExecute() {
- return execute;
- }
-
- public void setExecute(String execute) {
- this.execute = execute;
- }
-
- public String getNestedExecute() {
- return nestedExecute;
- }
-
- public void setNestedExecute(String nestedExecute) {
- this.nestedExecute = nestedExecute;
- }
-
- public String getOuterExecute() {
- return outerExecute;
- }
-
- public void setOuterExecute(String outerExecute) {
- this.outerExecute = outerExecute;
- }
-
- public String getInsertionExecute() {
- return insertionExecute;
- }
-
- public void setInsertionExecute(String insertionExecute) {
- this.insertionExecute = insertionExecute;
- }
-
- public String getInsertionValue() {
- return insertionValue;
- }
-
- public void setInsertionValue(String insertionValue) {
- this.insertionValue = insertionValue;
- }
-
- public String getDecorationExecute() {
- return decorationExecute;
- }
-
- public void setDecorationExecute(String decorationExecute) {
- this.decorationExecute = decorationExecute;
- }
-
- public String getDecorationValue() {
- return decorationValue;
- }
-
- public void setDecorationValue(String decorationValue) {
- this.decorationValue = decorationValue;
- }
-
- public void handleBehavior(AjaxBehaviorEvent event) {
- lastExecutedButtonValue = (String) event.getComponent().getAttributes().get("value");
- }
-
- public String getLastExecutedButtonValue() {
- return lastExecutedButtonValue;
- }
-
- public void handleDefaultsValueChange(ValueChangeEvent event) {
- String newValue = (String) event.getNewValue();
-
- setOuterExecute(newValue);
- setExecute(newValue);
- setDecorationExecute(newValue);
- setInsertionExecute(newValue);
- setNestedExecute(newValue);
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIRepeat;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:repeat.
- *
- * @author Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jRepeatBean")
-@ViewScoped
-public class A4JRepeatBean implements Serializable {
-
- private static final long serialVersionUID = 4864439475400649809L;
- private static final int MATRIX_DIMENSION = 4;
- private static Logger logger;
- private Attributes attributes;
- private List<Data> dataList;
- private Data selectedDataItem = null;
- private List<MatrixRow> matrixRows;
-
- public static final class MatrixCell implements Serializable {
-
- private static final long serialVersionUID = -5911659561854593681L;
- private int value = 0;
-
- public int getValue() {
- return value;
- }
-
- public void setValue(int value) {
- this.value = value;
- }
-
- public void clearValueAction() {
- setValue(0);
- }
-
- public void increaseValueAction() {
- value++;
- }
-
- public void decreaseValueAction() {
- value--;
- }
- }
-
- public static final class MatrixRow implements Serializable {
-
- private static final long serialVersionUID = -5051037819565283283L;
- private List<MatrixCell> cells = new ArrayList<MatrixCell>();
-
- public List<MatrixCell> getCells() {
- return cells;
- }
-
- public void addCell(MatrixCell cell) {
- cells.add(cell);
- }
- }
-
- public static final class Data implements Serializable {
-
- private static final long serialVersionUID = -1461777632529492912L;
- private String text;
-
- /**
- * @return the text
- */
- public String getText() {
- return text;
- }
-
- /**
- * @param text the text to set
- */
- public void setText(String text) {
- this.text = text;
- }
- }
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- // initialize model for page simple.xhtml
- dataList = new ArrayList<Data>();
- for (int i = 0; i < 20; i++) {
- Data data = new Data();
- data.setText(MessageFormat.format("Item {0}", i));
- dataList.add(data);
- }
-
- // initialize model for page matrix.xhtml
- matrixRows = new ArrayList<MatrixRow>();
- for (int i = 0; i < MATRIX_DIMENSION; i++) {
- MatrixRow matrixRow = new MatrixRow();
-
- for (int j = 0; j < MATRIX_DIMENSION; j++) {
- MatrixCell matrixCell = new MatrixCell();
- matrixRow.addCell(matrixCell);
- }
-
- matrixRows.add(matrixRow);
- }
-
- // initialize attributes
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIRepeat.class, getClass());
- attributes.setAttribute("rendered", true);
- // TODO has to be tested in other way
- attributes.remove("componentState");
- attributes.remove("iterationState");
- attributes.remove("iterationStatusVar");
- attributes.remove("rowKeyVar");
- attributes.remove("rowKeyConverter");
- attributes.remove("value");
- attributes.remove("stateVar");
- attributes.remove("var");
-
- // should be hidden
- attributes.remove("relativeRowIndex");
- attributes.remove("rowAvailable");
- attributes.remove("rowCount");
- attributes.remove("rowData");
- attributes.remove("rowIndex");
- attributes.remove("rowKey");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- /**
- * @return the data
- */
- public List<Data> getDataList() {
- return dataList;
- }
-
- /**
- * @return the selectedDataItem
- */
- public Data getSelectedDataItem() {
- return selectedDataItem;
- }
-
- /**
- * @param selectedDataItem the selectedDataItem to set
- */
- public void setSelectedDataItem(Data selectedDataItem) {
- this.selectedDataItem = selectedDataItem;
- }
-
- public List<MatrixRow> getMatrixRows() {
- return matrixRows;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIStatus;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for a4j:status.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "a4jStatusBean")
-@ViewScoped
-public class A4JStatusBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private String facetStartValue = "START";
- private String facetStopValue = "STOP";
- private String facetErrorValue = "ERROR";
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIStatus.class, getClass());
- attributes.setAttribute("rendered", true);
-
- // hidden attributes
- attributes.remove("converter");
- attributes.remove("localValue");
- attributes.remove("value");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String getFacetStartValue() {
- return facetStartValue;
- }
-
- public void setFacetStartValue(String facetStartValue) {
- this.facetStartValue = facetStartValue;
- }
-
- public String getFacetStopValue() {
- return facetStopValue;
- }
-
- public void setFacetStopValue(String facetStopValue) {
- this.facetStopValue = facetStopValue;
- }
-
- public String getFacetErrorValue() {
- return facetErrorValue;
- }
-
- public void setFacetErrorValue(String facetErrorValue) {
- this.facetErrorValue = facetErrorValue;
- }
-
- /**
- * Action that creates a 2-second delay.
- *
- * @throws InterruptedException
- * if any thread has interrupted the current thread. The interrupted status of the current thread is
- * cleared when this exception is thrown.
- */
- public void delay() throws InterruptedException {
- Thread.sleep(2000);
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIAccordion;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:accordion.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richAccordionBean")
-@ViewScoped
-public class RichAccordionBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIAccordion.class, getClass());
-
- attributes.setAttribute("activeItem", "item1");
- attributes.setAttribute("rendered", true);
-
- // will be tested in another way
- attributes.remove("converter");
- attributes.remove("itemChangeListener");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIAccordionItem;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:accordionItem.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richAccordionItemBean")
-@ViewScoped
-public class RichAccordionItemBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIAccordionItem.class, getClass());
-
- attributes.setAttribute("header", "Item 1");
- attributes.setAttribute("name", "item1");
- attributes.setAttribute("rendered", true);
-
- // TODO will be tested in another way
- attributes.remove("converter");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
-import javax.faces.bean.SessionScoped;
-
-import org.richfaces.component.UIAutocomplete;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.Capital;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:autocomplete.
- * http://community.jboss.org/wiki/richfacesautocompletecomponentbehavior
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richAutocompleteBean")
-// cannot be view-scoped (see https://jira.jboss.org/browse/RF-9287)
-@SessionScoped
-public class RichAutocompleteBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private Attributes ajaxAttributes;
- @ManagedProperty(value = "#{model.capitals}")
- private List<Capital> capitals;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIAutocomplete.class, getClass());
- attributes.setAttribute("converterMessage", "converter message");
- attributes.setAttribute("mode", "ajax");
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("tokens", ", ");
- attributes.setAttribute("validatorMessage", "validator message");
-
- ajaxAttributes = Attributes.getEmptyAttributes(getClass());
- ajaxAttributes.setAttribute("render", "output");
- ajaxAttributes.setAttribute("execute", "autocomplete");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Attributes getAjaxAttributes() {
- return ajaxAttributes;
- }
-
- public void setAjaxAttributes(Attributes ajaxAttributes) {
- this.ajaxAttributes = ajaxAttributes;
- }
-
- public List<String> autocomplete(String prefix) {
- ArrayList<String> result = new ArrayList<String>();
- if (prefix != null && prefix.length() > 0) {
- Iterator<Capital> iterator = capitals.iterator();
- while (iterator.hasNext()) {
- Capital elem = ((Capital) iterator.next());
- if ((elem.getState() != null && elem.getState().toLowerCase().indexOf(prefix.toLowerCase()) == 0)
- || "".equals(prefix)) {
- result.add(elem.getState());
- }
- }
- } else {
- for (Capital capital : capitals) {
- result.add(capital.getState());
- }
- }
- return result;
- }
-
- public void setCapitals(List<Capital> capitals) {
- this.capitals = capitals;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-
-import javax.annotation.PostConstruct;
-import javax.faces.application.FacesMessage;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.event.ValueChangeEvent;
-import javax.faces.validator.ValidatorException;
-import javax.validation.constraints.Future;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Past;
-
-import org.richfaces.component.UICalendar;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:calendar.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richCalendarBean")
-@ViewScoped
-public class RichCalendarBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private Date date = new Date();
- private TimeZone timeZone = TimeZone.getTimeZone("UTC");
- private Date date1;
- private Date date2;
- private Date date3;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UICalendar.class, getClass());
-
- attributes.setAttribute("datePattern", "MMM d, yyyy HH:mm");
- attributes.setAttribute("direction", "bottomRight");
- attributes.setAttribute("jointPoint", "bottomLeft");
- attributes.setAttribute("popup", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("requiredMessage", "value is required");
- attributes.setAttribute("showApplyButton", true);
- attributes.setAttribute("showHeader", true);
- attributes.setAttribute("showFooter", true);
- attributes.setAttribute("showInput", true);
- attributes.setAttribute("showWeeksBar", true);
- attributes.setAttribute("showWeekDaysBar", true);
-
- // TODO has to be tested in another way
- attributes.remove("converter");
- attributes.remove("dataModel");
- attributes.remove("validator");
- attributes.remove("valueChangeListener");
- attributes.remove("timeZone");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Date getDate() {
- return date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
- public TimeZone getTimeZone() {
- return timeZone;
- }
-
- public void setTimeZone(TimeZone timeZone) {
- this.timeZone = timeZone;
- }
-
- @Past
- @NotNull
- public Date getDate1() {
- return date1;
- }
-
- public void setDate1(Date date1) {
- this.date1 = date1;
- }
-
- @Future
- @NotNull
- public Date getDate2() {
- return date2;
- }
-
- public void setDate2(Date date2) {
- this.date2 = date2;
- }
-
- public Date getDate3() {
- return date3;
- }
-
- public void setDate3(Date date3) {
- this.date3 = date3;
- }
-
- /**
- * A value change listener that logs to the page old and new value.
- *
- * @param event
- * an event representing the activation of a user interface component
- */
- public void valueChangeListener(ValueChangeEvent event) {
- SimpleDateFormat sdf = new SimpleDateFormat(attributes.get("datePattern").getValue().toString());
- sdf.setTimeZone(timeZone);
-
- String oldDate = "null";
- String newDate = "null";
-
- if (event.getOldValue() != null) {
- oldDate = sdf.format((Date) event.getOldValue());
- }
- if (event.getNewValue() != null) {
- newDate = sdf.format((Date) event.getNewValue());
- }
-
- RichBean.logToPage("* value changed: " + oldDate + " -> " + newDate);
- }
-
- public void validateDate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
- if (value == null) {
- return;
- }
-
- Calendar cal = Calendar.getInstance();
- cal.setTime((Date) value);
- int componentYear = cal.get(Calendar.YEAR);
-
- FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Date too far in the past.",
- "Select a date from year 1991 or newer.");
-
- if (componentYear < 1991) {
- FacesContext.getCurrentInstance().addMessage("form:calendar", message);
- }
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UICollapsiblePanel;
-import org.richfaces.event.PanelToggleEvent;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:collapsiblePanel.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richCollapsiblePanelBean")
-@ViewScoped
-public class RichCollapsiblePanelBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UICollapsiblePanel.class, getClass());
-
- attributes.setAttribute("expanded", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("header", "collapsible panel header");
-
- // will be tested in another way
- attributes.remove("converter");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public void toggleListener(PanelToggleEvent event) {
- RichBean.logToPage("* panel " + (event.getExpanded() ? "expanded" : "collapsed"));
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UICollapsibleSubTable;
-import org.richfaces.component.UIDataTableBase;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.ColumnSortingMap;
-import org.richfaces.tests.metamer.model.Employee;
-import org.richfaces.tests.metamer.model.Employee.Sex;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:collapsibleSubTable.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richSubTableBean")
-@ViewScoped
-public class RichCollapsibleSubTableBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- // FIXME: @ManagedProperty(value = "#{model.employees}")
- private List<Employee> employees = Model.unmarshallEmployees();
- private List<List<Employee>> lists;
- private transient UICollapsibleSubTable binding;
- // true = model, false = empty table
- private boolean state;
- // facets
- private Map<String, String> facets = new HashMap<String, String>();
- // sorting
- private ColumnSortingMap sorting = new ColumnSortingMap() {
-
- private static final long serialVersionUID = 1L;
-
- protected UIDataTableBase getBinding() {
- return binding;
- }
-
- protected Attributes getAttributes() {
- return attributes;
- }
- };
- // filtering
- private Map<String, Object> filtering = new HashMap<String, Object>();
- // expanded
- private Map<List<Employee>, Boolean> expanded = new HashMap<List<Employee>, Boolean>();
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UICollapsibleSubTable.class, getClass());
-
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("rows", 5);
-
- // TODO these attributes have to be tested in another way
- attributes.remove("expanded");
- attributes.remove("columns");
- attributes.remove("selection");
- attributes.remove("filterVar");
- attributes.remove("iterationStatusVar");
- attributes.remove("componentState");
- attributes.remove("rowKeyVar");
- attributes.remove("stateVar");
- attributes.remove("var");
- attributes.remove("value");
-
- List<Employee> men = new ArrayList<Employee>();
- List<Employee> women = new ArrayList<Employee>();
-
- for (Employee e : employees) {
- if (e.getSex() == Sex.MALE) {
- men.add(e);
- } else {
- women.add(e);
- }
- }
-
- lists = new ArrayList<List<Employee>>();
- lists.add(men);
- lists.add(women);
-
- expanded.put(men, true);
- expanded.put(women, true);
-
- state = true;
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public List<Employee> getEmployees() {
- return employees;
- }
-
- public void setEmployees(List<Employee> employees) {
- this.employees = employees;
- }
-
- public List<List<Employee>> getLists() {
- return lists;
- }
-
- public void setLists(List<List<Employee>> lists) {
- this.lists = lists;
- }
-
- public boolean isState() {
- return state;
- }
-
- public void setState(boolean state) {
- this.state = state;
- }
-
- public Map<String, String> getFacets() {
- return facets;
- }
-
- public UICollapsibleSubTable getBinding() {
- return binding;
- }
-
- public void setBinding(UICollapsibleSubTable binding) {
- this.binding = binding;
- }
-
- public ColumnSortingMap getSorting() {
- return sorting;
- }
-
- public Map<String, Object> getFiltering() {
- return filtering;
- }
-
- public Map<List<Employee>, Boolean> getExpanded() {
- return expanded;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UICollapsibleSubTableToggleControl;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.Employee;
-import org.richfaces.tests.metamer.model.Employee.Sex;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:collapsibleSubTableToggler.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name="richSubTableTogglerBean")
-@ViewScoped
-public class RichCollapsibleSubTableTogglerBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- // FIXME: @ManagedProperty(value = "#{model.employees}")
- private List<Employee> employees = Model.unmarshallEmployees();
- private List<List<Employee>> lists;
- // true = model, false = empty table
- private boolean state;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UICollapsibleSubTableToggleControl.class, getClass());
- attributes.setAttribute("event", "click");
- attributes.setAttribute("rendered", true);
- // TODO these attributes have to be tested in another way
- attributes.remove("for");
-
- List<Employee> men = new ArrayList<Employee>();
- List<Employee> women = new ArrayList<Employee>();
-
- for (Employee e : employees) {
- if (e.getSex() == Sex.MALE) {
- men.add(e);
- } else {
- women.add(e);
- }
- }
-
- lists = new ArrayList<List<Employee>>();
- lists.add(men);
- lists.add(women);
-
- state = true;
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public List<Employee> getEmployees() {
- return employees;
- }
-
- public void setEmployees(List<Employee> employees) {
- this.employees = employees;
- }
-
- public List<List<Employee>> getLists() {
- return lists;
- }
-
- public void setLists(List<List<Employee>> lists) {
- this.lists = lists;
- }
-
- public boolean isState() {
- return state;
- }
-
- public void setState(boolean state) {
- this.state = state;
- }
-
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.Comparator;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.SortOrder;
-import org.richfaces.component.UIColumn;
-import org.richfaces.model.Filter;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.Capital;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:column
- *
- * @author <a href="mailto:pjha@redhat.com">Prabhat Jha</a>, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richColumnBean")
-@ViewScoped
-public class RichColumnBean implements Serializable {
-
- public static final Comparator<Capital> STATE_NAME_LENGTH_COMPARATOR = new Comparator<Capital>() {
- @Override
- public int compare(Capital o1, Capital o2) {
- return o1.getState().length() - o2.getState().length();
- }
- };
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
-
- private Attributes attributes;
- private String stateNameToFilter;
- private SortOrder sortOrder = SortOrder.ascending;
-
- private Filter<Capital> stateFilter = new StateFilter();
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIColumn.class, getClass());
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("colspan", 2);
- attributes.setAttribute("rowspan", 2);
- attributes.setAttribute("breakRowBefore", true);
-
- // attributes which needs to be tested another way
- attributes.remove("filter");
- attributes.remove("filterValue");
- attributes.remove("filterExpression");
- attributes.remove("comparator");
- attributes.remove("sortBy");
- attributes.remove("sortOrder");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Comparator<Capital> getStateNameLengthComparator() {
- return STATE_NAME_LENGTH_COMPARATOR;
- }
-
- public Filter<Capital> getStateNameFilter() {
- return stateFilter;
- }
-
- public String getStateNameToFilter() {
- return stateNameToFilter;
- }
-
- public void setStateNameToFilter(String stateNameToFilter) {
- this.stateNameToFilter = stateNameToFilter;
- }
-
- public SortOrder[] getSortOrders() {
- return SortOrder.values();
- }
-
- public void setSortOrder(SortOrder sortOrder) {
- this.sortOrder = sortOrder;
- }
-
- public SortOrder getSortOrder() {
- return sortOrder;
- }
-
- private class StateFilter implements Filter<Capital>, Serializable {
- private static final long serialVersionUID = 1L;
-
- public boolean accept(Capital c) {
- return c.getState().toLowerCase()
- .contains(stateNameToFilter == null ? "" : stateNameToFilter.toLowerCase());
- }
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-
-import org.richfaces.component.UIColumnGroup;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:columnGroup.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richColumnGroupBean")
-@SessionScoped
-public class RichColumnGroupBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private int page = 1;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIColumnGroup.class, getClass());
-
- attributes.setAttribute("rendered", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public int getPage() {
- return page;
- }
-
- public void setPage(int page) {
- this.page = page;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichComponentControlBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichComponentControlBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichComponentControlBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.behavior.ComponentControlBehavior;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:componentControl.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richComponentControlBean")
-@ViewScoped
-public class RichComponentControlBean implements Serializable {
-
- private static final long serialVersionUID = 4476643239809L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getBehaviorAttributesFromFacesConfig(ComponentControlBehavior.class, getClass());
-
- attributes.setAttribute("operation", "previous");
- attributes.setAttribute("target", "scroller");
-
- // The 'event' attribute for behavior tag must be a literal
- attributes.remove("event");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIDataGrid;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:dataGrid.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richDataGridBean")
-@ViewScoped
-public class RichDataGridBean implements Serializable {
-
- private static final long serialVersionUID = 4814439475400649809L;
- private static Logger logger;
- private Attributes attributes;
- // true = model, false = empty table
- private boolean state = true;
- private int page = 1;
- private Map<String, String> facets = new HashMap<String, String>();
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataGrid.class, getClass());
-
- attributes.setAttribute("columns", 3);
- attributes.setAttribute("rendered", true);
-
- // attributes defined directly in page
- attributes.remove("value");
- attributes.remove("var");
-
- // TODO attributes which needs to be tested in another way
- attributes.remove("iterationStatusVar");
- attributes.remove("rowKeyVar");
- attributes.remove("stateVar");
-
- // facets initial values
- facets.put("noData", "There is no data.");
- facets.put("caption", "Caption");
- facets.put("header", "Header");
- facets.put("footer", "Footer");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public boolean isState() {
- return state;
- }
-
- public void setState(boolean state) {
- this.state = state;
- }
-
- public int getPage() {
- return page;
- }
-
- public void setPage(int page) {
- this.page = page;
- }
-
- public Map<String, String> getFacets() {
- return facets;
- }
-
- public void setFacets(Map<String, String> facets) {
- this.facets = facets;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIDataScroller;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:dataScroller.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richDataScrollerBean")
-@ViewScoped
-public class RichDataScrollerBean implements Serializable {
-
- private static final long serialVersionUID = 122475400649809L;
- private static Logger logger;
- private Attributes attributes;
- private boolean state = true;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataScroller.class, getClass());
-
- attributes.setAttribute("boundaryControls", "show");
- attributes.setAttribute("fastControls", "show");
- attributes.setAttribute("stepControls", "show");
- attributes.setAttribute("fastStep", 1);
- attributes.setAttribute("lastPageMode", "short");
- attributes.setAttribute("maxPages", 10);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("render", "richDataTable");
- attributes.setAttribute("page", 1);
- attributes.setAttribute("renderIfSinglePage", true);
- attributes.setAttribute("for", "richDataTable");
-
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- /**
- * Getter for state.
- * @return true if non-empty data model should be used in table
- */
- public boolean isState() {
- return state;
- }
-
- /**
- * Setter for state.
- * @param state true if non-empty data model should be used in table
- */
- public void setState(boolean state) {
- this.state = state;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.ajax4jsf.model.DataComponentState;
-import org.richfaces.component.UIDataTable;
-import org.richfaces.component.UIDataTableBase;
-import org.richfaces.model.Filter;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.ColumnSortingMap;
-import org.richfaces.tests.metamer.model.Employee;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:dataTable.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richDataTableBean")
-@ViewScoped
-public class RichDataTableBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private transient UIDataTable binding;
- private DataComponentState dataTableState;
- private Map<Object, Integer> stateMap = new HashMap<Object, Integer>();
- private int page = 1;
- // true = model, false = empty table
- private boolean state = true;
- // sorting
- private ColumnSortingMap sorting = new CustomColumnSortingMap();
- // filtering
- private Map<String, Object> filtering = new HashMap<String, Object>();
- // facets
- private Map<String, String> facets = new HashMap<String, String>();
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataTable.class, getClass());
-
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("rows", 10);
-
- // facets initial values
- facets.put("noData", "There is no data.");
- facets.put("caption", "Caption");
- facets.put("header", "Header");
- facets.put("footer", "Footer");
- facets.put("columnStateHeader", "State Header");
- facets.put("columnStateFooter", "State Footer");
- facets.put("columnCapitalHeader", "Capital Header");
- facets.put("columnCapitalFooter", "Capital Footer");
-
- // attributes already in page
- attributes.remove("value");
- attributes.remove("var");
-
- // TODO needs to be tested another way
- attributes.remove("filterVar");
- attributes.remove("iterationStatusVar");
- attributes.remove("rowKeyVar");
- attributes.remove("stateVar");
- }
-
- public void setBinding(UIDataTable binding) {
- this.binding = binding;
- }
-
- public UIDataTable getBinding() {
- return binding;
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public int getPage() {
- return page;
- }
-
- public void setPage(int page) {
- this.page = page;
- }
-
- public Map<Object, Integer> getStateMap() {
- return stateMap;
- }
-
- public void setStateMap(Map<Object, Integer> stateMap) {
- this.stateMap = stateMap;
- }
-
- public DataComponentState getDataTableState() {
- return dataTableState;
- }
-
- public void setDataTableState(DataComponentState dataTableState) {
- this.dataTableState = dataTableState;
- }
-
- public boolean isState() {
- return state;
- }
-
- public void setState(boolean state) {
- this.state = state;
- }
-
- public Date getDate() {
- return new Date();
- }
-
- public Map<String, String> getFacets() {
- return facets;
- }
-
- public ColumnSortingMap getSorting() {
- return sorting;
- }
-
- public Map<String, Object> getFiltering() {
- return filtering;
- }
-
- public Filter<?> getFilterSexImpl() {
- return new Filter<Employee>() {
-
- public boolean accept(Employee e) {
- String sex = (String) getFiltering().get("sex");
- if (sex == null || sex.length() == 0 || sex.equalsIgnoreCase("all")
- || sex.equalsIgnoreCase(e.getSex().toString())) {
- return true;
- }
- return false;
- }
- };
- }
-
- private class CustomColumnSortingMap extends ColumnSortingMap {
-
- private static final long serialVersionUID = 1L;
-
- protected UIDataTableBase getBinding() {
- return binding;
- }
-
- protected Attributes getAttributes() {
- return attributes;
- }
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragIndicatorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragIndicatorBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragIndicatorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIDragIndicator;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richDragIndicatorBean")
-@ViewScoped
-public class RichDragIndicatorBean implements Serializable {
-
- private static final long serialVersionUID = 4008175400649809L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIDragIndicator.class, getClass());
- attributes.setAttribute("rendered", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragSourceBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragSourceBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragSourceBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIDragSource;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.drag.DragValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richDragSourceBean")
-@ViewScoped
-public class RichDragSourceBean implements Serializable {
-
- private static final int DRAG_VALUES = 3;
- private static final long serialVersionUID = 4008175400649809L;
- private static Logger logger;
- private Attributes attributes;
-
- private List<DragValue> dragValues = new ArrayList<DragValue>();
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIDragSource.class, getClass());
-
- attributes.setAttribute("dragIndicator", "indicator");
- attributes.setAttribute("type", "drg1");
- attributes.setAttribute("rendered", true);
-
- attributes.remove("dragValue");
- attributes.remove("event");
-
-
- for (int i = 0; i < DRAG_VALUES; i++) {
- dragValues.add(new DragValue(i + 1));
- }
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public List<DragValue> getDragValues() {
- return dragValues;
- }
-
- public void setDragValues(List<DragValue> dragValues) {
- this.dragValues = dragValues;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import org.richfaces.component.UIDropDownMenu;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:dropDownMenu.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richDropDownMenuBean")
-@ViewScoped
-public class RichDropDownMenuBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private String current;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIDropDownMenu.class, getClass());
-
- attributes.setAttribute("mode", "ajax");
- attributes.setAttribute("rendered", true);
-
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String getCurrent() {
- return this.current;
- }
-
- public void setCurrent(String current) {
- this.current = current;
- }
-
- public String doNew() {
- this.current = "New";
- return null;
- }
-
- public String doOpen() {
- this.current = "Open";
- return null;
- }
-
- public String doClose() {
- this.current = "Close";
- return null;
- }
-
- public String doSave() {
- this.current = "Save";
- return null;
- }
-
- public String doSaveAll() {
- this.current = "Save All";
- return null;
- }
-
- public String doExit() {
- this.current = "Exit";
- return null;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
-import javax.faces.bean.RequestScoped;
-
-import org.richfaces.event.DropEvent;
-import org.richfaces.tests.metamer.model.drag.DragValue;
-import org.richfaces.tests.metamer.model.drag.DropValue;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@RequestScoped
-@ManagedBean(name = "richDropListenerBean")
-public class RichDropListenerBean {
-
- private DropEvent dropEvent;
-
- @ManagedProperty("#{richDropTargetBean}")
- private RichDropTargetBean richDropTargetBean;
-
- public void processDragging(DropEvent dropEvent) {
- RichBean.logToPage("* dropListener");
-
- DragValue dragValue = (DragValue) dropEvent.getDragValue();
- DropValue dropValue = (DropValue) dropEvent.getDropValue();
-
- this.dropEvent = dropEvent;
-
- richDropTargetBean.increaseDropValue();
- if (dropEvent.getComponent().getClientId().endsWith("1")) {
- richDropTargetBean.getDroppedValues1().put(dropValue, dragValue);
- } else {
- richDropTargetBean.getDroppedValues2().put(dropValue, dragValue);
- }
- }
-
- public DropEvent getDropEvent() {
- return dropEvent;
- }
-
- public RichDropTargetBean getRichDropTargetBean() {
- return richDropTargetBean;
- }
-
- public void setRichDropTargetBean(RichDropTargetBean richDropBehaviorBean) {
- this.richDropTargetBean = richDropBehaviorBean;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropTargetBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropTargetBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropTargetBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIDropTarget;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.drag.DragValue;
-import org.richfaces.tests.metamer.model.drag.DropValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richDropTargetBean")
-@ViewScoped
-public class RichDropTargetBean implements Serializable {
-
- private static final long serialVersionUID = 4008175400649809L;
- private static Logger logger;
- private Attributes attributes;
-
- private Map<DropValue, DragValue> droppedValues1 = new LinkedHashMap<DropValue, DragValue>();
- private Map<DropValue, DragValue> droppedValues2 = new LinkedHashMap<DropValue, DragValue>();
- private DropValue dropValue;
- private int dropValueCounter = 1;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIDropTarget.class, getClass());
-
- attributes.setAttribute("acceptedTypes", "drg1, drg2");
- attributes.setAttribute("render", "droppable1 droppable2");
- attributes.setAttribute("rendered", true);
-
- attributes.remove("actionExpression");
- attributes.remove("action");
- attributes.remove("actionListener");
- attributes.remove("dropListener");
- attributes.remove("dropValue");
-
- increaseDropValue();
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Map<DropValue, DragValue> getDroppedValues1() {
- return droppedValues1;
- }
-
- public Map<DropValue, DragValue> getDroppedValues2() {
- return droppedValues2;
- }
-
- public void increaseDropValue() {
- dropValue = new DropValue(dropValueCounter++);
- }
-
- public DropValue getDropValue() {
- return dropValue;
- }
-
- public List<Entry<DropValue, DragValue>> getDroppedEntries1() {
- List<Entry<DropValue, DragValue>> list = new LinkedList<Entry<DropValue, DragValue>>(droppedValues1.entrySet());
- Collections.reverse(list);
- return list;
- }
-
- public List<Entry<DropValue, DragValue>> getDroppedEntries2() {
- List<Entry<DropValue, DragValue>> list = new LinkedList<Entry<DropValue, DragValue>>(droppedValues2.entrySet());
- Collections.reverse(list);
- return list;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TreeSet;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.ajax4jsf.model.DataComponentState;
-import org.richfaces.component.UIDataTableBase;
-import org.richfaces.component.UIExtendedDataTable;
-import org.richfaces.model.Filter;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.ColumnSortingMap;
-import org.richfaces.tests.metamer.model.Employee;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:extendedDataTable.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richExtendedDataTableBean")
-@ViewScoped
-public class RichExtendedDataTableBean implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private static Logger logger;
- private Attributes attributes;
- private transient DataComponentState dataTableState;
- private Map<Object, Integer> stateMap = new HashMap<Object, Integer>();
- private int page = 1;
- // true = model, false = empty table
- private boolean state = true;
- // sorting
- private ColumnSortingMap sorting = new ColumnSortingMap() {
-
- private static final long serialVersionUID = 1L;
-
- protected UIDataTableBase getBinding() {
- return binding;
- }
-
- protected Attributes getAttributes() {
- return attributes;
- }
- };
- // filtering
- private Map<String, Object> filtering = new HashMap<String, Object>();
- // facets
- private Map<String, String> facets = new HashMap<String, String>();
- private transient UIExtendedDataTable binding;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIExtendedDataTable.class, getClass());
-
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("rows", 30);
- attributes.setAttribute("styleClass", "extended-data-table");
- attributes.setAttribute("style", null);
-
- // setup types
- attributes.get("selection").setType(TreeSet.class);
- attributes.get("selection").setMemberType(Integer.class);
-
- // attributes which are already in page
- attributes.remove("value");
- attributes.remove("var");
-
- // TODO attributes which needs to be tested another way
- attributes.remove("filterVar");
- attributes.remove("iterationStatusVar");
- attributes.remove("rowKeyVar");
- attributes.remove("stateVar");
-
- // facets initial values
- facets.put("noData", "There is no data.");
- facets.put("header", "Header");
- facets.put("footer", "Footer");
- facets.put("columnStateHeader", "State Header");
- facets.put("columnStateFooter", "State Footer");
- facets.put("columnCapitalHeader", "Capital Header");
- facets.put("columnCapitalFooter", "Capital Footer");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public UIExtendedDataTable getBinding() {
- return binding;
- }
-
- public void setBinding(UIExtendedDataTable binding) {
- this.binding = binding;
- }
-
- /**
- * Getter for page.
- *
- * @return page number that will be used by data scroller
- */
- public int getPage() {
- return page;
- }
-
- /**
- * Setter for page.
- *
- * @param page
- * page number that will be used by data scroller
- */
- public void setPage(int page) {
- this.page = page;
- }
-
- public Map<Object, Integer> getStateMap() {
- return stateMap;
- }
-
- public void setStateMap(Map<Object, Integer> stateMap) {
- this.stateMap = stateMap;
- }
-
- public DataComponentState getDataTableState() {
- return dataTableState;
- }
-
- public void setDataTableState(DataComponentState dataTableState) {
- this.dataTableState = dataTableState;
- }
-
- /**
- * Getter for state.
- *
- * @return true if data should be displayed in table
- */
- public boolean isState() {
- return state;
- }
-
- /**
- * Setter for state.
- *
- * @param state
- * true if data should be displayed in table
- */
- public void setState(boolean state) {
- this.state = state;
- }
-
- public Filter<?> getFilterSexImpl() {
- return new Filter<Employee>() {
-
- public boolean accept(Employee e) {
- String sex = (String) getFiltering().get("sex");
- if (sex == null || sex.length() == 0 || sex.equalsIgnoreCase("all")
- || sex.equalsIgnoreCase(e.getSex().toString())) {
- return true;
- }
- return false;
- }
- };
- }
-
- public Map<String, String> getFacets() {
- return facets;
- }
-
- public ColumnSortingMap getSorting() {
- return sorting;
- }
-
- public Map<String, Object> getFiltering() {
- return filtering;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIFileUpload;
-import org.richfaces.model.UploadedFile;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.richfaces.event.FileUploadEvent;
-
-/**
- * Managed bean for rich:fileUpload.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richFileUploadBean")
-@ViewScoped
-public class RichFileUploadBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private List<UploadedFile> files;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
- files = new ArrayList<UploadedFile>();
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIFileUpload.class, getClass());
-
- attributes.setAttribute("addLabel", "Add ...");
- attributes.setAttribute("clearAllLabel", "Clear All");
- attributes.setAttribute("clearLabel", "Clear");
- attributes.setAttribute("deleteLabel", "Delete");
- attributes.setAttribute("noDuplicate", false);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("uploadLabel", "Upload");
-
- // will be tested in another way
- attributes.remove("validator");
- attributes.remove("fileUploadListener");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public List<UploadedFile> getItems() {
- return files;
- }
-
- public void listener(FileUploadEvent event) {
- UploadedFile file = event.getUploadedFile();
-
- if (file != null) {
- files.add(file);
- }
- }
-
- public String clearUploadedData() {
- files.clear();
- return null;
- }
-
- public boolean isRenderButton() {
- return files.size() > 0;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.application.FacesMessage;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.context.FacesContext;
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.Size;
-import javax.validation.groups.Default;
-
-import org.richfaces.component.UIGraphValidator;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.validation.groups.ValidationGroup1;
-import org.richfaces.tests.metamer.validation.groups.ValidationGroup2;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed Bean for rich:graphValidator
- *
- * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
- * @version $Revision$
- */
-@ManagedBean(name="richGraphValidatorBean")
-@ViewScoped
-public class RichGraphValidatorBean implements Serializable, Cloneable {
-
- /** Generated UID */
- private static final long serialVersionUID = -960575870621302059L;
- private static Logger logger;
- private Attributes attributes;
-
- @Size(min = 5, max = 15, message = "Wrong size for password")
- private String password;
- @Size(min = 5, max = 15, message = "Wrong size for password")
- private String passwordConfirm;
-
- @PostConstruct
- public void init(){
- logger = LoggerFactory.getLogger(getClass());
- logger.info("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIGraphValidator.class, getClass());
-
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("type", "org.richfaces.BeanValidator");
- }
-
- @AssertTrue(message = "Different passwords entered! [Default Group]")
- public boolean isPasswordsEquals() {
- return password.equals(passwordConfirm);
- }
-
- @AssertTrue(message = "Different passwords entered! [G1]", groups={ValidationGroup1.class})
- public boolean isRovnakeHesla() {
- return password.equals(passwordConfirm);
- }
-
- @AssertTrue(message = "Different passwords entered! [G2 + Default Group]", groups = {ValidationGroup2.class,Default.class})
- public boolean isPokusUspesny() {
- return password.equals(passwordConfirm);
- }
-
- public void storeNewPassword() {
- FacesContext.getCurrentInstance().addMessage(null,
- new FacesMessage(FacesMessage.SEVERITY_INFO, "Succesfully changed!", "Succesfully changed!"));
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getPasswordConfirm() {
- return passwordConfirm;
- }
-
- public void setPasswordConfirm(String passwordConfirm) {
- this.passwordConfirm = passwordConfirm;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichHashParamBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichHashParamBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichHashParamBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIHashParameter;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:hashParam.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richHashParamBean")
-@ViewScoped
-public class RichHashParamBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIHashParameter.class, getClass());
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-import org.hibernate.validator.constraints.NotEmpty;
-
-import org.richfaces.component.UIInplaceInput;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:inplaceInput.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richInplaceInputBean")
-@ViewScoped
-public class RichInplaceInputBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private String value1;
- private String value2;
- private String value3;
- private String value4;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIInplaceInput.class, getClass());
-
- attributes.setAttribute("defaultLabel", "Click here to edit");
- attributes.setAttribute("editEvent", "click");
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("requiredMessage", "value is required");
- attributes.setAttribute("saveOnBlur", true);
- attributes.setAttribute("value", "RichFaces 4");
-
- // TODO has to be tested in another way
- attributes.remove("converter");
- attributes.remove("converterMessage");
- attributes.remove("validator");
- attributes.remove("validatorMessage");
- attributes.remove("valueChangeListener");
-
- // TODO remove as soon as RF-10411 is fixed
- attributes.setAttribute("style", null);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- @NotEmpty
- public String getValue1() {
- return value1;
- }
-
- public void setValue1(String value1) {
- this.value1 = value1;
- }
-
- @Pattern(regexp = "[a-z].*")
- public String getValue2() {
- return value2;
- }
-
- public void setValue2(String value2) {
- this.value2 = value2;
- }
-
- @Size(min = 3, max = 6)
- public String getValue3() {
- return value3;
- }
-
- public void setValue3(String value3) {
- this.value3 = value3;
- }
-
- public String getValue4() {
- return value4;
- }
-
- public void setValue4(String value4) {
- this.value4 = value4;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.event.ValueChangeEvent;
-import javax.faces.model.SelectItem;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-import org.hibernate.validator.constraints.NotEmpty;
-
-import org.richfaces.component.UIInplaceSelect;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.Capital;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:inplaceSelect.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richInplaceSelectBean")
-@ViewScoped
-public class RichInplaceSelectBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- // FIXME: @ManagedProperty(value = "#{model.capitals}")
- private List<Capital> capitals = Model.unmarshallCapitals();
- private List<SelectItem> capitalsOptions = null;
- private List<SelectItem> validationOptions = null;
- private String value1;
- private String value2;
- private String value3;
- private String value4;
- private String value5;
- private String requiredMessage = "value is required";
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- capitalsOptions = new ArrayList<SelectItem>();
- validationOptions = new ArrayList<SelectItem>();
- for (Capital capital : capitals) {
- capitalsOptions.add(new SelectItem(capital.getState(), capital.getState()));
- validationOptions.add(new SelectItem(capital.getState(), capital.getState()));
- }
- validationOptions.add(new SelectItem("@@", "@@"));
- validationOptions.add(new SelectItem("", ""));
- validationOptions.add(new SelectItem("RichFaces", "RichFaces"));
- validationOptions.add(new SelectItem("richfaces", "richfaces"));
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIInplaceSelect.class, getClass());
-
- attributes.setAttribute("defaultLabel", "Click here to edit");
- attributes.setAttribute("editEvent", "click");
- attributes.setAttribute("listHeight", "200px");
- attributes.setAttribute("listWidth", "200px");
- attributes.setAttribute("openOnEdit", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("saveOnBlur", true);
- attributes.setAttribute("saveOnSelect", true);
-
- // TODO has to be tested in another way
- attributes.remove("converter");
- attributes.remove("converterMessage");
- attributes.remove("required");
- attributes.remove("requiredMessage");
- attributes.remove("validator");
- attributes.remove("validatorMessage");
- attributes.remove("valueChangeListener");
-
- // TODO remove as soon as RF-10411 is resolved
- attributes.setAttribute("changedStateClass", null);
- attributes.setAttribute("disabledStateClass", null);
- attributes.setAttribute("editStateClass", null);
- attributes.setAttribute("readyStateClass", null);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public void setCapitals(List<Capital> capitals) {
- this.capitals = capitals;
- }
-
- public List<SelectItem> getCapitalsOptions() {
- return capitalsOptions;
- }
-
- public void setCapitalsOptions(List<SelectItem> capitalsOptions) {
- this.capitalsOptions = capitalsOptions;
- }
-
- public List<SelectItem> getValidationOptions() {
- return validationOptions;
- }
-
- public void setValidationOptions(List<SelectItem> validationOptions) {
- this.validationOptions = validationOptions;
- }
-
- @NotEmpty
- public String getValue1() {
- return value1;
- }
-
- public void setValue1(String value1) {
- this.value1 = value1;
- }
-
- @Pattern(regexp = "[a-z].*")
- public String getValue2() {
- return value2;
- }
-
- public void setValue2(String value2) {
- this.value2 = value2;
- }
-
- @Size(min = 3, max = 6)
- public String getValue3() {
- return value3;
- }
-
- public void setValue3(String value3) {
- this.value3 = value3;
- }
-
- public String getValue4() {
- return value4;
- }
-
- public void setValue4(String value4) {
- this.value4 = value4;
- }
-
- public String getValue5() {
- return value5;
- }
-
- public void setValue5(String value5) {
- this.value5 = value5;
- }
-
- public String getRequiredMessage() {
- return requiredMessage;
- }
-
- public void setRequiredMessage(String requiredMessage) {
- this.requiredMessage = requiredMessage;
- }
-
- public void listener(ValueChangeEvent event) {
- RichBean.logToPage("* value changed: " + event.getOldValue() + " -> " + event.getNewValue());
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-
-import org.richfaces.component.html.HtmlInputNumberSlider;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:inputNumberSlider.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richInputNumberSliderBean")
-@ViewScoped
-public class RichInputNumberSliderBean implements Serializable {
-
- private static final long serialVersionUID = 595154649809L;
- private static Logger logger;
- private Attributes attributes;
- private int value1;
- private int value2;
- private int value3;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(HtmlInputNumberSlider.class, getClass());
-
- attributes.setAttribute("enableManualInput", true);
- attributes.setAttribute("inputSize", 3);
- attributes.setAttribute("maxlength", 10);
- attributes.setAttribute("maxValue", 10);
- attributes.setAttribute("minValue", -10);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("requiredMessage", "value is required");
- attributes.setAttribute("showBoundaryValues", true);
- attributes.setAttribute("showInput", true);
- attributes.setAttribute("step", 1);
- attributes.setAttribute("value", 2);
-
- // will be tested in another way
- attributes.remove("valueChangeListener");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- @Min(2)
- public int getValue1() {
- return value1;
- }
-
- public void setValue1(int value1) {
- this.value1 = value1;
- }
-
- @Max(2)
- public int getValue2() {
- return value2;
- }
-
- public void setValue2(int value2) {
- this.value2 = value2;
- }
-
- public int getValue3() {
- return value3;
- }
-
- public void setValue3(int value3) {
- this.value3 = value3;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-
-import org.richfaces.component.html.HtmlInputNumberSpinner;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:inputNumberSpinner.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richInputNumberSpinnerBean")
-@ViewScoped
-public class RichInputNumberSpinnerBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private int value1;
- private int value2;
- private int value3;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(HtmlInputNumberSpinner.class, getClass());
-
- attributes.setAttribute("enableManualInput", true);
- attributes.setAttribute("maxValue", 10);
- attributes.setAttribute("minValue", -10);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("requiredMessage", "value is required");
- attributes.setAttribute("step", 1);
- attributes.setAttribute("value", 2);
-
- // will be tested in another way
- attributes.remove("valueChangeListener");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- @Min(2)
- public int getValue1() {
- return value1;
- }
-
- public void setValue1(int value1) {
- this.value1 = value1;
- }
-
- @Max(2)
- public int getValue2() {
- return value2;
- }
-
- public void setValue2(int value2) {
- this.value2 = value2;
- }
-
- public int getValue3() {
- return value3;
- }
-
- public void setValue3(int value3) {
- this.value3 = value3;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIJQuery;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:jQuery.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>, Nick Belaevski
- * @version $Revision$
- */
-@ManagedBean(name = "richJQueryBean")
-@ViewScoped
-public class RichJQueryBean implements Serializable {
-
- private static final long serialVersionUID = 111475400649809L;
- private static Logger logger;
- private Attributes attributes;
- private List<String> componentsDataList;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- componentsDataList = new ArrayList<String>();
- addComponent();
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIJQuery.class, getClass());
-
- attributes.setAttribute("event", "click");
- attributes.setAttribute("name", "bubu");
- attributes.setAttribute("query", "alert('immediate attachment')");
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("selector", "#jQueryTestButton");
- attributes.setAttribute("timing", "immediate");
-
- // TODO must be tested in other way
- attributes.remove("name");
-
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public List<String> getComponentsDataList() {
- return componentsDataList;
- }
-
- public void addComponent() {
- componentsDataList.add(UUID.randomUUID().toString());
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIList;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:list.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richListBean")
-@ViewScoped
-public class RichListBean implements Serializable {
-
- private static final long serialVersionUID = 4008175400649809L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIList.class, getClass());
-
- attributes.setAttribute("type", "ordered");
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("rows", 20);
-
- // TODO has to be tested in other way
- attributes.remove("iterationStatusVar");
- attributes.remove("rowKeyVar");
- attributes.remove("stateVar");
- attributes.remove("value");
- attributes.remove("var");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuGroupBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuGroupBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuGroupBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import org.richfaces.component.UIMenuGroup;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:menuGroup.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richMenuGroupBean")
-@ViewScoped
-public class RichMenuGroupBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIMenuGroup.class, getClass());
-
- attributes.setAttribute("label", "Save As...");
- attributes.setAttribute("rendered", true);
-
- attributes.remove("converter");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import org.richfaces.component.UIMenuItem;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:menuItem.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richMenuItemBean")
-@ViewScoped
-public class RichMenuItemBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIMenuItem.class, getClass());
-
- attributes.setAttribute("icon", "/resources/images/icons/create_doc.gif");
- attributes.setAttribute("label", "New");
- attributes.setAttribute("mode", "ajax");
- attributes.setAttribute("rendered", true);
-
- attributes.remove("action");
- attributes.remove("actionListener");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIMenuSeparator;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:menuSeparator.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean
-@ViewScoped
-public class RichMenuSeparatorBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIMenuSeparator.class, getClass());
-
- attributes.setAttribute("rendered", true);
-
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIRichMessage;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Simple bean for rich:message component example.
- *
- * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richMessageBean")
-@ViewScoped
-public class RichMessageBean implements Serializable {
-
- /** Generated UID */
- private static final long serialVersionUID = -5058242586244822846L;
- private static Logger logger;
- private Attributes attributes;
- private String simpleInput1;
- private String simpleInput2;
-
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.info("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIRichMessage.class, getClass());
-
- // setting up incorrect values to fire-up validator
- simpleInput1 = "-5";
- simpleInput2 = "-5";
-
- // to get working this component example correctly is required that for
- // property has been initialized
- attributes.setAttribute("for", "simpleInput1");
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("showSummary", true);
- attributes.setAttribute("ajaxRendered", true); // make sense for a4j:commandButton submit
-
- // workaround for missing attribute def from rich.taglib.xml
- // to get it in list of attrs in metamer
- attributes.setAttribute("dir", null); // direction
- attributes.setAttribute("lang", null);
- attributes.setAttribute("onclick", null);
- attributes.setAttribute("ondblclick", null);
- attributes.setAttribute("onkeydown", null);
- attributes.setAttribute("onkeypress", null);
- attributes.setAttribute("onkeyup", null);
- attributes.setAttribute("onmousedown", null);
- attributes.setAttribute("onmousemove", null);
- attributes.setAttribute("onmouseout", null);
- attributes.setAttribute("onmouseover", null);
- attributes.setAttribute("onmouseup", null);
- attributes.setAttribute("style", null);
- attributes.setAttribute("styleClass", null);
- attributes.setAttribute("title", null);
-
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public String getSimpleInput2() {
- return simpleInput2;
- }
-
- public void setSimpleInput2(String simpleInput2) {
- this.simpleInput2 = simpleInput2;
- }
-
- public String getSimpleInput1() {
- return simpleInput1;
- }
-
- public void setSimpleInput1(String simpleInput1) {
- this.simpleInput1 = simpleInput1;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.application.FacesMessage;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
-
-import org.richfaces.component.UIRichMessages;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Simple bean for rich:messages component example.
- *
- * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richMessagesBean")
-@ViewScoped
-public class RichMessagesBean implements Serializable {
-
- /** Generated UID */
- private static final long serialVersionUID = 4893769498631480379L;
- // id for input element to bound some FacesMessage to it
- private static final String INPUT1_ID = "form:simpleInput1";
- private static final String INPUT2_ID = "form:simpleInput2";
-
- private static Logger logger;
- private Attributes attributes;
-
- private String simpleInput1;
- private String simpleInput2;
-
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.info("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIRichMessages.class, getClass());
-
- simpleInput1 = "10";
- simpleInput2 = "10";
-
- attributes.setAttribute("ajaxRendered", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("for", "simpleInput1");
- attributes.setAttribute("showSummary", true);
-
- // add attributes with missing appropriate annotation
- attributes.setAttribute("lang", null);
- attributes.setAttribute("dir", null);
- attributes.setAttribute("style", null);
- attributes.setAttribute("styleClass", null);
- attributes.setAttribute("title", null);
-
- attributes.setAttribute("onclick", null);
- attributes.setAttribute("ondblclick", null);
- attributes.setAttribute("onkeydown", null);
- attributes.setAttribute("onkeypress", null);
- attributes.setAttribute("onkeyup", null);
- attributes.setAttribute("onmousedown", null);
- attributes.setAttribute("onmousemove", null);
- attributes.setAttribute("onmouseup", null);
- attributes.setAttribute("onmouseout", null);
- attributes.setAttribute("onmouseover", null);
-
- }
-
- public void generateFacesError(ActionEvent event) {
-
- logger.info(" ### Just called generateFacesError()");
-
- FacesContext.getCurrentInstance().addMessage(null,
- new FacesMessage(FacesMessage.SEVERITY_ERROR,
- "Generated error message without binding to any component (global)",
- "Generated error message without binding to any component (global)"));
-
- FacesContext.getCurrentInstance().addMessage(null,
- new FacesMessage(FacesMessage.SEVERITY_WARN,
- "Generated warning message without binding to any component (global)",
- "Generated warning message without binding to any component (global)"));
-
- // Message bound to component on page
- FacesContext.getCurrentInstance().addMessage(INPUT1_ID,
- new FacesMessage(FacesMessage.SEVERITY_ERROR, "Generated error message for Input 1",
- "Generated error message for Input 1"));
-
- FacesContext.getCurrentInstance().addMessage(INPUT1_ID,
- new FacesMessage(FacesMessage.SEVERITY_WARN, "Generated warning message for Input 1",
- "Generated warning message for Input 1"));
-
- FacesContext.getCurrentInstance().addMessage(INPUT2_ID,
- new FacesMessage(FacesMessage.SEVERITY_ERROR, "Generated error message for Input 2",
- "Generated error message for Input 2"));
-
- FacesContext.getCurrentInstance().addMessage(INPUT2_ID,
- new FacesMessage(FacesMessage.SEVERITY_WARN, "Generated warning message for Input 2",
- "Generated warning message for Input 2"));
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String getSimpleInput1() {
- return simpleInput1;
- }
-
- public void setSimpleInput1(String simpleInput1) {
- this.simpleInput1 = simpleInput1;
- }
-
- public String getSimpleInput2() {
- return simpleInput2;
- }
-
- public void setSimpleInput2(String simpleInput2) {
- this.simpleInput2 = simpleInput2;
- }
-
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIPanel;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:panel.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richPanelBean")
-@ViewScoped
-public class RichPanelBean implements Serializable {
-
- private static final long serialVersionUID = 48122475400649801L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanel.class, getClass());
-
- attributes.setAttribute("rendered", true);
-
- // FIXME these attributes were not found automatically
- attributes.setAttribute("bodyClass", null);
- attributes.setAttribute("header", null);
- attributes.setAttribute("headerClass", null);
- attributes.setAttribute("onclick", null);
- attributes.setAttribute("ondblclick", null);
- attributes.setAttribute("onkeydown", null);
- attributes.setAttribute("onkeypress", null);
- attributes.setAttribute("onkeyup", null);
- attributes.setAttribute("onmousedown", null);
- attributes.setAttribute("onmousemove", null);
- attributes.setAttribute("onmouseout", null);
- attributes.setAttribute("onmouseover", null);
- attributes.setAttribute("onmouseup", null);
- attributes.setAttribute("style", null);
- attributes.setAttribute("styleClass", null);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIPanelMenu;
-import org.richfaces.event.ItemChangeEvent;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:panelMenu.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richPanelMenuBean")
-@ViewScoped
-public class RichPanelMenuBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- private String activeItem;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenu.class, getClass());
-
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("style", "width: 200px;");
-
- // will be tested in another way
- attributes.remove("itemChangeListener");
- attributes.remove("converter");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- /**
- * An item change listener that logs to the page old and new value.
- *
- * @param event
- * an event representing the activation of a user interface component
- */
- public void itemChangeListener(ItemChangeEvent event) {
- activeItem = event.getNewItemName();
- RichBean.logToPage("* item changed: " + (event.getOldItem() == null ? null : event.getOldItem().getId())
- + " -> " + event.getNewItem().getId());
- }
-
- public String getActiveItem() {
- return activeItem;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIPanelMenuGroup;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:panelMenu.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richPanelMenuGroupBean")
-@ViewScoped
-public class RichPanelMenuGroupBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private Map<String, Boolean> expanded = new HashMap<String, Boolean>();
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenuGroup.class, getClass());
-
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("selectable", true);
- attributes.setAttribute("mode", "ajax");
-
- // already defined in source directly
- attributes.remove("name");
- attributes.remove("label");
- attributes.remove("changeExpandListener");
- attributes.remove("action");
- attributes.remove("actionListener");
-
- // expanded needs to be set separately
- attributes.remove("expanded");
- expanded.put("group2", true);
- expanded.put("group23", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public Map<String, Boolean> getExpanded() {
- return expanded;
- }
-
- public void changeExpandListener(Object event) {
- RichBean.logToPage("* group expanded");
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIPanelMenuItem;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:panelMenu.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richPanelMenuItemBean")
-@ViewScoped
-public class RichPanelMenuItemBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenuItem.class, getClass());
-
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("selectable", true);
-
- // already defined in source directly
- attributes.remove("action");
- attributes.remove("actionListener");
- attributes.remove("name");
- attributes.remove("label");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIPopupPanel;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:popupPanel.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richPopupPanelBean")
-@ViewScoped
-public class RichPopupPanelBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private String value1;
- private String value2;
- private String value3;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIPopupPanel.class, getClass());
-
- attributes.setAttribute("header", "popup panel header");
- attributes.setAttribute("height", 300);
- attributes.setAttribute("left", "auto");
- attributes.setAttribute("maxHeight", 500);
- attributes.setAttribute("maxWidth", 500);
- attributes.setAttribute("minHeight", 300);
- attributes.setAttribute("minWidth", 300);
- attributes.setAttribute("moveable", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("resizeable", true);
- attributes.setAttribute("top", "auto");
- attributes.setAttribute("trimOverlayedElements", true);
- attributes.setAttribute("width", 500);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String getValue1() {
- return value1;
- }
-
- public void setValue1(String value1) {
- this.value1 = value1;
- }
-
- public String getValue2() {
- return value2;
- }
-
- public void setValue2(String value2) {
- this.value2 = value2;
- }
-
- public String getValue3() {
- return value3;
- }
-
- public void setValue3(String value3) {
- this.value3 = value3;
- }
-
- public String save() {
- logger.warn("1: " + value1);
- logger.warn("2: " + value2);
- logger.warn("3: " + value3);
- return null;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIProgressBar;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:progressBar.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richProgressBarBean")
-@ViewScoped
-public class RichProgressBarBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private boolean buttonRendered = true;
- private Long startTime;
- private boolean initialFacetRendered = true;
- private boolean finishFacetRendered = true;
- private boolean childrenRendered = false;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIProgressBar.class, getClass());
-
- attributes.setAttribute("maxValue", 100);
- attributes.setAttribute("minValue", 0);
- attributes.setAttribute("interval", 500);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("value", -1);
-
- // attributes tested in another way
- attributes.remove("mode");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String startProcess() {
- attributes.setAttribute("enabled", true);
- buttonRendered = false;
- setStartTime(new Date().getTime());
- return null;
- }
-
- public Long getCurrentValue() {
- if (Boolean.TRUE.equals(attributes.get("enabled").getValue())) {
- Long current = (new Date().getTime() - startTime) / 500;
- if (current >= 100) {
- buttonRendered = true;
- } else if (current.equals(0L)) {
- return 1L;
- }
- return (new Date().getTime() - startTime) / 500;
- }
- if (startTime == null) {
- return -1L;
- } else {
- return 101L;
- }
- }
-
- public Long getStartTime() {
- return startTime;
- }
-
- public void setStartTime(Long startTime) {
- this.startTime = startTime;
- }
-
- public boolean isButtonRendered() {
- return buttonRendered;
- }
-
- public void setButtonRendered(boolean buttonRendered) {
- this.buttonRendered = buttonRendered;
- }
-
- public boolean isFinishFacetRendered() {
- return finishFacetRendered;
- }
-
- public void setFinishFacetRendered(boolean finishFacetRendered) {
- this.finishFacetRendered = finishFacetRendered;
- }
-
- public boolean isInitialFacetRendered() {
- return initialFacetRendered;
- }
-
- public void setInitialFacetRendered(boolean initialFacetRendered) {
- this.initialFacetRendered = initialFacetRendered;
- }
-
- public boolean isChildrenRendered() {
- return childrenRendered;
- }
-
- public void setChildrenRendered(boolean childrenRendered) {
- this.childrenRendered = childrenRendered;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.event.ValueChangeEvent;
-import javax.faces.model.SelectItem;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-import org.hibernate.validator.constraints.NotEmpty;
-
-import org.richfaces.component.UISelect;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.Capital;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:select.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richSelectBean")
-@ViewScoped
-public class RichSelectBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-// temporary fix because of a bug in MyFaces
-// @ManagedProperty(value = "#{model.capitals}")
- private List<Capital> capitals;
- private List<SelectItem> capitalsOptions = null;
- private List<SelectItem> validationOptions = null;
- private String value1;
- private String value2;
- private String value3;
- private String value4;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- capitalsOptions = new ArrayList<SelectItem>();
- validationOptions = new ArrayList<SelectItem>();
-// temporary fix because of a bug in MyFaces
-// for (Capital capital : capitals) {
- for (Capital capital : Model.unmarshallCapitals()) {
- capitalsOptions.add(new SelectItem(capital.getState(), capital.getState()));
- validationOptions.add(new SelectItem(capital.getState(), capital.getState()));
- }
- validationOptions.add(new SelectItem("@@", "@@"));
- validationOptions.add(new SelectItem("", ""));
- validationOptions.add(new SelectItem("RichFaces", "RichFaces"));
- validationOptions.add(new SelectItem("richfaces", "richfaces"));
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UISelect.class, getClass());
-
- attributes.setAttribute("defaultLabel", "Click here to edit");
- attributes.setAttribute("enableManualInput", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("showButton", true);
-
- // TODO has to be tested in another way
- attributes.remove("converter");
- attributes.remove("converterMessage");
- attributes.remove("required");
- attributes.remove("requiredMessage");
- attributes.remove("validator");
- attributes.remove("validatorMessage");
-
- attributes.remove("valueChangeListener");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public void setCapitals(List<Capital> capitals) {
- this.capitals = capitals;
- }
-
- public List<SelectItem> getCapitalsOptions() {
- return capitalsOptions;
- }
-
- public void setCapitalsOptions(List<SelectItem> capitalsOptions) {
- this.capitalsOptions = capitalsOptions;
- }
-
- public List<SelectItem> getValidationOptions() {
- return validationOptions;
- }
-
- public void setValidationOptions(List<SelectItem> validationOptions) {
- this.validationOptions = validationOptions;
- }
-
- @NotEmpty
- public String getValue1() {
- return value1;
- }
-
- public void setValue1(String value1) {
- this.value1 = value1;
- }
-
- @Pattern(regexp = "[a-z].*")
- public String getValue2() {
- return value2;
- }
-
- public void setValue2(String value2) {
- this.value2 = value2;
- }
-
- @Size(min = 3, max = 6)
- public String getValue3() {
- return value3;
- }
-
- public void setValue3(String value3) {
- this.value3 = value3;
- }
-
- public String getValue4() {
- return value4;
- }
-
- public void setValue4(String value4) {
- this.value4 = value4;
- }
-
- public void listener(ValueChangeEvent event) {
- RichBean.logToPage("* value changed: " + event.getOldValue() + " -> " + event.getNewValue());
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UITab;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:tab.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTabBean")
-@ViewScoped
-public class RichTabBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UITab.class, getClass());
-
- attributes.setAttribute("header", "tab1 header");
- attributes.setAttribute("name", "tab1");
- attributes.setAttribute("rendered", true);
-
- // will be tested in another way
- attributes.remove("converter");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import org.richfaces.component.UITabPanel;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import java.io.Serializable;
-
-/**
- * Managed bean for rich:tabPanel.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTabPanelBean")
-@ViewScoped
-public class RichTabPanelBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UITabPanel.class, getClass());
-
- attributes.setAttribute("activeItem", "tab1");
- attributes.setAttribute("rendered", true);
-
- // will be tested in another way
- attributes.remove("converter");
- attributes.remove("itemChangeListener");
-
- // remove as soon as https://issues.jboss.org/browse/RF-10588 is fixed
- attributes.setAttribute("bypassUpdates", null);
- attributes.get("bypassUpdates").setType(Boolean.class);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToggleControlBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToggleControlBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToggleControlBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import org.richfaces.component.behavior.ToggleControl;
-
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:toggleControl.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richToggleControlBean")
-@ViewScoped
-public class RichToggleControlBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getBehaviorAttributesFromFacesConfig(ToggleControl.class, getClass());
-
- attributes.setAttribute("targetPanel", "panel1");
- attributes.setAttribute("targetItem", "item1");
-
- // TODO following attributes have to be tested in another way
- attributes.remove("disableDefault");
- attributes.remove("event"); // has to be literal
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UITogglePanel;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:togglePanel.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTogglePanelBean")
-@ViewScoped
-public class RichTogglePanelBean implements Serializable {
-
- private static final long serialVersionUID = 67812341568562249L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UITogglePanel.class, getClass());
-
- attributes.setAttribute("activeItem", "item1");
- attributes.setAttribute("rendered", true);
-
- // will to be tested in another way
- attributes.remove("converter");
- attributes.remove("itemChangeListener");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UITogglePanelItem;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:togglePanelItem.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTogglePanelItemBean")
-@ViewScoped
-public class RichTogglePanelItemBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UITogglePanelItem.class, getClass());
-
- attributes.setAttribute("name", "item1");
- attributes.setAttribute("rendered", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIToolbar;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:toolbar.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richToolbarBean")
-@ViewScoped
-public class RichToolbarBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIToolbar.class, getClass());
-
- attributes.setAttribute("height", 28);
- attributes.setAttribute("rendered", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UIToolbarGroup;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:toolbar.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richToolbarGroupBean")
-@ViewScoped
-public class RichToolbarGroupBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UIToolbarGroup.class, getClass());
-
- attributes.setAttribute("rendered", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UITooltip;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:list.
- *
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTooltipBean")
-@ViewScoped
-public class RichTooltipBean implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private static Logger logger;
- private Attributes attributes;
-
- private int counter = 0;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UITooltip.class, getClass());
-
-
- // set defaults
- attributes.setAttribute("attached", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("followMouse", true);
- attributes.setAttribute("layout", "inline");
- attributes.setAttribute("mode", "client");
- attributes.setAttribute("showEvent", "mouseenter");
- attributes.setAttribute("hideEvent", "mouseleave");
- attributes.setAttribute("target", "form:panel");
-
- // attributes that needs to be tested in other way
- attributes.remove("converter");
-
- // intentionally hidden attributes
- attributes.remove("localValue");
- attributes.remove("value");
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public int getCounter() {
- return counter++;
- }
-
- public Date getTooltipDate() {
- return new Date();
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.event.ComponentSystemEvent;
-
-import org.richfaces.component.UITree;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.tree.CompactDisc;
-import org.richfaces.tests.metamer.model.tree.CompactDiscXmlDescriptor;
-import org.richfaces.tests.metamer.model.tree.Company;
-import org.richfaces.tests.metamer.model.tree.Country;
-import org.richfaces.tests.metamer.model.tree.NamedNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTreeBean")
-@ViewScoped
-public class RichTreeBean implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private static Logger logger;
- private Attributes attributes;
- private List<NamedNode> root = new ArrayList<NamedNode>();
- private Collection<? extends Serializable> selection;
-
- // FIXME: @ManagedProperty(value = "#{model}")
- // private Model model;
-
- private Map<String, Country> countriesCache = new HashMap<String, Country>();
- private Map<String, Company> companiesCache = new HashMap<String, Company>();
-
- private boolean testLoadingFacet = false;
- private boolean delayedRender = false;
-
- private Map<NamedNode, Boolean> expanded = new HashMap<NamedNode, Boolean>();
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UITree.class, getClass());
- attributes.get("rendered").setValue(true);
- attributes.get("toggleType").setValue("ajax");
- attributes.get("selectionType").setValue("ajax");
-
- // attributes which needs to be tested another way
- attributes.remove("selectionChangeListener");
- attributes.remove("toggleListener");
- attributes.remove("value");
- attributes.remove("var");
- attributes.remove("rowKeyVar");
- attributes.remove("stateVar");
- attributes.remove("nodeType");
-
- for (CompactDiscXmlDescriptor descriptor : Model.unmarshallCompactDiscs()) {
- createCompactDisc(descriptor);
- }
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- private CompactDisc createCompactDisc(CompactDiscXmlDescriptor descriptor) {
- final Company company = findOrCreateCompany(descriptor);
-
- CompactDisc cd = new CompactDisc(descriptor.getTitle(), descriptor.getArtist(), company, descriptor.getPrice(),
- descriptor.getYear());
- company.getCds().add(cd);
- expanded.put(cd, false);
- return cd;
- }
-
- private Company findOrCreateCompany(CompactDiscXmlDescriptor descriptor) {
- final Country country = findOrCreateCountry(descriptor);
-
- String companyName = descriptor.getCompany();
- Company company = companiesCache.get(companyName);
- if (company == null) {
- company = new Company();
- company.setName(companyName);
- company.setParent(country);
- country.getCompanies().add(company);
- companiesCache.put(companyName, company);
- expanded.put(company, false);
- }
- return company;
- }
-
- private Country findOrCreateCountry(CompactDiscXmlDescriptor descriptor) {
- String countryName = descriptor.getCountry();
- Country country = countriesCache.get(countryName);
- if (country == null) {
- country = new Country();
- country.setName(countryName);
- countriesCache.put(countryName, country);
- expanded.put(country, false);
- root.add(country);
- }
- return country;
- }
-
- public List<NamedNode> getRoot() {
-
- return root;
- }
-
- public Collection<? extends Serializable> getSelection() {
- return selection;
- }
-
- public void setSelection(Collection<? extends Serializable> selection) {
- this.selection = selection;
- }
-
- public boolean isTestLoadingFacet() {
- return testLoadingFacet;
- }
-
- public void setTestLoadingFacet(boolean testLoadingFacet) {
- this.testLoadingFacet = testLoadingFacet;
- }
-
- public boolean isDelayedRender() {
- return delayedRender;
- }
-
- public void setDelayedRender(boolean delayedRender) {
- this.delayedRender = delayedRender;
- }
-
- public void preRenderView(ComponentSystemEvent event) {
- if (delayedRender) {
- try {
- Thread.sleep(1000);
- } catch (Exception e) {
- throw new IllegalStateException();
- }
- }
- }
-
- public Map<NamedNode, Boolean> getExpanded() {
- return expanded;
- }
-
- public void expandAll() {
- for (Entry<NamedNode, Boolean> entry : expanded.entrySet()) {
- entry.setValue(true);
- }
- }
-
- public void collapseAll() {
- for (Entry<NamedNode, Boolean> entry : expanded.entrySet()) {
- entry.setValue(false);
- }
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeListenerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeListenerBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeListenerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
-
-import org.richfaces.event.TreeSelectionChangeEvent;
-import org.richfaces.event.TreeToggleEvent;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTreeListenerBean")
-@RequestScoped
-public class RichTreeListenerBean {
-
- private TreeSelectionChangeEvent treeSelectionChangeEvent;
- private TreeToggleEvent treeToggleEvent;
-
- public void processSelectionChange(TreeSelectionChangeEvent event) {
- this.treeSelectionChangeEvent = event;
- RichBean.logToPage("* selection change listener invoked");
- }
-
- public void processToggle(TreeToggleEvent event) {
- this.treeToggleEvent = event;
- RichBean.logToPage("* tree toggle listener invoked");
- }
-
- public TreeSelectionChangeEvent getTreeSelectionChangeEvent() {
- return treeSelectionChangeEvent;
- }
-
- public TreeToggleEvent getTreeToggleEvent() {
- return treeToggleEvent;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UITreeModelAdaptor;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTreeModelAdaptorBean")
-@ViewScoped
-public class RichTreeModelAdaptorBean implements Serializable {
-
- private static final long serialVersionUID = 4008175400649809L;
- private static Logger logger;
- private Attributes attributes;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UITreeModelAdaptor.class, getClass());
- attributes.setAttribute("rendered", true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelRecursiveAdaptorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelRecursiveAdaptorBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelRecursiveAdaptorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.annotation.PostConstruct;
-import javax.el.ELContext;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.component.UITreeModelRecursiveAdaptor;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.treeAdaptor.RecursiveNode;
-import org.richfaces.tests.metamer.model.treeAdaptor.RecursiveNodeImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTreeModelRecursiveAdaptorBean")
-@ViewScoped
-public class RichTreeModelRecursiveAdaptorBean implements Serializable {
-
-
- private static final long serialVersionUID = 1L;
- private static Logger logger;
- private static List<RecursiveNode> rootNodes;
-
- private Attributes attributes;
- private AtomicReference<Boolean> leafChildrenNullable = new AtomicReference<Boolean>(true);
- private boolean useMapModel;
- private Map<String, Boolean> expanded = new TreeMap<String, Boolean>();
- private boolean rootNodesInitialized = false;
-
- /*
- * Nodes which was loaded lazily in the current request
- */
- private Set<String> lazyInitializedNodes = new LinkedHashSet<String>();
-
- public Set<String> getLazyInitializedNodes() {
- return lazyInitializedNodes;
- }
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getComponentAttributesFromFacesConfig(UITreeModelRecursiveAdaptor.class, getClass());
-
- attributes.get("rendered").setValue(true);
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public List<RecursiveNode> getRootNodes() {
- if (!rootNodesInitialized) {
- rootNodes = RecursiveNodeImpl.createChildren(true, "", 1, false);
- }
- return rootNodes;
- }
-
- public boolean isLeafChildrenNullable() {
- return leafChildrenNullable.get();
- }
-
- public void setLeafChildrenNullable(boolean leafChildrenNullable) {
- this.leafChildrenNullable.set(leafChildrenNullable);
- }
-
- public boolean isUseMapModel() {
- return useMapModel;
- }
-
- public void setUseMapModel(boolean useMapModel) {
- this.useMapModel = useMapModel;
- }
-
- public Map<String, Boolean> getExpanded() {
- return expanded;
- }
-
- public static List<RecursiveNode> getRootNodesStatically() {
- return rootNodes;
- }
-
- public static RichTreeModelRecursiveAdaptorBean getFacesContext() {
- ELContext elContext = FacesContext.getCurrentInstance().getELContext();
- return (RichTreeModelRecursiveAdaptorBean) elContext.getELResolver().getValue(elContext, null, "richTreeModelRecursiveAdaptorBean");
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeNodeBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeNodeBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeNodeBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.UITreeNode;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richTreeNodeBean")
-@ViewScoped
-public class RichTreeNodeBean implements Serializable {
-
- private static final long serialVersionUID = 4008175400649809L;
- private static Logger logger;
- private Attributes[] attributes = new Attributes[3];
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- for (int i = 0; i < attributes.length; i++) {
- attributes[i] = Attributes.getComponentAttributesFromFacesConfig(UITreeNode.class, getClass());
- attributes[i].get("rendered").setValue(true);
-
- // attributes which needs to be tested another way
- attributes[i].remove("type");
- attributes[i].remove("expanded");
- }
- }
-
- public Attributes[] getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes[] attributes) {
- this.attributes = attributes;
- }
-}
Deleted: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * 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.
- *******************************************************************************/
-package org.richfaces.tests.metamer.bean;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-import org.richfaces.component.behavior.ClientValidatorImpl;
-import org.richfaces.tests.metamer.Attributes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:validator.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richValidatorBean")
-@ViewScoped
-public class RichValidatorBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- private String stringValue = "RichFaces";
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes = Attributes.getBehaviorAttributesFromFacesConfig(ClientValidatorImpl.class, getClass());
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public String getStringValue() {
- return stringValue;
- }
-
- public void setStringValue(String stringValue) {
- this.stringValue = stringValue;
- }
-}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JActionListenerBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JActionListenerBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JActionListenerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.NoneScoped;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
+
+/**
+ * Managed bean for a4j:ajax.
+ *
+ * @author Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jActionListenerBean")
+@NoneScoped
+public class A4JActionListenerBean {
+
+ public static final class ActionListenerImpl implements ActionListener {
+
+ public void processAction(ActionEvent event) throws AbortProcessingException {
+ addFacesMessage("Implementation of ActionListener created and called: " + this);
+ }
+ }
+
+ private static final class BoundActionListener implements ActionListener {
+
+ public void processAction(ActionEvent event) throws AbortProcessingException {
+ addFacesMessage("Bound listener called");
+ }
+ }
+ private ActionListener actionListener = new BoundActionListener();
+
+ private static void addFacesMessage(String messageText) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ context.addMessage(null, new FacesMessage(messageText));
+ }
+
+ public void handleActionMethod(ActionEvent event) throws AbortProcessingException {
+ addFacesMessage("Method expression listener called");
+ }
+
+ public void handleActionMethodComposite(ActionEvent event) throws AbortProcessingException {
+ addFacesMessage("Method expression listener called from composite component");
+ }
+
+ public ActionListener getActionListener() {
+ return actionListener;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.FacesException;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.event.AjaxBehaviorEvent;
+import javax.faces.model.SelectItem;
+
+import org.ajax4jsf.component.behavior.AjaxBehavior;
+import org.richfaces.tests.metamer.Attribute;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:ajax.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jAjaxBean")
+@ViewScoped
+public class A4JAjaxBean implements Serializable {
+
+ private static final long serialVersionUID = -546567867L;
+ private static final int ACTION_STRING_LENGTH = 6;
+ private static Logger logger;
+ private Attributes attributes;
+ private String input;
+ private List<String> cars;
+ private String car;
+ private boolean boolVal;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getBehaviorAttributesFromFacesConfig(AjaxBehavior.class, getClass());
+
+ // the 'event' attribute for behavior tag must be a literal
+ attributes.remove("event");
+
+ attributes.setAttribute("render", "output1, output2");
+ attributes.setAttribute("execute", "@form");
+
+ // FIXME not found attribute
+ Attribute listenerAttr = new Attribute("listener");
+ List<SelectItem> selectOptions = new ArrayList<SelectItem>();
+ selectOptions.add(new SelectItem("doubleStringListener", "doubleStringListener"));
+ selectOptions.add(new SelectItem("first6CharsListener", "first6CharsListener"));
+ selectOptions.add(new SelectItem("toUpperCaseListener", "toUpperCaseListener"));
+ selectOptions.add(new SelectItem("causeErrorListener", "causeErrorListener"));
+ selectOptions.add(new SelectItem(null, "null"));
+ listenerAttr.setSelectOptions(selectOptions);
+ attributes.put(listenerAttr.getName(), listenerAttr);
+
+ cars = new ArrayList<String>();
+ cars.add("Ferrari");
+ cars.add("Lexus");
+ car = "Ferrari";
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for input.
+ * @return content of the input field on the page
+ */
+ public String getInput() {
+ return input;
+ }
+
+ /**
+ * Setter for input.
+ * @param input new content of the input field on the page
+ */
+ public void setInput(String input) {
+ this.input = input;
+ }
+
+ public String getCar() {
+ return car;
+ }
+
+ public void setCar(String car) {
+ this.car = car;
+ }
+
+ public List<String> getCars() {
+ return cars;
+ }
+
+ public void setCars(List<String> cars) {
+ this.cars = cars;
+ }
+
+ public boolean isBoolVal() {
+ return boolVal;
+ }
+
+ public void setBoolVal(boolean boolVal) {
+ this.boolVal = boolVal;
+ }
+
+ /**
+ * An action listener that takes the first six characters from input and stores it to input.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void first6CharsListener(AjaxBehaviorEvent event) {
+ if (input == null) {
+ input = "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
+ input = (String) input.subSequence(0, endIndex);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, doubles it and stores it to input.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void doubleStringListener(AjaxBehaviorEvent event) {
+ if (input == null) {
+ input = "";
+ } else {
+ input = input.concat(input);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, converts it to upper case and stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void toUpperCaseListener(AjaxBehaviorEvent event) {
+ if (input == null) {
+ input = "";
+ } else {
+ input = input.toUpperCase();
+ }
+ }
+
+ /**
+ * An action listener causing error. Suitable for testing onerror attribute.
+ * @param event an event representing the activation of a user interface component (not used)
+ */
+ public void causeErrorListener(AjaxBehaviorEvent event) {
+ throw new FacesException("Ajax request caused an error. This is intentional behavior.");
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAttachQueueBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAttachQueueBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAttachQueueBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIAttachQueue;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:attachQueue.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jAttachQueueBean")
+@ViewScoped
+public class A4JAttachQueueBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private Attributes attributes2;
+ private String text1;
+ private String text2;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ // initialize attributes
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIAttachQueue.class, getClass());
+ initializeAttributes(attributes);
+ attributes.setAttribute("requestDelay", 500);
+
+ attributes2 = Attributes.getComponentAttributesFromFacesConfig(UIAttachQueue.class, getClass());
+ initializeAttributes(attributes2);
+ attributes2.setAttribute("requestDelay", 1500);
+ }
+
+ private void initializeAttributes(Attributes attributes) {
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Attributes getAttributes2() {
+ return attributes2;
+ }
+
+ public void setAttributes2(Attributes attributes2) {
+ this.attributes2 = attributes2;
+ }
+
+ public String getText1() {
+ return text1;
+ }
+
+ public void setText1(String text1) {
+ this.text1 = text1;
+ }
+
+ public String getText2() {
+ return text2;
+ }
+
+ public void setText2(String text2) {
+ this.text2 = text2;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.UICommandButton;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:commandButton.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jButtonBean")
+@ViewScoped
+public class A4JCommandButtonBean implements Serializable {
+
+ private static final long serialVersionUID = -2556026843426776944L;
+ private static final int ACTION_STRING_LENGTH = 6;
+ private static Logger logger;
+ private Attributes attributes;
+ private String input;
+ private String input2;
+ private String input3;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UICommandButton.class, getClass());
+
+ attributes.setAttribute("action", "first6CharsAction");
+ attributes.setAttribute("actionListener", "toUpperCaseActionListener");
+ attributes.setAttribute("disabled", false);
+ attributes.get("disabled").setType(Boolean.class);
+ attributes.setAttribute("render", "output1 output2 output3");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("value", "command button");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for input.
+ *
+ * @return value entered by a user
+ */
+ public String getInput() {
+ return input;
+ }
+
+ /**
+ * Getter for input2.
+ *
+ * @return value entered by a user modified by selected action
+ */
+ public String getInput2() {
+ return input2;
+ }
+
+ /**
+ * Getter for input3.
+ *
+ * @return value entered by a user modified by selected action listener
+ */
+ public String getInput3() {
+ return input3;
+ }
+
+ /**
+ * Setter for input.
+ *
+ * @param input
+ * value which user entered into text input on the page
+ */
+ public void setInput(String input) {
+ this.input = input;
+ }
+
+ /**
+ * An action that takes the first six characters from input and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String first6CharsAction() {
+ if (input == null) {
+ return "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
+ input2 = (String) input.subSequence(0, endIndex);
+ return null;
+ }
+ }
+
+ /**
+ * An action that takes user's input, doubles it and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String doubleStringAction() {
+ if (input == null) {
+ input2 = "";
+ } else {
+ input2 = input.concat(input);
+ }
+
+ return null;
+ }
+
+ /**
+ * An action that takes user's input, converts it to upper case and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String toUpperCaseAction() {
+ if (input == null) {
+ return "";
+ } else {
+ input2 = input.toUpperCase();
+ return null;
+ }
+ }
+
+ /**
+ * An action listener that takes the first six characters from input and stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void first6CharsActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
+ input3 = (String) input.subSequence(0, endIndex);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, doubles it and stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void doubleStringActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ input3 = input.concat(input);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, converts it to upper case and stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void toUpperCaseActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ input3 = input.toUpperCase();
+ }
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandLinkBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandLinkBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandLinkBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.UICommandLink;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:commandLink.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jLinkBean")
+@ViewScoped
+public class A4JCommandLinkBean implements Serializable {
+
+ private static final long serialVersionUID = -2556076843426776944L;
+ private static final int ACTION_STRING_LENGTH = 6;
+ private static Logger logger;
+ private Attributes attributes;
+ private String input;
+ private String input2;
+ private String input3;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UICommandLink.class, getClass());
+
+ attributes.setAttribute("value", "command link");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("action", "first6CharsAction");
+ attributes.setAttribute("actionListener", "toUpperCaseActionListener");
+ attributes.setAttribute("render", "output1 output2 output3");
+
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for input.
+ *
+ * @return value entered by a user
+ */
+ public String getInput() {
+ return input;
+ }
+
+ /**
+ * Getter for input2.
+ *
+ * @return value entered by a user modified by selected action
+ */
+ public String getInput2() {
+ return input2;
+ }
+
+ /**
+ * Getter for input3.
+ *
+ * @return value entered by a user modified by selected action listener
+ */
+ public String getInput3() {
+ return input3;
+ }
+
+ /**
+ * Setter for input.
+ *
+ * @param input
+ * value which user entered into text input on the page
+ */
+ public void setInput(String input) {
+ this.input = input;
+ }
+
+ /**
+ * An action that takes the first six characters from input and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String first6CharsAction() {
+ if (input == null) {
+ return "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
+ input2 = (String) input.subSequence(0, endIndex);
+ return null;
+ }
+ }
+
+ /**
+ * An action that takes user's input, doubles it and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String doubleStringAction() {
+ if (input == null) {
+ input2 = "";
+ } else {
+ input2 = input.concat(input);
+ }
+
+ return null;
+ }
+
+ /**
+ * An action that takes user's input, converts it to upper case and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String toUpperCaseAction() {
+ if (input == null) {
+ return "";
+ } else {
+ input2 = input.toUpperCase();
+ return null;
+ }
+ }
+
+ /**
+ * An action listener that takes the first six characters from input and stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void first6CharsActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ? ACTION_STRING_LENGTH : input.length();
+ input3 = (String) input.subSequence(0, endIndex);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, doubles it and stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void doubleStringActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ input3 = input.concat(input);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, converts it to upper case and stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void toUpperCaseActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ input3 = input.toUpperCase();
+ }
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JJSFunctionBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JJSFunctionBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JJSFunctionBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.UIFunction;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:jsFunction.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jJSFunctionBean")
+// should not be view-scoped (see https://jira.jboss.org/browse/RF-9287)
+@ViewScoped
+public class A4JJSFunctionBean implements Serializable {
+
+ private static final long serialVersionUID = 48333649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private int year;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+ year = Integer.parseInt(new SimpleDateFormat("yyyy").format(new Date()));
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIFunction.class, getClass());
+
+ attributes.setAttribute("name", "metamerFunction");
+ attributes.setAttribute("render", "time1, time2, year");
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public int getYear() {
+ return year;
+ }
+
+ public void setYear(int year) {
+ this.year = year;
+ }
+
+ public String increaseYearAction() {
+ year++;
+ return null;
+ }
+
+ public String decreaseYearAction() {
+ year--;
+ return null;
+ }
+
+ public void increaseYearActionListener(ActionEvent event) {
+ year++;
+ }
+
+ public void decreaseYearActionListener(ActionEvent event) {
+ year--;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JLogBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JLogBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JLogBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIAjaxLog;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:log.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jLogBean")
+@ViewScoped
+public class A4JLogBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String name;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ name = "John";
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIAjaxLog.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("level", "debug");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for name.
+ * @return content of the input field on the page
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Setter for name.
+ * @param name new content of the input field on the page
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JMediaOutputBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JMediaOutputBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JMediaOutputBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+import javax.imageio.ImageIO;
+
+import org.richfaces.component.UIMediaOutput;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.MediaData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:mediaOutput.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jMediaOutputBean")
+@RequestScoped
+public class A4JMediaOutputBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIMediaOutput.class, getClass());
+
+ attributes.setAttribute("session", true);
+ attributes.setAttribute("rendered", true);
+ attributes.remove("createContent");
+ attributes.remove("element");
+ attributes.remove("value");
+ attributes.remove("mimeType");
+ attributes.remove("uriAttribute");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public void paint(OutputStream out, Object data) throws IOException {
+ if (data instanceof MediaData) {
+ MediaData paintData = (MediaData) data;
+ BufferedImage img = new BufferedImage(paintData.getWidth(), paintData.getHeight(), BufferedImage.TYPE_INT_RGB);
+ Graphics2D graphics2D = img.createGraphics();
+ graphics2D.clearRect(0, 0, paintData.getWidth(), paintData.getHeight());
+
+ graphics2D.setColor(Color.YELLOW);
+ graphics2D.fillRect(0, 0, paintData.getWidth() / 2, paintData.getHeight() / 2);
+
+ graphics2D.setColor(Color.RED);
+ graphics2D.fillRect(paintData.getWidth() / 2, 0, paintData.getWidth() / 2, paintData.getHeight() / 2);
+
+ graphics2D.setColor(Color.BLUE);
+ graphics2D.fillRect(0, paintData.getWidth() / 2, paintData.getWidth() / 2, paintData.getHeight() / 2);
+
+ graphics2D.setColor(Color.GREEN);
+ graphics2D.fillRect(paintData.getWidth() / 2, paintData.getHeight() / 2, paintData.getWidth() / 2, paintData.getHeight() / 2);
+
+ ImageIO.write(img, "png", out);
+ }
+ }
+
+ private void copy(InputStream in, OutputStream out) throws IOException {
+ byte[] buffer = new byte[2048];
+ int read;
+
+ while ((read = in.read(buffer)) != -1) {
+ out.write(buffer, 0, read);
+ }
+ }
+
+ public void paintFlash(OutputStream out, Object data) throws IOException {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ if (loader == null) {
+ loader = getClass().getClassLoader();
+ }
+
+ InputStream stream = loader.getResourceAsStream("resources/flash/text.swf");
+
+ if (stream != null) {
+ try {
+ copy(stream, out);
+ } finally {
+ stream.close();
+ }
+ }
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JOutputPanelBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JOutputPanelBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JOutputPanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIOutputPanel;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:outputPanel.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jOutputPanelBean")
+@ViewScoped
+public class A4JOutputPanelBean implements Serializable {
+
+ private static final long serialVersionUID = 4814439475400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private int counter;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIOutputPanel.class, getClass());
+
+ attributes.setAttribute("ajaxRendered", true);
+ attributes.setAttribute("layout", "block");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("styleClass", "");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public int getCounter() {
+ return counter;
+ }
+
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+
+ public String increaseCounterAction() {
+ counter++;
+ return null;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JParamBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JParamBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JParamBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JParamBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.component.UIParameter;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:param.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jParamBean")
+@ViewScoped
+public class A4JParamBean implements Serializable {
+
+ private static final long serialVersionUID = -23993426776944L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String parameter;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIParameter.class, getClass());
+
+ attributes.setAttribute("name", "param");
+ attributes.setAttribute("noEscape", true);
+ attributes.get("noEscape").setType(Boolean.class);
+ attributes.setAttribute("value", "screen.width");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getParameter() {
+ return parameter;
+ }
+
+ public void setParameter(String parameter) {
+ this.parameter = parameter;
+ }
+
+ public String getRequestParameter() {
+ Map<String, String> requestParameterMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ return requestParameterMap.get(attributes.get("name").getValue().toString());
+ }
+
+ public String reset() {
+ parameter = null;
+ return null;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPollBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPollBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPollBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.UIPoll;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:poll.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jPollBean")
+@ViewScoped
+public class A4JPollBean implements Serializable {
+
+ private static final long serialVersionUID = 4810889475400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private int counter;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIPoll.class, getClass());
+
+ attributes.setAttribute("enabled", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("interval", 2500);
+ attributes.setAttribute("action", "increaseCounterAction");
+ attributes.setAttribute("actionListener", "increaseCounterActionListener");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Date getDate() {
+ return new Date();
+ }
+
+ public int getCounter() {
+ return counter;
+ }
+
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+
+ public String increaseCounterAction() {
+ counter++;
+ return null;
+ }
+
+ public String decreaseCounterAction() {
+ counter--;
+ return null;
+ }
+
+ public void increaseCounterActionListener(ActionEvent event) {
+ counter++;
+ }
+
+ public void decreaseCounterActionListener(ActionEvent event) {
+ counter--;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import org.richfaces.application.push.MessageException;
+import org.richfaces.application.push.TopicKey;
+
+import org.richfaces.application.push.TopicsContext;
+import org.richfaces.component.UIPush;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.Message;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:push.
+ *
+ * @author Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jPushBean")
+@SessionScoped
+public class A4JPushBean implements Serializable {
+
+ private static final long serialVersionUID = 4810889475400649809L;
+ private static Logger logger;
+ private transient TopicsContext topicsContext;
+ private Attributes attributes;
+ private String username;
+ private String message;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ topicsContext = TopicsContext.lookup();
+
+ attributes = Attributes.getComponentAttributesFromClass(UIPush.class, getClass());
+// attributes.setAttribute("interval", 1000);
+// attributes.setAttribute("action", "increaseCounterAction");
+// attributes.setAttribute("actionListener", "increaseCounterActionListener");
+// attributes.setAttribute("rendered", true);
+// attributes.setAttribute("enabled", true);
+//
+// // will be set on page and cannot be changed
+// attributes.remove("eventProducer");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public void setTopicsContext(TopicsContext topicsContext) {
+ this.topicsContext = topicsContext;
+ }
+
+ private TopicsContext getTopicsContext() {
+ if (topicsContext == null) {
+ topicsContext = TopicsContext.lookup();
+ }
+ return topicsContext;
+ }
+
+ public void send() {
+ try {
+ logger.info("sending message \"" + message + "\" by user " + username);
+ Message msg = new Message(message, username, new Date().toString());
+ getTopicsContext().publish(new TopicKey("metamer", "xxx"), msg);
+ } catch (MessageException messageException) {
+ logger.error("Could not send message \"" + message + "\" by user " + username + ".", messageException);
+ }
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JQueueBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JQueueBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JQueueBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIQueue;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:queue.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jQueueBean")
+@ViewScoped
+public class A4JQueueBean implements Serializable {
+
+ private static final long serialVersionUID = 486866943531809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String text;
+ private A4JQueueBean globalQueue;
+ private A4JQueueBean formQueue1;
+ private A4JQueueBean formQueue2;
+ private boolean introduceDelay;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ // initialize attributes
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIQueue.class, getClass());
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requestDelay", 750);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public A4JQueueBean getGlobalQueue() {
+ if (globalQueue == null) {
+ globalQueue = new A4JQueueBean();
+ globalQueue.init();
+ globalQueue.attributes.setAttribute("requestDelay", 10000);
+ }
+ return globalQueue;
+ }
+
+ public A4JQueueBean getFormQueue1() {
+ if (formQueue1 == null) {
+ formQueue1 = new A4JQueueBean();
+ formQueue1.init();
+ formQueue1.attributes.setAttribute("requestDelay", 500);
+ }
+ return formQueue1;
+ }
+
+ public A4JQueueBean getFormQueue2() {
+ if (formQueue2 == null) {
+ formQueue2 = new A4JQueueBean();
+ formQueue2.init();
+ formQueue2.attributes.setAttribute("requestDelay", 2000);
+ }
+ return formQueue2;
+ }
+
+ public A4JQueueBean[] getFormQueues() {
+ return new A4JQueueBean[]{getFormQueue1(), getFormQueue2()};
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ if (introduceDelay) {
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+ this.text = text;
+ }
+
+ public boolean isIntroduceDelay() {
+ return introduceDelay;
+ }
+
+ public void setIntroduceDelay(boolean introduceDelay) {
+ this.introduceDelay = introduceDelay;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JRegionBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JRegionBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JRegionBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.event.AjaxBehaviorEvent;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+
+import org.richfaces.component.UIRegion;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.model.Employee;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:region.
+ *
+ * @author Exadel, Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jRegionBean")
+@SessionScoped
+public class A4JRegionBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static final SelectItem[] AVAILABLE_EXECUTE_OPTIONS = new SelectItem[]{new SelectItem(null, "default"),
+ new SelectItem("@all"), new SelectItem("@form"), new SelectItem("@region"), new SelectItem("@this"),
+ new SelectItem("outerValueInput", "Outer"), new SelectItem("regionValueInput", "Region"),
+ new SelectItem("nestedRegionValueInput", "Nested region"),
+ new SelectItem("decorationValueInput", "Decoration"), new SelectItem("insertionValueInput", "Insertion")};
+ private static Logger logger;
+ // for page simple.xhtml
+ private Attributes attributes;
+ private Employee user1;
+ private Employee user2;
+ // for page nested.xhtml
+ private String execute;
+ private String nestedExecute;
+ private String outerExecute;
+ private String decorationExecute;
+ private String decorationValue;
+ private String insertionExecute;
+ private String outerValue;
+ private String regionValue;
+ private String nestedRegionValue;
+ private String lastExecutedButtonValue;
+ private String insertionValue;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ user1 = new Employee();
+ user2 = new Employee();
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIRegion.class, getClass());
+ attributes.setAttribute("rendered", true);
+ }
+
+ // getters and setters for page simple.xhtml
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Employee getUser1() {
+ return user1;
+ }
+
+ public void setUser1(Employee user1) {
+ this.user1 = user1;
+ }
+
+ public Employee getUser2() {
+ return user2;
+ }
+
+ public void setUser2(Employee user2) {
+ this.user2 = user2;
+ }
+
+ // getters and setters for page nested.xhtml
+ public SelectItem[] getExecuteOptions() {
+ return AVAILABLE_EXECUTE_OPTIONS;
+ }
+
+ public String getOuterValue() {
+ return outerValue;
+ }
+
+ public void setOuterValue(String outerValue) {
+ this.outerValue = outerValue;
+ }
+
+ public String getRegionValue() {
+ return regionValue;
+ }
+
+ public void setRegionValue(String value) {
+ this.regionValue = value;
+ }
+
+ public String getNestedRegionValue() {
+ return nestedRegionValue;
+ }
+
+ public void setNestedRegionValue(String nestedValue) {
+ this.nestedRegionValue = nestedValue;
+ }
+
+ public String getExecute() {
+ return execute;
+ }
+
+ public void setExecute(String execute) {
+ this.execute = execute;
+ }
+
+ public String getNestedExecute() {
+ return nestedExecute;
+ }
+
+ public void setNestedExecute(String nestedExecute) {
+ this.nestedExecute = nestedExecute;
+ }
+
+ public String getOuterExecute() {
+ return outerExecute;
+ }
+
+ public void setOuterExecute(String outerExecute) {
+ this.outerExecute = outerExecute;
+ }
+
+ public String getInsertionExecute() {
+ return insertionExecute;
+ }
+
+ public void setInsertionExecute(String insertionExecute) {
+ this.insertionExecute = insertionExecute;
+ }
+
+ public String getInsertionValue() {
+ return insertionValue;
+ }
+
+ public void setInsertionValue(String insertionValue) {
+ this.insertionValue = insertionValue;
+ }
+
+ public String getDecorationExecute() {
+ return decorationExecute;
+ }
+
+ public void setDecorationExecute(String decorationExecute) {
+ this.decorationExecute = decorationExecute;
+ }
+
+ public String getDecorationValue() {
+ return decorationValue;
+ }
+
+ public void setDecorationValue(String decorationValue) {
+ this.decorationValue = decorationValue;
+ }
+
+ public void handleBehavior(AjaxBehaviorEvent event) {
+ lastExecutedButtonValue = (String) event.getComponent().getAttributes().get("value");
+ }
+
+ public String getLastExecutedButtonValue() {
+ return lastExecutedButtonValue;
+ }
+
+ public void handleDefaultsValueChange(ValueChangeEvent event) {
+ String newValue = (String) event.getNewValue();
+
+ setOuterExecute(newValue);
+ setExecute(newValue);
+ setDecorationExecute(newValue);
+ setInsertionExecute(newValue);
+ setNestedExecute(newValue);
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JRepeatBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JRepeatBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JRepeatBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIRepeat;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:repeat.
+ *
+ * @author Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jRepeatBean")
+@ViewScoped
+public class A4JRepeatBean implements Serializable {
+
+ private static final long serialVersionUID = 4864439475400649809L;
+ private static final int MATRIX_DIMENSION = 4;
+ private static Logger logger;
+ private Attributes attributes;
+ private List<Data> dataList;
+ private Data selectedDataItem = null;
+ private List<MatrixRow> matrixRows;
+
+ public static final class MatrixCell implements Serializable {
+
+ private static final long serialVersionUID = -5911659561854593681L;
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+
+ public void clearValueAction() {
+ setValue(0);
+ }
+
+ public void increaseValueAction() {
+ value++;
+ }
+
+ public void decreaseValueAction() {
+ value--;
+ }
+ }
+
+ public static final class MatrixRow implements Serializable {
+
+ private static final long serialVersionUID = -5051037819565283283L;
+ private List<MatrixCell> cells = new ArrayList<MatrixCell>();
+
+ public List<MatrixCell> getCells() {
+ return cells;
+ }
+
+ public void addCell(MatrixCell cell) {
+ cells.add(cell);
+ }
+ }
+
+ public static final class Data implements Serializable {
+
+ private static final long serialVersionUID = -1461777632529492912L;
+ private String text;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+ }
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ // initialize model for page simple.xhtml
+ dataList = new ArrayList<Data>();
+ for (int i = 0; i < 20; i++) {
+ Data data = new Data();
+ data.setText(MessageFormat.format("Item {0}", i));
+ dataList.add(data);
+ }
+
+ // initialize model for page matrix.xhtml
+ matrixRows = new ArrayList<MatrixRow>();
+ for (int i = 0; i < MATRIX_DIMENSION; i++) {
+ MatrixRow matrixRow = new MatrixRow();
+
+ for (int j = 0; j < MATRIX_DIMENSION; j++) {
+ MatrixCell matrixCell = new MatrixCell();
+ matrixRow.addCell(matrixCell);
+ }
+
+ matrixRows.add(matrixRow);
+ }
+
+ // initialize attributes
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIRepeat.class, getClass());
+ attributes.setAttribute("rendered", true);
+ // TODO has to be tested in other way
+ attributes.remove("componentState");
+ attributes.remove("iterationState");
+ attributes.remove("iterationStatusVar");
+ attributes.remove("rowKeyVar");
+ attributes.remove("rowKeyConverter");
+ attributes.remove("value");
+ attributes.remove("stateVar");
+ attributes.remove("var");
+
+ // should be hidden
+ attributes.remove("relativeRowIndex");
+ attributes.remove("rowAvailable");
+ attributes.remove("rowCount");
+ attributes.remove("rowData");
+ attributes.remove("rowIndex");
+ attributes.remove("rowKey");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * @return the data
+ */
+ public List<Data> getDataList() {
+ return dataList;
+ }
+
+ /**
+ * @return the selectedDataItem
+ */
+ public Data getSelectedDataItem() {
+ return selectedDataItem;
+ }
+
+ /**
+ * @param selectedDataItem the selectedDataItem to set
+ */
+ public void setSelectedDataItem(Data selectedDataItem) {
+ this.selectedDataItem = selectedDataItem;
+ }
+
+ public List<MatrixRow> getMatrixRows() {
+ return matrixRows;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JStatusBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JStatusBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JStatusBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.a4j;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIStatus;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:status.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jStatusBean")
+@ViewScoped
+public class A4JStatusBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String facetStartValue = "START";
+ private String facetStopValue = "STOP";
+ private String facetErrorValue = "ERROR";
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIStatus.class, getClass());
+ attributes.setAttribute("rendered", true);
+
+ // hidden attributes
+ attributes.remove("converter");
+ attributes.remove("localValue");
+ attributes.remove("value");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getFacetStartValue() {
+ return facetStartValue;
+ }
+
+ public void setFacetStartValue(String facetStartValue) {
+ this.facetStartValue = facetStartValue;
+ }
+
+ public String getFacetStopValue() {
+ return facetStopValue;
+ }
+
+ public void setFacetStopValue(String facetStopValue) {
+ this.facetStopValue = facetStopValue;
+ }
+
+ public String getFacetErrorValue() {
+ return facetErrorValue;
+ }
+
+ public void setFacetErrorValue(String facetErrorValue) {
+ this.facetErrorValue = facetErrorValue;
+ }
+
+ /**
+ * Action that creates a 2-second delay.
+ *
+ * @throws InterruptedException
+ * if any thread has interrupted the current thread. The interrupted status of the current thread is
+ * cleared when this exception is thrown.
+ */
+ public void delay() throws InterruptedException {
+ Thread.sleep(2000);
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAccordionBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAccordionBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAccordionBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIAccordion;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:accordion.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richAccordionBean")
+@ViewScoped
+public class RichAccordionBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIAccordion.class, getClass());
+
+ attributes.setAttribute("activeItem", "item1");
+ attributes.setAttribute("rendered", true);
+
+ // will be tested in another way
+ attributes.remove("converter");
+ attributes.remove("itemChangeListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAccordionItemBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAccordionItemBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAccordionItemBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIAccordionItem;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:accordionItem.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richAccordionItemBean")
+@ViewScoped
+public class RichAccordionItemBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIAccordionItem.class, getClass());
+
+ attributes.setAttribute("header", "Item 1");
+ attributes.setAttribute("name", "item1");
+ attributes.setAttribute("rendered", true);
+
+ // TODO will be tested in another way
+ attributes.remove("converter");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.component.UIAutocomplete;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.model.Capital;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:autocomplete.
+ * http://community.jboss.org/wiki/richfacesautocompletecomponentbehavior
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richAutocompleteBean")
+// cannot be view-scoped (see https://jira.jboss.org/browse/RF-9287)
+@SessionScoped
+public class RichAutocompleteBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private Attributes ajaxAttributes;
+ @ManagedProperty(value = "#{model.capitals}")
+ private List<Capital> capitals;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIAutocomplete.class, getClass());
+ attributes.setAttribute("converterMessage", "converter message");
+ attributes.setAttribute("mode", "ajax");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("tokens", ", ");
+ attributes.setAttribute("validatorMessage", "validator message");
+
+ ajaxAttributes = Attributes.getEmptyAttributes(getClass());
+ ajaxAttributes.setAttribute("render", "output");
+ ajaxAttributes.setAttribute("execute", "autocomplete");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Attributes getAjaxAttributes() {
+ return ajaxAttributes;
+ }
+
+ public void setAjaxAttributes(Attributes ajaxAttributes) {
+ this.ajaxAttributes = ajaxAttributes;
+ }
+
+ public List<String> autocomplete(String prefix) {
+ ArrayList<String> result = new ArrayList<String>();
+ if (prefix != null && prefix.length() > 0) {
+ Iterator<Capital> iterator = capitals.iterator();
+ while (iterator.hasNext()) {
+ Capital elem = ((Capital) iterator.next());
+ if ((elem.getState() != null && elem.getState().toLowerCase().indexOf(prefix.toLowerCase()) == 0)
+ || "".equals(prefix)) {
+ result.add(elem.getState());
+ }
+ }
+ } else {
+ for (Capital capital : capitals) {
+ result.add(capital.getState());
+ }
+ }
+ return result;
+ }
+
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.TimeZone;
+
+import javax.annotation.PostConstruct;
+import javax.faces.application.FacesMessage;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.validator.ValidatorException;
+import javax.validation.constraints.Future;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Past;
+
+import org.richfaces.component.UICalendar;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.RichBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:calendar.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richCalendarBean")
+@ViewScoped
+public class RichCalendarBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private Date date = new Date();
+ private TimeZone timeZone = TimeZone.getTimeZone("UTC");
+ private Date date1;
+ private Date date2;
+ private Date date3;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UICalendar.class, getClass());
+
+ attributes.setAttribute("datePattern", "MMM d, yyyy HH:mm");
+ attributes.setAttribute("direction", "bottomRight");
+ attributes.setAttribute("jointPoint", "bottomLeft");
+ attributes.setAttribute("popup", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
+ attributes.setAttribute("showApplyButton", true);
+ attributes.setAttribute("showHeader", true);
+ attributes.setAttribute("showFooter", true);
+ attributes.setAttribute("showInput", true);
+ attributes.setAttribute("showWeeksBar", true);
+ attributes.setAttribute("showWeekDaysBar", true);
+
+ // TODO has to be tested in another way
+ attributes.remove("converter");
+ attributes.remove("dataModel");
+ attributes.remove("validator");
+ attributes.remove("valueChangeListener");
+ attributes.remove("timeZone");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public TimeZone getTimeZone() {
+ return timeZone;
+ }
+
+ public void setTimeZone(TimeZone timeZone) {
+ this.timeZone = timeZone;
+ }
+
+ @Past
+ @NotNull
+ public Date getDate1() {
+ return date1;
+ }
+
+ public void setDate1(Date date1) {
+ this.date1 = date1;
+ }
+
+ @Future
+ @NotNull
+ public Date getDate2() {
+ return date2;
+ }
+
+ public void setDate2(Date date2) {
+ this.date2 = date2;
+ }
+
+ public Date getDate3() {
+ return date3;
+ }
+
+ public void setDate3(Date date3) {
+ this.date3 = date3;
+ }
+
+ /**
+ * A value change listener that logs to the page old and new value.
+ *
+ * @param event
+ * an event representing the activation of a user interface component
+ */
+ public void valueChangeListener(ValueChangeEvent event) {
+ SimpleDateFormat sdf = new SimpleDateFormat(attributes.get("datePattern").getValue().toString());
+ sdf.setTimeZone(timeZone);
+
+ String oldDate = "null";
+ String newDate = "null";
+
+ if (event.getOldValue() != null) {
+ oldDate = sdf.format((Date) event.getOldValue());
+ }
+ if (event.getNewValue() != null) {
+ newDate = sdf.format((Date) event.getNewValue());
+ }
+
+ RichBean.logToPage("* value changed: " + oldDate + " -> " + newDate);
+ }
+
+ public void validateDate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ if (value == null) {
+ return;
+ }
+
+ Calendar cal = Calendar.getInstance();
+ cal.setTime((Date) value);
+ int componentYear = cal.get(Calendar.YEAR);
+
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Date too far in the past.",
+ "Select a date from year 1991 or newer.");
+
+ if (componentYear < 1991) {
+ FacesContext.getCurrentInstance().addMessage("form:calendar", message);
+ }
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsiblePanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UICollapsiblePanel;
+import org.richfaces.event.PanelToggleEvent;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.RichBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:collapsiblePanel.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richCollapsiblePanelBean")
+@ViewScoped
+public class RichCollapsiblePanelBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UICollapsiblePanel.class, getClass());
+
+ attributes.setAttribute("expanded", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("header", "collapsible panel header");
+
+ // will be tested in another way
+ attributes.remove("converter");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public void toggleListener(PanelToggleEvent event) {
+ RichBean.logToPage("* panel " + (event.getExpanded() ? "expanded" : "collapsed"));
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UICollapsibleSubTable;
+import org.richfaces.component.UIDataTableBase;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.ColumnSortingMap;
+import org.richfaces.tests.metamer.bean.Model;
+import org.richfaces.tests.metamer.model.Employee;
+import org.richfaces.tests.metamer.model.Employee.Sex;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:collapsibleSubTable.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richSubTableBean")
+@ViewScoped
+public class RichCollapsibleSubTableBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ // FIXME: @ManagedProperty(value = "#{model.employees}")
+ private List<Employee> employees = Model.unmarshallEmployees();
+ private List<List<Employee>> lists;
+ private transient UICollapsibleSubTable binding;
+ // true = model, false = empty table
+ private boolean state;
+ // facets
+ private Map<String, String> facets = new HashMap<String, String>();
+ // sorting
+ private ColumnSortingMap sorting = new ColumnSortingMap() {
+
+ private static final long serialVersionUID = 1L;
+
+ protected UIDataTableBase getBinding() {
+ return binding;
+ }
+
+ protected Attributes getAttributes() {
+ return attributes;
+ }
+ };
+ // filtering
+ private Map<String, Object> filtering = new HashMap<String, Object>();
+ // expanded
+ private Map<List<Employee>, Boolean> expanded = new HashMap<List<Employee>, Boolean>();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UICollapsibleSubTable.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("rows", 5);
+
+ // TODO these attributes have to be tested in another way
+ attributes.remove("expanded");
+ attributes.remove("columns");
+ attributes.remove("selection");
+ attributes.remove("filterVar");
+ attributes.remove("iterationStatusVar");
+ attributes.remove("componentState");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+ attributes.remove("var");
+ attributes.remove("value");
+
+ List<Employee> men = new ArrayList<Employee>();
+ List<Employee> women = new ArrayList<Employee>();
+
+ for (Employee e : employees) {
+ if (e.getSex() == Sex.MALE) {
+ men.add(e);
+ } else {
+ women.add(e);
+ }
+ }
+
+ lists = new ArrayList<List<Employee>>();
+ lists.add(men);
+ lists.add(women);
+
+ expanded.put(men, true);
+ expanded.put(women, true);
+
+ state = true;
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<Employee> getEmployees() {
+ return employees;
+ }
+
+ public void setEmployees(List<Employee> employees) {
+ this.employees = employees;
+ }
+
+ public List<List<Employee>> getLists() {
+ return lists;
+ }
+
+ public void setLists(List<List<Employee>> lists) {
+ this.lists = lists;
+ }
+
+ public boolean isState() {
+ return state;
+ }
+
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+ public Map<String, String> getFacets() {
+ return facets;
+ }
+
+ public UICollapsibleSubTable getBinding() {
+ return binding;
+ }
+
+ public void setBinding(UICollapsibleSubTable binding) {
+ this.binding = binding;
+ }
+
+ public ColumnSortingMap getSorting() {
+ return sorting;
+ }
+
+ public Map<String, Object> getFiltering() {
+ return filtering;
+ }
+
+ public Map<List<Employee>, Boolean> getExpanded() {
+ return expanded;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableTogglerBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableTogglerBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCollapsibleSubTableTogglerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UICollapsibleSubTableToggleControl;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.Model;
+import org.richfaces.tests.metamer.model.Employee;
+import org.richfaces.tests.metamer.model.Employee.Sex;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:collapsibleSubTableToggler.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name="richSubTableTogglerBean")
+@ViewScoped
+public class RichCollapsibleSubTableTogglerBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ // FIXME: @ManagedProperty(value = "#{model.employees}")
+ private List<Employee> employees = Model.unmarshallEmployees();
+ private List<List<Employee>> lists;
+ // true = model, false = empty table
+ private boolean state;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UICollapsibleSubTableToggleControl.class, getClass());
+ attributes.setAttribute("event", "click");
+ attributes.setAttribute("rendered", true);
+ // TODO these attributes have to be tested in another way
+ attributes.remove("for");
+
+ List<Employee> men = new ArrayList<Employee>();
+ List<Employee> women = new ArrayList<Employee>();
+
+ for (Employee e : employees) {
+ if (e.getSex() == Sex.MALE) {
+ men.add(e);
+ } else {
+ women.add(e);
+ }
+ }
+
+ lists = new ArrayList<List<Employee>>();
+ lists.add(men);
+ lists.add(women);
+
+ state = true;
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<Employee> getEmployees() {
+ return employees;
+ }
+
+ public void setEmployees(List<Employee> employees) {
+ this.employees = employees;
+ }
+
+ public List<List<Employee>> getLists() {
+ return lists;
+ }
+
+ public void setLists(List<List<Employee>> lists) {
+ this.lists = lists;
+ }
+
+ public boolean isState() {
+ return state;
+ }
+
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichColumnBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichColumnBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichColumnBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.Comparator;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.SortOrder;
+import org.richfaces.component.UIColumn;
+import org.richfaces.model.Filter;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.model.Capital;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:column
+ *
+ * @author <a href="mailto:pjha@redhat.com">Prabhat Jha</a>, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richColumnBean")
+@ViewScoped
+public class RichColumnBean implements Serializable {
+
+ public static final Comparator<Capital> STATE_NAME_LENGTH_COMPARATOR = new Comparator<Capital>() {
+ @Override
+ public int compare(Capital o1, Capital o2) {
+ return o1.getState().length() - o2.getState().length();
+ }
+ };
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+
+ private Attributes attributes;
+ private String stateNameToFilter;
+ private SortOrder sortOrder = SortOrder.ascending;
+
+ private Filter<Capital> stateFilter = new StateFilter();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIColumn.class, getClass());
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("colspan", 2);
+ attributes.setAttribute("rowspan", 2);
+ attributes.setAttribute("breakRowBefore", true);
+
+ // attributes which needs to be tested another way
+ attributes.remove("filter");
+ attributes.remove("filterValue");
+ attributes.remove("filterExpression");
+ attributes.remove("comparator");
+ attributes.remove("sortBy");
+ attributes.remove("sortOrder");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Comparator<Capital> getStateNameLengthComparator() {
+ return STATE_NAME_LENGTH_COMPARATOR;
+ }
+
+ public Filter<Capital> getStateNameFilter() {
+ return stateFilter;
+ }
+
+ public String getStateNameToFilter() {
+ return stateNameToFilter;
+ }
+
+ public void setStateNameToFilter(String stateNameToFilter) {
+ this.stateNameToFilter = stateNameToFilter;
+ }
+
+ public SortOrder[] getSortOrders() {
+ return SortOrder.values();
+ }
+
+ public void setSortOrder(SortOrder sortOrder) {
+ this.sortOrder = sortOrder;
+ }
+
+ public SortOrder getSortOrder() {
+ return sortOrder;
+ }
+
+ private class StateFilter implements Filter<Capital>, Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public boolean accept(Capital c) {
+ return c.getState().toLowerCase()
+ .contains(stateNameToFilter == null ? "" : stateNameToFilter.toLowerCase());
+ }
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichColumnGroupBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichColumnGroupBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichColumnGroupBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.component.UIColumnGroup;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:columnGroup.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richColumnGroupBean")
+@SessionScoped
+public class RichColumnGroupBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private int page = 1;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIColumnGroup.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public int getPage() {
+ return page;
+ }
+
+ public void setPage(int page) {
+ this.page = page;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichComponentControlBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.behavior.ComponentControlBehavior;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:componentControl.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richComponentControlBean")
+@ViewScoped
+public class RichComponentControlBean implements Serializable {
+
+ private static final long serialVersionUID = 4476643239809L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getBehaviorAttributesFromFacesConfig(ComponentControlBehavior.class, getClass());
+
+ attributes.setAttribute("operation", "previous");
+ attributes.setAttribute("target", "scroller");
+
+ // The 'event' attribute for behavior tag must be a literal
+ attributes.remove("event");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataGridBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataGridBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataGridBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIDataGrid;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:dataGrid.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richDataGridBean")
+@ViewScoped
+public class RichDataGridBean implements Serializable {
+
+ private static final long serialVersionUID = 4814439475400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ // true = model, false = empty table
+ private boolean state = true;
+ private int page = 1;
+ private Map<String, String> facets = new HashMap<String, String>();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataGrid.class, getClass());
+
+ attributes.setAttribute("columns", 3);
+ attributes.setAttribute("rendered", true);
+
+ // attributes defined directly in page
+ attributes.remove("value");
+ attributes.remove("var");
+
+ // TODO attributes which needs to be tested in another way
+ attributes.remove("iterationStatusVar");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+
+ // facets initial values
+ facets.put("noData", "There is no data.");
+ facets.put("caption", "Caption");
+ facets.put("header", "Header");
+ facets.put("footer", "Footer");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public boolean isState() {
+ return state;
+ }
+
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+ public int getPage() {
+ return page;
+ }
+
+ public void setPage(int page) {
+ this.page = page;
+ }
+
+ public Map<String, String> getFacets() {
+ return facets;
+ }
+
+ public void setFacets(Map<String, String> facets) {
+ this.facets = facets;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataScrollerBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataScrollerBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataScrollerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIDataScroller;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:dataScroller.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richDataScrollerBean")
+@ViewScoped
+public class RichDataScrollerBean implements Serializable {
+
+ private static final long serialVersionUID = 122475400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private boolean state = true;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataScroller.class, getClass());
+
+ attributes.setAttribute("boundaryControls", "show");
+ attributes.setAttribute("fastControls", "show");
+ attributes.setAttribute("stepControls", "show");
+ attributes.setAttribute("fastStep", 1);
+ attributes.setAttribute("lastPageMode", "short");
+ attributes.setAttribute("maxPages", 10);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("render", "richDataTable");
+ attributes.setAttribute("page", 1);
+ attributes.setAttribute("renderIfSinglePage", true);
+ attributes.setAttribute("for", "richDataTable");
+
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for state.
+ * @return true if non-empty data model should be used in table
+ */
+ public boolean isState() {
+ return state;
+ }
+
+ /**
+ * Setter for state.
+ * @param state true if non-empty data model should be used in table
+ */
+ public void setState(boolean state) {
+ this.state = state;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataTableBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataTableBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDataTableBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.ajax4jsf.model.DataComponentState;
+import org.richfaces.component.UIDataTable;
+import org.richfaces.component.UIDataTableBase;
+import org.richfaces.model.Filter;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.ColumnSortingMap;
+import org.richfaces.tests.metamer.model.Employee;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:dataTable.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richDataTableBean")
+@ViewScoped
+public class RichDataTableBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private transient UIDataTable binding;
+ private DataComponentState dataTableState;
+ private Map<Object, Integer> stateMap = new HashMap<Object, Integer>();
+ private int page = 1;
+ // true = model, false = empty table
+ private boolean state = true;
+ // sorting
+ private ColumnSortingMap sorting = new CustomColumnSortingMap();
+ // filtering
+ private Map<String, Object> filtering = new HashMap<String, Object>();
+ // facets
+ private Map<String, String> facets = new HashMap<String, String>();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataTable.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("rows", 10);
+
+ // facets initial values
+ facets.put("noData", "There is no data.");
+ facets.put("caption", "Caption");
+ facets.put("header", "Header");
+ facets.put("footer", "Footer");
+ facets.put("columnStateHeader", "State Header");
+ facets.put("columnStateFooter", "State Footer");
+ facets.put("columnCapitalHeader", "Capital Header");
+ facets.put("columnCapitalFooter", "Capital Footer");
+
+ // attributes already in page
+ attributes.remove("value");
+ attributes.remove("var");
+
+ // TODO needs to be tested another way
+ attributes.remove("filterVar");
+ attributes.remove("iterationStatusVar");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+ }
+
+ public void setBinding(UIDataTable binding) {
+ this.binding = binding;
+ }
+
+ public UIDataTable getBinding() {
+ return binding;
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public int getPage() {
+ return page;
+ }
+
+ public void setPage(int page) {
+ this.page = page;
+ }
+
+ public Map<Object, Integer> getStateMap() {
+ return stateMap;
+ }
+
+ public void setStateMap(Map<Object, Integer> stateMap) {
+ this.stateMap = stateMap;
+ }
+
+ public DataComponentState getDataTableState() {
+ return dataTableState;
+ }
+
+ public void setDataTableState(DataComponentState dataTableState) {
+ this.dataTableState = dataTableState;
+ }
+
+ public boolean isState() {
+ return state;
+ }
+
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+ public Date getDate() {
+ return new Date();
+ }
+
+ public Map<String, String> getFacets() {
+ return facets;
+ }
+
+ public ColumnSortingMap getSorting() {
+ return sorting;
+ }
+
+ public Map<String, Object> getFiltering() {
+ return filtering;
+ }
+
+ public Filter<?> getFilterSexImpl() {
+ return new Filter<Employee>() {
+
+ public boolean accept(Employee e) {
+ String sex = (String) getFiltering().get("sex");
+ if (sex == null || sex.length() == 0 || sex.equalsIgnoreCase("all")
+ || sex.equalsIgnoreCase(e.getSex().toString())) {
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+
+ private class CustomColumnSortingMap extends ColumnSortingMap {
+
+ private static final long serialVersionUID = 1L;
+
+ protected UIDataTableBase getBinding() {
+ return binding;
+ }
+
+ protected Attributes getAttributes() {
+ return attributes;
+ }
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDragIndicatorBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragIndicatorBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDragIndicatorBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDragIndicatorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIDragIndicator;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richDragIndicatorBean")
+@ViewScoped
+public class RichDragIndicatorBean implements Serializable {
+
+ private static final long serialVersionUID = 4008175400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDragIndicator.class, getClass());
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDragSourceBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDragSourceBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDragSourceBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDragSourceBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIDragSource;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.model.drag.DragValue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richDragSourceBean")
+@ViewScoped
+public class RichDragSourceBean implements Serializable {
+
+ private static final int DRAG_VALUES = 3;
+ private static final long serialVersionUID = 4008175400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ private List<DragValue> dragValues = new ArrayList<DragValue>();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDragSource.class, getClass());
+
+ attributes.setAttribute("dragIndicator", "indicator");
+ attributes.setAttribute("type", "drg1");
+ attributes.setAttribute("rendered", true);
+
+ attributes.remove("dragValue");
+ attributes.remove("event");
+
+
+ for (int i = 0; i < DRAG_VALUES; i++) {
+ dragValues.add(new DragValue(i + 1));
+ }
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<DragValue> getDragValues() {
+ return dragValues;
+ }
+
+ public void setDragValues(List<DragValue> dragValues) {
+ this.dragValues = dragValues;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropDownMenuBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropDownMenuBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropDownMenuBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropDownMenuBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import org.richfaces.component.UIDropDownMenu;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:dropDownMenu.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richDropDownMenuBean")
+@ViewScoped
+public class RichDropDownMenuBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String current;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDropDownMenu.class, getClass());
+
+ attributes.setAttribute("mode", "ajax");
+ attributes.setAttribute("rendered", true);
+
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getCurrent() {
+ return this.current;
+ }
+
+ public void setCurrent(String current) {
+ this.current = current;
+ }
+
+ public String doNew() {
+ this.current = "New";
+ return null;
+ }
+
+ public String doOpen() {
+ this.current = "Open";
+ return null;
+ }
+
+ public String doClose() {
+ this.current = "Close";
+ return null;
+ }
+
+ public String doSave() {
+ this.current = "Save";
+ return null;
+ }
+
+ public String doSaveAll() {
+ this.current = "Save All";
+ return null;
+ }
+
+ public String doExit() {
+ this.current = "Exit";
+ return null;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropListenerBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropListenerBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropListenerBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropListenerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.RequestScoped;
+
+import org.richfaces.event.DropEvent;
+import org.richfaces.tests.metamer.bean.RichBean;
+import org.richfaces.tests.metamer.model.drag.DragValue;
+import org.richfaces.tests.metamer.model.drag.DropValue;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@RequestScoped
+@ManagedBean(name = "richDropListenerBean")
+public class RichDropListenerBean {
+
+ private DropEvent dropEvent;
+
+ @ManagedProperty("#{richDropTargetBean}")
+ private RichDropTargetBean richDropTargetBean;
+
+ public void processDragging(DropEvent dropEvent) {
+ RichBean.logToPage("* dropListener");
+
+ DragValue dragValue = (DragValue) dropEvent.getDragValue();
+ DropValue dropValue = (DropValue) dropEvent.getDropValue();
+
+ this.dropEvent = dropEvent;
+
+ richDropTargetBean.increaseDropValue();
+ if (dropEvent.getComponent().getClientId().endsWith("1")) {
+ richDropTargetBean.getDroppedValues1().put(dropValue, dragValue);
+ } else {
+ richDropTargetBean.getDroppedValues2().put(dropValue, dragValue);
+ }
+ }
+
+ public DropEvent getDropEvent() {
+ return dropEvent;
+ }
+
+ public RichDropTargetBean getRichDropTargetBean() {
+ return richDropTargetBean;
+ }
+
+ public void setRichDropTargetBean(RichDropTargetBean richDropBehaviorBean) {
+ this.richDropTargetBean = richDropBehaviorBean;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropTargetBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDropTargetBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropTargetBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichDropTargetBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIDropTarget;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.model.drag.DragValue;
+import org.richfaces.tests.metamer.model.drag.DropValue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richDropTargetBean")
+@ViewScoped
+public class RichDropTargetBean implements Serializable {
+
+ private static final long serialVersionUID = 4008175400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ private Map<DropValue, DragValue> droppedValues1 = new LinkedHashMap<DropValue, DragValue>();
+ private Map<DropValue, DragValue> droppedValues2 = new LinkedHashMap<DropValue, DragValue>();
+ private DropValue dropValue;
+ private int dropValueCounter = 1;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDropTarget.class, getClass());
+
+ attributes.setAttribute("acceptedTypes", "drg1, drg2");
+ attributes.setAttribute("render", "droppable1 droppable2");
+ attributes.setAttribute("rendered", true);
+
+ attributes.remove("actionExpression");
+ attributes.remove("action");
+ attributes.remove("actionListener");
+ attributes.remove("dropListener");
+ attributes.remove("dropValue");
+
+ increaseDropValue();
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Map<DropValue, DragValue> getDroppedValues1() {
+ return droppedValues1;
+ }
+
+ public Map<DropValue, DragValue> getDroppedValues2() {
+ return droppedValues2;
+ }
+
+ public void increaseDropValue() {
+ dropValue = new DropValue(dropValueCounter++);
+ }
+
+ public DropValue getDropValue() {
+ return dropValue;
+ }
+
+ public List<Entry<DropValue, DragValue>> getDroppedEntries1() {
+ List<Entry<DropValue, DragValue>> list = new LinkedList<Entry<DropValue, DragValue>>(droppedValues1.entrySet());
+ Collections.reverse(list);
+ return list;
+ }
+
+ public List<Entry<DropValue, DragValue>> getDroppedEntries2() {
+ List<Entry<DropValue, DragValue>> list = new LinkedList<Entry<DropValue, DragValue>>(droppedValues2.entrySet());
+ Collections.reverse(list);
+ return list;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichExtendedDataTableBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichExtendedDataTableBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichExtendedDataTableBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeSet;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.ajax4jsf.model.DataComponentState;
+import org.richfaces.component.UIDataTableBase;
+import org.richfaces.component.UIExtendedDataTable;
+import org.richfaces.model.Filter;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.ColumnSortingMap;
+import org.richfaces.tests.metamer.model.Employee;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:extendedDataTable.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richExtendedDataTableBean")
+@ViewScoped
+public class RichExtendedDataTableBean implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private transient DataComponentState dataTableState;
+ private Map<Object, Integer> stateMap = new HashMap<Object, Integer>();
+ private int page = 1;
+ // true = model, false = empty table
+ private boolean state = true;
+ // sorting
+ private ColumnSortingMap sorting = new ColumnSortingMap() {
+
+ private static final long serialVersionUID = 1L;
+
+ protected UIDataTableBase getBinding() {
+ return binding;
+ }
+
+ protected Attributes getAttributes() {
+ return attributes;
+ }
+ };
+ // filtering
+ private Map<String, Object> filtering = new HashMap<String, Object>();
+ // facets
+ private Map<String, String> facets = new HashMap<String, String>();
+ private transient UIExtendedDataTable binding;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIExtendedDataTable.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("rows", 30);
+ attributes.setAttribute("styleClass", "extended-data-table");
+ attributes.setAttribute("style", null);
+
+ // setup types
+ attributes.get("selection").setType(TreeSet.class);
+ attributes.get("selection").setMemberType(Integer.class);
+
+ // attributes which are already in page
+ attributes.remove("value");
+ attributes.remove("var");
+
+ // TODO attributes which needs to be tested another way
+ attributes.remove("filterVar");
+ attributes.remove("iterationStatusVar");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+
+ // facets initial values
+ facets.put("noData", "There is no data.");
+ facets.put("header", "Header");
+ facets.put("footer", "Footer");
+ facets.put("columnStateHeader", "State Header");
+ facets.put("columnStateFooter", "State Footer");
+ facets.put("columnCapitalHeader", "Capital Header");
+ facets.put("columnCapitalFooter", "Capital Footer");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public UIExtendedDataTable getBinding() {
+ return binding;
+ }
+
+ public void setBinding(UIExtendedDataTable binding) {
+ this.binding = binding;
+ }
+
+ /**
+ * Getter for page.
+ *
+ * @return page number that will be used by data scroller
+ */
+ public int getPage() {
+ return page;
+ }
+
+ /**
+ * Setter for page.
+ *
+ * @param page
+ * page number that will be used by data scroller
+ */
+ public void setPage(int page) {
+ this.page = page;
+ }
+
+ public Map<Object, Integer> getStateMap() {
+ return stateMap;
+ }
+
+ public void setStateMap(Map<Object, Integer> stateMap) {
+ this.stateMap = stateMap;
+ }
+
+ public DataComponentState getDataTableState() {
+ return dataTableState;
+ }
+
+ public void setDataTableState(DataComponentState dataTableState) {
+ this.dataTableState = dataTableState;
+ }
+
+ /**
+ * Getter for state.
+ *
+ * @return true if data should be displayed in table
+ */
+ public boolean isState() {
+ return state;
+ }
+
+ /**
+ * Setter for state.
+ *
+ * @param state
+ * true if data should be displayed in table
+ */
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+ public Filter<?> getFilterSexImpl() {
+ return new Filter<Employee>() {
+
+ public boolean accept(Employee e) {
+ String sex = (String) getFiltering().get("sex");
+ if (sex == null || sex.length() == 0 || sex.equalsIgnoreCase("all")
+ || sex.equalsIgnoreCase(e.getSex().toString())) {
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+
+ public Map<String, String> getFacets() {
+ return facets;
+ }
+
+ public ColumnSortingMap getSorting() {
+ return sorting;
+ }
+
+ public Map<String, Object> getFiltering() {
+ return filtering;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIFileUpload;
+import org.richfaces.model.UploadedFile;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.richfaces.event.FileUploadEvent;
+
+/**
+ * Managed bean for rich:fileUpload.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richFileUploadBean")
+@ViewScoped
+public class RichFileUploadBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private List<UploadedFile> files;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+ files = new ArrayList<UploadedFile>();
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIFileUpload.class, getClass());
+
+ attributes.setAttribute("addLabel", "Add ...");
+ attributes.setAttribute("clearAllLabel", "Clear All");
+ attributes.setAttribute("clearLabel", "Clear");
+ attributes.setAttribute("deleteLabel", "Delete");
+ attributes.setAttribute("noDuplicate", false);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("uploadLabel", "Upload");
+
+ // will be tested in another way
+ attributes.remove("validator");
+ attributes.remove("fileUploadListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<UploadedFile> getItems() {
+ return files;
+ }
+
+ public void listener(FileUploadEvent event) {
+ UploadedFile file = event.getUploadedFile();
+
+ if (file != null) {
+ files.add(file);
+ }
+ }
+
+ public String clearUploadedData() {
+ files.clear();
+ return null;
+ }
+
+ public boolean isRenderButton() {
+ return files.size() > 0;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.application.FacesMessage;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.context.FacesContext;
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.Size;
+import javax.validation.groups.Default;
+
+import org.richfaces.component.UIGraphValidator;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.validation.groups.ValidationGroup1;
+import org.richfaces.tests.metamer.validation.groups.ValidationGroup2;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed Bean for rich:graphValidator
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+@ManagedBean(name="richGraphValidatorBean")
+@ViewScoped
+public class RichGraphValidatorBean implements Serializable, Cloneable {
+
+ /** Generated UID */
+ private static final long serialVersionUID = -960575870621302059L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ @Size(min = 5, max = 15, message = "Wrong size for password")
+ private String password;
+ @Size(min = 5, max = 15, message = "Wrong size for password")
+ private String passwordConfirm;
+
+ @PostConstruct
+ public void init(){
+ logger = LoggerFactory.getLogger(getClass());
+ logger.info("initializing bean " + getClass().getName());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIGraphValidator.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("type", "org.richfaces.BeanValidator");
+ }
+
+ @AssertTrue(message = "Different passwords entered! [Default Group]")
+ public boolean isPasswordsEquals() {
+ return password.equals(passwordConfirm);
+ }
+
+ @AssertTrue(message = "Different passwords entered! [G1]", groups={ValidationGroup1.class})
+ public boolean isRovnakeHesla() {
+ return password.equals(passwordConfirm);
+ }
+
+ @AssertTrue(message = "Different passwords entered! [G2 + Default Group]", groups = {ValidationGroup2.class,Default.class})
+ public boolean isPokusUspesny() {
+ return password.equals(passwordConfirm);
+ }
+
+ public void storeNewPassword() {
+ FacesContext.getCurrentInstance().addMessage(null,
+ new FacesMessage(FacesMessage.SEVERITY_INFO, "Succesfully changed!", "Succesfully changed!"));
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getPasswordConfirm() {
+ return passwordConfirm;
+ }
+
+ public void setPasswordConfirm(String passwordConfirm) {
+ this.passwordConfirm = passwordConfirm;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHashParamBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichHashParamBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHashParamBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHashParamBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIHashParameter;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:hashParam.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richHashParamBean")
+@ViewScoped
+public class RichHashParamBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIHashParameter.class, getClass());
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInplaceInputBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInplaceInputBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInplaceInputBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import org.richfaces.component.UIInplaceInput;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:inplaceInput.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richInplaceInputBean")
+@ViewScoped
+public class RichInplaceInputBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String value1;
+ private String value2;
+ private String value3;
+ private String value4;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIInplaceInput.class, getClass());
+
+ attributes.setAttribute("defaultLabel", "Click here to edit");
+ attributes.setAttribute("editEvent", "click");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
+ attributes.setAttribute("saveOnBlur", true);
+ attributes.setAttribute("value", "RichFaces 4");
+
+ // TODO has to be tested in another way
+ attributes.remove("converter");
+ attributes.remove("converterMessage");
+ attributes.remove("validator");
+ attributes.remove("validatorMessage");
+ attributes.remove("valueChangeListener");
+
+ // TODO remove as soon as RF-10411 is fixed
+ attributes.setAttribute("style", null);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ @NotEmpty
+ public String getValue1() {
+ return value1;
+ }
+
+ public void setValue1(String value1) {
+ this.value1 = value1;
+ }
+
+ @Pattern(regexp = "[a-z].*")
+ public String getValue2() {
+ return value2;
+ }
+
+ public void setValue2(String value2) {
+ this.value2 = value2;
+ }
+
+ @Size(min = 3, max = 6)
+ public String getValue3() {
+ return value3;
+ }
+
+ public void setValue3(String value3) {
+ this.value3 = value3;
+ }
+
+ public String getValue4() {
+ return value4;
+ }
+
+ public void setValue4(String value4) {
+ this.value4 = value4;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInplaceSelectBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInplaceSelectBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInplaceSelectBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import org.richfaces.component.UIInplaceSelect;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.Model;
+import org.richfaces.tests.metamer.bean.RichBean;
+import org.richfaces.tests.metamer.model.Capital;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:inplaceSelect.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richInplaceSelectBean")
+@ViewScoped
+public class RichInplaceSelectBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ // FIXME: @ManagedProperty(value = "#{model.capitals}")
+ private List<Capital> capitals = Model.unmarshallCapitals();
+ private List<SelectItem> capitalsOptions = null;
+ private List<SelectItem> validationOptions = null;
+ private String value1;
+ private String value2;
+ private String value3;
+ private String value4;
+ private String value5;
+ private String requiredMessage = "value is required";
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ capitalsOptions = new ArrayList<SelectItem>();
+ validationOptions = new ArrayList<SelectItem>();
+ for (Capital capital : capitals) {
+ capitalsOptions.add(new SelectItem(capital.getState(), capital.getState()));
+ validationOptions.add(new SelectItem(capital.getState(), capital.getState()));
+ }
+ validationOptions.add(new SelectItem("@@", "@@"));
+ validationOptions.add(new SelectItem("", ""));
+ validationOptions.add(new SelectItem("RichFaces", "RichFaces"));
+ validationOptions.add(new SelectItem("richfaces", "richfaces"));
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIInplaceSelect.class, getClass());
+
+ attributes.setAttribute("defaultLabel", "Click here to edit");
+ attributes.setAttribute("editEvent", "click");
+ attributes.setAttribute("listHeight", "200px");
+ attributes.setAttribute("listWidth", "200px");
+ attributes.setAttribute("openOnEdit", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("saveOnBlur", true);
+ attributes.setAttribute("saveOnSelect", true);
+
+ // TODO has to be tested in another way
+ attributes.remove("converter");
+ attributes.remove("converterMessage");
+ attributes.remove("required");
+ attributes.remove("requiredMessage");
+ attributes.remove("validator");
+ attributes.remove("validatorMessage");
+ attributes.remove("valueChangeListener");
+
+ // TODO remove as soon as RF-10411 is resolved
+ attributes.setAttribute("changedStateClass", null);
+ attributes.setAttribute("disabledStateClass", null);
+ attributes.setAttribute("editStateClass", null);
+ attributes.setAttribute("readyStateClass", null);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+
+ public List<SelectItem> getCapitalsOptions() {
+ return capitalsOptions;
+ }
+
+ public void setCapitalsOptions(List<SelectItem> capitalsOptions) {
+ this.capitalsOptions = capitalsOptions;
+ }
+
+ public List<SelectItem> getValidationOptions() {
+ return validationOptions;
+ }
+
+ public void setValidationOptions(List<SelectItem> validationOptions) {
+ this.validationOptions = validationOptions;
+ }
+
+ @NotEmpty
+ public String getValue1() {
+ return value1;
+ }
+
+ public void setValue1(String value1) {
+ this.value1 = value1;
+ }
+
+ @Pattern(regexp = "[a-z].*")
+ public String getValue2() {
+ return value2;
+ }
+
+ public void setValue2(String value2) {
+ this.value2 = value2;
+ }
+
+ @Size(min = 3, max = 6)
+ public String getValue3() {
+ return value3;
+ }
+
+ public void setValue3(String value3) {
+ this.value3 = value3;
+ }
+
+ public String getValue4() {
+ return value4;
+ }
+
+ public void setValue4(String value4) {
+ this.value4 = value4;
+ }
+
+ public String getValue5() {
+ return value5;
+ }
+
+ public void setValue5(String value5) {
+ this.value5 = value5;
+ }
+
+ public String getRequiredMessage() {
+ return requiredMessage;
+ }
+
+ public void setRequiredMessage(String requiredMessage) {
+ this.requiredMessage = requiredMessage;
+ }
+
+ public void listener(ValueChangeEvent event) {
+ RichBean.logToPage("* value changed: " + event.getOldValue() + " -> " + event.getNewValue());
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInputNumberSliderBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInputNumberSliderBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInputNumberSliderBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+import org.richfaces.component.html.HtmlInputNumberSlider;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:inputNumberSlider.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richInputNumberSliderBean")
+@ViewScoped
+public class RichInputNumberSliderBean implements Serializable {
+
+ private static final long serialVersionUID = 595154649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private int value1;
+ private int value2;
+ private int value3;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(HtmlInputNumberSlider.class, getClass());
+
+ attributes.setAttribute("enableManualInput", true);
+ attributes.setAttribute("inputSize", 3);
+ attributes.setAttribute("maxlength", 10);
+ attributes.setAttribute("maxValue", 10);
+ attributes.setAttribute("minValue", -10);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
+ attributes.setAttribute("showBoundaryValues", true);
+ attributes.setAttribute("showInput", true);
+ attributes.setAttribute("step", 1);
+ attributes.setAttribute("value", 2);
+
+ // will be tested in another way
+ attributes.remove("valueChangeListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ @Min(2)
+ public int getValue1() {
+ return value1;
+ }
+
+ public void setValue1(int value1) {
+ this.value1 = value1;
+ }
+
+ @Max(2)
+ public int getValue2() {
+ return value2;
+ }
+
+ public void setValue2(int value2) {
+ this.value2 = value2;
+ }
+
+ public int getValue3() {
+ return value3;
+ }
+
+ public void setValue3(int value3) {
+ this.value3 = value3;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInputNumberSpinnerBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInputNumberSpinnerBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichInputNumberSpinnerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+import org.richfaces.component.html.HtmlInputNumberSpinner;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:inputNumberSpinner.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richInputNumberSpinnerBean")
+@ViewScoped
+public class RichInputNumberSpinnerBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private int value1;
+ private int value2;
+ private int value3;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(HtmlInputNumberSpinner.class, getClass());
+
+ attributes.setAttribute("enableManualInput", true);
+ attributes.setAttribute("maxValue", 10);
+ attributes.setAttribute("minValue", -10);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
+ attributes.setAttribute("step", 1);
+ attributes.setAttribute("value", 2);
+
+ // will be tested in another way
+ attributes.remove("valueChangeListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ @Min(2)
+ public int getValue1() {
+ return value1;
+ }
+
+ public void setValue1(int value1) {
+ this.value1 = value1;
+ }
+
+ @Max(2)
+ public int getValue2() {
+ return value2;
+ }
+
+ public void setValue2(int value2) {
+ this.value2 = value2;
+ }
+
+ public int getValue3() {
+ return value3;
+ }
+
+ public void setValue3(int value3) {
+ this.value3 = value3;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichJQueryBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichJQueryBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichJQueryBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIJQuery;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:jQuery.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>, Nick Belaevski
+ * @version $Revision$
+ */
+@ManagedBean(name = "richJQueryBean")
+@ViewScoped
+public class RichJQueryBean implements Serializable {
+
+ private static final long serialVersionUID = 111475400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private List<String> componentsDataList;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ componentsDataList = new ArrayList<String>();
+ addComponent();
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIJQuery.class, getClass());
+
+ attributes.setAttribute("event", "click");
+ attributes.setAttribute("name", "bubu");
+ attributes.setAttribute("query", "alert('immediate attachment')");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("selector", "#jQueryTestButton");
+ attributes.setAttribute("timing", "immediate");
+
+ // TODO must be tested in other way
+ attributes.remove("name");
+
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<String> getComponentsDataList() {
+ return componentsDataList;
+ }
+
+ public void addComponent() {
+ componentsDataList.add(UUID.randomUUID().toString());
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichListBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichListBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichListBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIList;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:list.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richListBean")
+@ViewScoped
+public class RichListBean implements Serializable {
+
+ private static final long serialVersionUID = 4008175400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIList.class, getClass());
+
+ attributes.setAttribute("type", "ordered");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("rows", 20);
+
+ // TODO has to be tested in other way
+ attributes.remove("iterationStatusVar");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+ attributes.remove("value");
+ attributes.remove("var");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuGroupBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuGroupBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuGroupBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuGroupBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import org.richfaces.component.UIMenuGroup;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:menuGroup.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richMenuGroupBean")
+@ViewScoped
+public class RichMenuGroupBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIMenuGroup.class, getClass());
+
+ attributes.setAttribute("label", "Save As...");
+ attributes.setAttribute("rendered", true);
+
+ attributes.remove("converter");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuItemBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuItemBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuItemBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import org.richfaces.component.UIMenuItem;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:menuItem.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richMenuItemBean")
+@ViewScoped
+public class RichMenuItemBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIMenuItem.class, getClass());
+
+ attributes.setAttribute("icon", "/resources/images/icons/create_doc.gif");
+ attributes.setAttribute("label", "New");
+ attributes.setAttribute("mode", "ajax");
+ attributes.setAttribute("rendered", true);
+
+ attributes.remove("action");
+ attributes.remove("actionListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuSeparatorBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuSeparatorBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMenuSeparatorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIMenuSeparator;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:menuSeparator.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+@ViewScoped
+public class RichMenuSeparatorBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIMenuSeparator.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIRichMessage;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Simple bean for rich:message component example.
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richMessageBean")
+@ViewScoped
+public class RichMessageBean implements Serializable {
+
+ /** Generated UID */
+ private static final long serialVersionUID = -5058242586244822846L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String simpleInput1;
+ private String simpleInput2;
+
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.info("initializing bean " + getClass().getName());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIRichMessage.class, getClass());
+
+ // setting up incorrect values to fire-up validator
+ simpleInput1 = "-5";
+ simpleInput2 = "-5";
+
+ // to get working this component example correctly is required that for
+ // property has been initialized
+ attributes.setAttribute("for", "simpleInput1");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("showSummary", true);
+ attributes.setAttribute("ajaxRendered", true); // make sense for a4j:commandButton submit
+
+ // workaround for missing attribute def from rich.taglib.xml
+ // to get it in list of attrs in metamer
+ attributes.setAttribute("dir", null); // direction
+ attributes.setAttribute("lang", null);
+ attributes.setAttribute("onclick", null);
+ attributes.setAttribute("ondblclick", null);
+ attributes.setAttribute("onkeydown", null);
+ attributes.setAttribute("onkeypress", null);
+ attributes.setAttribute("onkeyup", null);
+ attributes.setAttribute("onmousedown", null);
+ attributes.setAttribute("onmousemove", null);
+ attributes.setAttribute("onmouseout", null);
+ attributes.setAttribute("onmouseover", null);
+ attributes.setAttribute("onmouseup", null);
+ attributes.setAttribute("style", null);
+ attributes.setAttribute("styleClass", null);
+ attributes.setAttribute("title", null);
+
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public String getSimpleInput2() {
+ return simpleInput2;
+ }
+
+ public void setSimpleInput2(String simpleInput2) {
+ this.simpleInput2 = simpleInput2;
+ }
+
+ public String getSimpleInput1() {
+ return simpleInput1;
+ }
+
+ public void setSimpleInput1(String simpleInput1) {
+ this.simpleInput1 = simpleInput1;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.application.FacesMessage;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.UIRichMessages;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Simple bean for rich:messages component example.
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richMessagesBean")
+@ViewScoped
+public class RichMessagesBean implements Serializable {
+
+ /** Generated UID */
+ private static final long serialVersionUID = 4893769498631480379L;
+ // id for input element to bound some FacesMessage to it
+ private static final String INPUT1_ID = "form:simpleInput1";
+ private static final String INPUT2_ID = "form:simpleInput2";
+
+ private static Logger logger;
+ private Attributes attributes;
+
+ private String simpleInput1;
+ private String simpleInput2;
+
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.info("initializing bean " + getClass().getName());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIRichMessages.class, getClass());
+
+ simpleInput1 = "10";
+ simpleInput2 = "10";
+
+ attributes.setAttribute("ajaxRendered", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("for", "simpleInput1");
+ attributes.setAttribute("showSummary", true);
+
+ // add attributes with missing appropriate annotation
+ attributes.setAttribute("lang", null);
+ attributes.setAttribute("dir", null);
+ attributes.setAttribute("style", null);
+ attributes.setAttribute("styleClass", null);
+ attributes.setAttribute("title", null);
+
+ attributes.setAttribute("onclick", null);
+ attributes.setAttribute("ondblclick", null);
+ attributes.setAttribute("onkeydown", null);
+ attributes.setAttribute("onkeypress", null);
+ attributes.setAttribute("onkeyup", null);
+ attributes.setAttribute("onmousedown", null);
+ attributes.setAttribute("onmousemove", null);
+ attributes.setAttribute("onmouseup", null);
+ attributes.setAttribute("onmouseout", null);
+ attributes.setAttribute("onmouseover", null);
+
+ }
+
+ public void generateFacesError(ActionEvent event) {
+
+ logger.info(" ### Just called generateFacesError()");
+
+ FacesContext.getCurrentInstance().addMessage(null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Generated error message without binding to any component (global)",
+ "Generated error message without binding to any component (global)"));
+
+ FacesContext.getCurrentInstance().addMessage(null,
+ new FacesMessage(FacesMessage.SEVERITY_WARN,
+ "Generated warning message without binding to any component (global)",
+ "Generated warning message without binding to any component (global)"));
+
+ // Message bound to component on page
+ FacesContext.getCurrentInstance().addMessage(INPUT1_ID,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Generated error message for Input 1",
+ "Generated error message for Input 1"));
+
+ FacesContext.getCurrentInstance().addMessage(INPUT1_ID,
+ new FacesMessage(FacesMessage.SEVERITY_WARN, "Generated warning message for Input 1",
+ "Generated warning message for Input 1"));
+
+ FacesContext.getCurrentInstance().addMessage(INPUT2_ID,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Generated error message for Input 2",
+ "Generated error message for Input 2"));
+
+ FacesContext.getCurrentInstance().addMessage(INPUT2_ID,
+ new FacesMessage(FacesMessage.SEVERITY_WARN, "Generated warning message for Input 2",
+ "Generated warning message for Input 2"));
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getSimpleInput1() {
+ return simpleInput1;
+ }
+
+ public void setSimpleInput1(String simpleInput1) {
+ this.simpleInput1 = simpleInput1;
+ }
+
+ public String getSimpleInput2() {
+ return simpleInput2;
+ }
+
+ public void setSimpleInput2(String simpleInput2) {
+ this.simpleInput2 = simpleInput2;
+ }
+
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIPanel;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:panel.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richPanelBean")
+@ViewScoped
+public class RichPanelBean implements Serializable {
+
+ private static final long serialVersionUID = 48122475400649801L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanel.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+
+ // FIXME these attributes were not found automatically
+ attributes.setAttribute("bodyClass", null);
+ attributes.setAttribute("header", null);
+ attributes.setAttribute("headerClass", null);
+ attributes.setAttribute("onclick", null);
+ attributes.setAttribute("ondblclick", null);
+ attributes.setAttribute("onkeydown", null);
+ attributes.setAttribute("onkeypress", null);
+ attributes.setAttribute("onkeyup", null);
+ attributes.setAttribute("onmousedown", null);
+ attributes.setAttribute("onmousemove", null);
+ attributes.setAttribute("onmouseout", null);
+ attributes.setAttribute("onmouseover", null);
+ attributes.setAttribute("onmouseup", null);
+ attributes.setAttribute("style", null);
+ attributes.setAttribute("styleClass", null);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIPanelMenu;
+import org.richfaces.event.ItemChangeEvent;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.RichBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:panelMenu.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richPanelMenuBean")
+@ViewScoped
+public class RichPanelMenuBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ private String activeItem;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenu.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("style", "width: 200px;");
+
+ // will be tested in another way
+ attributes.remove("itemChangeListener");
+ attributes.remove("converter");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * An item change listener that logs to the page old and new value.
+ *
+ * @param event
+ * an event representing the activation of a user interface component
+ */
+ public void itemChangeListener(ItemChangeEvent event) {
+ activeItem = event.getNewItemName();
+ RichBean.logToPage("* item changed: " + (event.getOldItem() == null ? null : event.getOldItem().getId())
+ + " -> " + event.getNewItem().getId());
+ }
+
+ public String getActiveItem() {
+ return activeItem;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuGroupBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuGroupBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuGroupBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIPanelMenuGroup;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.RichBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:panelMenu.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richPanelMenuGroupBean")
+@ViewScoped
+public class RichPanelMenuGroupBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private Map<String, Boolean> expanded = new HashMap<String, Boolean>();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenuGroup.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("selectable", true);
+ attributes.setAttribute("mode", "ajax");
+
+ // already defined in source directly
+ attributes.remove("name");
+ attributes.remove("label");
+ attributes.remove("changeExpandListener");
+ attributes.remove("action");
+ attributes.remove("actionListener");
+
+ // expanded needs to be set separately
+ attributes.remove("expanded");
+ expanded.put("group2", true);
+ expanded.put("group23", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Map<String, Boolean> getExpanded() {
+ return expanded;
+ }
+
+ public void changeExpandListener(Object event) {
+ RichBean.logToPage("* group expanded");
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuItemBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuItemBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPanelMenuItemBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIPanelMenuItem;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:panelMenu.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richPanelMenuItemBean")
+@ViewScoped
+public class RichPanelMenuItemBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenuItem.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("selectable", true);
+
+ // already defined in source directly
+ attributes.remove("action");
+ attributes.remove("actionListener");
+ attributes.remove("name");
+ attributes.remove("label");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPopupPanelBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPopupPanelBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPopupPanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIPopupPanel;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:popupPanel.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richPopupPanelBean")
+@ViewScoped
+public class RichPopupPanelBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String value1;
+ private String value2;
+ private String value3;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIPopupPanel.class, getClass());
+
+ attributes.setAttribute("header", "popup panel header");
+ attributes.setAttribute("height", 300);
+ attributes.setAttribute("left", "auto");
+ attributes.setAttribute("maxHeight", 500);
+ attributes.setAttribute("maxWidth", 500);
+ attributes.setAttribute("minHeight", 300);
+ attributes.setAttribute("minWidth", 300);
+ attributes.setAttribute("moveable", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("resizeable", true);
+ attributes.setAttribute("top", "auto");
+ attributes.setAttribute("trimOverlayedElements", true);
+ attributes.setAttribute("width", 500);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getValue1() {
+ return value1;
+ }
+
+ public void setValue1(String value1) {
+ this.value1 = value1;
+ }
+
+ public String getValue2() {
+ return value2;
+ }
+
+ public void setValue2(String value2) {
+ this.value2 = value2;
+ }
+
+ public String getValue3() {
+ return value3;
+ }
+
+ public void setValue3(String value3) {
+ this.value3 = value3;
+ }
+
+ public String save() {
+ logger.warn("1: " + value1);
+ logger.warn("2: " + value2);
+ logger.warn("3: " + value3);
+ return null;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichProgressBarBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichProgressBarBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichProgressBarBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIProgressBar;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:progressBar.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richProgressBarBean")
+@ViewScoped
+public class RichProgressBarBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private boolean buttonRendered = true;
+ private Long startTime;
+ private boolean initialFacetRendered = true;
+ private boolean finishFacetRendered = true;
+ private boolean childrenRendered = false;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIProgressBar.class, getClass());
+
+ attributes.setAttribute("maxValue", 100);
+ attributes.setAttribute("minValue", 0);
+ attributes.setAttribute("interval", 500);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("value", -1);
+
+ // attributes tested in another way
+ attributes.remove("mode");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String startProcess() {
+ attributes.setAttribute("enabled", true);
+ buttonRendered = false;
+ setStartTime(new Date().getTime());
+ return null;
+ }
+
+ public Long getCurrentValue() {
+ if (Boolean.TRUE.equals(attributes.get("enabled").getValue())) {
+ Long current = (new Date().getTime() - startTime) / 500;
+ if (current >= 100) {
+ buttonRendered = true;
+ } else if (current.equals(0L)) {
+ return 1L;
+ }
+ return (new Date().getTime() - startTime) / 500;
+ }
+ if (startTime == null) {
+ return -1L;
+ } else {
+ return 101L;
+ }
+ }
+
+ public Long getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(Long startTime) {
+ this.startTime = startTime;
+ }
+
+ public boolean isButtonRendered() {
+ return buttonRendered;
+ }
+
+ public void setButtonRendered(boolean buttonRendered) {
+ this.buttonRendered = buttonRendered;
+ }
+
+ public boolean isFinishFacetRendered() {
+ return finishFacetRendered;
+ }
+
+ public void setFinishFacetRendered(boolean finishFacetRendered) {
+ this.finishFacetRendered = finishFacetRendered;
+ }
+
+ public boolean isInitialFacetRendered() {
+ return initialFacetRendered;
+ }
+
+ public void setInitialFacetRendered(boolean initialFacetRendered) {
+ this.initialFacetRendered = initialFacetRendered;
+ }
+
+ public boolean isChildrenRendered() {
+ return childrenRendered;
+ }
+
+ public void setChildrenRendered(boolean childrenRendered) {
+ this.childrenRendered = childrenRendered;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichSelectBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichSelectBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichSelectBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import org.richfaces.component.UISelect;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.Model;
+import org.richfaces.tests.metamer.bean.RichBean;
+import org.richfaces.tests.metamer.model.Capital;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:select.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richSelectBean")
+@ViewScoped
+public class RichSelectBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+// temporary fix because of a bug in MyFaces
+// @ManagedProperty(value = "#{model.capitals}")
+ private List<Capital> capitals;
+ private List<SelectItem> capitalsOptions = null;
+ private List<SelectItem> validationOptions = null;
+ private String value1;
+ private String value2;
+ private String value3;
+ private String value4;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ capitalsOptions = new ArrayList<SelectItem>();
+ validationOptions = new ArrayList<SelectItem>();
+// temporary fix because of a bug in MyFaces
+// for (Capital capital : capitals) {
+ for (Capital capital : Model.unmarshallCapitals()) {
+ capitalsOptions.add(new SelectItem(capital.getState(), capital.getState()));
+ validationOptions.add(new SelectItem(capital.getState(), capital.getState()));
+ }
+ validationOptions.add(new SelectItem("@@", "@@"));
+ validationOptions.add(new SelectItem("", ""));
+ validationOptions.add(new SelectItem("RichFaces", "RichFaces"));
+ validationOptions.add(new SelectItem("richfaces", "richfaces"));
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UISelect.class, getClass());
+
+ attributes.setAttribute("defaultLabel", "Click here to edit");
+ attributes.setAttribute("enableManualInput", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("showButton", true);
+
+ // TODO has to be tested in another way
+ attributes.remove("converter");
+ attributes.remove("converterMessage");
+ attributes.remove("required");
+ attributes.remove("requiredMessage");
+ attributes.remove("validator");
+ attributes.remove("validatorMessage");
+
+ attributes.remove("valueChangeListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+
+ public List<SelectItem> getCapitalsOptions() {
+ return capitalsOptions;
+ }
+
+ public void setCapitalsOptions(List<SelectItem> capitalsOptions) {
+ this.capitalsOptions = capitalsOptions;
+ }
+
+ public List<SelectItem> getValidationOptions() {
+ return validationOptions;
+ }
+
+ public void setValidationOptions(List<SelectItem> validationOptions) {
+ this.validationOptions = validationOptions;
+ }
+
+ @NotEmpty
+ public String getValue1() {
+ return value1;
+ }
+
+ public void setValue1(String value1) {
+ this.value1 = value1;
+ }
+
+ @Pattern(regexp = "[a-z].*")
+ public String getValue2() {
+ return value2;
+ }
+
+ public void setValue2(String value2) {
+ this.value2 = value2;
+ }
+
+ @Size(min = 3, max = 6)
+ public String getValue3() {
+ return value3;
+ }
+
+ public void setValue3(String value3) {
+ this.value3 = value3;
+ }
+
+ public String getValue4() {
+ return value4;
+ }
+
+ public void setValue4(String value4) {
+ this.value4 = value4;
+ }
+
+ public void listener(ValueChangeEvent event) {
+ RichBean.logToPage("* value changed: " + event.getOldValue() + " -> " + event.getNewValue());
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UITab;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:tab.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTabBean")
+@ViewScoped
+public class RichTabBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITab.class, getClass());
+
+ attributes.setAttribute("header", "tab1 header");
+ attributes.setAttribute("name", "tab1");
+ attributes.setAttribute("rendered", true);
+
+ // will be tested in another way
+ attributes.remove("converter");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import org.richfaces.component.UITabPanel;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import java.io.Serializable;
+
+/**
+ * Managed bean for rich:tabPanel.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTabPanelBean")
+@ViewScoped
+public class RichTabPanelBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITabPanel.class, getClass());
+
+ attributes.setAttribute("activeItem", "tab1");
+ attributes.setAttribute("rendered", true);
+
+ // will be tested in another way
+ attributes.remove("converter");
+ attributes.remove("itemChangeListener");
+
+ // remove as soon as https://issues.jboss.org/browse/RF-10588 is fixed
+ attributes.setAttribute("bypassUpdates", null);
+ attributes.get("bypassUpdates").setType(Boolean.class);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToggleControlBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToggleControlBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToggleControlBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToggleControlBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import org.richfaces.component.behavior.ToggleControl;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:toggleControl.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richToggleControlBean")
+@ViewScoped
+public class RichToggleControlBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getBehaviorAttributesFromFacesConfig(ToggleControl.class, getClass());
+
+ attributes.setAttribute("targetPanel", "panel1");
+ attributes.setAttribute("targetItem", "item1");
+
+ // TODO following attributes have to be tested in another way
+ attributes.remove("disableDefault");
+ attributes.remove("event"); // has to be literal
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTogglePanelBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTogglePanelBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTogglePanelBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UITogglePanel;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:togglePanel.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTogglePanelBean")
+@ViewScoped
+public class RichTogglePanelBean implements Serializable {
+
+ private static final long serialVersionUID = 67812341568562249L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITogglePanel.class, getClass());
+
+ attributes.setAttribute("activeItem", "item1");
+ attributes.setAttribute("rendered", true);
+
+ // will to be tested in another way
+ attributes.remove("converter");
+ attributes.remove("itemChangeListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTogglePanelItemBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTogglePanelItemBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTogglePanelItemBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UITogglePanelItem;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:togglePanelItem.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTogglePanelItemBean")
+@ViewScoped
+public class RichTogglePanelItemBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITogglePanelItem.class, getClass());
+
+ attributes.setAttribute("name", "item1");
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToolbarBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToolbarBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToolbarBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIToolbar;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:toolbar.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richToolbarBean")
+@ViewScoped
+public class RichToolbarBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIToolbar.class, getClass());
+
+ attributes.setAttribute("height", 28);
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToolbarGroupBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToolbarGroupBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichToolbarGroupBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIToolbarGroup;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:toolbar.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richToolbarGroupBean")
+@ViewScoped
+public class RichToolbarGroupBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIToolbarGroup.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UITooltip;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:list.
+ *
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTooltipBean")
+@ViewScoped
+public class RichTooltipBean implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private static Logger logger;
+ private Attributes attributes;
+
+ private int counter = 0;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITooltip.class, getClass());
+
+
+ // set defaults
+ attributes.setAttribute("attached", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("followMouse", true);
+ attributes.setAttribute("layout", "inline");
+ attributes.setAttribute("mode", "client");
+ attributes.setAttribute("showEvent", "mouseenter");
+ attributes.setAttribute("hideEvent", "mouseleave");
+ attributes.setAttribute("target", "form:panel");
+
+ // attributes that needs to be tested in other way
+ attributes.remove("converter");
+
+ // intentionally hidden attributes
+ attributes.remove("localValue");
+ attributes.remove("value");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public int getCounter() {
+ return counter++;
+ }
+
+ public Date getTooltipDate() {
+ return new Date();
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.event.ComponentSystemEvent;
+
+import org.richfaces.component.UITree;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.bean.Model;
+import org.richfaces.tests.metamer.model.tree.CompactDisc;
+import org.richfaces.tests.metamer.model.tree.CompactDiscXmlDescriptor;
+import org.richfaces.tests.metamer.model.tree.Company;
+import org.richfaces.tests.metamer.model.tree.Country;
+import org.richfaces.tests.metamer.model.tree.NamedNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTreeBean")
+@ViewScoped
+public class RichTreeBean implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private static Logger logger;
+ private Attributes attributes;
+ private List<NamedNode> root = new ArrayList<NamedNode>();
+ private Collection<? extends Serializable> selection;
+
+ // FIXME: @ManagedProperty(value = "#{model}")
+ // private Model model;
+
+ private Map<String, Country> countriesCache = new HashMap<String, Country>();
+ private Map<String, Company> companiesCache = new HashMap<String, Company>();
+
+ private boolean testLoadingFacet = false;
+ private boolean delayedRender = false;
+
+ private Map<NamedNode, Boolean> expanded = new HashMap<NamedNode, Boolean>();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITree.class, getClass());
+ attributes.get("rendered").setValue(true);
+ attributes.get("toggleType").setValue("ajax");
+ attributes.get("selectionType").setValue("ajax");
+
+ // attributes which needs to be tested another way
+ attributes.remove("selectionChangeListener");
+ attributes.remove("toggleListener");
+ attributes.remove("value");
+ attributes.remove("var");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+ attributes.remove("nodeType");
+
+ for (CompactDiscXmlDescriptor descriptor : Model.unmarshallCompactDiscs()) {
+ createCompactDisc(descriptor);
+ }
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ private CompactDisc createCompactDisc(CompactDiscXmlDescriptor descriptor) {
+ final Company company = findOrCreateCompany(descriptor);
+
+ CompactDisc cd = new CompactDisc(descriptor.getTitle(), descriptor.getArtist(), company, descriptor.getPrice(),
+ descriptor.getYear());
+ company.getCds().add(cd);
+ expanded.put(cd, false);
+ return cd;
+ }
+
+ private Company findOrCreateCompany(CompactDiscXmlDescriptor descriptor) {
+ final Country country = findOrCreateCountry(descriptor);
+
+ String companyName = descriptor.getCompany();
+ Company company = companiesCache.get(companyName);
+ if (company == null) {
+ company = new Company();
+ company.setName(companyName);
+ company.setParent(country);
+ country.getCompanies().add(company);
+ companiesCache.put(companyName, company);
+ expanded.put(company, false);
+ }
+ return company;
+ }
+
+ private Country findOrCreateCountry(CompactDiscXmlDescriptor descriptor) {
+ String countryName = descriptor.getCountry();
+ Country country = countriesCache.get(countryName);
+ if (country == null) {
+ country = new Country();
+ country.setName(countryName);
+ countriesCache.put(countryName, country);
+ expanded.put(country, false);
+ root.add(country);
+ }
+ return country;
+ }
+
+ public List<NamedNode> getRoot() {
+
+ return root;
+ }
+
+ public Collection<? extends Serializable> getSelection() {
+ return selection;
+ }
+
+ public void setSelection(Collection<? extends Serializable> selection) {
+ this.selection = selection;
+ }
+
+ public boolean isTestLoadingFacet() {
+ return testLoadingFacet;
+ }
+
+ public void setTestLoadingFacet(boolean testLoadingFacet) {
+ this.testLoadingFacet = testLoadingFacet;
+ }
+
+ public boolean isDelayedRender() {
+ return delayedRender;
+ }
+
+ public void setDelayedRender(boolean delayedRender) {
+ this.delayedRender = delayedRender;
+ }
+
+ public void preRenderView(ComponentSystemEvent event) {
+ if (delayedRender) {
+ try {
+ Thread.sleep(1000);
+ } catch (Exception e) {
+ throw new IllegalStateException();
+ }
+ }
+ }
+
+ public Map<NamedNode, Boolean> getExpanded() {
+ return expanded;
+ }
+
+ public void expandAll() {
+ for (Entry<NamedNode, Boolean> entry : expanded.entrySet()) {
+ entry.setValue(true);
+ }
+ }
+
+ public void collapseAll() {
+ for (Entry<NamedNode, Boolean> entry : expanded.entrySet()) {
+ entry.setValue(false);
+ }
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeListenerBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeListenerBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeListenerBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeListenerBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
+import org.richfaces.event.TreeSelectionChangeEvent;
+import org.richfaces.event.TreeToggleEvent;
+import org.richfaces.tests.metamer.bean.RichBean;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTreeListenerBean")
+@RequestScoped
+public class RichTreeListenerBean {
+
+ private TreeSelectionChangeEvent treeSelectionChangeEvent;
+ private TreeToggleEvent treeToggleEvent;
+
+ public void processSelectionChange(TreeSelectionChangeEvent event) {
+ this.treeSelectionChangeEvent = event;
+ RichBean.logToPage("* selection change listener invoked");
+ }
+
+ public void processToggle(TreeToggleEvent event) {
+ this.treeToggleEvent = event;
+ RichBean.logToPage("* tree toggle listener invoked");
+ }
+
+ public TreeSelectionChangeEvent getTreeSelectionChangeEvent() {
+ return treeSelectionChangeEvent;
+ }
+
+ public TreeToggleEvent getTreeToggleEvent() {
+ return treeToggleEvent;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeModelAdaptorBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeModelAdaptorBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeModelAdaptorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UITreeModelAdaptor;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTreeModelAdaptorBean")
+@ViewScoped
+public class RichTreeModelAdaptorBean implements Serializable {
+
+ private static final long serialVersionUID = 4008175400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITreeModelAdaptor.class, getClass());
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeModelRecursiveAdaptorBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelRecursiveAdaptorBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeModelRecursiveAdaptorBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeModelRecursiveAdaptorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.annotation.PostConstruct;
+import javax.el.ELContext;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.component.UITreeModelRecursiveAdaptor;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.model.treeAdaptor.RecursiveNode;
+import org.richfaces.tests.metamer.model.treeAdaptor.RecursiveNodeImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTreeModelRecursiveAdaptorBean")
+@ViewScoped
+public class RichTreeModelRecursiveAdaptorBean implements Serializable {
+
+
+ private static final long serialVersionUID = 1L;
+ private static Logger logger;
+ private static List<RecursiveNode> rootNodes;
+
+ private Attributes attributes;
+ private AtomicReference<Boolean> leafChildrenNullable = new AtomicReference<Boolean>(true);
+ private boolean useMapModel;
+ private Map<String, Boolean> expanded = new TreeMap<String, Boolean>();
+ private boolean rootNodesInitialized = false;
+
+ /*
+ * Nodes which was loaded lazily in the current request
+ */
+ private Set<String> lazyInitializedNodes = new LinkedHashSet<String>();
+
+ public Set<String> getLazyInitializedNodes() {
+ return lazyInitializedNodes;
+ }
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITreeModelRecursiveAdaptor.class, getClass());
+
+ attributes.get("rendered").setValue(true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<RecursiveNode> getRootNodes() {
+ if (!rootNodesInitialized) {
+ rootNodes = RecursiveNodeImpl.createChildren(true, "", 1, false);
+ }
+ return rootNodes;
+ }
+
+ public boolean isLeafChildrenNullable() {
+ return leafChildrenNullable.get();
+ }
+
+ public void setLeafChildrenNullable(boolean leafChildrenNullable) {
+ this.leafChildrenNullable.set(leafChildrenNullable);
+ }
+
+ public boolean isUseMapModel() {
+ return useMapModel;
+ }
+
+ public void setUseMapModel(boolean useMapModel) {
+ this.useMapModel = useMapModel;
+ }
+
+ public Map<String, Boolean> getExpanded() {
+ return expanded;
+ }
+
+ public static List<RecursiveNode> getRootNodesStatically() {
+ return rootNodes;
+ }
+
+ public static RichTreeModelRecursiveAdaptorBean getFacesContext() {
+ ELContext elContext = FacesContext.getCurrentInstance().getELContext();
+ return (RichTreeModelRecursiveAdaptorBean) elContext.getELResolver().getValue(elContext, null, "richTreeModelRecursiveAdaptorBean");
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeNodeBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeNodeBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeNodeBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeNodeBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UITreeNode;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTreeNodeBean")
+@ViewScoped
+public class RichTreeNodeBean implements Serializable {
+
+ private static final long serialVersionUID = 4008175400649809L;
+ private static Logger logger;
+ private Attributes[] attributes = new Attributes[3];
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ for (int i = 0; i < attributes.length; i++) {
+ attributes[i] = Attributes.getComponentAttributesFromFacesConfig(UITreeNode.class, getClass());
+ attributes[i].get("rendered").setValue(true);
+
+ // attributes which needs to be tested another way
+ attributes[i].remove("type");
+ attributes[i].remove("expanded");
+ }
+ }
+
+ public Attributes[] getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes[] attributes) {
+ this.attributes = attributes;
+ }
+}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichValidatorBean.java (from rev 22459, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichValidatorBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichValidatorBean.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.behavior.ClientValidatorImpl;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:validator.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richValidatorBean")
+@ViewScoped
+public class RichValidatorBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String stringValue = "RichFaces";
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getBehaviorAttributesFromFacesConfig(ClientValidatorImpl.class, getClass());
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getStringValue() {
+ return stringValue;
+ }
+
+ public void setStringValue(String stringValue) {
+ this.stringValue = stringValue;
+ }
+}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/TopicsInitializer.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/TopicsInitializer.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/TopicsInitializer.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -30,7 +30,6 @@
import javax.faces.event.SystemEventListener;
import javax.servlet.http.HttpServletRequest;
-import org.richfaces.application.push.EventAbortedException;
import org.richfaces.application.push.Session;
import org.richfaces.application.push.SessionPreSubscriptionEvent;
import org.richfaces.application.push.SessionSubscriptionEvent;
@@ -67,7 +66,7 @@
topic.addTopicListener(new SessionTopicListener() {
- public void processUnsubscriptionEvent(SessionUnsubscriptionEvent event) throws EventAbortedException {
+ public void processUnsubscriptionEvent(SessionUnsubscriptionEvent event) {
logger.info("unsubscibe from JMS topic");
TopicKey topicKey = event.getTopicKey();
Session session = event.getSession();
@@ -75,7 +74,7 @@
topicKey.getTopicAddress()));
}
- public void processSubscriptionEvent(SessionSubscriptionEvent event) throws EventAbortedException {
+ public void processSubscriptionEvent(SessionSubscriptionEvent event) {
logger.info("subscibe to JMS topic");
TopicKey topicKey = event.getTopicKey();
Session session = event.getSession();
@@ -87,7 +86,7 @@
topicKey.getTopicAddress(), hsr.getRemoteAddr()));
}
- public void processPreSubscriptionEvent(SessionPreSubscriptionEvent event) throws EventAbortedException {
+ public void processPreSubscriptionEvent(SessionPreSubscriptionEvent event) {
logger.info("presubscription to JMS topic");
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/AbstractNode.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/AbstractNode.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/AbstractNode.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -23,7 +23,7 @@
import java.io.Serializable;
-import org.richfaces.tests.metamer.bean.RichTreeModelRecursiveAdaptorBean;
+import org.richfaces.tests.metamer.bean.rich.RichTreeModelRecursiveAdaptorBean;
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/KeyConverter.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/KeyConverter.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/KeyConverter.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -29,7 +29,7 @@
import javax.faces.convert.FacesConverter;
import org.apache.commons.lang.CharUtils;
-import org.richfaces.tests.metamer.bean.RichTreeModelRecursiveAdaptorBean;
+import org.richfaces.tests.metamer.bean.rich.RichTreeModelRecursiveAdaptorBean;
import com.google.common.base.Strings;
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/RecursiveNodeImpl.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/RecursiveNodeImpl.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/treeAdaptor/RecursiveNodeImpl.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -30,7 +30,7 @@
import java.util.Map;
import java.util.Set;
-import org.richfaces.tests.metamer.bean.RichTreeModelRecursiveAdaptorBean;
+import org.richfaces.tests.metamer.bean.rich.RichTreeModelRecursiveAdaptorBean;
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
Modified: modules/tests/metamer/trunk/application/src/test/java/org/richfaces/tests/metamer/TestRichTreeModelRecursiveAdaptorBeanSerialization.java
===================================================================
--- modules/tests/metamer/trunk/application/src/test/java/org/richfaces/tests/metamer/TestRichTreeModelRecursiveAdaptorBeanSerialization.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/application/src/test/java/org/richfaces/tests/metamer/TestRichTreeModelRecursiveAdaptorBeanSerialization.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -38,7 +38,7 @@
import java.util.Set;
import java.util.TreeSet;
-import org.richfaces.tests.metamer.bean.RichTreeModelRecursiveAdaptorBean;
+import org.richfaces.tests.metamer.bean.rich.RichTreeModelRecursiveAdaptorBean;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -27,7 +27,7 @@
import org.jboss.test.selenium.request.RequestType;
import org.richfaces.component.SortOrder;
-import org.richfaces.tests.metamer.bean.RichColumnBean;
+import org.richfaces.tests.metamer.bean.rich.RichColumnBean;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.model.Capital;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/TestColumnFiltering.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/TestColumnFiltering.java 2011-05-01 20:52:05 UTC (rev 22459)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/TestColumnFiltering.java 2011-05-03 11:12:59 UTC (rev 22460)
@@ -31,7 +31,7 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.JQueryLocator;
-import org.richfaces.tests.metamer.bean.RichColumnBean;
+import org.richfaces.tests.metamer.bean.rich.RichColumnBean;
import org.richfaces.tests.metamer.model.Capital;
import org.testng.annotations.Test;
@@ -43,14 +43,13 @@
* @version $Revision$
*/
public class TestColumnFiltering extends AbstractColumnModelTest {
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/richColumn/filtering.xhtml");
}
-
JQueryLocator stateNameToFilter = pjq("input:text[id$=stateNameToFilter]");
private final static String stateName = "Maryland";
-
JQueryLocator tableWithFilter = pjq("table.rf-dt[id$=richDataTable1]");
JQueryLocator tableWithFilterExpression = pjq("table.rf-dt[id$=richDataTable2]");
@@ -77,17 +76,16 @@
richColumnBean.setStateNameToFilter(namePart);
Collection<Capital> expectedCapitals = Collections2.filter(capitals, new Predicate<Capital>() {
+
@Override
public boolean apply(Capital capital) {
return richColumnBean.getStateNameFilter().accept(capital);
}
-
});
assertEqualsCapitals(actualCapitals, expectedCapitals);
}
}
-
RichColumnBean richColumnBean = new RichColumnBean();
private void assertEqualsCapitals(Collection<Capital> actualCapitals, Collection<Capital> expectedCapitals) {
13 years, 8 months
JBoss Rich Faces SVN: r22459 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-01 16:52:05 -0400 (Sun, 01 May 2011)
New Revision: 22459
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java
Log:
Fix tests for showDetail and showSummary attribute
There was wrong locators - firstly locator for summary/detail
is not direct child of message container,
secondly this locator cannot be created by pjq (why... its clear)...
Another fix is remove waitForPageToLoad after form submit
performed by a4j:command button
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java 2011-04-29 15:26:10 UTC (rev 22458)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java 2011-05-01 20:52:05 UTC (rev 22459)
@@ -144,8 +144,8 @@
} else {
waitModel.until(elementPresent.locator(hCommandBtn));
selenium.click(hCommandBtn);
+ selenium.waitForPageToLoad();
}
- selenium.waitForPageToLoad();
}
private JQueryLocator getInput4Attribute(RichMessageAttributes attribute) {
@@ -217,12 +217,14 @@
public void testShowSummary() {
// span with class=rf-msg-sum should appear when set to true
- JQueryLocator summary = mainMessage.getChild(pjq("span.rf-msg-sum"));
+ JQueryLocator summary = mainMessage.getDescendant(jq("span.rf-msg-sum"));
attributes.setShowSummary(Boolean.TRUE);
- waitGui.until(elementPresent.locator(summary));
+ generateValidationMessages(false);
+ waitModel.until(elementPresent.locator(summary));
attributes.setShowSummary(Boolean.FALSE);
+ generateValidationMessages(false);
waitGui.until(isNotDisplayed.locator(summary));
}
@@ -233,12 +235,14 @@
public void testShowDetail() {
// span with class=rf-msg-det should appear when set to true
- JQueryLocator detail = mainMessage.getChild(pjq("span.rf-msg-det"));
+ JQueryLocator detail = mainMessage.getDescendant(jq("span.rf-msg-det"));
attributes.setShowDetail(Boolean.TRUE);
+ generateValidationMessages(false);
waitGui.until(elementPresent.locator(detail));
attributes.setShowDetail(Boolean.FALSE);
+ generateValidationMessages(false);
waitGui.until(isNotDisplayed.locator(detail));
}
13 years, 8 months