JBoss Rich Faces SVN: r12673 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-02-16 13:15:41 -0500 (Mon, 16 Feb 2009)
New Revision: 12673
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
Log:
RF-6069
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-16 16:42:22 UTC (rev 12672)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-16 18:15:41 UTC (rev 12673)
@@ -31,6 +31,8 @@
public class ComboBoxTest extends SeleniumTestBase {
+ private String comboBox;
+
private String comboboxField;
private String comboboxButton;
@@ -60,7 +62,7 @@
filterNewValues = attrForm + ":filterNewValues";
selectFirstOnUpdate = attrForm + ":selectFirstOnUpdate";
String mainForm = getParentId() + "_form";
- String comboBox = mainForm + ":comboBox";
+ comboBox = mainForm + ":comboBox";
comboboxField = comboBox + "comboboxField";
comboboxButton = comboBox + "comboboxButton";
comboboxList = comboBox + "list";
@@ -252,6 +254,24 @@
Assert.assertFalse(selenium.getAttribute("xpath=id('" + comboboxList + "')/span[1]@class").indexOf("selected") != -1);
}
+
+ /**
+ * Check combobox JS API: showList(), hideList(), enable(), disable().
+ */
+ @Test
+ public void testJSAPI(Template template) {
+ init(template);
+ selenium.runScript("var comboBox = document.getElementById('" + comboBox + "').component;");
+ selenium.runScript("comboBox.showList();");
+ Assert.assertTrue(selenium.isVisible(comboboxList));
+ selenium.runScript("comboBox.hideList();");
+ Assert.assertFalse(selenium.isVisible(comboboxList));
+ selenium.runScript("comboBox.disable();");
+ Assert.assertFalse(selenium.isEditable(comboboxField));
+ selenium.runScript("comboBox.enable();");
+ Assert.assertTrue(selenium.isEditable(comboboxField));
+ }
+
@Override
public void setValueEmpty() {
selenium.type(getParentId() + "autoTestForm:componentIdcomboboxValue", "");
15 years, 10 months
JBoss Rich Faces SVN: r12672 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/comboBox and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-02-16 11:42:22 -0500 (Mon, 16 Feb 2009)
New Revision: 12672
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
Log:
RF-6068
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java 2009-02-16 15:36:29 UTC (rev 12671)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java 2009-02-16 16:42:22 UTC (rev 12672)
@@ -37,6 +37,9 @@
private String value;
private String trace;
+ private Boolean directInputSuggestions;
+ private Boolean filterNewValues;
+ private Boolean selectFirstOnUpdate;
private List<SelectItem> treeItems;
private List<String> treeNames;
@@ -52,6 +55,9 @@
public void init() {
value = null;
trace = null;
+ directInputSuggestions = false;
+ filterNewValues = true;
+ selectFirstOnUpdate = true;
}
/**
@@ -113,4 +119,28 @@
Object value) {
return value != null ? "c:" + value.toString(): null;
}
+
+ public void setDirectInputSuggestions(Boolean directInputSuggestions) {
+ this.directInputSuggestions = directInputSuggestions;
+ }
+
+ public Boolean getDirectInputSuggestions() {
+ return directInputSuggestions;
+ }
+
+ public void setFilterNewValues(Boolean filterNewValues) {
+ this.filterNewValues = filterNewValues;
+ }
+
+ public Boolean getFilterNewValues() {
+ return filterNewValues;
+ }
+
+ public void setSelectFirstOnUpdate(Boolean selectFirstOnUpdate) {
+ this.selectFirstOnUpdate = selectFirstOnUpdate;
+ }
+
+ public Boolean getSelectFirstOnUpdate() {
+ return selectFirstOnUpdate;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-16 15:36:29 UTC (rev 12671)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-16 16:42:22 UTC (rev 12672)
@@ -31,12 +31,14 @@
public class ComboBoxTest extends SeleniumTestBase {
- private String comboBox;
+ private String comboboxField;
private String comboboxButton;
- private String list;
+ private String comboboxList;
+ private String comboboxValue;
+
private String submit;
private String value;
@@ -45,13 +47,24 @@
private String message;
+ private String directInputSuggestions;
+
+ private String filterNewValues;
+
+ private String selectFirstOnUpdate;
+
private void init(Template template) {
renderPage(null, template, "#{comboBean.init}");
- //String attrForm = getParentId() + "attrForm";
+ String attrForm = getParentId() + "attrForm";
+ directInputSuggestions = attrForm + ":directInputSuggestions";
+ filterNewValues = attrForm + ":filterNewValues";
+ selectFirstOnUpdate = attrForm + ":selectFirstOnUpdate";
String mainForm = getParentId() + "_form";
- comboBox = mainForm + ":comboBox";
+ String comboBox = mainForm + ":comboBox";
+ comboboxField = comboBox + "comboboxField";
comboboxButton = comboBox + "comboboxButton";
- list = comboBox + "list";
+ comboboxList = comboBox + "list";
+ comboboxValue = comboBox + "comboboxValue";
submit = mainForm + ":submit";
value = getParentId() + "value";
trace = getParentId() + "trace";
@@ -141,8 +154,8 @@
Assert.assertEquals(selenium.getText(value), "");
Assert.assertEquals(selenium.getText(trace), "");
selenium.click(comboboxButton);
- selenium.mouseMove("xpath=id('" + list + "')/span[2]");
- selenium.click("xpath=id('" + list + "')/span[2]");
+ selenium.mouseMove("xpath=id('" + comboboxList + "')/span[2]");
+ selenium.click("xpath=id('" + comboboxList + "')/span[2]");
clickAjaxCommandAndWait(submit);
Assert.assertEquals(selenium.getText(value), "22");
Assert.assertEquals(selenium.getText(trace), "changed");
@@ -158,13 +171,13 @@
init(template);
Assert.assertEquals(selenium.getText(message), "");
selenium.click(comboboxButton);
- selenium.mouseMove("xpath=id('" + list + "')/span[1]");
- selenium.click("xpath=id('" + list + "')/span[1]");
+ selenium.mouseMove("xpath=id('" + comboboxList + "')/span[1]");
+ selenium.click("xpath=id('" + comboboxList + "')/span[1]");
clickAjaxCommandAndWait(submit);
Assert.assertEquals(selenium.getText(message), "Value mustn't be equal 11.");
selenium.click(comboboxButton);
- selenium.mouseMove("xpath=id('" + list + "')/span[4]");
- selenium.click("xpath=id('" + list + "')/span[4]");
+ selenium.mouseMove("xpath=id('" + comboboxList + "')/span[4]");
+ selenium.click("xpath=id('" + comboboxList + "')/span[4]");
clickAjaxCommandAndWait(submit);
Assert.assertEquals(selenium.getText(message), "Value mustn't be equal 44.");
}
@@ -179,8 +192,8 @@
Assert.assertEquals(selenium.getText(value), "");
Assert.assertEquals(selenium.getText(message), "");
selenium.click(comboboxButton);
- selenium.mouseMove("xpath=id('" + list + "')/span[4]");
- selenium.click("xpath=id('" + list + "')/span[4]");
+ selenium.mouseMove("xpath=id('" + comboboxList + "')/span[4]");
+ selenium.click("xpath=id('" + comboboxList + "')/span[4]");
clickAjaxCommandAndWait(submit);
Assert.assertEquals(selenium.getText(value), "");
Assert.assertEquals(selenium.getText(message), "Value mustn't be equal 44.");
@@ -204,9 +217,41 @@
public void testConverter(Template template) {
init(template);
selenium.click(comboboxButton);
- Assert.assertEquals(selenium.getText("xpath=id('" + list + "')/span[3]"), "c:33");
+ Assert.assertEquals(selenium.getText("xpath=id('" + comboboxList + "')/span[3]"), "c:33");
}
+ /**
+ * Check components selection, filtering & presentation values
+ * by testing "directInputSuggestions", "filterNewValues",
+ * "selectFirstOnUpdate" attributes.
+ */
+ @Test
+ public void testSelectionFilteringAndPresentation(Template template) {
+ init(template);
+ type(comboboxField, "c");
+ Assert.assertEquals(selenium.getValue(comboboxField), "c");
+ selenium.click(comboboxButton);
+ clickAjaxCommandAndWait(directInputSuggestions);
+ type(comboboxField, "c");
+ Assert.assertEquals(selenium.getValue(comboboxField), "c:11");
+ selenium.click(comboboxButton);
+ clickAjaxCommandAndWait(directInputSuggestions);
+ type(comboboxField, "c:2");
+ Assert.assertEquals(selenium.getXpathCount("id('" + comboboxList + "')/span").intValue(), 1);
+ selenium.click(comboboxButton);
+ clickAjaxCommandAndWait(filterNewValues);
+ type(comboboxField, "c:2");
+ Assert.assertEquals(selenium.getXpathCount("id('" + comboboxList + "')/span").intValue(), 4);
+ selenium.click(comboboxButton);
+ clickAjaxCommandAndWait(filterNewValues);
+ selenium.click(comboboxButton);
+ Assert.assertTrue(selenium.getAttribute("xpath=id('" + comboboxList + "')/span[1]@class").indexOf("selected") != -1);
+ selenium.click(comboboxButton);
+ clickAjaxCommandAndWait(selectFirstOnUpdate);
+ selenium.click(comboboxButton);
+ Assert.assertFalse(selenium.getAttribute("xpath=id('" + comboboxList + "')/span[1]@class").indexOf("selected") != -1);
+ }
+
@Override
public void setValueEmpty() {
selenium.type(getParentId() + "autoTestForm:componentIdcomboboxValue", "");
15 years, 10 months
JBoss Rich Faces SVN: r12671 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-16 10:36:29 -0500 (Mon, 16 Feb 2009)
New Revision: 12671
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
Log:
https://jira.jboss.org/jira/browse/RF-6087
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2009-02-16 15:19:10 UTC (rev 12670)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2009-02-16 15:36:29 UTC (rev 12671)
@@ -176,6 +176,13 @@
}
@Test
+ public void testAjaxSingleWithProcessExternalValidation(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ tester.testAjaxSingleWithProcesExternalValidation(true);
+ }
+
+ @Test
public void testImmediate(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
15 years, 10 months
JBoss Rich Faces SVN: r12670 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-16 10:19:10 -0500 (Mon, 16 Feb 2009)
New Revision: 12670
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/usage.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5761
queue live demo section is corrected
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml 2009-02-16 15:11:59 UTC (rev 12669)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml 2009-02-16 15:19:10 UTC (rev 12670)
@@ -8,33 +8,30 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- There you could explore <b>optimization </b>parameters of the <b>queue
- </b>and learn how them influence the <b>Ajax requests</b>. This example
+ Here you could explore <b>optimization </b>parameters of the <b>queue
+ </b>and learn how they influence <b>Ajax requests</b>. This example
is a good start to learn about Ajax requests flood protection.
</p>
<p>
Pay attention to some points in the example:
</p>
- <ul>
- <li>
- Setting ignoreDupResponces to true - will reduce the count of DOM updates on typing inside input.
- (in initial state - count of updates will be equals to count of requests)
- </li>
- <li>
- Disabling the queue will causes fully asynchronous updates. Note
- that updates could appears not in the right order and you could get
- wrong string in the result.
+ <ul> <li>
+ Setting ignoreDupResponces to true reduces the count of DOM updates on typing inside the input.
+ (in initial state count of updates is equals to count of requests)
+ </li> <li>
+ Disabling the queue causes fully asynchronous updates. Note
+ that updates could appear not only in direct order and as a result you could get
+ wrong string.
</li>
<li>
- Setting request delay to greater value will reduce the requests count
- on fast typing. (More similar requests will be combined in the result)
+ Setting request delay to greater value reduces the requests count
+ on fast typing. (More similar requests are combined in the result)
</li>
- </ul>
- <p><i>
+ </ul> <p><i>
- Also pay your attention to the queue definition. As it mentioned in
- our documentation such definition (inside some form without name)
+ Also pay your attention to the queue definition. As it is mentioned in
+ our documentation (queue chapter in developer guide) such definition (inside some form without a name)
means that the queue becomes global for the form.
</i></p>
<fieldset class="demo_fieldset">
@@ -57,52 +54,47 @@
<b>Queue</b> provides subset of common <b>Ajax requests optimization attributes</b>
(<i>requestDelay, ignoreDupResponse and timeout</i>)
which you could explore at <h:commandLink value="Queue and Traffic Flood Protection" immediate="true" action="ajaxOptimization"/> section.
- These attributes defined within the queue will be used for all the request
- in case concrete components do not override them.
+ These attributes defined within the queue are used for all request
+ in case particular components do not override them.
</p>
</h:form>
<p>The queue component also provides some additional attributes in order to
- control queue itself:
+ control the queue itself:
</p>
<ul>
<li>
- <b>name</b> attribute which defines name for the queue.
+ <b>name</b> attribute defines a name for the queue.
</li>
<li>
- <b>disabled</b> - attribute which allows to disable the queue.
- Could be used in order to disable the global queue for particular
- views or in order to switch between same named queues with different
+ <b>disabled</b> attribute allows to disable the queue.
+ It could be used in order to disable the global queue for particular
+ views or in order to switch between queues of the same name with different
parameters.
</li>
<li>
- <b>size</b> - Defines the count of requests which could be queued
+ <b>size</b> defines the count of requests which could be queued
at the moment. -1 value means that queue has no size limit.
</li>
<li>
- <b>sizeExceededBehavior</b> - defines the behavior for the queue
- if size already exceeded and new request tried to be added to
+ <b>sizeExceededBehavior</b> defines the behavior for the queue
+ if size is already exceeded and a new request is tried to be added to
the queue. (dropNew, dropNext, fireNew, fireNext values allowed)
</li>
<li>
- <b>status</b> - attribute which allows to point status component
- to all the requests from the particular queue.
+ <b>status</b> attribute allows to point the status component
+ to all requests from a particular queue.
</li>
</ul>
<p>
- Full attributes table and usage ways you could explore at our
- queue documentation.
+ Complete attributes table and ways of usage you could explore in our
+ queue documentation (queue chapter in developer guide).
</p>
- <p><i>
- Also pay your attention to the queue definition. As it mentioned in
- our documentation such definition (inside some form without name)
- means that the queue becomes global for the form.
- </i></p>
<p class="note">
<i><b>Note:</b></i> queue component could get its parameters from
- EL bindings. But the component isn't designed to be updated via
- ajax requests. (There are no useful cases where the developers
- need to change the timeouts or request delays on the fly). So
+ EL bindings, but the component isn't designed to be updated via
+ ajax requests. As there are no useful cases where the developers
+ need to change the timeouts or request delays on the fly. Thus
as you could see the example below uses <b>h:commandButton</b> in order to
reebuild all the view and reinitialize the queue with new parameter
values.
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/usage.xhtml 2009-02-16 15:11:59 UTC (rev 12669)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/usage.xhtml 2009-02-16 15:19:10 UTC (rev 12670)
@@ -8,15 +8,15 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- The <b>Ajax Requests</b> area represent individual Ajax requests that can be fired by clicking the green images (a4j:commandLink components).
+ The <b>Ajax Requests</b> area represents individual Ajax requests that can be fired by clicking the green images (a4j:commandLink components).
A <i>JSF managed bean</i> on the server causes a random sleep time (4 seconds or less) to simulate
- different processing times for each request. The <a4j:queue/> (defined as global
- for the form where controls placed) handles all the requests and fires next one only after
- the responce from previous returned.
+ different processing time for each request. The <a4j:queue/> (defined as global
+ for the form where controls are placed) handles all requests and fires the next one only after
+ the response from the previous returned.
</p>
<p>
- The demo JavaScript on the client includes a function that subscribes to these queue events, so the UI is updated as queue events happen.<br />
- Just click on any sequence of green images (any number, any order) and you will see that each request is handled in the order they were fired.
+ The demo JavaScript on the client includes a function that is subscribed to these queue events, so the UI is updated as queue events happen.<br />
+ Just click on any sequence of green images (any number, any order) and you will see that each request is handled in the order it was fired.
</p>
<fieldset class="demo_fieldset">
15 years, 10 months
JBoss Rich Faces SVN: r12669 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-16 10:11:59 -0500 (Mon, 16 Feb 2009)
New Revision: 12669
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
Log:
https://jira.jboss.org/jira/browse/RF-6086
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2009-02-16 12:39:33 UTC (rev 12668)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2009-02-16 15:11:59 UTC (rev 12669)
@@ -26,7 +26,6 @@
import org.ajax4jsf.template.Template;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
-import org.testng.Assert;
import org.testng.annotations.Test;
public class SimpleTogglePanelTest extends SeleniumTestBase {
@@ -58,38 +57,48 @@
String serverBody = parentId + "panel2_body";
String clientBody = parentId + "panel3_body";
+ String ajaxPanelContent = parentId + "content1";
+ String serverPanelContent = parentId + "content2";
+ String clientPanelContent = parentId + "content3";
+
writeStatus("Click on client simple toggle panel. It should be opened.");
clickById(clientHeader);
- Assert.assertTrue(isVisibleById(clientBody));
+ AssertVisible(clientBody);
+ AssertPresent(clientPanelContent, "Content of client panel should always be present");
writeStatus("Click on client simple toggle panel again. It should be closed.");
clickById(clientHeader);
- Assert.assertFalse(isVisibleById(clientBody));
+ AssertNotVisible(clientBody);
+ AssertPresent(clientPanelContent, "Content of client panel should always be present");
writeStatus("Click on ajax simple toggle panel. It should be opened.");
clickById(ajaxHeader);
waitForAjaxCompletion();
AssertValueEquals(inputId, "panel1");
AssertTextEquals(outputId, "1");
- Assert.assertTrue(isVisibleById(ajaxBody));
+ AssertVisible(ajaxBody);
+ AssertPresent(ajaxPanelContent, "Content of open ajax panel should be present");
writeStatus("Click on ajax simple toggle panel again. It should be closed.");
clickById(ajaxHeader);
waitForAjaxCompletion();
AssertValueEquals(inputId, "panel1");
AssertTextEquals(outputId, "2");
- Assert.assertFalse(isVisibleById(ajaxBody));
+ AssertNotVisible(ajaxBody);
+ AssertNotPresent(ajaxPanelContent, "Content of closed ajax panel should not be present at all");
writeStatus("Click on server simple toggle panel. It should be opened.");
clickCommandAndWait(serverHeader);
AssertValueEquals(inputId, "panel2");
AssertTextEquals(outputId, "3");
- Assert.assertTrue(isVisibleById(serverBody));
+ AssertVisible(serverBody);
+ AssertPresent(serverPanelContent, "Content of open server panel should be present");
writeStatus("Click on server simple toggle panel. It should be closed.");
clickCommandAndWait(serverHeader);
AssertValueEquals(inputId, "panel2");
AssertTextEquals(outputId, "4");
- Assert.assertFalse(isVisibleById(serverBody));
+ AssertNotVisible(serverBody);
+ AssertNotPresent(serverPanelContent, "Content of closed server panel should not be present at all");
}
@Test
@@ -191,6 +200,14 @@
}
@Test
+ public void testWithExternalValidationFailure(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ autoTester.renderPage(template, null);
+ writeStatus("Check component in case of external validation failure: listeners are not invoked, model is not updated");
+ autoTester.testExtrenalValidationFailure();
+ }
+
+ @Test
public void testChildProcessingServerCase(Template template) {
renderPage(CHILD_PROCESSING_TEST_URL, template, "#{panelBean.reset2Server}");
writeStatus("Check children components processing for server mode");
15 years, 10 months
JBoss Rich Faces SVN: r12668 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-16 07:39:33 -0500 (Mon, 16 Feb 2009)
New Revision: 12668
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/hoverEcho.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5761
Live Demo. Language checking for components 3.3.0 and 3.3.1, names in example are corrected
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/hoverEcho.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/hoverEcho.xhtml 2009-02-16 10:38:02 UTC (rev 12667)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/hoverEcho.xhtml 2009-02-16 12:39:33 UTC (rev 12668)
@@ -8,9 +8,9 @@
<table width="400">
<tbody>
<tr>
+ <td><span onmouseover="updateName('Kate')" onmouseout="updateName('')">Kate</span></td>
+ <td><span onmouseover="updateName('John')" onmouseout="updateName('')">John</span></td>
<td><span onmouseover="updateName('Alex')" onmouseout="updateName('')">Alex</span></td>
- <td><span onmouseover="updateName('Jonh')" onmouseout="updateName('')">Jonh</span></td>
- <td><span onmouseover="updateName('Roger')" onmouseout="updateName('')">Roger</span></td>
</tr>
<rich:spacer height="10" />
<tr>
15 years, 10 months
JBoss Rich Faces SVN: r12667 - in trunk/ui: componentControl/src/main/java/org/richfaces/renderkit and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-02-16 05:38:02 -0500 (Mon, 16 Feb 2009)
New Revision: 12667
Modified:
trunk/ui/componentControl/src/main/java/org/richfaces/component/UIComponentControl.java
trunk/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java
trunk/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java
trunk/ui/core/src/main/java/org/ajax4jsf/component/UISelector.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
Log:
Component control generates unnecessary JavaScript on page when attachTo attribute is not defined
https://jira.jboss.org/jira/browse/RF-2302
Modified: trunk/ui/componentControl/src/main/java/org/richfaces/component/UIComponentControl.java
===================================================================
--- trunk/ui/componentControl/src/main/java/org/richfaces/component/UIComponentControl.java 2009-02-16 10:21:25 UTC (rev 12666)
+++ trunk/ui/componentControl/src/main/java/org/richfaces/component/UIComponentControl.java 2009-02-16 10:38:02 UTC (rev 12667)
@@ -57,8 +57,7 @@
* @return JavaScript eventString. Rebuild on every call, since
* can be in loop ( as in dataTable ) with different parameters.
*/
- public String getEventString()
- {
+ public String getEventString() {
String targetId = HtmlUtil.idsToIdSelector(getFor());
targetId = HtmlUtil.expandIdSelector(targetId, this, FacesContext.getCurrentInstance());
@@ -71,8 +70,6 @@
invocation.addParameter(Boolean.valueOf(isDisableDefault()));
return invocation.toScript();
-
-
}
public String getEncodedParametersMap() {
Modified: trunk/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java
===================================================================
--- trunk/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java 2009-02-16 10:21:25 UTC (rev 12666)
+++ trunk/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java 2009-02-16 10:38:02 UTC (rev 12667)
@@ -54,7 +54,7 @@
private static final String ON_LOAD = "onload";
protected Class<UIComponentControl> getComponentClass() {
- return UIComponentControl.class;
+ return UIComponentControl.class;
}
/**
@@ -72,20 +72,20 @@
* @param operation - operation performed on target components
*/
protected void checkValidity(String clientId, String name, String attachTiming, String forAttr, String operation) {
- if (!ON_LOAD.equals(attachTiming) && !IMMEDIATE.equals(attachTiming) && !ON_AVAILABLE.equals(attachTiming)) {
- throw new FacesException("The attachTiming attribute of the controlComponent (id='" + clientId
- + "') has an invalid value:'" + attachTiming + "'. It may have only the following values: '"
- + IMMEDIATE + "', '" + ON_LOAD + "', '" + ON_AVAILABLE + "'");
- }
-
- if (operation == null || operation.trim().length() == 0) {
- throw new FacesException("The operation attribute of the controlComponent (id='" + clientId
- + "') must be specified");
- }
+ if (!ON_LOAD.equals(attachTiming) && !IMMEDIATE.equals(attachTiming) && !ON_AVAILABLE.equals(attachTiming)) {
+ throw new FacesException("The attachTiming attribute of the controlComponent (id='" + clientId
+ + "') has an invalid value:'" + attachTiming + "'. It may have only the following values: '"
+ + IMMEDIATE + "', '" + ON_LOAD + "', '" + ON_AVAILABLE + "'");
+ }
+
+ if (operation == null || operation.trim().length() == 0) {
+ throw new FacesException("The operation attribute of the controlComponent (id='" + clientId
+ + "') must be specified");
+ }
}
protected String replaceClientIds(FacesContext context, UIComponent component, String selector) {
- return HtmlUtil.expandIdSelector(HtmlUtil.idsToIdSelector(selector), component, context);
+ return HtmlUtil.expandIdSelector(HtmlUtil.idsToIdSelector(selector), component, context);
}
/**
@@ -95,68 +95,72 @@
* @param component - component control
* @throws IOException - is thrown in case of writing to ResponceWriter exception
*/
- protected void attachEventAccordingToTimingOption(FacesContext context, UIComponent component) throws IOException {
- if (!(component instanceof UIComponentControl)) {
- return;
- }
-
- UIComponentControl componentControl = (UIComponentControl) component;
- String attachTo = componentControl.getAttachTo();
- String attachTiming = componentControl.getAttachTiming();
- boolean isImmediate = attachTiming.equals(IMMEDIATE);
- boolean isOnLoad = attachTiming.equals(ON_LOAD);
- boolean isOnAvailable = attachTiming.equals(ON_AVAILABLE);
-
- if (!(isImmediate || isOnLoad || isOnAvailable)) {
- // unknown value of property "attachTiming"
- return;
- }
-
- ResponseWriter writer = context.getResponseWriter();
- ComponentVariables variables = ComponentsVariableResolver.getVariables(this, componentControl);
-
- writer.startElement("script", componentControl);
- getUtils().writeAttribute(writer, "type", "text/javascript");
- writer.writeText("//", null);
- writer.write("<![CDATA[");
-
- String attachEventBodyStart = "\n{\n Richfaces.componentControl.attachEvent('";
- StringBuilder attachEventBodyEnd = new StringBuilder();
- attachEventBodyEnd.append("', '");
- attachEventBodyEnd.append(convertToString(variables.getVariable("event")));
- attachEventBodyEnd.append("', '");
- attachEventBodyEnd.append(convertToString(variables.getVariable("forAttr")));
- attachEventBodyEnd.append("', '");
- attachEventBodyEnd.append(convertToString(variables.getVariable("operation")));
- attachEventBodyEnd.append("', function() { return {");
- attachEventBodyEnd.append(convertToString(variables.getVariable("params")));
- attachEventBodyEnd.append("}; }, ");
- attachEventBodyEnd.append(convertToString(componentControl.isDisableDefault()));
- attachEventBodyEnd.append(");\n }");
-
- String pattern = "\\s*,\\s*";
- // "attachTo" attribute may contain several ids splitted by ","
- String[] result = attachTo.split(pattern);
- for (int i = 0; i < result.length; i++) {
- if (isOnLoad) {
- writer.write("\n jQuery(document).ready(function()");
- } else if (isOnAvailable) {
- UIComponent target = RendererUtils.getInstance().findComponentFor(context, component, result[i]);
- String clientId = (target != null) ? target.getClientId(context) : result[i];
- writer.write("\n Richfaces.onAvailable('" + clientId + "', function()");
- } else if (isImmediate) {
- }
- writer.write(attachEventBodyStart);
- writer.write(getUtils().escapeJavaScript(replaceClientIds(context, component, result[i])));
- writer.write(attachEventBodyEnd.toString());
-
- if (isOnLoad || isOnAvailable) {
- writer.write(");");
- }
- }
- writer.writeText("//", null);
- writer.write("]]>");
- writer.endElement("script");
+ protected void attachEventAccordingToTimingOption(FacesContext context,
+ UIComponent component) throws IOException {
+ if (!(component instanceof UIComponentControl)) {
+ return;
+ }
+
+ UIComponentControl componentControl = (UIComponentControl) component;
+ String attachTo = componentControl.getAttachTo();
+ String attachTiming = componentControl.getAttachTiming();
+ boolean isImmediate = attachTiming.equals(IMMEDIATE);
+ boolean isOnLoad = attachTiming.equals(ON_LOAD);
+ boolean isOnAvailable = attachTiming.equals(ON_AVAILABLE);
+
+ if (!(isImmediate || isOnLoad || isOnAvailable || attachTo == null || attachTo.length() == 0)) {
+ // unknown value of property "attachTiming"
+ return;
+ }
+
+ ResponseWriter writer = context.getResponseWriter();
+ ComponentVariables variables =
+ ComponentsVariableResolver.getVariables(this, componentControl);
+
+ writer.startElement("script", componentControl);
+ getUtils().writeAttribute(writer, "type", "text/javascript");
+ writer.writeText("//", null);
+ writer.write("<![CDATA[");
+
+ String attachEventBodyStart = "\n{\n Richfaces.componentControl.attachEvent('";
+ StringBuilder attachEventBodyEnd = new StringBuilder();
+ attachEventBodyEnd.append("', '");
+ attachEventBodyEnd.append(convertToString(variables.getVariable("event")));
+ attachEventBodyEnd.append("', '");
+ attachEventBodyEnd.append(convertToString(variables.getVariable("forAttr")));
+ attachEventBodyEnd.append("', '");
+ attachEventBodyEnd.append(convertToString(variables.getVariable("operation")));
+ attachEventBodyEnd.append("', function() { return {");
+ attachEventBodyEnd.append(convertToString(variables.getVariable("params")));
+ attachEventBodyEnd.append("}; }, ");
+ attachEventBodyEnd.append(convertToString(componentControl.isDisableDefault()));
+ attachEventBodyEnd.append(");\n }");
+
+ String pattern = "\\s*,\\s*";
+ // "attachTo" attribute may contain several ids splitted by ","
+ String[] result = attachTo.split(pattern);
+ for (int i = 0; i < result.length; i++) {
+ if (isOnLoad) {
+ writer.write("\n jQuery(document).ready(function()");
+ } else if (isOnAvailable) {
+ UIComponent target = RendererUtils.getInstance()
+ .findComponentFor(context, component, result[i]);
+ String clientId = (target != null) ? target.getClientId(context) : result[i];
+ writer.write("\n Richfaces.onAvailable('" + clientId + "', function()");
+ } else if (isImmediate) {
+ }
+
+ writer.write(attachEventBodyStart);
+ writer.write(getUtils().escapeJavaScript(replaceClientIds(context, component, result[i])));
+ writer.write(attachEventBodyEnd.toString());
+
+ if (isOnLoad || isOnAvailable) {
+ writer.write(");");
+ }
+ }
+ writer.writeText("//", null);
+ writer.write("]]>");
+ writer.endElement("script");
}
/**
@@ -165,7 +169,7 @@
* @return array of resources
*/
protected InternetResource[] getScripts() {
- return additionalScripts;
+ return additionalScripts;
}
/**
@@ -175,6 +179,6 @@
* @return String representation of object.
*/
private static String convertToString(Object obj ) {
- return ( obj == null ? "" : obj.toString() );
+ return ( obj == null ? "" : obj.toString() );
}
}
Modified: trunk/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java
===================================================================
--- trunk/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java 2009-02-16 10:21:25 UTC (rev 12666)
+++ trunk/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java 2009-02-16 10:38:02 UTC (rev 12667)
@@ -21,8 +21,9 @@
package org.richfaces.component;
+import java.util.List;
+
import javax.faces.FacesException;
-import javax.faces.component.UICommand;
import javax.faces.component.UIForm;
import javax.faces.component.UIInput;
import javax.faces.component.UIOutput;
@@ -30,8 +31,8 @@
import javax.faces.component.html.HtmlForm;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.richfaces.component.UIComponentControl;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
@@ -44,8 +45,7 @@
*
* @param testName name of the test case
*/
- public ComponentControlTest( String testName )
- {
+ public ComponentControlTest (String testName) {
super( testName );
}
@@ -109,7 +109,40 @@
String eventString = htmlInput.getAttributeValue("onclick");
assertNotNull(eventString);
assertTrue(eventString.contains("Richfaces.componentControl.performOperation"));
- String [] params = eventString.split(",");
+
+ eventStringParams(eventString);
+ }
+
+ public void testAttachString() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ List<?> scripts = page.getHtmlElementsByName("script");
+ String attachTo = componentControl.getAttachTo();
+ assertTrue("If on componentControl defined attachTo attr, on page must be presented attach script",
+ scripts.isEmpty() && (attachTo == null || attachTo.length() == 0));
+
+ String eventString = null;
+ for (Object obj : scripts) {
+ HtmlElement element = (HtmlElement) obj;
+ if (element.asText().contains("Richfaces.componentControl.attachEvent")) {
+ eventString = element.asText();
+ break;
+ }
+ }
+
+ if (attachTo == null || attachTo.length() == 0) {
+ assertNull(eventString);
+ } else {
+ assertNotNull(eventString);
+ assertTrue(eventString.contains("Richfaces.componentControl.attachEvent"));
+
+ eventStringParams(eventString);
+ }
+ }
+
+ private void eventStringParams(String eventString) {
+ String [] params = eventString.split(",");
assertEquals(6, params.length);
assertTrue(params[0].trim().endsWith("event"));
@@ -118,8 +151,6 @@
assertTrue(params[3].trim().startsWith("{"));
assertTrue(params[4].trim().endsWith("}"));
assertTrue(params[5].trim().endsWith("false)"));
-
- assertTrue( true );
}
public void testParametersMap() throws Exception {
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/component/UISelector.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/component/UISelector.java 2009-02-16 10:21:25 UTC (rev 12666)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/component/UISelector.java 2009-02-16 10:38:02 UTC (rev 12667)
@@ -47,7 +47,7 @@
private static final AjaxChildrenRenderer childrenRenderer = new AjaxChildrenRenderer() {
- protected Class getComponentClass() {
+ protected Class<? extends UIComponent> getComponentClass() {
return UISelector.class;
}
@@ -74,20 +74,19 @@
* @see org.ajax4jsf.framework.ajax.AjaxChildrenEncoder#encodeAjaxChild(javax.faces.context.FacesContext,
* java.lang.String, java.util.Set, java.util.Set)
*/
- public void encodeAjaxChild(FacesContext context, String path, Set ids,
- Set renderedAreas) throws IOException {
+ public void encodeAjaxChild(FacesContext context, String path,
+ Set<String> ids, Set<String> renderedAreas) throws IOException {
if (getChildCount() != 1) {
- throw new FacesException(
- "Selector component must have one, and only one, child");
+ throw new FacesException("Selector component must have one, and only one, child");
}
UIComponent child = (UIComponent) getChildren().get(0);
- Set ajaxKeys = getAjaxKeys();
+ Set<Object> ajaxKeys = getAjaxKeys();
if (null != ajaxKeys) {
String iterationProperty = getIterationProperty();
try {
Object savedKey = PropertyUtils.getProperty(child,
iterationProperty);
- for (Iterator iter = ajaxKeys.iterator(); iter.hasNext();) {
+ for (Iterator<Object> iter = ajaxKeys.iterator(); iter.hasNext();) {
Object key = (Object) iter.next();
PropertyUtils.setProperty(child, iterationProperty, key);
if (true) {
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java 2009-02-16 10:21:25 UTC (rev 12666)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java 2009-02-16 10:38:02 UTC (rev 12667)
@@ -125,7 +125,7 @@
return false;
}
String clientId = uiComponent.getClientId(facesContext);
- Map paramMap = facesContext.getExternalContext()
+ Map<String, String> paramMap = facesContext.getExternalContext()
.getRequestParameterMap();
Object value = paramMap.get(clientId);
boolean submitted = null != value;
15 years, 10 months
JBoss Rich Faces SVN: r12666 - in trunk/ui/fileUpload/src/main: resources/org/richfaces/renderkit/html/js and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-02-16 05:21:25 -0500 (Mon, 16 Feb 2009)
New Revision: 12666
Modified:
trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
https://jira.jboss.org/jira/browse/RF-6153
Modified: trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2009-02-13 17:08:28 UTC (rev 12665)
+++ trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2009-02-16 10:21:25 UTC (rev 12666)
@@ -272,6 +272,11 @@
<description>A JavaScript event handler called when the file entries were cleared</description>
</property>
<property>
+ <name>onfileuploadcomplete</name>
+ <classname>java.lang.String</classname>
+ <description>A JavaScript event handler called when file uploaded to server</description>
+ </property>
+ <property>
<name>addControlLabel</name>
<classname>java.lang.String</classname>
<description>Defines a label for an add button</description>
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2009-02-13 17:08:28 UTC (rev 12665)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2009-02-16 10:21:25 UTC (rev 12666)
@@ -1064,6 +1064,10 @@
this.watcher = new LoadWatcher(this.iframe, function(newState) {
this.finishProgressBar();
this.setState(newState);
+ // call onFileUploadComplete event handler
+ if(this.uploadObject.events.onfileuploadcomplete) {
+ this.uploadObject.element.fire("rich:onfileuploadcomplete", { state: newState });
+ }
}.bind(entry),
function (state) {
this.updateViewState(state);
@@ -1320,6 +1324,10 @@
var entry = this.entries[entryIndex];
if (entry) {
entry.setState(state);
+ // call onFileUploadComplete event handler
+ if(this.events.onfileuploadcomplete) {
+ this.element.fire("rich:onfileuploadcomplete", { state: state });
+ }
}
}
Modified: trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2009-02-13 17:08:28 UTC (rev 12665)
+++ trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2009-02-16 10:21:25 UTC (rev 12666)
@@ -194,7 +194,8 @@
ontyperejected : #{this:getAsEventHandler(context, component, "ontyperejected")},
onsizerejected : #{this:getAsEventHandler(context, component, "onsizerejected")},
onclear : #{this:getAsEventHandler(context, component, "onclear")},
- onadd : #{this:getAsEventHandler(context, component, "onadd")}
+ onadd : #{this:getAsEventHandler(context, component, "onadd")},
+ onfileuploadcomplete : #{this:getAsEventHandler(context, component, "onfileuploadcomplete")}
};
new FileUpload('#{clientId}','#{formId}','#{actionUrl}',#{this:getStopScript(context, component)}, #{this:getFileSizeScript(context, component)} ,'#{this:getProgressBarId(context, component)}', FileUpload.CLASSES, #{this:getLabelMarkup(context, component)}, #{maxCount}, events, #{component.attributes["disabled"]}, #{this:getAcceptedTypes(context, component)}, {'autoclear':#{component.attributes["autoclear"]},'autoUpload':#{component.attributes["immediateUpload"]},'noDuplicate':#{component.attributes["noDuplicate"]}, 'allowFlash':'#{allowFlash}', 'flashComponentUrl':'#{flashComponent}'},#{this:_getLabels(labels)},#{this:getChildrenParams(context, component)},'#{this:getSessionId(context, component)}');
15 years, 10 months
JBoss Rich Faces SVN: r12665 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-13 12:08:28 -0500 (Fri, 13 Feb 2009)
New Revision: 12665
Modified:
trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml
trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
Log:
https://jira.jboss.org/jira/browse/RF-6023
Pronoun "here" is replaced with the more meaningful phrases (such as wiki page, RichFaces Forum, etc. )
Modified: trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2009-02-13 17:06:06 UTC (rev 12664)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2009-02-13 17:08:28 UTC (rev 12665)
@@ -115,8 +115,8 @@
<section>
<title>Relevant resources links</title>
<para>
- Some additional information about usage of component can be found
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/ajaxListener.jsf?c=aj...">here</ulink>.</para>
+ Some additional information about usage of component can be found in this
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/ajaxListener.jsf?c=aj...">forum topic</ulink>.</para>
<para>
More information about <emphasis role="bold"><property><f:valueChangeListener></property></emphasis> can be found <ulink url=" http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/valueCha...">here</ulink>.
</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2009-02-13 17:06:06 UTC (rev 12664)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2009-02-13 17:08:28 UTC (rev 12665)
@@ -565,8 +565,8 @@
<property><rich:dataTable></property>
</emphasis> and <emphasis role="bold">
<property><rich:datascroller></property>
- </emphasis> in a context of Extended Data Model see <ulink
+ </emphasis> in a context of Extended Data Model see on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115636"
- >here</ulink>.</para>
+ >RichFaces Users Forum</ulink>.</para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2009-02-13 17:06:06 UTC (rev 12664)
+++ trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2009-02-13 17:08:28 UTC (rev 12665)
@@ -715,8 +715,8 @@
<property><rich:dataTable></property>
</emphasis> and <emphasis role="bold">
<property><rich:datascroller></property>
- </emphasis> in a context of Extended Data Model see <ulink
+ </emphasis> in a context of Extended Data Model see on the<ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115636"
- >here</ulink>.</para>
+ >RichFaces Users Forum</ulink>.</para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml 2009-02-13 17:06:06 UTC (rev 12664)
+++ trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml 2009-02-13 17:08:28 UTC (rev 12665)
@@ -115,8 +115,8 @@
role="bold">
<property><a4j:keepAlive></property>
</emphasis> usage and sources for the given example. </para>
- <para> Some additional information about usage of component can be found <ulink
+ <para> Some additional information about usage of component can be found on the<ulink
url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104989"
- >here</ulink>. </para>
+ >Ajax4JSF Users Forum</ulink>. </para>
</section>
</chapter>
Modified: trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml 2009-02-13 17:06:06 UTC (rev 12664)
+++ trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml 2009-02-13 17:08:28 UTC (rev 12665)
@@ -283,11 +283,11 @@
usage and sources for the given example.
</para>
<para>
- Some additional information about usage of component can be
+ Some additional information about usage of component can be on the
found
<ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052203#...">
- here
+ Ajax4JSF Users Forum
</ulink>
.
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2009-02-13 17:06:06 UTC (rev 12664)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2009-02-13 17:08:28 UTC (rev 12665)
@@ -559,8 +559,8 @@
</section>
<section>
<title>Relevant resources links</title>
- <para> Some additional information about usage of component can be found <ulink
+ <para> Some additional information about usage of component can be found on this <ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/panelMenu.jsf?c=panel..."
- >here</ulink>. </para>
+ >LiveDemo page</ulink>. </para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-02-13 17:06:06 UTC (rev 12664)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-02-13 17:08:28 UTC (rev 12665)
@@ -970,9 +970,9 @@
role="bold">
<property><rich:tree></property>
</emphasis> usage and sources for the given example. </para>
- <para>How to Expand/Collapse Tree Nodes from code, see <ulink
+ <para>How to Expand/Collapse Tree Nodes from code, see in this<ulink
url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes"
- >here</ulink>. </para>
+ >wiki article</ulink>. </para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2009-02-13 17:06:06 UTC (rev 12664)
+++ trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2009-02-13 17:08:28 UTC (rev 12665)
@@ -403,7 +403,7 @@
<section>
<title>Relevant Resources Links</title>
- <para>How to Expand/Collapse Tree Nodes from code see <ulink
- url="http://labs.jboss.com/wiki/ExpandCollapsetreeNodesAdaptor">here</ulink>. </para>
+ <para>How to Expand/Collapse Tree Nodes from code see in this<ulink
+ url="http://labs.jboss.com/wiki/ExpandCollapsetreeNodesAdaptor">wiki article</ulink>. </para>
</section>
</section>
15 years, 10 months
JBoss Rich Faces SVN: r12664 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-02-13 12:06:06 -0500 (Fri, 13 Feb 2009)
New Revision: 12664
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
https://jira.jboss.org/jira/browse/RF-5083 - The component section was updated according to info from Forum
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-02-13 17:05:16 UTC (rev 12663)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-02-13 17:06:06 UTC (rev 12664)
@@ -123,11 +123,11 @@
</para>
<para>
When the <emphasis role="bold"><property><rich:tree></property></emphasis> component is being rendered
- it iterates through model nodes and renders them using one of its <property>immediate</property>
+ it iterates over the model nodes and renders them using one of its <property>immediate</property>
<emphasis role="bold"><property><rich:treeNode></property></emphasis> children.
Data property of the current model <code>TreeNode</code> is exposed using
<emphasis><property>"var"</property></emphasis> attribute,
- so if <code>var="itemData"</code> you can refer to that data using <code>#{itemData}</code> syntax.
+ so if <code>var="station"</code> you can refer to that data using <code>#{station}</code> syntax.
</para>
<para>
In the following example the <emphasis role="bold"><property><rich:tree></property></emphasis> is
@@ -173,10 +173,13 @@
</mediaobject>
</figure>
-<para>There is a <code>"XmlTreeDataBuilder"</code> class
+<para>
+Implementation of the <emphasis role="bold"><property><rich:tree></property></emphasis> component
+provides another way to build a tree.
+This approach implies using a <code>"XmlTreeDataBuilder"</code> class
(<ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">
org.richfaces.component.xml.XmlTreeDataBuilder
- </ulink>) that allows transforming XML into structures of objects containing <code>"XmlNodeData"</code>
+ </ulink>) that allows to transform XML into structures of objects containing <code>"XmlNodeData"</code>
(<ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">
org.richfaces.component.xml.XmlNodeData
</ulink>) instances as data, which could be represented by the
@@ -197,7 +200,7 @@
</feed>
</station>]]></programlisting>
<para>
- Now you need a bean that holds a model nodes:
+ Now you need to create a bean that holds a model nodes:
</para>
<programlisting role="JAVA"><![CDATA[...
private TreeNode data;
15 years, 10 months