Author: dsvyatobatsko
Date: 2008-10-09 05:18:31 -0400 (Thu, 09 Oct 2008)
New Revision: 10701
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java
Log:
PanelMenu: component with rendered = false is not present on the page
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2008-10-09
09:13:17 UTC (rev 10700)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2008-10-09
09:18:31 UTC (rev 10701)
@@ -34,12 +34,15 @@
private String itemAction;
- private String selectedChild = "Group1";
+ private String selectedChild;
+ private boolean rendered;
+
public RichPanelTestBean() {
value = "";
value2 = 0;
selectedChild = "Group1";
+ rendered = true;
}
public String getValue() {
@@ -109,6 +112,22 @@
this.selectedChild = selectedChild;
}
+ /**
+ * Gets value of rendered field.
+ * @return value of rendered field
+ */
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ /**
+ * Set a new value for rendered field.
+ * @param rendered a new value for rendered field
+ */
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
public void actionListener(ActionEvent event) {
this.value = event.getComponent().getId();
}
@@ -143,6 +162,10 @@
}
}
+ public void hide() {
+ rendered = false;
+ }
+
public void cleanValues() {
value = "";
value2 = 0;
@@ -150,5 +173,6 @@
panelValue2 = null;
itemAction = "";
selectedChild = "Group1";
+ rendered = true;
}
}
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-10-09
09:13:17 UTC (rev 10700)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-10-09
09:18:31 UTC (rev 10701)
@@ -270,6 +270,17 @@
testIcon("pItem2_selected", "Chevron");
}
+ @Test
+ public void testRenderedComponentAttribute(Template template) {
+ renderPage(template, RESET_METHOD_NAME);
+
+ writeStatus("Check the component with rendered = false is not present on the
page");
+
+ AssertPresent(getParentId() + "_form3:pMenu_selected");
+ clickCommandAndWait(getParentId() + "_form3:_hide");
+ AssertNotPresent(getParentId() + "_form3:pMenu_selected");
+ }
+
/**
* Test an icon.
*
Show replies by date