JBoss Rich Faces SVN: r16191 - root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-12-22 19:09:13 -0500 (Tue, 22 Dec 2009)
New Revision: 16191
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java
Log:
revert changes
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java 2009-12-23 00:07:34 UTC (rev 16190)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java 2009-12-23 00:09:13 UTC (rev 16191)
@@ -60,11 +60,6 @@
public Renderer renderer();
/**
- * <p class="changed_added_4_0">The value of this annotation attribute defines JSF component associated with this tag.</p>
- * @return
- */
- public Component component();
- /**
* <p class="changed_added_4_0">Taglib url in which generated tag will be defined. By default CDK uses url
* defined in the built project.</p>
*
15 years, 2 months
JBoss Rich Faces SVN: r16190 - root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-12-22 19:07:34 -0500 (Tue, 22 Dec 2009)
New Revision: 16190
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java
Log:
add "component()" attribute.
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java 2009-12-22 14:09:09 UTC (rev 16189)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java 2009-12-23 00:07:34 UTC (rev 16190)
@@ -60,6 +60,11 @@
public Renderer renderer();
/**
+ * <p class="changed_added_4_0">The value of this annotation attribute defines JSF component associated with this tag.</p>
+ * @return
+ */
+ public Component component();
+ /**
* <p class="changed_added_4_0">Taglib url in which generated tag will be defined. By default CDK uses url
* defined in the built project.</p>
*
15 years, 2 months
JBoss Rich Faces SVN: r16189 - in branches/community/3.3.X/samples/richfaces-demo/functional-test: src/test/java/org/jboss/richfaces/integrationTest/stateManager and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2009-12-22 09:09:09 -0500 (Tue, 22 Dec 2009)
New Revision: 16189
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/testng.xml
Log:
https://jira.jboss.org/jira/browse/RFPL-300
* test refactored -- added skipping tests if running with JSF 1.2
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2009-12-22 12:20:55 UTC (rev 16188)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2009-12-22 14:09:09 UTC (rev 16189)
@@ -73,6 +73,7 @@
<demo.deployable>${demo.deployable.directory}/${demo.deployable.file}</demo.deployable>
<demo.deployable.directory>${project.build.directory}</demo.deployable.directory>
<demo.deployable.file>richfaces-demo.war</demo.deployable.file>
+ <jsf.majorVersion>1</jsf.majorVersion>
</properties>
<build>
<finalName>${project.artifactId}</finalName>
@@ -225,7 +226,7 @@
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
- <argLine>-Dbrowser='${browser}' -Dcontext.root='${context.root}' -Dcontext.path='${context.path}' -Dselenium.host='${selenium.host}' -Dselenium.port='${selenium.port}' -Dselenium.debug='${selenium.debug}' -Dselenium.maximize='${selenium.maximize}' -Dmaven.resources.dir='${resources.dir}' -Dmaven.project.build.directory='${project.build.directory}'</argLine>
+ <argLine>-Dbrowser='${browser}' -Dcontext.root='${context.root}' -Dcontext.path='${context.path}' -Dselenium.host='${selenium.host}' -Dselenium.port='${selenium.port}' -Dselenium.debug='${selenium.debug}' -Dselenium.maximize='${selenium.maximize}' -Dmaven.resources.dir='${resources.dir}' -Dmaven.project.build.directory='${project.build.directory}' -Djsf.majorVersion='${jsf.majorVersion}'</argLine>
<firefoxProfileTemplate>${firefoxProfileTemplate}</firefoxProfileTemplate>
<properties>
<property>
@@ -249,6 +250,7 @@
</activation>
<properties>
<demo.artifactId.suffix>-jsf2</demo.artifactId.suffix>
+ <jsf.majorVersion>2</jsf.majorVersion>
</properties>
</profile>
<!-- Container Profile -->
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java 2009-12-22 12:20:55 UTC (rev 16188)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java 2009-12-22 14:09:09 UTC (rev 16189)
@@ -24,18 +24,19 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotSame;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
import org.jboss.test.selenium.waiting.Condition;
import org.jboss.test.selenium.waiting.Wait;
+import org.testng.SkipException;
import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
/**
- * A test case for State Manager API. It verifies https://jira.jboss.org/jira/browse/RF-8204. To run this
- * test, demo has to run on top of JSF 2 and server-side state serialization has to be switched on.
+ * A test case for State Manager API. It verifies https://jira.jboss.org/jira/browse/RF-8204. To run this test, demo has
+ * to run on top of JSF 2 and server-side state serialization has to be switched on. If the test suite is launched with
+ * JSF 1.2, all tests in this class will be skipped.
*
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
@@ -45,42 +46,42 @@
private final String LOC_HIDDEN_INPUT_PREFORMATTED = getLoc("HIDDEN_INPUT_PREFORMATTED");
private final String LOC_LINK = getLoc("LINK");
- /**
- * Tests behavior of the application after Ajax request. It clicks on the link in the form on the page. There
- * are three forms on the page, each of them has to contain the same value which cannot change after Ajax request.
- */
- @Test
- public void testAjaxRequest() {
- String [] oldValues = new String[3];
- getValuesAndVerify(oldValues);
-
-
- selenium.click(LOC_LINK);
- Wait.failWith("The form did not change").until(new Condition() {
- public boolean isTrue() {
- return selenium.getText(LOC_LINK).equals("(To login)");
- }
- });
-
- String [] newValues = new String[3];
- getValuesAndVerify(newValues);
-
- assertEquals(oldValues[0], newValues[0],
- "The value attribute in all forms should not change after an Ajax request.");
- }
+ /**
+ * Tests behavior of the application after Ajax request. It clicks on the link in the form on the page. There are
+ * three forms on the page, each of them has to contain the same value which cannot change after Ajax request.
+ */
+ @Test(dependsOnMethods = { "testJsfVersion" })
+ public void testAjaxRequest() {
+ String[] oldValues = new String[3];
+ getValuesAndVerify(oldValues);
+ selenium.click(LOC_LINK);
+ Wait.failWith("The form did not change").until(new Condition() {
+ public boolean isTrue() {
+ return selenium.getText(LOC_LINK).equals("(To login)");
+ }
+ });
+
+ String[] newValues = new String[3];
+ getValuesAndVerify(newValues);
+
+ assertEquals(oldValues[0], newValues[0],
+ "The value attribute in all forms should not change after an Ajax request.");
+ }
+
/**
- * Tests behavior of the application after non-Ajax request. It reloads the page which will cause a non-Ajax request.
- * There are three forms on the page, each of them has to contain the same value which has to change after non-Ajax request.
+ * Tests behavior of the application after non-Ajax request. It reloads the page which will cause a non-Ajax
+ * request. There are three forms on the page, each of them has to contain the same value which has to change after
+ * non-Ajax request.
*/
- @Test
+ @Test(dependsOnMethods = { "testJsfVersion" })
public void testNonAjaxRequest() {
String[] oldValues = new String[3];
getValuesAndVerify(oldValues);
selenium.refresh();
waitFor(4000);
-
+
String[] newValues = new String[3];
getValuesAndVerify(newValues);
@@ -88,6 +89,11 @@
"The value attribute in all forms should change after a non-Ajax request.");
}
+ /**
+ * Gets the "value" attribute in three form on the page and verifies that all are the same.
+ *
+ * @param values
+ */
private void getValuesAndVerify(String[] values) {
for (int i = 0; i < 3; i++) {
values[i] = selenium.getAttribute(format(LOC_HIDDEN_INPUT_PREFORMATTED, i));
@@ -100,6 +106,21 @@
}
/**
+ * Tests that the test suite is running with JSF2. If test suite is launched with JSF 1.x, all tests in this class
+ * are skipped.
+ *
+ * @param jsfMajorVersion
+ * major version of JSF, 1 or 2
+ */
+ @Test
+ @Parameters( { "jsf.majorVersion" })
+ public void testJsfVersion(String jsfMajorVersion) {
+ if (!"2".equals(jsfMajorVersion)) {
+ throw new SkipException("Test should be launched only if running on top of JSF 2.");
+ }
+ }
+
+ /**
* Loads the needed page.
*/
@SuppressWarnings("unused")
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/testng.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/testng.xml 2009-12-22 12:20:55 UTC (rev 16188)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/testng.xml 2009-12-22 14:09:09 UTC (rev 16189)
@@ -167,22 +167,25 @@
name="org.jboss.richfaces.integrationTest.dataTable.DataTableTestCase" />
</classes>
</test>
-
- <test name="org.jboss.richfaces.integrationTest.dataTable.EditTableWithModalPanelTestCase">
+
+ <test
+ name="org.jboss.richfaces.integrationTest.dataTable.EditTableWithModalPanelTestCase">
<classes>
<class
name="org.jboss.richfaces.integrationTest.dataTable.EditTableWithModalPanelTestCase" />
</classes>
</test>
-
- <test name="org.jboss.richfaces.integrationTest.dataTable.ExtendedDataModelTestCase">
+
+ <test
+ name="org.jboss.richfaces.integrationTest.dataTable.ExtendedDataModelTestCase">
<classes>
<class
name="org.jboss.richfaces.integrationTest.dataTable.ExtendedDataModelTestCase" />
</classes>
</test>
-
- <test name="org.jboss.richfaces.integrationTest.dataTable.ModifiableDataModelTestCase">
+
+ <test
+ name="org.jboss.richfaces.integrationTest.dataTable.ModifiableDataModelTestCase">
<classes>
<class
name="org.jboss.richfaces.integrationTest.dataTable.ModifiableDataModelTestCase" />
@@ -227,7 +230,7 @@
name="org.jboss.richfaces.integrationTest.extendedDataTable.DraggingTestCase" />
</classes>
</test>
-
+
<test
name="org.jboss.richfaces.integrationTest.extendedDataTable.FilteringTestCase">
<classes>
@@ -235,7 +238,7 @@
name="org.jboss.richfaces.integrationTest.extendedDataTable.FilteringTestCase" />
</classes>
</test>
-
+
<test
name="org.jboss.richfaces.integrationTest.extendedDataTable.GroupingTestCase">
<classes>
@@ -243,7 +246,7 @@
name="org.jboss.richfaces.integrationTest.extendedDataTable.GroupingTestCase" />
</classes>
</test>
-
+
<test
name="org.jboss.richfaces.integrationTest.extendedDataTable.SelectingTestCase">
<classes>
@@ -251,7 +254,7 @@
name="org.jboss.richfaces.integrationTest.extendedDataTable.SelectingTestCase" />
</classes>
</test>
-
+
<test
name="org.jboss.richfaces.integrationTest.extendedDataTable.SortingTestCase">
<classes>
@@ -343,13 +346,13 @@
</classes>
</test>
-<!-- <test-->
-<!-- name="org.jboss.richfaces.integrationTest.mediaOutput.MediaOutputTestCase">-->
-<!-- <classes>-->
-<!-- <class-->
-<!-- name="org.jboss.richfaces.integrationTest.mediaOutput.MediaOutputTestCase" />-->
-<!-- </classes>-->
-<!-- </test>-->
+ <!--
+ <test
+ name="org.jboss.richfaces.integrationTest.mediaOutput.MediaOutputTestCase">
+ <classes> <class
+ name="org.jboss.richfaces.integrationTest.mediaOutput.MediaOutputTestCase"
+ /> </classes> </test>
+ -->
<test
name="org.jboss.richfaces.integrationTest.modalPanel.ModalPanelTestCase">
@@ -375,11 +378,13 @@
</classes>
</test>
-<!-- <test name="org.jboss.richfaces.integrationTest.paint2d.Paint2DTestCase">-->
-<!-- <classes>-->
-<!-- <class name="org.jboss.richfaces.integrationTest.paint2d.Paint2DTestCase" />-->
-<!-- </classes>-->
-<!-- </test>-->
+ <!--
+ <test
+ name="org.jboss.richfaces.integrationTest.paint2d.Paint2DTestCase">
+ <classes> <class
+ name="org.jboss.richfaces.integrationTest.paint2d.Paint2DTestCase" />
+ </classes> </test>
+ -->
<test
name="org.jboss.richfaces.integrationTest.panel.PanelCustomizationTestCase">
@@ -488,12 +493,22 @@
</classes>
</test>
-<!-- <test name="org.jboss.richfaces.integrationTest.status.StatusTestCase">-->
-<!-- <classes>-->
-<!-- <class name="org.jboss.richfaces.integrationTest.status.StatusTestCase" />-->
-<!-- </classes>-->
-<!-- </test>-->
+ <test
+ name="org.jboss.richfaces.integrationTest.stateManager.StateManagerTestCase">
+ <classes>
+ <class
+ name="org.jboss.richfaces.integrationTest.stateManager.StateManagerTestCase" />
+ </classes>
+ </test>
+ <!--
+ <test
+ name="org.jboss.richfaces.integrationTest.status.StatusTestCase">
+ <classes> <class
+ name="org.jboss.richfaces.integrationTest.status.StatusTestCase" />
+ </classes> </test>
+ -->
+
<test name="org.jboss.richfaces.integrationTest.style.StyleTestCase">
<classes>
<class name="org.jboss.richfaces.integrationTest.style.StyleTestCase" />
@@ -507,7 +522,7 @@
name="org.jboss.richfaces.integrationTest.suggestionBox.SuggestionBoxTestCase" />
</classes>
</test>
-
+
<test
name="org.jboss.richfaces.integrationTest.tableFiltering.TableFilteringTestCase">
<classes>
15 years, 2 months
JBoss Rich Faces SVN: r16188 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: java/org/jboss/richfaces/integrationTest/stateManager and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2009-12-22 07:20:55 -0500 (Tue, 22 Dec 2009)
New Revision: 16188
Added:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/stateManager/
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/stateManager/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/stateManager/messages.properties
Log:
https://jira.jboss.org/jira/browse/RFPL-300
* added a test case for state manager
Added: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java (rev 0)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java 2009-12-22 12:20:55 UTC (rev 16188)
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+
+package org.jboss.richfaces.integrationTest.stateManager;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotSame;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
+import org.jboss.test.selenium.waiting.Condition;
+import org.jboss.test.selenium.waiting.Wait;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * A test case for State Manager API. It verifies https://jira.jboss.org/jira/browse/RF-8204. To run this
+ * test, demo has to run on top of JSF 2 and server-side state serialization has to be switched on.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class StateManagerTestCase extends AbstractSeleniumRichfacesTestCase {
+
+ private final String LOC_HIDDEN_INPUT_PREFORMATTED = getLoc("HIDDEN_INPUT_PREFORMATTED");
+ private final String LOC_LINK = getLoc("LINK");
+
+ /**
+ * Tests behavior of the application after Ajax request. It clicks on the link in the form on the page. There
+ * are three forms on the page, each of them has to contain the same value which cannot change after Ajax request.
+ */
+ @Test
+ public void testAjaxRequest() {
+ String [] oldValues = new String[3];
+ getValuesAndVerify(oldValues);
+
+
+ selenium.click(LOC_LINK);
+ Wait.failWith("The form did not change").until(new Condition() {
+ public boolean isTrue() {
+ return selenium.getText(LOC_LINK).equals("(To login)");
+ }
+ });
+
+ String [] newValues = new String[3];
+ getValuesAndVerify(newValues);
+
+ assertEquals(oldValues[0], newValues[0],
+ "The value attribute in all forms should not change after an Ajax request.");
+ }
+
+ /**
+ * Tests behavior of the application after non-Ajax request. It reloads the page which will cause a non-Ajax request.
+ * There are three forms on the page, each of them has to contain the same value which has to change after non-Ajax request.
+ */
+ @Test
+ public void testNonAjaxRequest() {
+ String[] oldValues = new String[3];
+ getValuesAndVerify(oldValues);
+
+ selenium.refresh();
+ waitFor(4000);
+
+ String[] newValues = new String[3];
+ getValuesAndVerify(newValues);
+
+ assertNotSame(oldValues[0], newValues[0],
+ "The value attribute in all forms should change after a non-Ajax request.");
+ }
+
+ private void getValuesAndVerify(String[] values) {
+ for (int i = 0; i < 3; i++) {
+ values[i] = selenium.getAttribute(format(LOC_HIDDEN_INPUT_PREFORMATTED, i));
+ }
+
+ assertEquals(values[0], values[1],
+ "The attribute value in the first form should be the same as one in the second form.");
+ assertEquals(values[1], values[2],
+ "The attribute value in the second form should be the same as one in the third form.");
+ }
+
+ /**
+ * Loads the needed page.
+ */
+ @SuppressWarnings("unused")
+ @BeforeMethod
+ private void loadPage() {
+ openComponent("State Manager API");
+ }
+}
Property changes on: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/stateManager/StateManagerTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/stateManager/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/stateManager/locators.properties (rev 0)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/stateManager/locators.properties 2009-12-22 12:20:55 UTC (rev 16188)
@@ -0,0 +1,2 @@
+HIDDEN_INPUT_PREFORMATTED=jquery=input[name=javax.faces.ViewState]:eq({0})@value
+LINK=jquery=span#wizard a
\ No newline at end of file
Added: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/stateManager/messages.properties
===================================================================
15 years, 2 months
JBoss Rich Faces SVN: r16187 - in root/docs/trunk/Component_Reference/en-US: extras and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2009-12-22 02:12:06 -0500 (Tue, 22 Dec 2009)
New Revision: 16187
Added:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-0.xml_sample
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-1.js
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-richajaxValidator_example.xml_sample
Removed:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml
Modified:
root/docs/trunk/Component_Reference/en-US/Book_Info.xml
root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
root/docs/trunk/Component_Reference/en-US/Preface.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Validation.xml
Log:
Worked on Validators and added ref data to Containers
Modified: root/docs/trunk/Component_Reference/en-US/Book_Info.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Book_Info.xml 2009-12-22 05:19:34 UTC (rev 16186)
+++ root/docs/trunk/Component_Reference/en-US/Book_Info.xml 2009-12-22 07:12:06 UTC (rev 16187)
@@ -29,7 +29,7 @@
<year>&YEAR;</year>
<holder>&HOLDER;</holder>
</copyright>
- <!-- FOR PUBLICAN --><xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR JDOCBOOK: --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- FOR PUBLICAN --><xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR JDOCBOOK: --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</xi:fallback>
</xi:include>
<xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2009-12-22 05:19:34 UTC (rev 16186)
+++ root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2009-12-22 07:12:06 UTC (rev 16187)
@@ -3,9 +3,9 @@
]>
<book status="draft">
<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!--
+ <!--
<xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
- --><xi:include href="chap-Component_Reference-Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ --><xi:include href="chap-Component_Reference-Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Common_Ajax_attributes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Common_features.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<part id="part-Component_Reference-a4j_tag_library">
Modified: root/docs/trunk/Component_Reference/en-US/Preface.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Preface.xml 2009-12-22 05:19:34 UTC (rev 16186)
+++ root/docs/trunk/Component_Reference/en-US/Preface.xml 2009-12-22 07:12:06 UTC (rev 16187)
@@ -3,10 +3,10 @@
]>
<preface id="pref-Component_Reference-Preface">
<title>Preface</title>
- <!-- FOR JDOCBOOK --><xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR PUBLICAN --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- FOR JDOCBOOK --><xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR PUBLICAN --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</xi:fallback>
</xi:include>
- <!-- PUBLICAN'S ORIGINAL XINCLUDES --><xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR JDOCBOOK --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- PUBLICAN'S ORIGINAL XINCLUDES --><xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR JDOCBOOK --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</xi:fallback>
</xi:include>
</xi:fallback>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml 2009-12-22 05:19:34 UTC (rev 16186)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml 2009-12-22 07:12:06 UTC (rev 16187)
@@ -8,6 +8,28 @@
</para>
<section id="sect-Component_Reference-Containers-a4jform">
<title><a4j:form></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Form</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>javax.faces.Form</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxForm</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.FormRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
The <sgmltag><a4j:form></sgmltag> builds on the functionality of the JavaServer Faces (<acronym>JSF</acronym>) component <sgmltag><h:form></sgmltag>, adding Ajax capabilities to the form.
</para>
@@ -66,26 +88,51 @@
<para>
The page uses <sgmltag><a4j:include></sgmltag> to include the first step of the wizard:
</para>
+
<programlisting language="XML" role="XML">
-<xi:include parse="text" href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
+<xi:include href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
</programlisting>
<para>
The first step is fully contained in a separate file, <filename>wstep1.xhtml</filename>. Subsequent steps are set up similarly with additional <guibutton>Previous</guibutton> buttons.
</para>
+
<programlisting language="XML" role="XML">
-<xi:include parse="text" href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
+<xi:include href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
</programlisting>
<para>
The navigation is defined in the <filename>faces-config.xml</filename> configuration file:
</para>
+
<programlisting language="XML" role="XML">
-<xi:include parse="text" href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
+<xi:include href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
</programlisting>
</example>
</section>
<section id="sect-Component_Reference-Containers-a4joutputPanel">
<title><a4j:outputPanel></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.OutputPanel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>javax.faces.Panel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HtmlAjaxOutputPanel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxOutputPanelRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
The <sgmltag><a4j:outputPanel></sgmltag> component is used to group together components in to update them as a whole, rather than having to specify the components individually.
</para>
@@ -116,6 +163,28 @@
<section id="sect-Component_Reference-Containers-a4jregion">
<title><a4j:region></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.AjaxRegion</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.AjaxRegion</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HtmlAjaxRegion</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxRegionRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
The <sgmltag><a4j:region></sgmltag> component specifies a part of the document object model (<acronym>DOM</acronym>) tree to be processed on the server. The processing includes data handling during decoding, conversion, validation, and model updating. When not using <sgmltag><a4j:region></sgmltag>, the entire view functions as a region.
</para>
Deleted: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml 2009-12-22 05:19:34 UTC (rev 16186)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml 2009-12-22 07:12:06 UTC (rev 16187)
@@ -1,318 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Component_Reference-Resources">
- <title>Resources</title>
- <para>
- This chapter covers those components used to handle and manage resources and beans.
- </para>
- <section id="sect-Component_Reference-Resources-a4jloadBundle">
- <title><a4j:loadBundle></title>
- <itemizedlist>
- <listitem>
- <para>
- component-type: <classname>org.ajax4jsf.Bundle</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-family: <classname>org.ajax4jsf.Bundle</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-class: <classname>org.ajax4jsf.component.html.AjaxLoadBundle</classname>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The <sgmltag><a4j:loadBundle></sgmltag> component is used to load resource bundles to aid in localization of an application. The bundles are localized to the locale of the current view, and properties are stored as a map in the current request attributes.
- </para>
- <para>
- The <sgmltag><a4j:loadBundle></sgmltag> component allows bundles to be accessed by Ajax requests working in their own address scopes. This solves the problem of using the <acronym>JSF</acronym> <sgmltag><h:loadBundle></sgmltag> component with Ajax, where bundle information loaded with the page was unavailable for later Ajax requests.
- </para>
- <para>
- Resource bundles are registered in the Faces configuration file, <filename>faces-config.xml</filename>.
- </para>
- <example id="exam-Component_Reference-a4jloadBundle-a4jloadBundle_example">
- <title><sgmltag><a4j:loadBundle></sgmltag> example</title>
- <para>
- This example shows a simple application capable of switching between different localized languages.
- </para>
- <procedure>
- <step id="step-Component_Reference-a4jloadBundle_example-Create_resource_bundles">
- <title>Create resource bundles</title>
- <para>
- String resource bundles are contained in files with a <filename class="extension">.properties</filename> extension. The files consist of a list of entries, each with a unique name and a corresponding value. A seperate file is required for each language. Append the filename with the locale identifier (<literal>en</literal> for English, for example).
- </para>
- </step>
- <step id="step-Component_Reference-a4jloadBundle_example-Register_bundles_in_Faces_configuration_file">
- <title>Register bundles in Faces configuration file</title>
- <para>
- The resource bundles need to be registered in the Faces configuration file, <filename>faces-config.xml</filename>. The filename is defined with the <sgmltag><message-bundle></sgmltag> tag, without the locale code and without the extension. The supported locale codes are listed with <sgmltag><supported-locale></sgmltag> tags.
- </para>
-
-<programlisting language="XML" role="XML">
-<xi:include href="extras/exam-Component_Reference-a4jloadBundle-a4jloadBundle_example-0.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- </step>
- <step id="step-Component_Reference-a4jloadBundle_example-Create_method_to_set_locale">
- <title>Create method to set locale</title>
- <para>
- The <acronym>JSF</acronym> <methodname>javax.faces.component.UIViewRoot.setLocale()</methodname> method can be used to update the locale through a Java class:
- </para>
-
-<programlisting language="Java" role="JAVA">
-<xi:include href="extras/exam-Component_Reference-a4jloadBundle-a4jloadBundle_example-1.js" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- </step>
- <step id="step-Component_Reference-a4jloadBundle_example-Add_a4jloadBundle_to_the_JSP_page">
- <title>Add <sgmltag><a4j:loadBundle></sgmltag> to the <acronym>JSP</acronym> page</title>
- <para>
- The <sgmltag><a4j:loadBundle></sgmltag> component is added to the application, and links to change the locale will update the displayed text.
- </para>
-
-<programlisting language="XML" role="XML">
-<xi:include href="extras/exam-Component_Reference-a4jloadBundle-a4jloadBundle_example-2.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- </step>
- </procedure>
-
- <para>
- Clicking on the different links will render the localized string as appropriate.
- </para>
- </example>
- </section>
-
- <section id="sect-Component_Reference-Resources-a4jloadScript">
- <title><a4j:loadScript></title>
- <itemizedlist>
- <listitem>
- <para>
- component-type: <classname>org.ajax4jsf.LoadScript</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-family: <classname>org.ajax4jsf.LoadScript</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-class: <classname>org.ajax4jsf.component.html.HtmlLoadScript</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- renderer-type: <classname>org.ajax4jsf.LoadScriptRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The <sgmltag><a4j:loadScript></sgmltag> component allows scripts to be loaded from external sources such as <filename>jar</filename> files.
- </para>
- <para>
- The required <varname>src</varname> attribute defines the path to the script. A leading slash (<literal>/</literal>) represents the root of the web context. The <code>resource://</code> prefix can be used to access a file in the RichFaces resource framework. The path is passed to the <methodname>getResourceURL()</methodname> method of the application's <classname>ViewHandler</classname>, with the result then being passed through the <methodname>encodeResourceURL()</methodname> method of <classname>ExternalContext</classname>.
- </para>
- <example id="exam-Component_Reference-a4jloadScript-a4jloadScript_example">
- <title><sgmltag><a4j:loadScript></sgmltag> example</title>
-
-<programlisting language="XML" role="XML">
-<a4j:loadScript src="resource:///org/mycompany/assets/script/focus.js" />
-</programlisting>
- </example>
- </section>
-
- <section id="sect-Component_Reference-Resources-a4jloadStyle">
- <title><a4j:loadStyle></title>
- <itemizedlist>
- <listitem>
- <para>
- component-type: <classname>org.ajax4jsf.LoadStyle</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-family: <classname>org.ajax4jsf.LoadStyle</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-class: <classname>org.ajax4jsf.component.html.HtmlLoadStyle</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- renderer-type: <classname>org.ajax4jsf.LoadStyleRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The <sgmltag><a4j:loadStyle></sgmltag> component allows a style sheet to be loaded from an external source, such as a <filename>jar</filename> file. The style sheet links are inserted into the head element.
- </para>
- <para>
- The required <varname>src</varname> attribute defines the path to the script. A leading slash (<literal>/</literal>) represents the root of the web context. The <code>resource://</code> prefix can be used to access a file in the RichFaces resource framework. The path is passed to the <methodname>getResourceURL()</methodname> method of the application's <classname>ViewHandler</classname>, with the result then being passed through the <methodname>encodeResourceURL()</methodname> method of <classname>ExternalContext</classname>.
- </para>
- <example id="exam-Component_Reference-a4jloadStyle-a4jloadStyle_example">
- <title><sgmltag><a4j:loadStyle></sgmltag> example</title>
-
-<programlisting language="XML" role="XML">
-<a4j:loadStyle src="resource:///org/mycompany/assets/script/focus.js" />
-</programlisting>
- </example>
- </section>
-
- <section id="sect-Component_Reference-Resources-a4jkeepAlive">
- <title><a4j:keepAlive></title>
- <itemizedlist>
- <listitem>
- <para>
- component-type: <classname>org.ajax4jsf.components.KeepAlive</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-family: <classname>org.ajax4jsf.components.AjaxKeepAlive</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-class: <classname>org.ajax4jsf.components.AjaxKeepAlive</classname>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The <sgmltag><a4j:keepAlive></sgmltag> component allows the state of a managed bean to be retained between Ajax requests.
- </para>
- <para>
- Managed beans can be declared with the <literal>request</literal> scope in the <filename>faces-config.xml</filename> configuration file, using the <sgmltag><managed-bean-scope></sgmltag> tag. Any references to the bean instance after the request has ended will cause the server to throw an illegal argument exception. The <sgmltag><a4j:keepAlive></sgmltag> component avoids this be maintaining the state of the whole bean object for subsequent requests.
- </para>
- <para>
- The <varname>beanName</varname> attribute uses JSF Expression Language (<acronym>EL</acronym>) to define the request scope bean name to keep alive. The expression must resolve to a managed bean instance. The <varname>ajaxOnly</varname> attribute determines whether or not the value of the bean should be available during non-Ajaxx requests; if <code>ajaxOnly="true"</code>, the request-scope bean keeps its value during Ajax requests, but any non-Ajax requests will re-create the bean as a regular request-scope bean.
- </para>
- <example id="exam-Component_Reference-a4jkeepAlive-a4jkeepAlive_example">
- <title><sgmltag><a4j:keepAlive></sgmltag> example</title>
-
-<programlisting language="XML" role="XML">
-<a4j:keepAlive beanName="#{myClass.testBean}" />
-</programlisting>
- </example>
- </section>
-
- <section id="sect-Component_Reference-Resources-a4jmediaOutput">
- <title><a4j:mediaOutput></title>
- <itemizedlist>
- <listitem>
- <para>
- component-type: <classname>org.ajax4jsf.Push</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-family: <classname>org.ajax4jsf.components.AjaxPush</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- component-class: <classname>org.ajax4jsf.component.html.AjaxPush</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- renderer-type: <classname>org.ajax4jsf.components.AjaxPushRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The <sgmltag><a4j:mediaOutput></sgmltag> component is used for generating images, video, sounds, and other resources defined on the fly.
- </para>
- <para>
- The <varname>createContent</varname> attribute points to the method used for generating the displayed content. If necessary, the <varname>value</varname> attribute can be used to pass input data to the content generation method specified with <varname>createContent</varname>. The <varname>cacheable</varname> attribute specifies whether the resulting content will be cached or not.
- </para>
- <para>
- The <varname>mimeType</varname> attribute describes the type of output content, and corresponds to the type in the header of the <acronym>HTTP</acronym> request. The <varname>element</varname> attribute defines <acronym>XHTML</acronym> element used to display the content:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>img</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>object</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>applet</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>script</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>link</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>a</literal>
- </para>
- </listitem>
- </itemizedlist>
- <example id="exam-Component_Reference-a4jmediaOutput-a4jmediaOutput_example">
- <title><sgmltag><a4j:mediaOutput></sgmltag> example</title>
- <para>
- This example uses the <sgmltag><a4j:mediaOutput></sgmltag> component to generate a <acronym>JPEG</acronym> image of verification digits. The code on the application page is a single element:
- </para>
-
-<programlisting language="XML" role="XML">
-<a4j:mediaOutput element="img" cacheable="false" session="false" createContent="#{mediaBean.paint}" value="#{mediaData}" mimeType="image/jpeg" />
-</programlisting>
- <para>
- The <sgmltag><a4j:mediaOutput></sgmltag> component uses the <methodname>MediaBean.paint</methodname> method to create the image. The method generates a random number, which is then converted into an output stream and rendered to a <acronym>JPEG</acronym> image. The <classname>MediaBean</classname> class is as follows:
- </para>
-
-<programlisting language="Java" role="JAVA">
-<xi:include href="extras/exam-Component_Reference-a4jmediaOutput-a4jmediaOutput_example-0.js" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <para>
- Another class, <classname>MediaData</classname> is required by the <varname>value</varname> attribute for keeping data to be used as input for the content creation method. The <classname>MediaData</classname> class is as follows:
- </para>
-
-<programlisting language="Java" role="JAVA">
-<xi:include href="extras/exam-Component_Reference-a4jmediaOutput-a4jmediaOutput_example-1.js" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <para>
- The <sgmltag><a4j:mediaOutput></sgmltag> component uses the <classname>MediaBean</classname> and <classname>MediaData</classname> classes to generate a new image on each page refresh, which appears as shown in <xref linkend="figu-Component_Reference-a4jmediaOutput-a4jmediaOutput_example_result" />
- </para>
- <blockquote>
- <figure id="figu-Component_Reference-a4jmediaOutput-a4jmediaOutput_example_result">
- <title><sgmltag><a4j:mediaOutput></sgmltag> example result</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-a4jmediaOutput-a4jmediaOutput_example_result.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- The generated image containing a random verification number.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- <note>
- <title><classname>Serializable</classname> interface</title>
- <para>
- A bean class passed using the <varname>value</varname> attribute of <sgmltag><a4j:mediaOutput></sgmltag> should implement the <classname>Serializable</classname> interface so that it will be encoded to the <acronym>URL</acronym> of the resource.
- </para>
- </note>
- </section>
-
-</chapter>
-
Added: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml 2009-12-22 07:12:06 UTC (rev 16187)
@@ -0,0 +1,318 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<chapter id="chap-Component_Reference-Resources">
+ <title>Resources</title>
+ <para>
+ This chapter covers those components used to handle and manage resources and beans.
+ </para>
+ <section id="sect-Component_Reference-Resources-a4jloadBundle">
+ <title><a4j:loadBundle></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Bundle</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.Bundle</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxLoadBundle</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><a4j:loadBundle></sgmltag> component is used to load resource bundles to aid in localization of an application. The bundles are localized to the locale of the current view, and properties are stored as a map in the current request attributes.
+ </para>
+ <para>
+ The <sgmltag><a4j:loadBundle></sgmltag> component allows bundles to be accessed by Ajax requests working in their own address scopes. This solves the problem of using the <acronym>JSF</acronym> <sgmltag><h:loadBundle></sgmltag> component with Ajax, where bundle information loaded with the page was unavailable for later Ajax requests.
+ </para>
+ <para>
+ Resource bundles are registered in the Faces configuration file, <filename>faces-config.xml</filename>.
+ </para>
+ <example id="exam-Component_Reference-a4jloadBundle-a4jloadBundle_example">
+ <title><sgmltag><a4j:loadBundle></sgmltag> example</title>
+ <para>
+ This example shows a simple application capable of switching between different localized languages.
+ </para>
+ <procedure>
+ <step id="step-Component_Reference-a4jloadBundle_example-Create_resource_bundles">
+ <title>Create resource bundles</title>
+ <para>
+ String resource bundles are contained in files with a <filename class="extension">.properties</filename> extension. The files consist of a list of entries, each with a unique name and a corresponding value. A seperate file is required for each language. Append the filename with the locale identifier (<literal>en</literal> for English, for example).
+ </para>
+ </step>
+ <step id="step-Component_Reference-a4jloadBundle_example-Register_bundles_in_Faces_configuration_file">
+ <title>Register bundles in Faces configuration file</title>
+ <para>
+ The resource bundles need to be registered in the Faces configuration file, <filename>faces-config.xml</filename>. The filename is defined with the <sgmltag><message-bundle></sgmltag> tag, without the locale code and without the extension. The supported locale codes are listed with <sgmltag><supported-locale></sgmltag> tags.
+ </para>
+
+<programlisting language="XML" role="XML">
+<xi:include href="extras/exam-Component_Reference-a4jloadBundle-a4jloadBundle_example-0.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </step>
+ <step id="step-Component_Reference-a4jloadBundle_example-Create_method_to_set_locale">
+ <title>Create method to set locale</title>
+ <para>
+ The <acronym>JSF</acronym> <methodname>javax.faces.component.UIViewRoot.setLocale()</methodname> method can be used to update the locale through a Java class:
+ </para>
+
+<programlisting language="Java" role="JAVA">
+<xi:include href="extras/exam-Component_Reference-a4jloadBundle-a4jloadBundle_example-1.js" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </step>
+ <step id="step-Component_Reference-a4jloadBundle_example-Add_a4jloadBundle_to_the_JSP_page">
+ <title>Add <sgmltag><a4j:loadBundle></sgmltag> to the <acronym>JSP</acronym> page</title>
+ <para>
+ The <sgmltag><a4j:loadBundle></sgmltag> component is added to the application, and links to change the locale will update the displayed text.
+ </para>
+
+<programlisting language="XML" role="XML">
+<xi:include href="extras/exam-Component_Reference-a4jloadBundle-a4jloadBundle_example-2.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </step>
+ </procedure>
+
+ <para>
+ Clicking on the different links will render the localized string as appropriate.
+ </para>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-Resources-a4jloadScript">
+ <title><a4j:loadScript></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.LoadScript</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.LoadScript</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HtmlLoadScript</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.LoadScriptRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><a4j:loadScript></sgmltag> component allows scripts to be loaded from external sources such as <filename>jar</filename> files.
+ </para>
+ <para>
+ The required <varname>src</varname> attribute defines the path to the script. A leading slash (<literal>/</literal>) represents the root of the web context. The <code>resource://</code> prefix can be used to access a file in the RichFaces resource framework. The path is passed to the <methodname>getResourceURL()</methodname> method of the application's <classname>ViewHandler</classname>, with the result then being passed through the <methodname>encodeResourceURL()</methodname> method of <classname>ExternalContext</classname>.
+ </para>
+ <example id="exam-Component_Reference-a4jloadScript-a4jloadScript_example">
+ <title><sgmltag><a4j:loadScript></sgmltag> example</title>
+
+<programlisting language="XML" role="XML">
+<a4j:loadScript src="resource:///org/mycompany/assets/script/focus.js" />
+</programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-Resources-a4jloadStyle">
+ <title><a4j:loadStyle></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.LoadStyle</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.LoadStyle</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HtmlLoadStyle</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.LoadStyleRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><a4j:loadStyle></sgmltag> component allows a style sheet to be loaded from an external source, such as a <filename>jar</filename> file. The style sheet links are inserted into the head element.
+ </para>
+ <para>
+ The required <varname>src</varname> attribute defines the path to the script. A leading slash (<literal>/</literal>) represents the root of the web context. The <code>resource://</code> prefix can be used to access a file in the RichFaces resource framework. The path is passed to the <methodname>getResourceURL()</methodname> method of the application's <classname>ViewHandler</classname>, with the result then being passed through the <methodname>encodeResourceURL()</methodname> method of <classname>ExternalContext</classname>.
+ </para>
+ <example id="exam-Component_Reference-a4jloadStyle-a4jloadStyle_example">
+ <title><sgmltag><a4j:loadStyle></sgmltag> example</title>
+
+<programlisting language="XML" role="XML">
+<a4j:loadStyle src="resource:///org/mycompany/assets/script/focus.js" />
+</programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-Resources-a4jkeepAlive">
+ <title><a4j:keepAlive></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.components.KeepAlive</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.components.AjaxKeepAlive</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.components.AjaxKeepAlive</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><a4j:keepAlive></sgmltag> component allows the state of a managed bean to be retained between Ajax requests.
+ </para>
+ <para>
+ Managed beans can be declared with the <literal>request</literal> scope in the <filename>faces-config.xml</filename> configuration file, using the <sgmltag><managed-bean-scope></sgmltag> tag. Any references to the bean instance after the request has ended will cause the server to throw an illegal argument exception. The <sgmltag><a4j:keepAlive></sgmltag> component avoids this be maintaining the state of the whole bean object for subsequent requests.
+ </para>
+ <para>
+ The <varname>beanName</varname> attribute uses JSF Expression Language (<acronym>EL</acronym>) to define the request scope bean name to keep alive. The expression must resolve to a managed bean instance. The <varname>ajaxOnly</varname> attribute determines whether or not the value of the bean should be available during non-Ajaxx requests; if <code>ajaxOnly="true"</code>, the request-scope bean keeps its value during Ajax requests, but any non-Ajax requests will re-create the bean as a regular request-scope bean.
+ </para>
+ <example id="exam-Component_Reference-a4jkeepAlive-a4jkeepAlive_example">
+ <title><sgmltag><a4j:keepAlive></sgmltag> example</title>
+
+<programlisting language="XML" role="XML">
+<a4j:keepAlive beanName="#{myClass.testBean}" />
+</programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-Resources-a4jmediaOutput">
+ <title><a4j:mediaOutput></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Push</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.components.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxPushRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><a4j:mediaOutput></sgmltag> component is used for generating images, video, sounds, and other resources defined on the fly.
+ </para>
+ <para>
+ The <varname>createContent</varname> attribute points to the method used for generating the displayed content. If necessary, the <varname>value</varname> attribute can be used to pass input data to the content generation method specified with <varname>createContent</varname>. The <varname>cacheable</varname> attribute specifies whether the resulting content will be cached or not.
+ </para>
+ <para>
+ The <varname>mimeType</varname> attribute describes the type of output content, and corresponds to the type in the header of the <acronym>HTTP</acronym> request. The <varname>element</varname> attribute defines <acronym>XHTML</acronym> element used to display the content:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>img</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>object</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>applet</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>script</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>link</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>a</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <example id="exam-Component_Reference-a4jmediaOutput-a4jmediaOutput_example">
+ <title><sgmltag><a4j:mediaOutput></sgmltag> example</title>
+ <para>
+ This example uses the <sgmltag><a4j:mediaOutput></sgmltag> component to generate a <acronym>JPEG</acronym> image of verification digits. The code on the application page is a single element:
+ </para>
+
+<programlisting language="XML" role="XML">
+<a4j:mediaOutput element="img" cacheable="false" session="false" createContent="#{mediaBean.paint}" value="#{mediaData}" mimeType="image/jpeg" />
+</programlisting>
+ <para>
+ The <sgmltag><a4j:mediaOutput></sgmltag> component uses the <methodname>MediaBean.paint</methodname> method to create the image. The method generates a random number, which is then converted into an output stream and rendered to a <acronym>JPEG</acronym> image. The <classname>MediaBean</classname> class is as follows:
+ </para>
+
+<programlisting language="Java" role="JAVA">
+<xi:include href="extras/exam-Component_Reference-a4jmediaOutput-a4jmediaOutput_example-0.js" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ <para>
+ Another class, <classname>MediaData</classname> is required by the <varname>value</varname> attribute for keeping data to be used as input for the content creation method. The <classname>MediaData</classname> class is as follows:
+ </para>
+
+<programlisting language="Java" role="JAVA">
+<xi:include href="extras/exam-Component_Reference-a4jmediaOutput-a4jmediaOutput_example-1.js" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ <para>
+ The <sgmltag><a4j:mediaOutput></sgmltag> component uses the <classname>MediaBean</classname> and <classname>MediaData</classname> classes to generate a new image on each page refresh, which appears as shown in <xref linkend="figu-Component_Reference-a4jmediaOutput_example-a4jmediaOutput_example_result" />
+ </para>
+ <blockquote>
+ <figure id="figu-Component_Reference-a4jmediaOutput_example-a4jmediaOutput_example_result">
+ <title><sgmltag><a4j:mediaOutput></sgmltag> example result</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-a4jmediaOutput-a4jmediaOutput_example_result.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The generated image containing a random verification number.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ <note>
+ <title><classname>Serializable</classname> interface</title>
+ <para>
+ A bean class passed using the <varname>value</varname> attribute of <sgmltag><a4j:mediaOutput></sgmltag> should implement the <classname>Serializable</classname> interface so that it will be encoded to the <acronym>URL</acronym> of the resource.
+ </para>
+ </note>
+ </section>
+
+</chapter>
+
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Validation.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Validation.xml 2009-12-22 05:19:34 UTC (rev 16186)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Validation.xml 2009-12-22 07:12:06 UTC (rev 16187)
@@ -4,24 +4,135 @@
<chapter id="chap-Component_Reference-Validation">
<title>Validation</title>
<para>
- Incomplete
+ This chapter covers those components that validate user input. The components enhance <acronym>JSF</acronym> validation capabilities with Ajax support and the use of <application>Hibernate</application> validators.
</para>
<section id="sect-Component_Reference-Validation-richajaxValidator">
<title><rich:ajaxValidator></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.richfaces.ajaxValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.richfaces.component.html.HtmlajaxValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.richfaces.ajaxValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.richfaces.ajaxValidatorRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ tag-class: <classname>org.richfaces.taglib.ajaxValidatorTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><rich:ajaxValidator></sgmltag> component provides Ajax validation for <acronym>JSF</acronym> inputs. It is added as a child component to a <acronym>JSF</acronym> tag, and the <varname>event</varname> attribute specifies when to trigger the validation.
</para>
+ <example id="exam-Component_Reference-richajaxValidator-richajaxValidator_example">
+ <title><sgmltag><rich:ajaxValidator></sgmltag> example</title>
+ <para>
+ This example shows the use of <sgmltag><rich:ajaxValidator></sgmltag> with standard <acronym>JSF</acronym> validators. The validators check the length of the entered name, and the range of the entered age.
+ </para>
+
+<programlisting language="XML" role="XML">
+<xi:include href="extras/exam-Component_Reference-richajaxValidator-richajaxValidator_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </example>
+ <para>
+ The <sgmltag><rich:ajaxValidator></sgmltag> component can also work with custom validators made using the <acronym>JSF</acronym> Validation <acronym>API</acronym> in the <package>javax.faces.validator</package> package, or with Hibernate Validator. Refer to the <citetitle>Hibernate Validator documentation</citetitle> for details on how to use Hibernate Validator.
+ </para>
+ <example id="exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator">
+ <title>Using <sgmltag><rich:ajaxValidator></sgmltag> with Hibernate Validator</title>
+ <para>
+ This example shows the use of <sgmltag><rich:ajaxValidator></sgmltag> with Hibernate Validator. It validates the entered name, email, and age.
+ </para>
+
+<programlisting language="XML" role="XML">
+<xi:include href="extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-0.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </example>
+ <para>
+ The validation is performed using the <classname>ValidationBean</classname> class:
+ </para>
+
+<programlisting language="Java" role="JAVA">
+<xi:include href="extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-1.js" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
</section>
- <section id="sect-Component_Reference-Validation-richgraphValidator">
- <title><rich:graphValidator></title>
+ <section id="sect-Component_Reference-Validation-richbeanValidator">
+ <title><rich:beanValidator></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.richfaces.beanValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.richfaces.component.html.HtmlbeanValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.richfaces.beanValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.richfaces.beanValidatorRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ tag-class: <classname>org.richfaces.taglib.beanValidatorTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
Incomplete
</para>
</section>
- <section id="sect-Component_Reference-Validation-richbeanValidator">
- <title><rich:beanValidator></title>
+ <section id="sect-Component_Reference-Validation-richgraphValidator">
+ <title><rich:graphValidator></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.richfaces.graphValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.richfaces.component.html.HtmlgraphValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.richfaces.graphValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.richfaces.graphValidatorRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ tag-class: <classname>org.richfaces.taglib.graphValidatorTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
Incomplete
</para>
Added: root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-0.xml_sample
===================================================================
--- root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-0.xml_sample (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-0.xml_sample 2009-12-22 07:12:06 UTC (rev 16187)
@@ -0,0 +1,24 @@
+<h:form id="ajaxValidatorForm2">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="User Info:" />
+ </f:facet>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{validationBean.name}" id="name" required="true">
+ <rich:ajaxValidator event="onblur" />
+ </h:inputText>
+ <rich:message for="name" />
+ <h:outputText value="Email:" />
+ <h:inputText value="#{validationBean.email}" id="email">
+ <rich:ajaxValidator event="onblur" />
+ </h:inputText>
+ <rich:message for="email" />
+ <h:outputText value="Age:" />
+ <h:inputText value="#{validationBean.age}" id="age">
+ <rich:ajaxValidator event="onblur" />
+ </h:inputText>
+ <rich:message for="age" />
+ </h:panelGrid>
+ </rich:panel>
+</h:form>
Added: root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-1.js
===================================================================
--- root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-1.js (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-1.js 2009-12-22 07:12:06 UTC (rev 16187)
@@ -0,0 +1,65 @@
+package org.richfaces.demo.validation;
+
+import org.hibernate.validator.Email;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Min;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Pattern;
+
+public class ValidationBean {
+
+ private String progressString="Fill the form in";
+
+ @NotEmpty
+ @Pattern(regex=".*[^\\s].*", message="This string contains only spaces")
+ @Length(min=3,max=12)
+ private String name;
+ @Email
+ @NotEmpty
+ private String email;
+
+ @NotNull
+ @Min(18)
+ @Max(100)
+ private Integer age;
+
+ public ValidationBean() {
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public Integer getAge() {
+ return age;
+ }
+
+ public void setAge(Integer age) {
+ this.age = age;
+ }
+ public void success() {
+ setProgressString(getProgressString() + "(Stored successfully)");
+ }
+
+ public String getProgressString() {
+ return progressString;
+ }
+
+ public void setProgressString(String progressString) {
+ this.progressString = progressString;
+ }
+}
Added: root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-richajaxValidator_example.xml_sample
===================================================================
--- root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-richajaxValidator_example.xml_sample (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richajaxValidator-richajaxValidator_example.xml_sample 2009-12-22 07:12:06 UTC (rev 16187)
@@ -0,0 +1,23 @@
+<rich:panel>
+ <f:facet name="header">
+ <h:outputText value="User Info:" />
+ </f:facet>
+ <h:panelGrid columns="3">
+
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" id="name" required="true">
+ <f:validateLength minimum="3" maximum="12"/>
+ <rich:ajaxValidator event="onblur"/>
+ </h:inputText>
+ <rich:message for="name" />
+
+ <h:outputText value="Age:" />
+ <h:inputText value="#{userBean.age}" id="age" required="true">
+ <f:convertNumber integerOnly="true"/>
+ <f:validateLongRange minimum="18" maximum="99"/>
+ <rich:ajaxValidator event="onblur"/>
+ </h:inputText>
+ <rich:message for="age"/>
+
+ </h:panelGrid>
+</rich:panel>
15 years, 2 months
JBoss Rich Faces SVN: r16186 - root/docs/trunk/Component_Reference/en-US/extras.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2009-12-22 00:19:34 -0500 (Tue, 22 Dec 2009)
New Revision: 16186
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample
Log:
Added a4j:include examples
Added: root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample
===================================================================
--- root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample 2009-12-22 05:19:34 UTC (rev 16186)
@@ -0,0 +1,11 @@
+<h:panelGrid width="100%" columns="2">
+ <a4j:keepAlive beanName="profile" />
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="A wizard using a4j:include" />
+ </f:facet>
+ <h:form>
+ <a4j:include viewId="/richfaces/include/examples/wstep1.xhtml" />
+ </h:form>
+ </rich:panel>
+</h:panelGrid>
Added: root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample
===================================================================
--- root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample 2009-12-22 05:19:34 UTC (rev 16186)
@@ -0,0 +1,22 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <div style="position:relative;height:140px">
+ <h:panelGrid rowClasses="s1row" columns="3" columnClasses="wfcol1,wfcol2,wfcol3">
+ <h:outputText value="First Name:" />
+ <h:inputText id="fn" value="#{profile.firstName}" label="First Name" required="true" />
+ <rich:message for="fn" />
+
+ <h:outputText value="Last Name:" />
+ <h:inputText id="ln" value="#{profile.lastName}" label="Last Name" required="true" />
+ <rich:message for="ln" />
+ </h:panelGrid>
+ <div class="navPanel" style="width:100%;">
+ <a4j:commandButton style="float:right" action="next" value="Next >>"/>
+ </div>
+ </div>
+</ui:composition>
Added: root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample
===================================================================
--- root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample 2009-12-22 05:19:34 UTC (rev 16186)
@@ -0,0 +1,25 @@
+<navigation-rule>
+ <from-view-id>/richfaces/include/examples/wstep1.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>next</from-outcome>
+ <to-view-id>/richfaces/include/examples/wstep2.xhtml</to-view-id>
+ </navigation-case>
+</navigation-rule>
+<navigation-rule>
+ <from-view-id>/richfaces/include/examples/wstep2.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>previous</from-outcome>
+ <to-view-id>/richfaces/include/examples/wstep1.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>next</from-outcome>
+ <to-view-id>/richfaces/include/examples/finalStep.xhtml</to-view-id>
+ </navigation-case>
+</navigation-rule>
+<navigation-rule>
+ <from-view-id>/richfaces/include/examples/finalStep.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>previous</from-outcome>
+ <to-view-id>/richfaces/include/examples/wstep2.xhtml</to-view-id>
+ </navigation-case>
+</navigation-rule>
15 years, 2 months
JBoss Rich Faces SVN: r16185 - root/docs/trunk/Component_Reference/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2009-12-22 00:18:46 -0500 (Tue, 22 Dec 2009)
New Revision: 16185
Modified:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml
Log:
Finished Containers
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml 2009-12-22 01:35:19 UTC (rev 16184)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml 2009-12-22 05:18:46 UTC (rev 16185)
@@ -33,9 +33,55 @@
<section id="sect-Component_Reference-Containers-a4jinclude">
<title>a4j:include</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Include</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>javax.faces.Output</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.Include</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxIncludeRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><a4j:include></sgmltag> component allows one view to be included as part of another page. This is useful for applications where multiple views might appear on the one page, with navigation between the views. Views can use partial page navigation in Ajax mode, or standard <acronym>JSF</acronym> navigation for navigation between views.
</para>
+ <para>
+ The <varname>viewId</varname> attribute is required to reference the resource that will be included as a view on the page. It uses a full context-relative path to point to the resource, similar to the paths used for the <sgmltag><from-view-id></sgmltag> and <sgmltag><to-view-id></sgmltag> tags in the <filename>faces-config.xml</filename> <acronym>JSF</acronym> navigation rules.
+ </para>
+ <example id="exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude">
+ <title>A wizard using <sgmltag><a4j:include></sgmltag></title>
+ <para>
+ The page uses <sgmltag><a4j:include></sgmltag> to include the first step of the wizard:
+ </para>
+<programlisting language="XML" role="XML">
+<xi:include parse="text" href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ <para>
+ The first step is fully contained in a separate file, <filename>wstep1.xhtml</filename>. Subsequent steps are set up similarly with additional <guibutton>Previous</guibutton> buttons.
+ </para>
+<programlisting language="XML" role="XML">
+<xi:include parse="text" href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ <para>
+ The navigation is defined in the <filename>faces-config.xml</filename> configuration file:
+ </para>
+<programlisting language="XML" role="XML">
+<xi:include parse="text" href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </example>
</section>
<section id="sect-Component_Reference-Containers-a4joutputPanel">
15 years, 2 months
JBoss Rich Faces SVN: r16184 - root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-12-21 20:35:19 -0500 (Mon, 21 Dec 2009)
New Revision: 16184
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RendererAdapter.java
Log:
CDK: fixed missing renderer-type in generated faces-config.xml
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RendererAdapter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RendererAdapter.java 2009-12-22 00:12:16 UTC (rev 16183)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RendererAdapter.java 2009-12-22 01:35:19 UTC (rev 16184)
@@ -24,10 +24,12 @@
package org.richfaces.cdk.xmlconfig.model;
import org.richfaces.cdk.model.Renderer;
+import org.richfaces.cdk.model.Renderer.Type;
/**
- * <p class="changed_added_4_0"></p>
- *
+ * <p class="changed_added_4_0">
+ * </p>
+ *
* @author asmirnov(a)exadel.com
*/
public class RendererAdapter extends AdapterBase<RendererBean, Renderer> {
@@ -41,4 +43,17 @@
protected Class<? extends Renderer> getModelClass(RendererBean bean) {
return Renderer.class;
}
+
+ @Override
+ protected void postMarshal(Renderer model, RendererBean bean) {
+ }
+
+ @Override
+ protected void postUnmarshal(RendererBean bean, Renderer model) {
+ // Copy type.
+ String type = bean.getType();
+ if (null != type) {
+ model.setType(new Type(type.trim()));
+ }
+ }
}
15 years, 2 months
JBoss Rich Faces SVN: r16183 - in root/cdk/trunk/plugins/generator/src: test/java/org/richfaces/cdk/xmlconfig and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-12-21 19:12:16 -0500 (Mon, 21 Dec 2009)
New Revision: 16183
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitIdAdapter.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/renderkit.xml
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitBean.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FacesConfigTest.java
Log:
Fix render-kit-id marshal/unmarshal
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitBean.java 2009-12-21 23:59:12 UTC (rev 16182)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitBean.java 2009-12-22 00:12:16 UTC (rev 16183)
@@ -45,24 +45,32 @@
* @author asmirnov(a)exadel.com
*/
public class RenderKitBean extends ExtensibleBean<RenderKitBean.RenderKitExtension> implements MapEntry<RenderKit.Id> {
- @XmlElement(name = "render-kit-id", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
- private String id = RenderKitFactory.HTML_BASIC_RENDER_KIT;
- @XmlElement(name = "renderer", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
- @XmlJavaTypeAdapter(RendererAdapter.class)
+
private List<Renderer> renderers = Lists.newArrayList();
- @XmlElement(name = "client-behavior-renderer", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
- @XmlJavaTypeAdapter(BehaviorRendererAdapter.class)
private List<BehaviorRenderer> behaviorRenderers = Lists.newArrayList();
- @XmlElement(name = "render-kit-class", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
- @XmlJavaTypeAdapter(ClassAdapter.class)
private ClassDescription renderkitClass;
- private Id key;
+ private Id key = new Id(RenderKitFactory.HTML_BASIC_RENDER_KIT);
+
+ @Override
+ @XmlElement(name = "render-kit-id", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ @XmlJavaTypeAdapter(RenderKitIdAdapter.class)
+ public Id getKey() {
+ return key;
+ }
+
+ @Override
+ public void setKey(Id key) {
+ this.key = key;
+ }
+
/**
* <p class="changed_added_4_0"></p>
*
* @return the renderkitClass
*/
+ @XmlElement(name = "render-kit-class", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ @XmlJavaTypeAdapter(ClassAdapter.class)
public ClassDescription getRenderkitClass() {
return renderkitClass;
}
@@ -79,55 +87,39 @@
/**
* <p class="changed_added_4_0"></p>
*
- * @return the id
+ * @return the renderers
*/
- public String getId() {
- return id;
+ @XmlElement(name = "renderer", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ @XmlJavaTypeAdapter(RendererAdapter.class)
+ public List<Renderer> getRenderers() {
+ return renderers;
}
/**
* <p class="changed_added_4_0"></p>
*
- * @param id the id to set
+ * @param renderers the renderers to set
*/
- public void setId(String id) {
- this.id = id;
- this.key = new Id(id);
+ public void setRenderers(List<Renderer> renderers) {
+ this.renderers = renderers;
}
- @Override
- public Id getKey() {
- return key;
- }
-
- @Override
- public void setKey(Id key) {
- this.key = key;
-
- //TODO: Alex, please review fixed NPE
- if (key != null) {
- this.id = key.toString();
- } else {
- this.id = null;
- }
- }
-
/**
* <p class="changed_added_4_0"></p>
- *
- * @return the renderers
+ * @return the behaviorRenderers
*/
- public List<Renderer> getRenderers() {
- return renderers;
+ @XmlElement(name = "client-behavior-renderer", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ @XmlJavaTypeAdapter(BehaviorRendererAdapter.class)
+ public List<BehaviorRenderer> getBehaviorRenderers() {
+ return this.behaviorRenderers;
}
/**
* <p class="changed_added_4_0"></p>
- *
- * @param renderers the renderers to set
+ * @param behaviorRenderers the behaviorRenderers to set
*/
- public void setRenderers(List<Renderer> renderers) {
- this.renderers = renderers;
+ public void setBehaviorRenderers(List<BehaviorRenderer> behaviorRenderers) {
+ this.behaviorRenderers = behaviorRenderers;
}
/**
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitIdAdapter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitIdAdapter.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitIdAdapter.java 2009-12-22 00:12:16 UTC (rev 16183)
@@ -0,0 +1,48 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.richfaces.cdk.model.RenderKit;
+import org.richfaces.cdk.model.RenderKit.Id;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class RenderKitIdAdapter extends XmlAdapter<String, RenderKit.Id>{
+
+ @Override
+ public String marshal(Id v) throws Exception {
+ return v.toString();
+ }
+
+ @Override
+ public Id unmarshal(String v) throws Exception {
+ return new Id(v);
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitIdAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FacesConfigTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FacesConfigTest.java 2009-12-21 23:59:12 UTC (rev 16182)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FacesConfigTest.java 2009-12-22 00:12:16 UTC (rev 16183)
@@ -21,13 +21,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
package org.richfaces.cdk.xmlconfig;
import static org.junit.Assert.*;
import java.util.Collection;
+import java.util.List;
import java.util.Map;
import org.junit.Test;
@@ -38,25 +37,26 @@
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.Facet;
import org.richfaces.cdk.model.Property;
+import org.richfaces.cdk.model.RenderKit;
import org.richfaces.cdk.xmlconfig.model.FacesConfigBean;
+import org.richfaces.cdk.xmlconfig.model.RenderKitBean;
import com.google.common.collect.Iterables;
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">
+ * </p>
+ *
* @author asmirnov(a)exadel.com
- *
+ *
*/
public class FacesConfigTest extends CdkTestBase {
@Test
public void testComponentUnmarshal() throws Exception {
- CdkContextBase contextBase = new CdkContextBase(createClassLoader());
- JAXBBinding jaxbBinding = new JAXBBinding();
+ JAXBBinding jaxbBinding = createJAXB();
- jaxbBinding.init(contextBase);
-
FacesConfigBean library = jaxbBinding.unmarshal("urn:resource:org/richfaces/cdk/xmlconfig/component.xml",
- ComponentLibrary.FACES_CONFIG_SCHEMA_LOCATION, FacesConfigBean.class);
+ ComponentLibrary.FACES_CONFIG_SCHEMA_LOCATION, FacesConfigBean.class);
assertEquals(1, library.getComponents().size());
@@ -81,4 +81,31 @@
assertEquals(3, attributes.size());
}
+
+ @Test
+ public void testRenderKitUnmarshall() throws Exception {
+ JAXBBinding jaxbBinding = createJAXB();
+
+ FacesConfigBean library = jaxbBinding.unmarshal("urn:resource:org/richfaces/cdk/xmlconfig/renderkit.xml",
+ ComponentLibrary.FACES_CONFIG_SCHEMA_LOCATION, FacesConfigBean.class);
+ List<RenderKitBean> renderKits = library.getRenderKits();
+ assertEquals(2, renderKits.size());
+ assertEquals(new RenderKit.Id("HTML_BASIC"), renderKits.get(0).getKey());
+ assertEquals(new RenderKit.Id("RDFa"), renderKits.get(1).getKey());
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @return
+ * @throws Exception
+ */
+ protected JAXBBinding createJAXB() throws Exception {
+ CdkContextBase contextBase = new CdkContextBase(createClassLoader());
+ JAXBBinding jaxbBinding = new JAXBBinding();
+
+ jaxbBinding.init(contextBase);
+ return jaxbBinding;
+ }
}
Added: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/renderkit.xml
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/renderkit.xml (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/renderkit.xml 2009-12-22 00:12:16 UTC (rev 16183)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:cdk="http://richfaces.org/cdk/extensions"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+
+ <render-kit>
+ <renderer>
+ <component-family>foo.BarFamily</component-family>
+ <renderer-type>foo.Bar</renderer-type>
+ <renderer-class>foo.BarRenderer</renderer-class>
+ <renderer-extension>
+ </renderer-extension>
+ </renderer>
+ </render-kit>
+ <render-kit>
+ <render-kit-id>RDFa</render-kit-id>
+ <render-kit-class>foo.RdfaRenderKit</render-kit-class>
+ <renderer>
+ <component-family>foo.BarFamily</component-family>
+ <renderer-type>foo.Bar</renderer-type>
+ <renderer-class>foo.rdfa.BarRenderer</renderer-class>
+ <renderer-extension>
+ </renderer-extension>
+ </renderer>
+ </render-kit>
+</faces-config>
\ No newline at end of file
Property changes on: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/renderkit.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 2 months
JBoss Rich Faces SVN: r16182 - in root/cdk/trunk/plugins: generator/src/main/java/org/richfaces/cdk/apt and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-12-21 18:59:12 -0500 (Mon, 21 Dec 2009)
New Revision: 16182
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
Log:
Annotation property renamed: passThough -> passThrough
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java 2009-12-21 16:37:02 UTC (rev 16181)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java 2009-12-21 23:59:12 UTC (rev 16182)
@@ -65,6 +65,6 @@
* <p class="changed_added_4_0"></p>
* @return
*/
- boolean passThough() default false;
+ boolean passThrough() default false;
boolean required() default false;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-12-21 16:37:02 UTC (rev 16181)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-12-21 23:59:12 UTC (rev 16182)
@@ -302,7 +302,7 @@
attribute.setHidden(attributeAnnotarion.hidden());
attribute.setLiteral(attributeAnnotarion.literal());
- attribute.setPassThrough(attributeAnnotarion.passThough());
+ attribute.setPassThrough(attributeAnnotarion.passThrough());
attribute.setRequired(attributeAnnotarion.required());
attribute.setReadOnly(attributeAnnotarion.readOnly());
15 years, 2 months