JBoss Rich Faces SVN: r10704 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/listShuttle and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-10-09 10:36:29 -0400 (Thu, 09 Oct 2008)
New Revision: 10704
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
Log:
'sourceRequired' and 'targetRequired' attributes work
Check "sourceCaption" and "targetCaption" facets
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java 2008-10-09 11:57:25 UTC (rev 10703)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java 2008-10-09 14:36:29 UTC (rev 10704)
@@ -11,11 +11,18 @@
private List<ListShuttleItem> items = null;
private List<ListShuttleItem> freeItems = null;
private boolean controlsVisible = true;
+
+ private boolean sourceRequired;
+ private boolean targetRequired;
+
+
public ListShuttleBean() {
init();
}
- private void init() {
+ public void init() {
+ sourceRequired = false;
+ targetRequired = false;
items = new ArrayList<ListShuttleItem>();
freeItems = new ArrayList<ListShuttleItem>();
for (int i = 0; i < 5; i++) {
@@ -61,4 +68,20 @@
public void setControlsVisible(boolean controlsVisible) {
this.controlsVisible = controlsVisible;
}
+
+ public boolean getSourceRequired() {
+ return sourceRequired;
+ }
+
+ public void setSourceRequired(boolean sourceRequired) {
+ this.sourceRequired = sourceRequired;
+ }
+
+ public boolean getTargetRequired() {
+ return targetRequired;
+ }
+
+ public void setTargetRequired(boolean targetRequired) {
+ this.targetRequired = targetRequired;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-10-09 11:57:25 UTC (rev 10703)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-10-09 14:36:29 UTC (rev 10704)
@@ -14,6 +14,8 @@
*/
public class ListShuttleTest extends SeleniumTestBase {
+ private String initMethod = "#{listShuttle.init}";
+
String parentId;
String availebleListId;
@@ -42,7 +44,16 @@
String hideId;
- private void init() {
+ String msgId;
+
+ String reqFormId;
+
+ String sourceRequiredId;
+
+ String targetRequiredId;
+
+ private void init(Template template) {
+ renderPage(template, initMethod);
parentId = getParentId() + "_form:";
availebleListId = parentId + "lstbody";
targetListId = parentId + "lstlTbody";
@@ -57,15 +68,54 @@
submitId = parentId + "submit";
resetId = parentId + "reset";
hideId = parentId + "hide";
+ msgId = getParentId() + "msgId";
+ reqFormId = getParentId() + "reqFormId";
+ sourceRequiredId = reqFormId + ":sourceRequiredId";
+ targetRequiredId = reqFormId + ":targetRequiredId";
+ }
+ /**
+ * 'sourceRequired' and 'targetRequired' attributes work
+ */
+ @Test
+ public void testSourceRequiredAndTargetRequired(Template template) {
+ init(template);
+ Assert.assertFalse(selenium.isElementPresent(msgId), "Message mustn't be rendered.");
+
+ selenium.click(targetRequiredId);
+ waitForAjaxCompletion();
+ clickAjaxCommandAndWait(submitId);
+ Assert.assertTrue(selenium.isElementPresent(msgId), "Message must be rendered. Target list is empty.");
+ clickById(copyAllId);
+ clickAjaxCommandAndWait(submitId);
+ Assert.assertFalse(selenium.isElementPresent(msgId), "Message mustn't be rendered.");
+
+ selenium.click(targetRequiredId);
+ waitForAjaxCompletion();
+
+ selenium.click(sourceRequiredId);
+ waitForAjaxCompletion();
+ clickAjaxCommandAndWait(submitId);
+ Assert.assertTrue(selenium.isElementPresent(msgId), "Message must be rendered. Source list is empty.");
+ clickById(removeAllId);
+ clickAjaxCommandAndWait(submitId);
+ Assert.assertFalse(selenium.isElementPresent(msgId), "Message mustn't be rendered.");
}
+ /**
+ * Check "sourceCaption" and "targetCaption" facets
+ */
@Test
+ public void testSourceCaptionAndTargetCaption(Template template) {
+ init(template);
+ Assert.assertTrue(selenium.isElementPresent(parentId + "ls:sourceCaptionId"), "Facet 'sourceCaption' must be rendered.");
+ Assert.assertTrue(selenium.isElementPresent(parentId + "ls:targetCaptionId"), "Facet 'targetCaption' must be rendered.");
+ }
+
+ @Test
public void testListShuttleComponent(Template template) {
- renderPage(template);
- init();
- reset();
-
+ init(template);
+
_checkVisibility(true);
// Check count
@@ -178,10 +228,6 @@
}
}
- private void reset() {
- clickAjaxCommandAndWait(resetId);
- }
-
private void _assertTableRowsCount(String tbId, int rows) {
writeStatus("Check items count for list id : " + tbId);
StringBuffer b = new StringBuffer("$('");
16 years, 3 months
JBoss Rich Faces SVN: r10703 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-10-09 07:57:25 -0400 (Thu, 09 Oct 2008)
New Revision: 10703
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java
Log:
PanelMenu: test style and classes, standard HTML attributes are output to client
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/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-10-09 10:06:22 UTC (rev 10702)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-10-09 11:57:25 UTC (rev 10703)
@@ -872,6 +872,17 @@
* @param expectedExpression - expected style attribute
*/
public void assertStyleAttribute(String elementId, String expectedExpression) {
+ assertStyleAttribute(elementId, expectedExpression, null);
+ }
+
+ /**
+ * Method to assert element style attribute with expected
+ * @param elementId - tested element id
+ * @param expectedExpression - expected style attribute
+ * @param message - Message will be inserted in the log after test failure
+ */
+
+ public void assertStyleAttribute(String elementId, String expectedExpression, String message) {
String styleAttribute = null;
try {
styleAttribute = selenium.getAttribute("//*[@id='" + elementId + "']/@style");
@@ -880,11 +891,16 @@
}
if (null == styleAttribute || !styleAttribute.toLowerCase().contains(expectedExpression.toLowerCase())) {
- Assert.fail("Element '" + elementId + "' with style '" + styleAttribute + "' doesn't contain '"
- + expectedExpression + "'");
+ String failureMsg = "Element '" + elementId + "' with style '" + styleAttribute + "' doesn't contain '"
+ + expectedExpression + "'";
+ if (null != message && !"".equals(message.trim())) {
+ failureMsg = message + ": " + failureMsg;
+ }
+ Assert.fail(failureMsg);
}
}
+
/**
* Asserts that expected columns count equals actual one.
* @param i the expected columns count
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 10:06:22 UTC (rev 10702)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-10-09 11:57:25 UTC (rev 10703)
@@ -281,6 +281,29 @@
AssertNotPresent(getParentId() + "_form3:pMenu_selected");
}
+ @Test
+ public void testStyleAndClassesStandardHTMLAttributesAreOutputToClient(Template template) {
+ renderPage(template, RESET_METHOD_NAME);
+
+ writeStatus("Check style and classes, standard HTML attributes are output to client");
+
+ String menuId = getParentId() + "_form3:pMenu_selected";
+ assertStyleAttribute(menuId, "font-size: 13px", "Style attribute was not output to client");
+ assertClassNames(menuId, new String[] { "noclass" }, "Class attribute was not output to client", true);
+
+ String menuTopGroupId = "tablehide" + getParentId() + "_form3:pGroup1_selected";
+ assertStyleAttribute(menuTopGroupId, "font-size: 14px", "topGroupStyle attribute was not output to client");
+ assertClassNames(menuTopGroupId, new String[] { "topGroupClass" }, "topGroupClass attribute was not output to client", true);
+
+ String menuGroupId = "tablehide" + getParentId() + "_form3:pGroup11_selected";
+ assertStyleAttribute(menuGroupId, "font-size: 15px", "groupStyle attribute was not output to client");
+ assertClassNames(menuGroupId, new String[] { "groupClass" }, "groupClass attribute was not output to client", true);
+
+ String menuItemId = "tablehide" + getParentId() + "_form3:pItem1_selected";
+ assertStyleAttribute(menuItemId, "font-size: 16px", "itemStyle attribute was not output to client");
+ assertClassNames(menuItemId, new String[] { "itemClass" }, "itemClass attribute was not output to client", true);
+ }
+
/**
* Test an icon.
*
16 years, 3 months
JBoss Rich Faces SVN: r10702 - in trunk/samples/columnsDemo/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-10-09 06:06:22 -0400 (Thu, 09 Oct 2008)
New Revision: 10702
Modified:
trunk/samples/columnsDemo/src/main/java/org/richfaces/samples/Bean.java
trunk/samples/columnsDemo/src/main/webapp/pages/index.jsp
trunk/samples/columnsDemo/src/main/webapp/pages/index.xhtml
Log:
Add filerMethod test
Modified: trunk/samples/columnsDemo/src/main/java/org/richfaces/samples/Bean.java
===================================================================
--- trunk/samples/columnsDemo/src/main/java/org/richfaces/samples/Bean.java 2008-10-09 09:18:31 UTC (rev 10701)
+++ trunk/samples/columnsDemo/src/main/java/org/richfaces/samples/Bean.java 2008-10-09 10:06:22 UTC (rev 10702)
@@ -8,6 +8,7 @@
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import javax.faces.event.ActionEvent;
@@ -31,12 +32,14 @@
Boolean description;
+ Integer maxValue;
public Bean() {
rowsCount = 5;
name = true;
type = true;
description = true;
+ maxValue = 15;
init();
}
@@ -91,6 +94,22 @@
return list;
}
+ public List<Integer[]> getInrementData() {
+ List<Integer[]> list = new ArrayList<Integer[]>();
+ for (int i = 0; i < 15; i++) {
+ list.add(new Integer[] {i});
+ }
+ return list;
+ }
+
+ public boolean filterMethod(Object o) {
+ Integer [] i = (Integer [])o;
+ if (i[0] > maxValue) {
+ return false;
+ }
+ return true;
+ }
+
public List<Column> getColumns() {
return columns;
}
@@ -131,4 +150,12 @@
this.rowsCount = rowsCount;
}
+ public Integer getMaxValue() {
+ return maxValue;
+ }
+
+ public void setMaxValue(Integer maxValue) {
+ this.maxValue = maxValue;
+ }
+
}
Modified: trunk/samples/columnsDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/columnsDemo/src/main/webapp/pages/index.jsp 2008-10-09 09:18:31 UTC (rev 10701)
+++ trunk/samples/columnsDemo/src/main/webapp/pages/index.jsp 2008-10-09 10:06:22 UTC (rev 10702)
@@ -9,9 +9,10 @@
<html>
+
<body>
<f:view>
- <h3>Test Facelets</h3>
+ <h3>Test Jsp</h3>
<br/><br/>
<h:form id="_form">
<table>
@@ -70,9 +71,32 @@
</dt:dataTable>
<br/>
<a4j:commandLink value="Ajax Submit" reRender="_data"></a4j:commandLink><br/>
- <h:commandLink value="Form Submit" action="xhtml"></h:commandLink>
+ <h:commandLink value="Form Submit" action="jsp"></h:commandLink>
</h:form>
+ <br/>
+ <h:form>
+ <b>Filter Method Test:</b>
+ <table>
+ <tr>
+ <td>Max Value:</td>
+ <td>
+ <h:inputText value="#{bean.maxValue}">
+ <a4j:support event="onchange" reRender="_data"></a4j:support>
+ </h:inputText>
+ </td>
+ </tr>
+ </table>
+ <dt:dataTable id="_data" value="#{bean.inrementData}" var="row">
+ <columns:columns value="Integer" index="index" var="col"
+ filterMethod="#{bean.filterMethod}">
+ <f:facet name="header">
+ <h:outputText value="#{col}"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{row[index]}"></h:outputText>
+ </columns:columns>
+ </dt:dataTable>
+ </h:form>
</f:view>
</body>
Modified: trunk/samples/columnsDemo/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/samples/columnsDemo/src/main/webapp/pages/index.xhtml 2008-10-09 09:18:31 UTC (rev 10701)
+++ trunk/samples/columnsDemo/src/main/webapp/pages/index.xhtml 2008-10-09 10:06:22 UTC (rev 10702)
@@ -7,6 +7,8 @@
xmlns:jstl="http://java.sun.com/jstl/core"
xmlns:dt="http://labs.jboss.com/jbossrichfaces/ui/dataTable"
xmlns:columns="http://labs.jboss.com/jbossrichfaces/ui/columns">
+
+ <body>
<f:view>
<h3>Test Facelets</h3>
<br/><br/>
@@ -69,6 +71,30 @@
<a4j:commandLink value="Ajax Submit" reRender="_data"></a4j:commandLink><br/>
<h:commandLink value="Form Submit" action="xhtml"></h:commandLink>
- </h:form>
+ </h:form>
+ <br/>
+ <h:form>
+ <b>Filter Method Test:</b>
+ <table>
+ <tr>
+ <td>Max Value:</td>
+ <td>
+ <h:inputText value="#{bean.maxValue}">
+ <a4j:support event="onchange" reRender="_data"></a4j:support>
+ </h:inputText>
+ </td>
+ </tr>
+ </table>
+ <dt:dataTable id="_data" value="#{bean.inrementData}" var="row">
+ <columns:columns value="Integer" index="index" var="col"
+ filterMethod="#{bean.filterMethod}">
+ <f:facet name="header">
+ <h:outputText value="#{col}"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{row[index]}"></h:outputText>
+ </columns:columns>
+ </dt:dataTable>
+ </h:form>
</f:view>
+ </body>
</html>
\ No newline at end of file
16 years, 3 months
JBoss Rich Faces SVN: r10701 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/panelMenu and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
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.
*
16 years, 3 months
JBoss Rich Faces SVN: r10700 - trunk/ui/progressBAR/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-10-09 05:13:17 -0400 (Thu, 09 Oct 2008)
New Revision: 10700
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
Log:
RF-4585
Modified: trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
===================================================================
--- trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-10-09 08:38:27 UTC (rev 10699)
+++ trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-10-09 09:13:17 UTC (rev 10700)
@@ -162,7 +162,7 @@
}
boolean enabled = (Boolean) this.getAttributes().get(_enabled);
- map.put(_enabled, Boolean.toString(enabled));
+ map.put(_enabled, new Boolean(enabled));
if (!isSimple(renderer)) {
map.put(_markup, getMarkup(facesContext, renderer));
16 years, 3 months
JBoss Rich Faces SVN: r10699 - trunk/test-applications/jsp/src/main/webapp/ContextMenu.
by richfaces-svn-commits@lists.jboss.org
Author: tromanovich
Date: 2008-10-09 04:38:27 -0400 (Thu, 09 Oct 2008)
New Revision: 10699
Modified:
trunk/test-applications/jsp/src/main/webapp/ContextMenu/ContextMenuProperty.jsp
Log:
Enable and disable JS API functions were removed
Modified: trunk/test-applications/jsp/src/main/webapp/ContextMenu/ContextMenuProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ContextMenu/ContextMenuProperty.jsp 2008-10-08 16:37:01 UTC (rev 10698)
+++ trunk/test-applications/jsp/src/main/webapp/ContextMenu/ContextMenuProperty.jsp 2008-10-09 08:38:27 UTC (rev 10699)
@@ -59,19 +59,14 @@
</h:selectBooleanCheckbox>
</h:panelGrid>
<br />
+ <h:outputText value="JavaScript API" style="FONT-WEIGHT: bold;" />
<h:panelGrid columns="2">
<a4j:commandLink
onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.show(event)"
value="show(event)"></a4j:commandLink>
<a4j:commandLink
- onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.hide(event)"
- value="hide(event)"></a4j:commandLink>
- <a4j:commandLink
- onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.enable()"
- value="enable()"></a4j:commandLink>
- <a4j:commandLink
- onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.disable()"
- value="disable()"></a4j:commandLink>
+ onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.hide()"
+ value="hide()"></a4j:commandLink>
</h:panelGrid>
<br />
<f:verbatim>
@@ -79,16 +74,10 @@
<br />
<a href="#" id="showID">show(event)</a>
<br />
- <a href="#" id="hideID">hide(event)</a>
- <br />
- <a href="#" id="enableID">enable()</a>
- <br />
- <a href="#" id="disableID">disable()</a>
+ <a href="#" id="hideID">hide()</a>
</f:verbatim>
<rich:componentControl attachTo="showID" event="onclick" for="contextMenuDefaultID" operation="show"></rich:componentControl>
<rich:componentControl attachTo="hideID" event="onclick" for="contextMenuDefaultID" operation="hide"></rich:componentControl>
- <rich:componentControl attachTo="enableID" event="onclick" for="contextMenuDefaultID" operation="enable"></rich:componentControl>
- <rich:componentControl attachTo="disableID" event="onclick" for="contextMenuDefaultID" operation="disable"></rich:componentControl>
<br/>
<br/>
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
16 years, 3 months
JBoss Rich Faces SVN: r10698 - in trunk/docs/cdkguide/en/src/main/docbook: modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-08 12:37:01 -0400 (Wed, 08 Oct 2008)
New Revision: 10698
Modified:
trunk/docs/cdkguide/en/src/main/docbook/master.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - "Component usage overview" chapter is started
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-10-08 16:19:41 UTC (rev 10697)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-10-08 16:37:01 UTC (rev 10698)
@@ -30,6 +30,11 @@
<bookinfo>
<title>RichFaces CDK Developer Guide</title>
<subtitle>This documentation is work in progress, thus some mistakes or incompleteness is possible</subtitle>
+ <author>
+ <firstname>Gleb</firstname>
+ <surname>Galkin</surname>
+ <email>ggalkin(a)exadel.com</email>
+ </author>
<copyright>
<year>2008</year>
<holder>Red Hat</holder>
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml 2008-10-08 16:19:41 UTC (rev 10697)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml 2008-10-08 16:37:01 UTC (rev 10698)
@@ -11,17 +11,19 @@
</chapterinfo>
<title>Component usage overview</title>
<para>
- Work in progress...
+ After the <emphasis role="bold"><property><inputDate></property></emphasis> component creation you could use it on a page.
+ Let's create a simple JSF project with the help of <code>maven-archetype-jsfwebapp</code> archetype.
</para>
- <!--
- TBD
+ <para>
+
+ </para>
+
<section id="devsample">
<title>Developer sample creation</title>
<para>
- Sample creation
+ Work in progress...
</para>
</section>
- -->
</chapter>
16 years, 3 months
JBoss Rich Faces SVN: r10697 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/panelMenu and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-10-08 12:19:41 -0400 (Wed, 08 Oct 2008)
New Revision: 10697
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: icons attributes apply: are output to client and images are accessible + selectedChild attribute is read on rendering and updated on form submit
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-08 13:09:19 UTC (rev 10696)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2008-10-08 16:19:41 UTC (rev 10697)
@@ -34,9 +34,12 @@
private String itemAction;
+ private String selectedChild = "Group1";
+
public RichPanelTestBean() {
value = "";
value2 = 0;
+ selectedChild = "Group1";
}
public String getValue() {
@@ -90,6 +93,22 @@
this.itemAction = itemAction;
}
+ /**
+ * Gets value of selectedChild field.
+ * @return value of selectedChild field
+ */
+ public String getSelectedChild() {
+ return selectedChild;
+ }
+
+ /**
+ * Set a new value for selectedChild field.
+ * @param selectedChild a new value for selectedChild field
+ */
+ public void setSelectedChild(String selectedChild) {
+ this.selectedChild = selectedChild;
+ }
+
public void actionListener(ActionEvent event) {
this.value = event.getComponent().getId();
}
@@ -114,11 +133,22 @@
return null;
}
+ public void switchSelectedChild() {
+ if("Group1".equals(selectedChild)) {
+ selectedChild = "Group2";
+ } else if("Group2".equals(selectedChild)) {
+ selectedChild = "Group3";
+ } else {
+ selectedChild = "Group1";
+ }
+ }
+
public void cleanValues() {
value = "";
value2 = 0;
panelValue = null;
panelValue2 = null;
itemAction = "";
+ selectedChild = "Group1";
}
}
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-08 13:09:19 UTC (rev 10696)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-10-08 16:19:41 UTC (rev 10697)
@@ -251,6 +251,41 @@
AssertTextNotEquals(itemAction, "NOT none", "Nothing is going to happen");
}
+ @Test
+ public void testIconsAttributesAreApplied(Template template) {
+ renderPage(template, RESET_METHOD_NAME);
+
+ writeStatus("Check icons attributes applied: are output to client and images are accessible");
+
+ String parentId = getParentId() + "_form3:";
+
+ testIcon("pGroup1_selected", "Triangle");
+ testIcon("pGroup2_selected", "Triangle");
+ testIcon("pGroup3_selected", "Triangle");
+
+ writeStatus("Expose group 2");
+ clickById("tablehide" + parentId + "pGroup2_selected");
+
+ testIcon("pGroup2_selected", "Spacer");
+ testIcon("pItem2_selected", "Chevron");
+ }
+
+ /**
+ * Test an icon.
+ *
+ * @param iconId id of image representing icon to be tested
+ * @param iconName type of icon e. g. Chevron, Triangle
+ */
+ private void testIcon(String iconId, String iconName) {
+ String parentId = getParentId() + "_form3:";
+
+ String iconSrc = selenium.getAttribute("//img[@id='leftIcon" + parentId + iconId + "']/@src");
+
+ if (null == iconSrc || !iconSrc.matches(".*" + iconName + ".*")) {
+ Assert.fail("It looks as if the icon is not proper. " + iconName + " icon is expected");
+ }
+ }
+
public String getTestUrl() {
return "pages/panelMenu/panelMenuTest.xhtml";
}
16 years, 3 months
JBoss Rich Faces SVN: r10696 - trunk/samples/columnsDemo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-10-08 09:09:19 -0400 (Wed, 08 Oct 2008)
New Revision: 10696
Added:
trunk/samples/columnsDemo/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
Log:
Added: trunk/samples/columnsDemo/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/samples/columnsDemo/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia (rev 0)
+++ trunk/samples/columnsDemo/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-10-08 13:09:19 UTC (rev 10696)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess">
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:" SHAPE="32,17,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules::0" NAME="item">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="xhtml::#faces#pages#index.xhtml" NAME="output"
+ PATH="/faces/pages/index.xhtml"
+ TARGET="rules:#faces#pages#index.xhtml" TITLE="xhtml"/>
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="jsp::#faces#pages#index.jsp" NAME="output1"
+ PATH="/faces/pages/index.jsp" TARGET="rules:#faces#pages#index.jsp" TITLE="jsp"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#faces#pages#index.jsp" PATH="/faces/pages/index.jsp" SHAPE="256,177,0,0"/>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#faces#pages#index.xhtml" PATH="/faces/pages/index.xhtml" SHAPE="256,33,0,0"/>
+</PROCESS>
16 years, 3 months
JBoss Rich Faces SVN: r10695 - trunk/samples/columnsDemo/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-10-08 09:07:49 -0400 (Wed, 08 Oct 2008)
New Revision: 10695
Modified:
trunk/samples/columnsDemo/src/main/webapp/index.jsp
Log:
Demo update
Modified: trunk/samples/columnsDemo/src/main/webapp/index.jsp
===================================================================
--- trunk/samples/columnsDemo/src/main/webapp/index.jsp 2008-10-08 13:07:00 UTC (rev 10694)
+++ trunk/samples/columnsDemo/src/main/webapp/index.jsp 2008-10-08 13:07:49 UTC (rev 10695)
@@ -7,8 +7,6 @@
<body>
<a href="faces/pages/index.jsp">JSP</a><br/>
<a href="faces/pages/index.xhtml">XHTML</a><br/>
- <a href="faces/pages/test.jsp">TestJSP</a>
- <a href="faces/pages/test.xhtml">TestXHTML</a>
</body>
</html>
\ No newline at end of file
16 years, 3 months