From richfaces-svn-commits at lists.jboss.org Thu Sep 23 07:19:08 2010 Content-Type: multipart/mixed; boundary="===============4328748331329928390==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r19322 - in modules/tests/metamer/trunk: application/src/main/webapp/components/a4jRegion and 1 other directories. Date: Thu, 23 Sep 2010 07:19:08 -0400 Message-ID: <201009231119.o8NBJ8Vw018589@svn01.web.mwc.hst.phx2.redhat.com> --===============4328748331329928390== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: lfryc(a)redhat.com Date: 2010-09-23 07:19:07 -0400 (Thu, 23 Sep 2010) New Revision: 19322 Added: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRe= gion/nested-decoration.xhtml modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRe= gion/nested-insertion.xhtml Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/test= s/metamer/bean/A4JRegionBean.java modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRe= gion/nested.xhtml modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tes= ts/metamer/ftest/a4jRegion/NestedRegionModel.java modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tes= ts/metamer/ftest/a4jRegion/TestNestedRegion.java Log: a4j:region tests in nested ui:decorate and ui:insert (RFPL-724) Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfac= es/tests/metamer/bean/A4JRegionBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tes= ts/metamer/bean/A4JRegionBean.java 2010-09-23 09:32:03 UTC (rev 19321) +++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tes= ts/metamer/bean/A4JRegionBean.java 2010-09-23 11:19:07 UTC (rev 19322) @@ -38,7 +38,7 @@ = /** * Managed bean for a4j:region. - * + * = * @author Exadel, Nick Belaevski, Pavol Pitonak * @version $Revision$ */ @@ -50,7 +50,8 @@ private static final SelectItem[] AVAILABLE_EXECUTE_OPTIONS =3D new Se= lectItem[] { new SelectItem(null, "default"), new SelectItem("@all"), new SelectItem("@form"), new SelectItem("@= region"), new SelectItem("@this"), new SelectItem("outerValueInput", "Outer"), new SelectItem("region= ValueInput", "Region"), - new SelectItem("nestedRegionValueInput", "Nested region") }; + new SelectItem("nestedRegionValueInput", "Nested region"), + new SelectItem("decorationValueInput", "Decoration"), new SelectIt= em("insertionValueInput", "Insertion") }; private static Logger logger; // for page simple.xhtml private Attributes attributes; @@ -60,10 +61,48 @@ private String execute; private String nestedExecute; private String outerExecute; + private String decorationExecute; + private String decorationValue; + private String insertionExecute; + + public String getInsertionExecute() { + return insertionExecute; + } + + public void setInsertionExecute(String insertionExecute) { + this.insertionExecute =3D insertionExecute; + } + + public String getInsertionValue() { + return insertionValue; + } + + public void setInsertionValue(String insertionValue) { + this.insertionValue =3D insertionValue; + } + + private String insertionValue; + + public String getDecorationExecute() { + return decorationExecute; + } + + public void setDecorationExecute(String decorationExecute) { + this.decorationExecute =3D decorationExecute; + } + + public String getDecorationValue() { + return decorationValue; + } + + public void setDecorationValue(String decorationValue) { + this.decorationValue =3D decorationValue; + } + private String outerValue; private String regionValue; private String nestedRegionValue; - private String lastExecutedLinkValue; + private String lastExecutedButtonValue; = /** * Initializes the managed bean. @@ -160,11 +199,11 @@ } = public void handleBehavior(AjaxBehaviorEvent event) { - lastExecutedLinkValue =3D (String) event.getComponent().getAttribu= tes().get("value"); + lastExecutedButtonValue =3D (String) event.getComponent().getAttri= butes().get("value"); } = - public String getLastExecutedLinkValue() { - return lastExecutedLinkValue; + public String getLastExecutedButtonValue() { + return lastExecutedButtonValue; } = public void handleDefaultsValueChange(ValueChangeEvent event) { @@ -172,6 +211,9 @@ = setOuterExecute(newValue); setExecute(newValue); + setDecorationExecute(newValue); + setInsertionExecute(newValue); setNestedExecute(newValue); + } } Added: modules/tests/metamer/trunk/application/src/main/webapp/components/a= 4jRegion/nested-decoration.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jR= egion/nested-decoration.xhtml (rev 0) +++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jR= egion/nested-decoration.xhtml 2010-09-23 11:19:07 UTC (rev 19322) @@ -0,0 +1,57 @@ + + + + + + + = +
+ = + Decoration + = + + + = + + + + + + + + + = +
+ +
+ + + \ No newline at end of file Added: modules/tests/metamer/trunk/application/src/main/webapp/components/a= 4jRegion/nested-insertion.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jR= egion/nested-insertion.xhtml (rev 0) +++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jR= egion/nested-insertion.xhtml 2010-09-23 11:19:07 UTC (rev 19322) @@ -0,0 +1,55 @@ + + + + + + + +
+ = + Insertion + = + + + + + + + + + + + = +
+ +
+ + \ No newline at end of file Modified: modules/tests/metamer/trunk/application/src/main/webapp/component= s/a4jRegion/nested.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jR= egion/nested.xhtml 2010-09-23 09:32:03 UTC (rev 19321) +++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jR= egion/nested.xhtml 2010-09-23 11:19:07 UTC (rev 19322) @@ -61,26 +61,8 @@ - + - - - - - - - - - - - - - - - - - - = = @@ -93,8 +75,10 @@ Outer: Region: + Decoration: + Insertion: Nested region: - Last executed link value: + Last executed button value: @@ -104,32 +88,56 @@

= - + + + + = + + + + = + + + + + = - - - - +
Region = + = - + + + = + + + + = + + + + + + = + + = - - - -
Nested region = = - + - - + + = + + + +
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfa= ces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/a4jRegion/NestedRegionModel.java 2010-09-23 09:32:03 UTC = (rev 19321) +++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/a4jRegion/NestedRegionModel.java 2010-09-23 11:19:07 UTC = (rev 19322) @@ -74,7 +74,7 @@ } = public enum Component { - OUTER("Outer"), REGION("Region"), NESTED("Nested region"); + OUTER("Outer"), REGION("Region"), NESTED("Nested region"), DECORAT= ION("Decoration"), INSERTION("Insertion"); = public final JQueryLocator select; public final JQueryLocator output; @@ -88,7 +88,7 @@ this.select =3D pjq("select[id$=3D{0}Select]").format(id); this.output =3D pjq("span[id$=3D{0}ValueOutput]").format(id); this.input =3D pjq("input:text[id$=3D{0}ValueInput]").format(i= d); - this.link =3D pjq("a[id$=3D{0}ValueLink]").format(id); + this.link =3D pjq("input:submit[id$=3D{0}ValueButton]").format= (id); this.executeOption =3D optionLabel(name); } = @@ -105,7 +105,8 @@ = public enum Execute { DEFAULT("default"), ALL("@all"), REGION("@region"), FORM("@form"),= THIS("@this"), COMPONENT_OUTER( - Component.OUTER), COMPONENT_REGION(Component.REGION), COMPONEN= T_NESTED(Component.NESTED); + Component.OUTER), COMPONENT_REGION(Component.REGION), COMPONEN= T_NESTED(Component.NESTED), COMPONENT_DECORATION( + Component.DECORATION), COMPONENT_INSERTION(Component.INSERTION= ); = public final OptionLocator option; public final Component componentBase; Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfa= ces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/a4jRegion/TestNestedRegion.java 2010-09-23 09:32:03 UTC (= rev 19321) +++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/a4jRegion/TestNestedRegion.java 2010-09-23 11:19:07 UTC (= rev 19322) @@ -1,6 +1,3 @@ -package org.richfaces.tests.metamer.ftest.a4jRegion; - -import static org.jboss.test.selenium.utils.URLUtils.buildUrl; /*************************************************************************= ****** * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat, Inc. and individual contributors @@ -22,6 +19,9 @@ * 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.ftest.a4jRegion; + +import static org.jboss.test.selenium.utils.URLUtils.buildUrl; import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format; import static org.testng.Assert.assertEquals; = @@ -88,9 +88,8 @@ } = if (execute =3D=3D Execute.REGION) { - if (component =3D=3D Component.REGION) { - expectedChanges.add(Component.REGION); - expectedChanges.add(Component.NESTED); + if (EnumSet.of(Component.REGION, Component.INSERTION, Componen= t.DECORATION).contains(component)) { + expectedChanges =3D EnumSet.complementOf(EnumSet.of(Compon= ent.OUTER)); } else if (component =3D=3D Component.NESTED) { expectedChanges.add(Component.NESTED); } --===============4328748331329928390==--