JBoss Rich Faces SVN: r19366 - in modules/tests/metamer/trunk/application/src/main: webapp/templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-29 07:01:54 -0400 (Wed, 29 Sep 2010)
New Revision: 19366
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
Log:
added server detection (able to distinguish JBoss AS 6 and Tomcat 6) (RFPL-799)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-09-29 10:51:48 UTC (rev 19365)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-09-29 11:01:54 UTC (rev 19366)
@@ -25,6 +25,7 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.security.CodeSource;
import java.util.Properties;
@@ -42,9 +43,11 @@
/**
* Vendor and version information for project Metamer.
- *
- * @author asmirnov(a)exadel.com, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
+ *
+ * @author asmirnov(a)exadel.com
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
*/
@ManagedBean(name = "metamer")
@ApplicationScoped
@@ -60,6 +63,7 @@
private String shortVersion;
private String richFacesVersion;
private String jsfVersion;
+ private String serverVersion;
/**
* Initializes the managed bean.
@@ -71,7 +75,10 @@
InputStream inStream = getClass().getClassLoader().getResourceAsStream("version.properties");
properties.load(inStream);
} catch (Exception e) {
- LOGGER.warn("Unable to load version.properties using PomVersion.class.getClassLoader().getResourceAsStream(...)", e);
+ LOGGER
+ .warn(
+ "Unable to load version.properties using PomVersion.class.getClassLoader().getResourceAsStream(...)",
+ e);
}
implementationTitle = properties.getProperty("Implementation-Title");
@@ -79,6 +86,7 @@
implementationVersion = properties.getProperty("Implementation-Version");
scmRevision = properties.getProperty("SCM-Revision");
scmTimestamp = properties.getProperty("SCM-Timestamp");
+ serverVersion = initializeServerVersion();
}
public String getVendor() {
@@ -111,10 +119,11 @@
return implementationVersion;
}
- fullVersion = implementationTitle + " by " + implementationVendor + ", version " + implementationVersion + " SVN r. " + scmRevision;
+ fullVersion = implementationTitle + " by " + implementationVendor + ", version " + implementationVersion
+ + " SVN r. " + scmRevision;
return fullVersion;
}
-
+
public String getShortVersion() {
if (shortVersion != null) {
return shortVersion;
@@ -125,15 +134,15 @@
return implementationVersion;
}
- shortVersion = "Metamer " + implementationVersion + " r. " + scmRevision;
+ shortVersion = "Metamer " + implementationVersion + " r." + scmRevision;
return shortVersion;
}
-
+
public String getRichFacesVersion() {
if (richFacesVersion != null) {
return richFacesVersion;
}
-
+
org.richfaces.VersionBean rfVersionBean = new org.richfaces.VersionBean();
StringBuilder result = new StringBuilder();
result.append("RichFaces ");
@@ -141,7 +150,7 @@
result.append(" r.");
result.append(rfVersionBean.getVersion().getScmRevision());
richFacesVersion = result.toString();
-
+
return richFacesVersion;
}
@@ -196,14 +205,135 @@
}
public String getBrowserVersion() {
- HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
+ HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext()
+ .getRequest();
return request.getHeader("user-agent");
}
-
+
public ProjectStage getProjectStage() {
return FacesContext.getCurrentInstance().getApplication().getProjectStage();
}
+ public String getServerVersion() {
+ return serverVersion;
+ }
+
+ private static String initializeServerVersion() {
+ String result = null;
+
+ try {
+ result = getJBossASVersionInfo();
+ } catch (FailToRetrieveInfo e) {
+ result = e.getMessage();
+ }
+
+ if (result == null) {
+ try {
+ result = getTomcatVersionInfo();
+ } catch (FailToRetrieveInfo e) {
+ result = e.getMessage();
+ }
+ }
+
+ if (result == null) {
+ result = "Server unknown";
+ }
+
+ return result;
+ }
+
+ private static String getTomcatVersionInfo() {
+ String result = (String) new InfoObtainer() {
+
+ @Override
+ protected Object obtainInfo() throws ClassNotFoundException, IllegalAccessException,
+ InstantiationException, SecurityException, NoSuchMethodException, IllegalArgumentException,
+ InvocationTargetException {
+
+ Class<?> clazz = Class.forName("org.apache.catalina.util.ServerInfo");
+ return clazz.getMethod("getServerInfo").invoke(null);
+ }
+ }.getInfo();
+
+ return result.replace("/", " ");
+ }
+
+ private static String getJBossASVersionInfo() {
+ String versionNumber = (String) new JBossASVersionInfoObtainer("getVersionNumber").getInfo();
+ String buildNumber = (String) new JBossASVersionInfoObtainer("getBuildID").getInfo();
+
+ if (versionNumber == null) {
+ return null;
+ }
+
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("JBoss AS ");
+ buffer.append(versionNumber);
+
+ if (versionNumber.endsWith("SNAPSHOT")) {
+ buffer.append(" ");
+ buffer.append(buildNumber.replaceFirst("r", "r."));
+ }
+
+ return buffer.toString();
+ }
+
+ private static class JBossASVersionInfoObtainer extends InfoObtainer {
+ private String methodName;
+
+ public JBossASVersionInfoObtainer(String methodName) {
+ super();
+ this.methodName = methodName;
+ }
+
+ @Override
+ protected Object obtainInfo() throws ClassNotFoundException, IllegalAccessException, InstantiationException,
+ SecurityException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException {
+
+ Class<?> clazz = Class.forName("org.jboss.bootstrap.impl.as.server.ASVersion");
+ Object classInstance = clazz.getMethod("getInstance").invoke(null);
+ return clazz.getMethod(methodName).invoke(classInstance);
+ }
+ }
+
+ private abstract static class InfoObtainer {
+ protected abstract Object obtainInfo() throws ClassNotFoundException, IllegalAccessException,
+ InstantiationException, SecurityException, NoSuchMethodException, IllegalArgumentException,
+ InvocationTargetException;
+
+ public final Object getInfo() {
+ try {
+ return obtainInfo();
+ } catch (ClassNotFoundException e) {
+ return null;
+ } catch (IllegalAccessException e) {
+ throw new FailToRetrieveInfo(fail("failed to retrieve info - ", e), e);
+ } catch (InstantiationException e) {
+ throw new FailToRetrieveInfo(fail("failed to retrieve info - ", e), e);
+ } catch (SecurityException e) {
+ throw new FailToRetrieveInfo(fail("failed to access version info - ", e), e);
+ } catch (NoSuchMethodException e) {
+ throw new FailToRetrieveInfo(fail("failed to access version info - ", e), e);
+ } catch (IllegalArgumentException e) {
+ throw new FailToRetrieveInfo(fail("failed to access version info - ", e), e);
+ } catch (InvocationTargetException e) {
+ throw new FailToRetrieveInfo(fail("failed to access version info - ", e), e);
+ }
+ }
+ }
+
+ private static class FailToRetrieveInfo extends RuntimeException {
+
+ public FailToRetrieveInfo(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ }
+
+ private static String fail(String message, Exception e) {
+ return message + e.getClass().getSimpleName() + e.getMessage();
+ }
+
@Override
public String toString() {
return getFullVersion();
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-29 10:51:48 UTC (rev 19365)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-29 11:01:54 UTC (rev 19366)
@@ -32,6 +32,7 @@
<li><h:outputText id="richfacesVersion" value="#{metamer.richFacesVersion}" /></li>
<li><h:outputText id="metamerVersion" value="#{metamer.shortVersion}" /></li>
<li><h:outputText id="jsfVersion" value="#{metamer.jsfVersion}" /></li>
+ <li><h:outputText id="serverVersion" value="#{metamer.serverVersion}" /></li>
<li><h:outputText id="javaVersion" value="#{metamer.javaVersion}" /> @ <h:outputText id="osVersion"
value="#{metamer.osVersion}" /></li>
<li><h:outputText id="browserVersion" value="#{metamer.browserVersion}" /></li>
14 years, 3 months
JBoss Rich Faces SVN: r19365 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-29 06:51:48 -0400 (Wed, 29 Sep 2010)
New Revision: 19365
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestMatrix.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java
Log:
reverting removal of templates from a4j:repeat tests (RFPL-819)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestMatrix.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestMatrix.java 2010-09-29 10:39:05 UTC (rev 19364)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestMatrix.java 2010-09-29 10:51:48 UTC (rev 19365)
@@ -33,7 +33,6 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -41,8 +40,6 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-@Templates(exclude = { "a4jRepeat1", "a4jRepeat2", "hDataTable1", "hDataTable2", "richDataTable1,redDiv",
- "richDataTable2,redDiv", "uiRepeat1", "uiRepeat2" })
public class TestMatrix extends AbstractMetamerTest {
Vector<Vector<Integer>> matrix;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java 2010-09-29 10:39:05 UTC (rev 19364)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java 2010-09-29 10:51:48 UTC (rev 19365)
@@ -30,6 +30,7 @@
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.BeforeMethod;
@@ -39,8 +40,6 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-@Templates(exclude = { "a4jRepeat1", "a4jRepeat2", "hDataTable1", "hDataTable2", "richDataTable1,redDiv",
- "richDataTable2,redDiv", "uiRepeat1", "uiRepeat2" })
public class TestSimple extends AbstractMetamerTest {
protected static final int ELEMENTS_TOTAL = 20;
@@ -85,6 +84,7 @@
@Test
@Use(field = "first", ints = { -2, -1, 0, 1, ELEMENTS_TOTAL / 2, ELEMENTS_TOTAL - 1, ELEMENTS_TOTAL,
ELEMENTS_TOTAL + 1 })
+ @IssueTracking({ "https://jira.jboss.org/browse/RF-9372" })
public void testFirstAttribute() {
verifyRepeat();
}
@@ -92,6 +92,7 @@
@Test
@Use(field = "rows", ints = { -2, -1, 0, 1, ELEMENTS_TOTAL / 2, ELEMENTS_TOTAL - 1, ELEMENTS_TOTAL,
ELEMENTS_TOTAL + 1 })
+ @IssueTracking({ "https://jira.jboss.org/browse/RF-9373" })
public void testRowsAttribute() {
verifyRepeat();
}
14 years, 3 months
JBoss Rich Faces SVN: r19364 - trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-29 06:39:05 -0400 (Wed, 29 Sep 2010)
New Revision: 19364
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
Log:
RF-9278
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss 2010-09-29 01:34:01 UTC (rev 19363)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss 2010-09-29 10:39:05 UTC (rev 19364)
@@ -57,7 +57,7 @@
overflow: hidden;
}
-.rf-edt-ftr-cnt {
+div.rf-edt-ftr-cnt {
overflow-x: auto;
overflow-y: visible;
}
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2010-09-29 01:34:01 UTC (rev 19363)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2010-09-29 10:39:05 UTC (rev 19364)
@@ -128,14 +128,13 @@
options = options || {};
var ranges = new richfaces.utils.Ranges();
var element = document.getElementById(id);
- var bodyElement, contentElement, spacerElement, dataTableElement, rows, rowHeight, parts, tbodies, shiftIndex,
- activeIndex, selectionFlag;
+ var bodyElement, contentElement, spacerElement, dataTableElement, normalPartStyle, rows, rowHeight, parts, tbodies,
+ shiftIndex, activeIndex, selectionFlag;
var dragElement = document.getElementById(id + ":d");
var reorderElement = document.getElementById(id + ":r");
var reorderMarkerElement = document.getElementById(id + ":rm");
var widthInput = document.getElementById(id + ":wi");
var selectionInput = document.getElementById(id + ":si");
- var normalPartStyle = richfaces.utils.getCSSRule("div.rf-edt-cnt").style;
var header = jQuery(element).children(".rf-edt-hdr");
var resizerHolders = header.find(".rf-edt-rsz-cntr");
@@ -168,11 +167,10 @@
normalPartStyle.width = width + "px";
}
normalPartStyle.display = "block";
+ scrollElement.style.overflowX = "";
if (scrollElement.clientWidth < scrollElement.scrollWidth
&& scrollElement.scrollHeight == scrollElement.offsetHeight) {
scrollElement.style.overflowX = "scroll";
- } else {
- scrollElement.style.overflowX = "";
}
var delta = scrollElement.firstChild.offsetHeight - scrollElement.clientHeight;
if (delta) {
@@ -183,7 +181,7 @@
}
var height = element.clientHeight;
var el = element.firstChild;
- while (el && el.nodeName && el.nodeName.toUpperCase() != "TABLE") {
+ while (el && (!el.nodeName || el.nodeName.toUpperCase() != "TABLE")) {
if(el.nodeName && el.nodeName.toUpperCase() == "DIV" && el != bodyElement) {
height -= el.offsetHeight;
}
@@ -244,6 +242,7 @@
var initialize = function() {
bodyElement = document.getElementById(id + ":b");
bodyElement.tabIndex = -1; //TODO don't use tabIndex.
+ normalPartStyle = richfaces.utils.getCSSRule("div.rf-edt-cnt").style;
var bodyJQuery = jQuery(bodyElement);
contentElement = bodyJQuery.children("div:first")[0];
if (contentElement) {
@@ -625,6 +624,10 @@
//JS API
element["richfaces"] = element["richfaces"] || {}; // TODO ExtendedDataTable should extend richfaces.BaseComponent instead of using it.
element.richfaces.component = this;
+ this.destroy = function() {
+ element.richfaces.component = null;
+ jQuery(window).unbind("resize", updateLayout);
+ }
this.getColumnPosition = function(id) {
var position;
14 years, 3 months
JBoss Rich Faces SVN: r19362 - in modules/docs/trunk: Component_Reference/src/main/docbook/en-US and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-09-28 21:32:39 -0400 (Tue, 28 Sep 2010)
New Revision: 19362
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsiblePanel-richcollapsiblePanel.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinplaceSelect-richinplaceSelect.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinputNumberSlider-richinputNumberSlider.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinputNumberSpinner-richinputNumberSpinner.png
Modified:
modules/docs/trunk/
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocomplete-Defining_suggestion_values.xml_sample
modules/docs/trunk/Migration_Guide/src/main/docbook/en-US/Changes_and_new_features.xml
Log:
Merged revisions 19182-19183,19209,19220,19305,19329,19352 via svnmerge from
http://svn.jboss.org/repos/richfaces/modules/docs/branches/M3_draft
.......
r19182 | SeanRogers | 2010-09-14 11:39:52 +1000 (Tue, 14 Sep 2010) | 1 line
Completed rich:list style details (RF-9140)
.......
r19183 | SeanRogers | 2010-09-14 16:27:07 +1000 (Tue, 14 Sep 2010) | 1 line
Removed ajaxKeys references and updated to new approach (RF-9139)
.......
r19209 | SeanRogers | 2010-09-15 11:09:27 +1000 (Wed, 15 Sep 2010) | 1 line
Updated rich:dataGrid description (RF-9141)
.......
r19220 | SeanRogers | 2010-09-16 13:46:10 +1000 (Thu, 16 Sep 2010) | 1 line
Added rich:collapsiblePanel (RF-8830)
.......
r19305 | SeanRogers | 2010-09-22 16:45:55 +1000 (Wed, 22 Sep 2010) | 1 line
rich:inputNumberSlider (RF-9202)
.......
r19329 | SeanRogers | 2010-09-24 16:13:12 +1000 (Fri, 24 Sep 2010) | 1 line
Updated rich:inplaceSelect (RF-9038)
.......
r19352 | SeanRogers | 2010-09-28 15:57:06 +1000 (Tue, 28 Sep 2010) | 1 line
Added rich:autocompleteBehavior
.......
Property changes on: modules/docs/trunk
___________________________________________________________________
Name: svnmerge-integrated
- /modules/docs/branches/M3_draft:1-19161
+ /modules/docs/branches/M3_draft:1-19361
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml 2010-09-29 01:26:56 UTC (rev 19361)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml 2010-09-29 01:32:39 UTC (rev 19362)
@@ -468,44 +468,151 @@
</section>
</section>
- <!-- TODO not in M2 -->
- <!--
- <section id="sect-Component_Reference-Panels_and_containers-richsimpleTogglePanel">
- <title><sgmltag><rich:simpleTogglePanel></sgmltag></title>
+ <!--<rich:collapsiblePanel>-->
+ <section id="sect-Component_Reference-Panels_and_containers-richcollapsiblePanel">
+ <title><sgmltag><rich:collapsiblePanel></sgmltag></title>
<para>
- The <sgmltag><rich:simpleTogglePanel></sgmltag> component is a collapsible panel that shows or hides content when the header bar is activated. It is a simplified version of <sgmltag><rich:togglePanel></sgmltag> component.
+ The <sgmltag><rich:collapsiblePanel></sgmltag> component is a collapsible panel that shows or hides content when the header bar is activated. It is a simplified version of <sgmltag><rich:togglePanel></sgmltag> component.
</para>
- <para>
- Basic usage requires only the <varname>label</varname> attribute to be specified, which provides the title for the header element.
- </para>
- <para>
- The switching mode for performing submissions is determined by the <code>switchType</code> attribute, which can have one of the following three values:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>server</literal>, the default setting, which causes the <sgmltag><rich:simpleTogglePanel></sgmltag> component to perform a common submission, completely re-rendering the page. Only one panel at a time is uploaded to the client side.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ajax</literal>, which causes the <sgmltag><rich:simpleTogglePanel></sgmltag> component to perform an Ajax form submission, and the content of the panel is rendered. Only one panel at a time is uploaded to the client side.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>client</literal>, which causes <sgmltag><rich:simpleTogglePanel></sgmltag> components to update on the client side, re-rendering themselves and any additional components listed with the <code>render</code> attribute.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- If the <sgmltag><rich:simpleTogglePanel></sgmltag> component uses <code>opened="true"</code>, the panel is open and expanded, otherwise it is closed and collapsed.
- </para>
- <para>
- The <code>openMarker</code> and <code>closeMarker</code> attributes can be used to define custom icons for the expanding header.
- </para>
+ <figure id="figu-Component_Reference-richcollapsiblePanel-richcollapsiblePanel">
+ <title><sgmltag><rich:collapsiblePanel></sgmltag></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richcollapsiblePanel-richcollapsiblePanel.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A <sgmltag><rich:collapsiblePanel></sgmltag> component displaying details on a camera model.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+
+ <section id="sect-Component_Reference-richcollapsiblePanel-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Basic usage requires only the <varname>label</varname> attribute to be specified, which provides the title for the header element.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richcollapsiblePanel-Expanding_and_collapsing_the_panel">
+ <title>Expanding and collapsing the panel</title>
+ <para>
+ If the <sgmltag><rich:collapsiblePanel></sgmltag> component uses <code><varname>expanded</varname>="true"</code>, the panel is open and expanded, otherwise it is closed and collapsed.
+ </para>
+ <para>
+ The <varname>toggleElement</varname> attribute is used to specify which user interface element triggers the expansion when clicked. It can have one of the following values:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>heading</literal></term>
+ <listitem>
+ <para>
+ This is the default setting. Clicking anywhere on the header of the panel will cause it to expand or collapse.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>panel</literal></term>
+ <listitem>
+ <para>
+ Clicking anywhere on the entire panel will cause it to expand or collapse.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>control</literal></term>
+ <listitem>
+ <para>
+ The panel can only be expanded or collapsed by clicking on the control in the right-hand side of the header.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ The switching mode for performing submissions is determined by the <varname>switchType</varname> attribute, which can have one of the following three values:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>server</literal></term>
+ <listitem>
+ <para>
+ This is the default setting. The <sgmltag><rich:collapsiblePanel></sgmltag> component performs a common submission, completely re-rendering the page. Only one panel at a time is uploaded to the client side.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>ajax</literal></term>
+ <listitem>
+ <para>
+ The <sgmltag><rich:collapsiblePanel></sgmltag> component performs an Ajax form submission, and only the content of the panel is rendered. Only one panel at a time is uploaded to the client side.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>client</literal></term>
+ <listitem>
+ <para>
+ The <sgmltag><rich:collapsiblePanel></sgmltag> component updates on the client side, re-rendering itself and any additional components listed with the <varname>render</varname> attribute.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+
+ <section id="sect-Component_Reference-richcollapsiblePanel-Appearance">
+ <title>Appearance</title>
+ <para>
+ The appearance of the <sgmltag><rich:collapsiblePanel></sgmltag> component can be customized using facets. The <literal>headerExpanded</literal> and <literal>headerCollapsed</literal> facets are used to style the appearance of the panel when it is expanded and collapsed respectively. The <literal>expandControl</literal> facet styles the control in the panel header used for expanding, and the <literal>collapseControl</literal> facet styles the control for collapsing.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richcollapsiblePanel-richcollapsiblePanel_server-side_events">
+ <title><sgmltag><rich:collapsiblePanel></sgmltag> server-side events</title>
+ <para>
+ The <sgmltag><rich:collapsiblePanel></sgmltag> component uses the following unique server-side events:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <varname>ChangeExpandEvent</varname> event occurs on the server side when the <sgmltag><rich:collapsiblePanel></sgmltag> component is expanded or collapsed through Ajax using the <literal>server</literal> mode. It can be processed using the <varname>ChangeExpandListener</varname> attribute.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Component_Reference-richcollapsiblePanel-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.collapsiblePanel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlcollapsiblePanel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.collapsiblePanel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.collapsiblePanelRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.collapsiblePanelTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
</section>
- -->
<!--<rich:tab>-->
<section id="sect-Component_Reference-Panels_and_containers-richtab">
@@ -906,30 +1013,6 @@
<para>
The switching mode for performing submissions is determined by the <code>switchType</code> attribute, which can have one of the following three values:
</para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>server</literal>, the default setting, which causes the child components to perform a common submission, completely re-rendering the page. Only one panel at a time is uploaded to the client side.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ajax</literal>, which causes the child components to perform an Ajax form submission, and the content of the panel is rendered. Only one panel at a time is uploaded to the client side.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>client</literal>, which causes the child components to update on the client side. JavaScript changes the styles such that one component becomes hidden while the other is shown.
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="sect-Component_Reference-richtogglePanel-Switching_panels">
- <title>Switching panels</title>
- <para>
- The switching mode for performing submissions is determined by the <code>switchType</code> attribute, which can have one of the following three values:
- </para>
<variablelist>
<varlistentry>
<term><literal>server</literal></term>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-09-29 01:26:56 UTC (rev 19361)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-09-29 01:32:39 UTC (rev 19362)
@@ -122,6 +122,9 @@
<para>
The <sgmltag><rich:autocomplete></sgmltag> component is an auto-completing input-box with built-in Ajax capabilities. It supports client-side suggestions, browser-like selection, and customization of the look and feel.
</para>
+ <para>
+ To attach an auto-completion behavior to other components, use the <sgmltag><rich:autocompleteBehavior></sgmltag> behavior. Refer to <xref linkend="sect-Component_Reference-Rich_inputs-richautocompleteBehavior" /> for full details on the <sgmltag><rich:autocompleteBehavior></sgmltag> behavior.
+ </para>
<figure id="figu-Component_Reference-richautocomplete-richautocomplete">
<title><sgmltag><rich:autocomplete></sgmltag></title>
<mediaobject>
@@ -139,7 +142,7 @@
<section id="sect-Component_Reference-richautocomplete-Basic_usage">
<title>Basic usage</title>
<para>
- The <varname>value</varname> attribute stores the text entered by the user for the auto-complete box. Suggestions shown in the auto-complete list can be specified using the <varname>autocompleteList</varname> attribute, which points to a collection of suggestions:
+ The <varname>value</varname> attribute stores the text entered by the user for the auto-complete box. Suggestions shown in the auto-complete list can be specified using the <varname>autocompleteMethod</varname> attribute, which points to a collection of suggestions.
</para>
<example id="exam-Component_Reference-richautocomplete-Defining_suggestion_values">
<title>Defining suggestion values</title>
@@ -228,6 +231,54 @@
</section>
</section>
+ <!--<rich:autocompleteBehavior>-->
+ <section id="sect-Component_Reference-Rich_inputs-richautocompleteBehavior">
+ <title><sgmltag><rich:autocompleteBehavior></sgmltag></title>
+ <para>
+ The <sgmltag><rich:autocompleteBehavior></sgmltag> behavior is an auto-completing list of input suggestions that can be attached to other components.
+ </para>
+ <para>
+ Use the <sgmltag><rich:autocomplete></sgmltag> component for a standard auto-completing combo-box control. Refer to <xref linkend="sect-Component_Reference-Rich_inputs-richautocomplete" /> for full details on the <sgmltag><rich:autocomplete></sgmltag> component.
+ </para>
+
+ <section id="sect-Component_Reference-richautocompleteBehavior-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Attach the <sgmltag><rich:autocompleteBehavior></sgmltag> behavior as a sub-element to another component to provide auto-complete suggestions for that component. Suggestions shown in the auto-complete list can be specified using the <varname>autocompleteMethod</varname> attribute, which points to a collection of suggestions. <xref linkend="exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values" /> demonstrates a <sgmltag><rich:autocompleteBehavior></sgmltag> behavior attached to a standard JSF <sgmltag><h:inputText></sgmltag> component.
+ </para>
+ <example id="exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values">
+ <title>Defining suggestion values</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-richautocompleteBehavior-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.autocompleteBehavior</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlAutocompleteBehavior</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.autocompleteBehavior</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.autocompleteBehaviorTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
<!-- TODO not in M2 -->
<!--
<section id="sect-Component_Reference-Rich_inputs-richeditor">
@@ -418,6 +469,19 @@
<para>
The <sgmltag><rich:inplaceSelect></sgmltag> component is similar to the <sgmltag><rich:inplaceInput></sgmltag> component, except that the <sgmltag><rich:inplaceSelect></sgmltag> component uses a drop-down selection box to enter text instead of a regular text field. Changes can be rendered either in-line or for the whole block, and inputs can be focused with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can select a value from a drop-down list; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
</para>
+ <figure id="figu-Component_Reference-richinplaceSelect-richinplaceSelect">
+ <title><sgmltag><rich:inplaceSelect></sgmltag></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richinplaceSelect-richinplaceSelect.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The figure shows the process of interaction with a <sgmltag><rich:inplaceSelect></sgmltag> component. The first line shows the component displayed as a <guilabel>click to edit</guilabel> label. Once the label is clicked, the component becomes a drop-down list, shown in the second line. The final line shows the new selection in the text, which can be clicked and changed again if necessary.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
<section id="sect-Component_Reference-richinplaceSelect-Basic_usage">
<title>Basic usage</title>
@@ -510,6 +574,20 @@
<para>
The <sgmltag><rich:inputNumberSlider></sgmltag> component provides a slider for changing numerical values. Optional features include control arrows to step through the values, a tool-tip to display the value while sliding, and a text field for typing the numerical value which can then be validated against the slider's range.
</para>
+ <figure id="figu-Component_Reference-richinputNumberSlider-richinputNumberSlider">
+ <title><sgmltag><rich:inputNumberSlider></sgmltag></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richinputNumberSlider-richinputNumberSlider.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ Two <sgmltag><rich:inputNumberSlider></sgmltag> components, one oriented horizontally and the other oriented vertically.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+
<section id="sect-Component_Reference-richinputNumberSlider-Basic_usage">
<title>Basic usage</title>
<para>
@@ -565,24 +643,77 @@
</section>
</section>
- <!-- TODO not in M2 -->
- <!--
+ <!-- <rich:inputNumberSpinner> -->
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSpinner">
<title><sgmltag><rich:inputNumberSpinner></sgmltag></title>
<para>
The <sgmltag><rich:inputNumberSpinner></sgmltag> component is a single-line input field with buttons to increase and decrease a numerical value. The value can be changed using the corresponding directional keys on a keyboard, or by typing into the field.
</para>
- <para>
- Basic use of the component with no attributes specified will render a number spinner with a minimum value of 1, a maximum value of 100, and a gradient step of 1. These default properties can be re-defined with the attributes <varname>minValue</varname>, <varname>maxValue</varname>, and <varname>step</varname> respectively. The starting value of the spinner is the minimum value unless otherwise specified with the <varname>value</varname> attribute.
- </para>
- <para>
- When changing the value using the buttons, raising the value above the maximum or cause the spinner to restart at the minimum value. Likewise, when lowering below the minimum value the spinner will reset to the maximum value. This behavior can be deactivated by setting <code>cycled="false"</code>, which will cause the buttons to stop responding when the reach the maximum or minimum value.
- </para>
- <para>
- The ability to change the value by typing into the text field can be disabled by setting <code>enableManualInput="false"</code>.
- </para>
+ <figure id="figu-Component_Reference-richinputNumberSpinner-richinputNumberSpinner">
+ <title><sgmltag><rich:inputNumberSpinner></sgmltag></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richinputNumberSpinner-richinputNumberSpinner.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A <sgmltag><rich:inputNumberSpinner></sgmltag> component. The spinner currently has a value of 20, and the arrow buttons are used to increment or decrement the value.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+
+ <section id="sect-Component_Reference-richinputNumberSpinner-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Basic use of the component with no attributes specified will render a number spinner with a minimum value of 1, a maximum value of 100, and a gradient step of 1.
+ </para>
+ <para>
+ These default properties can be re-defined with the attributes <varname>minValue</varname>, <varname>maxValue</varname>, and <varname>step</varname> respectively. The starting value of the spinner is the minimum value unless otherwise specified with the <varname>value</varname> attribute.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richinputNumberSpinner-Interactivity_options">
+ <title>Interactivity options</title>
+ <para>
+ When changing the value using the buttons, raising the value above the maximum or cause the spinner to restart at the minimum value. Likewise, when lowering below the minimum value the spinner will reset to the maximum value. This behavior can be deactivated by setting <code>cycled="false"</code>, which will cause the buttons to stop responding when the reach the maximum or minimum value.
+ </para>
+ <para>
+ The ability to change the value by typing into the text field can be disabled by setting <code>enableManualInput="false"</code>.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richinputNumberSpinner-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.inputNumberSpinner</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlInputNumberSpinner</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.inputNumberSpinner</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.renderkit.inputNumberSpinnerRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.inputNumberSpinnerTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
- -->
<!--<rich:suggestionBox>-->
<!--
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-09-29 01:26:56 UTC (rev 19361)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-09-29 01:32:39 UTC (rev 19362)
@@ -35,24 +35,95 @@
</example>
</section>
- <!-- TODO
<section id="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates">
<title>Limited views and partial updates</title>
<para>
The <sgmltag><a4j:repeat></sgmltag> component uses other attributes common to iteration components, such as the <varname>first</varname> attribute for specifying the first item for iteration, and the <varname>rows</varname> attribute for specifying the number of rows of items to display.
</para>
<para>
- After an Ajax request, only the rows specified with the <varname>ajaxKeys</varname> attribute are updated rather than the entire collection.
+ Specific cells, rows, and columns can be updated without sending Ajax requests for the entire collection. Components that cause the change can specify which part of the table to update through the <varname>render</varname> attribute. The <varname>render</varname> attribute specifies which part of a table to update:
</para>
- <example id="exam-Component_Reference-a4jrepeat-Limited_views_and_partial_updates">
- <title>Limited views and partial updates</title>
- <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-Tables_and_grids-Limited_views_and_partial_updates.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- The table rows are limited using the <varname>first</varname> and <varname>rows</varname> attributes. Only those rows specified through the <varname>ajaxKeys</varname> are updated after an Ajax request.
- </para>
- </example>
+ <variablelist>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>cellId</replaceable></code></term>
+ <listitem>
+ <para>
+ Update the cell with an identifier of <replaceable>cellId</replaceable> within the row that contains the current component.
+ </para>
+ <para>
+ Instead of a specific identifier, the <replaceable>cellId</replaceable> reference could be a variable: <code><varname>render</varname>=#{<replaceable>bean.cellToUpdate</replaceable>}</code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:<replaceable>rowId</replaceable></code></term>
+ <listitem>
+ <para>
+ Update the row with an identifier of <replaceable>rowId</replaceable> within the table with an identifier of <replaceable>tableId</replaceable>. Alternatively, if the current component is contained within the table, use <code><varname>render</varname>=<replaceable>rowId</replaceable></code>.
+ </para>
+ <para>
+ Instead of a specific identifier, the <replaceable>tableId</replaceable> of <replaceable>rowId</replaceable> references could be variables: <code><varname>render</varname>=<replaceable>tableId</replaceable>:#{<replaceable>bean.rowToUpdate</replaceable>}</code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:<replaceable>rowId</replaceable>:<replaceable>cellId</replaceable></code></term>
+ <listitem>
+ <para>
+ Update the cell with an identifier of <replaceable>cellId</replaceable>, within the row with and identifier of <replaceable>rowId</replaceable>, within the table with an identifier of <replaceable>tableId</replaceable>.
+ </para>
+ <para>
+ Instead of a specific identifier, any of the references could be variables: <code><varname>render</varname>=<replaceable>tableId</replaceable>:#{<replaceable>bean.rowToUpdate</replaceable>}:<replaceable>cellId</replaceable></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ Alternatively, keywords can be used with the <varname>render</varname> attribute:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><code><varname>render</varname>=@column</code></term>
+ <listitem>
+ <para>
+ Update the column that contains the current component.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=@row</code></term>
+ <listitem>
+ <para>
+ Update the row that contains the current component.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:@body</code></term>
+ <listitem>
+ <para>
+ Update the body of the table with the identifier of <replaceable>tableId</replaceable>. Alternatively, if the current component is contained within the table, use <code><varname>render</varname>=@body</code> instead.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:@header</code></term>
+ <listitem>
+ <para>
+ Update the header of the table with the identifier of <replaceable>tableId</replaceable>. Alternatively, if the current component is contained within the table, use <code><varname>render</varname>=@header</code> instead.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:@footer</code></term>
+ <listitem>
+ <para>
+ Update the footer of the table with the identifier of <replaceable>tableId</replaceable>. Alternatively, if the current component is contained within the table, use <code><varname>render</varname>=@footer</code> instead.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</section>
- -->
<section id="sect-Component_Reference-a4jrepeat-Reference_data">
<title>Reference data</title>
@@ -396,6 +467,9 @@
<para>
The <sgmltag><rich:dataGrid></sgmltag> component is used to arrange data objects in a grid. Values in the grid can be updated dynamically from the data model, and Ajax updates can be limited to specific rows. The component supports <literal>header</literal>, <literal>footer</literal>, and <literal>caption</literal> facets.
</para>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component is similar in function to the JavaServer Faces <sgmltag><h:panelGrid></sgmltag> component. However, the <sgmltag><rich:dataGrid></sgmltag> component additionally allows iteration through the data model rather than just aligning child components in a grid layout.
+ </para>
<figure id="figu-Component_Reference-richdataGrid-The_richdataGrid_component">
<title>The <sgmltag><rich:dataGrid></sgmltag> component</title>
<mediaobject>
@@ -455,12 +529,8 @@
<section id="sect-Component_Reference-richdataGrid-Patial_updates">
<title>Patial updates</title>
<para>
- As the component is based on the <sgmltag><a4j:repeat></sgmltag> component, it can be partially updated with Ajax. The <varname>ajaxKeys</varname> attribute allows row keys to be defined, which are updated after an Ajax request.
+ As <sgmltag><rich:dataGrid></sgmltag> the component is based on the <sgmltag><a4j:repeat></sgmltag> component, it can be partially updated with Ajax. Refer to <xref linkend="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates" /> for details on partially updating the <sgmltag><rich:dataGrid></sgmltag> component.
</para>
- <example id="exam-Component_Reference-richdataGrid-ajaxKeys_example">
- <title><varname>ajaxKeys</varname> example</title>
- <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richdataGrid-ajaxKeys_example.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
</section>
<section id="sect-Component_Reference-richdataGrid-Reference_data">
@@ -586,7 +656,7 @@
<section id="sect-Component_Reference-richdataTable-Partial_updates">
<title>Partial updates</title>
<para>
- The <sgmltag><rich:dataTable></sgmltag> component is based on the <sgmltag><a4j:repeat></sgmltag> component, and as such it can be partially updated using Ajax. The <varname>ajaxKeys</varname> attribute defines the rows to be updated during an Ajax request.
+ As <sgmltag><rich:dataTable></sgmltag> the component is based on the <sgmltag><a4j:repeat></sgmltag> component, it can be partially updated with Ajax. Refer to <xref linkend="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates" /> for details on partially updating the <sgmltag><rich:dataTable></sgmltag> component.
</para>
</section>
@@ -951,7 +1021,7 @@
</variablelist>
</section>
- <!-- TODO
+ <!--
<section id="sect-Component_Reference-richlist-Bullet_point_type">
<title>Bullet point type</title>
<para>
@@ -986,153 +1056,7 @@
</section>
-->
- <section id="sect-Component_Reference-richlist-Customizing_the_list">
- <title>Customizing the list</title>
- <para>
- The <varname>first</varname> attribute specifies which item in the data model to start from, and the <varname>rows</varname> attribute specifies the number of items to list. The <varname>title</varname> attribute is used for a floating tool-tip. <xref linkend="exam-Component_Reference-richlist-richlist_example" /> shows a simple example using the <sgmltag><rich:dataList></sgmltag> component.
- </para>
- <example id="exam-Component_Reference-richlist-richlist_example">
- <title><sgmltag><rich:list></sgmltag> example</title>
- <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-richdataList-richdataList_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <blockquote>
- <figure id="figu-Component_Reference-richlist-richlist_example">
- <title><sgmltag><rich:list></sgmltag> example</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richdataList-richdataList_example.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A list of cars displayed in a list with bullet points.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- </section>
-
- <section id="sect-Component_Reference-richlist-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.List</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlList</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.List</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.ListRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.ListTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
-
- <!--<rich:dataDefinitionList>-->
- <!-- TODO
- <section id="sect-Component_Reference-Tables_and_grids-richdataDefinitionList">
- <title><sgmltag><rich:dataDefinitionList></sgmltag></title>
- <para>
- The <sgmltag><rich:dataDefinitionList></sgmltag> component renders a list of items with definitions. The component uses a data model for managing the list items, which can be updated dynamically.
- </para>
-
- <section id="sect-Component_Reference-richdataDefinitionList-Basic_usage">
- <title>Basic usage</title>
- <para>
- The <varname>var</varname> attribute names a variable for iterating through the items in the data model. The items to iterate through are determined with the <varname>value</varname> attribute by using EL (Expression Lanugage).
- </para>
- </section>
-
- <section id="sect-Component_Reference-richdataDefinitionList-Customizing_the_list">
- <title>Customizing the list</title>
- <para>
- The <varname>first</varname> attribute specifies which item in the data model to start from, and the <varname>rows</varname> attribute specifies the number of items to list. The <varname>title</varname> attribute is used for a floating tool-tip. <xref linkend="exam-Component_Reference-richdataDefinitionList-richdataDefinitionList_example" /> shows a simple example using the <sgmltag><rich:dataDefinitionList></sgmltag> component.
- </para>
- <example id="exam-Component_Reference-richdataDefinitionList-richdataDefinitionList_example">
- <title><sgmltag><rich:dataDefinitionList></sgmltag> example</title>
- <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-Tables_and_grids-richdataDefinitionList_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <blockquote>
- <figure id="figu-Component_Reference-richdataDefinitionList_example-richdataDefinitionList_example">
- <title><sgmltag><rich:dataDefinitionList></sgmltag> example</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-richdataDefinitionList_example.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A list of cars with their price and mileage displayed as a data definition.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- </section>
-
- <section id="sect-Component_Reference-richdataDefinitionList-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.DataDefinitionList</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataDefinitionList</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.DataDefinitionList</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.DataDefinitionListRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.DataDefinitionListTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
- -->
-
- <!--<rich:dataOrderedList>-->
- <!-- TODO
- <section id="sect-Component_Reference-Tables_and_grids-richdataOrderedList">
- <title><sgmltag><rich:dataOrderedList></sgmltag></title>
- <para>
- The <sgmltag><rich:dataOrderedList></sgmltag> component renders an ordered list of items from a data model. Specific rows can be updated dynamically without updating the entire list.
- </para>
-
- <section id="sect-Component_Reference-richdataOrderedList-Basic_usage">
- <title>Basic usage</title>
- <para>
- The <varname>var</varname> attribute names a variable for iterating through the items in the data model. The items to iterate through are determined with the <varname>value</varname> attribute by using EL (Expression Lanugage).
- </para>
- </section>
-
+ <!--
<section id="sect-Component_Reference-richdataOrderedList-Numeration_type">
<title>Numeration type</title>
<para>
@@ -1181,25 +1105,33 @@
</varlistentry>
</variablelist>
</section>
+ -->
- <section id="sect-Component_Reference-richdataOrderedList-Customizing_the_list">
+ <section id="sect-Component_Reference-richlist-Bullet_and_numeration_appearance">
+ <title>Bullet and numeration appearance</title>
+ <para>
+ The appearance of bullet points for unordered lists or numeration for ordered lists can be customized through CSS, using the <property>list-style-type</property> property.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richlist-Customizing_the_list">
<title>Customizing the list</title>
<para>
- The <varname>first</varname> attribute specifies which item in the data model to start from, and the <varname>rows</varname> attribute specifies the number of items to list. The <varname>title</varname> attribute defines a pop-up title. To only update a sub-set of the rows in the list, use the <varname>ajaxKeys</varname> attribute, which points to an object that contains the specified rows.
+ The <varname>first</varname> attribute specifies which item in the data model to start from, and the <varname>rows</varname> attribute specifies the number of items to list. The <varname>title</varname> attribute is used for a floating tool-tip. <xref linkend="exam-Component_Reference-richlist-richlist_example" /> shows a simple example using the <sgmltag><rich:dataList></sgmltag> component.
</para>
- <example id="exam-Component_Reference-richdataOrderedList-richdataOrderedList_example">
- <title><sgmltag><rich:dataOrderedList></sgmltag> example</title>
- <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-Tables_and_grids-richdataOrderedList_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <example id="exam-Component_Reference-richlist-richlist_example">
+ <title><sgmltag><rich:list></sgmltag> example</title>
+ <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-richdataList-richdataList_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
<blockquote>
- <figure id="figu-Component_Reference-richdataOrderedList_example-richdataOrderedList_example">
- <title><sgmltag><rich:dataOrderedList></sgmltag> example</title>
+ <figure id="figu-Component_Reference-richlist-richlist_example">
+ <title><sgmltag><rich:list></sgmltag> example</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-richdataOrderedList_example.png" format="PNG" />
+ <imagedata fileref="images/figu-Component_Reference-richdataList-richdataList_example.png" format="PNG" />
</imageobject>
<textobject>
<para>
- A list of cars displayed in a numbered list.
+ A list of cars displayed in a list with bullet points.
</para>
</textobject>
</mediaobject>
@@ -1208,38 +1140,37 @@
</example>
</section>
- <section id="sect-Component_Reference-richdataOrderedList-Reference_data">
+ <section id="sect-Component_Reference-richlist-Reference_data">
<title>Reference data</title>
<itemizedlist>
<listitem>
<para>
- <parameter>component-type</parameter>: <classname>org.richfaces.DataOrderedList</classname>
+ <parameter>component-type</parameter>: <classname>org.richfaces.List</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataOrderedList</classname>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlList</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-family</parameter>: <classname>org.richfaces.DataOrderedList</classname>
+ <parameter>component-family</parameter>: <classname>org.richfaces.List</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.DataOrderedListRenderer</classname>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.ListRenderer</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.DataOrderedListTag</classname>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.ListTag</classname>
</para>
</listitem>
</itemizedlist>
</section>
</section>
- -->
<section id="sect-Component_Reference-Tables_and_grids-Table_filtering">
<title>Table filtering</title>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocomplete-Defining_suggestion_values.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocomplete-Defining_suggestion_values.xml_sample 2010-09-29 01:26:56 UTC (rev 19361)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocomplete-Defining_suggestion_values.xml_sample 2010-09-29 01:32:39 UTC (rev 19362)
@@ -1 +1 @@
-<rich:autocomplete value="#{bean.state}" autocompleteList="#{bean.suggestions}" />
+<rich:autocomplete value="#{bean.state}" autocompleteMethod="#{bean.suggestions}" />
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample (from rev 19352, modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample)
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample 2010-09-29 01:32:39 UTC (rev 19362)
@@ -0,0 +1,3 @@
+<h:inputText>
+ <rich:autocomplete value="#{bean.state}" autocompleteMethod="#{bean.suggestions}" />
+</h:inputText>
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsiblePanel-richcollapsiblePanel.png (from rev 19352, modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsiblePanel-richcollapsiblePanel.png)
===================================================================
(Binary files differ)
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinplaceSelect-richinplaceSelect.png (from rev 19352, modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinplaceSelect-richinplaceSelect.png)
===================================================================
(Binary files differ)
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinputNumberSlider-richinputNumberSlider.png (from rev 19352, modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinputNumberSlider-richinputNumberSlider.png)
===================================================================
(Binary files differ)
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinputNumberSpinner-richinputNumberSpinner.png (from rev 19352, modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richinputNumberSpinner-richinputNumberSpinner.png)
===================================================================
(Binary files differ)
Modified: modules/docs/trunk/Migration_Guide/src/main/docbook/en-US/Changes_and_new_features.xml
===================================================================
--- modules/docs/trunk/Migration_Guide/src/main/docbook/en-US/Changes_and_new_features.xml 2010-09-29 01:26:56 UTC (rev 19361)
+++ modules/docs/trunk/Migration_Guide/src/main/docbook/en-US/Changes_and_new_features.xml 2010-09-29 01:32:39 UTC (rev 19362)
@@ -4,12 +4,12 @@
<chapter id="chap-Migration_Guide-Changes_and_new_features">
<title>Changes and new features</title>
<para>
- There have been several changes made to the RichFaces framework for version &VERSION; that may affect migrated projects.
+ There have been several changes made to the RichFaces framework for version 4 that may affect migrated projects.
</para>
<section id="sect-Migration_Guide-Changes_and_new_features-JSF_2_integration">
<title>JSF 2 integration</title>
<para>
- RichFaces &VERSION; has full support for JavaServer Faces (<acronym>JSF</acronym>) 2. Due to limited support for JavaServer Pages (JSP) in JSF2, RichFaces no longer fully supports JSP either.
+ RichFaces 4 has full support for JavaServer Faces (<acronym>JSF</acronym>) 2. Due to limited support for JavaServer Pages (JSP) in JSF2, RichFaces no longer fully supports JSP either.
</para>
</section>
@@ -25,7 +25,7 @@
<term><varname>process</varname></term>
<listitem>
<para>
- Changed to <varname>execute</varname> in &VERSION;.
+ Changed to <varname>execute</varname> in 4.
</para>
<variablelist>
<varlistentry>
@@ -115,7 +115,7 @@
<term><varname>reRender</varname></term>
<listitem>
<para>
- Changed to <varname>render</varname> in &VERSION;.
+ Changed to <varname>render</varname> in 4.
</para>
<variablelist>
<varlistentry>
@@ -211,7 +211,7 @@
<term><varname>eventsQueue</varname></term>
<listitem>
<para>
- Changed to <varname>queue</varname> in &VERSION;.
+ Changed to <varname>queue</varname> in 4.
</para>
<variablelist>
<varlistentry>
@@ -304,7 +304,7 @@
<term><varname>limitToList</varname></term>
<listitem>
<para>
- Changed to <varname>limitRender</varname> in &VERSION;.
+ Changed to <varname>limitRender</varname> in 4.
</para>
<variablelist>
<varlistentry>
@@ -400,7 +400,7 @@
<term><varname>onbeforedomupdate</varname></term>
<listitem>
<para>
- Changed to <varname>onsuccess</varname> in &VERSION;.
+ Changed to <varname>onsuccess</varname> in 4.
</para>
<variablelist>
<varlistentry>
@@ -458,7 +458,7 @@
<term><varname>ignoreDupResponses</varname></term>
<listitem>
<para>
- Deprecated. Functionality moved to <varname>queue</varname> in &VERSION;.
+ Deprecated. Functionality moved to <varname>queue</varname> in 4.
</para>
<variablelist>
<varlistentry>
@@ -557,7 +557,7 @@
<term><varname>requestDelay</varname></term>
<listitem>
<para>
- Deprecated. Functionality moved to <varname>queue</varname> in &VERSION;.
+ Deprecated. Functionality moved to <varname>queue</varname> in 4.
</para>
<variablelist>
<varlistentry>
@@ -638,7 +638,7 @@
<term><varname>ajaxSingle</varname></term>
<listitem>
<para>
- Deprecated. Use <code>execute="@this"</code> in &VERSION; instead.
+ Deprecated. Use <code>execute="@this"</code> in 4 instead.
</para>
<variablelist>
<varlistentry>
@@ -779,7 +779,7 @@
<section id="sect-Migration_Guide-Changes_and_new_features-Feature_changes">
<title>Feature changes</title>
<para>
- Features have been altered or added to existing components and behaviors in the <productname>RichFaces</productname> &VERSION; framework. Refer to the <citetitle>Developer Guide</citetitle> for full details on how to make use of any new features.
+ Features have been altered or added to existing components and behaviors in the <productname>RichFaces</productname> 4 framework. Refer to the <citetitle>Developer Guide</citetitle> for full details on how to make use of any new features.
</para>
<section id="sect-Migration_Guide-Feature_changes-Server_side_process_and_render_mechanisms">
<title>Server-side process and render mechanisms</title>
@@ -943,7 +943,7 @@
<section id="sect-Migration_Guide-Changes_and_new_features-Consolidated_or_renamed_components">
<title>Consolidated or renamed components</title>
<para>
- Several new components and behaviors have been added to <productname>RichFaces</productname> &VERSION;, some of which replace the functionality of deprecated elements. For full details on how to use these new components and behaviors, refer to the <citetitle>Component Reference</citetitle>.
+ Several new components and behaviors have been added to <productname>RichFaces</productname> 4, some of which replace the functionality of deprecated elements. For full details on how to use these new components and behaviors, refer to the <citetitle>Component Reference</citetitle>.
</para>
<section id="sect-Migration_Guide-Consolidated_or_renamed_components-richautocomplete">
@@ -960,6 +960,13 @@
</para>
</section>
+ <section id="sect-Migration_Guide-Consolidated_or_renamed_components-richcollapsiblePanel">
+ <title><sgmltag><rich:collapsiblePanel></sgmltag></title>
+ <para>
+ The <sgmltag><rich:collapsiblePanel></sgmltag> component replaces the old <sgmltag><rich:simpleTogglePanel></sgmltag> component.
+ </para>
+ </section>
+
<section id="sect-Migration_Guide-Consolidated_or_renamed_components-richextendedDataTable">
<title><sgmltag><rich:extendedDataTable></sgmltag></title>
<para>
@@ -967,6 +974,19 @@
</para>
</section>
+ <section id="sect-Component_Reference-Consolidated_or_renamed_components-richlist">
+ <title><sgmltag><rich:list></sgmltag></title>
+ <para>
+ The <sgmltag><rich:list></sgmltag> component now combines the functionality of the old <sgmltag><rich:dataList></sgmltag>, <sgmltag><rich:dataDefinitionList></sgmltag>, and <sgmltag><rich:dataOrderedList></sgmltag> components.
+ </para>
+ <note>
+ <title>List styles</title>
+ <para>
+ Previously, the bullet styles for the <sgmltag><rich:dataList></sgmltag> component and the numeration styles for the <sgmltag><rich:dataOrderedList></sgmltag> component were specified with the <varname>type</varname> attribute. The <varname>type</varname> attribute for the <sgmltag><rich:list></sgmltag> component is now used to specify the type of list, and the bullet and numeration styles are now handled in CSS. Refer to the <sgmltag><rich:list></sgmltag> component section in the <citetitle>RichFaces Component Reference</citetitle> for details.
+ </para>
+ </note>
+ </section>
+
<section id="sect-Migration_Guide-Consolidated_or_renamed_components-richpopupPanel">
<title><sgmltag><rich:popupPanel></sgmltag></title>
<para>
@@ -986,7 +1006,7 @@
<section id="sect-Migration_Guide-Changes_and_new_features-New_components_and_behaviors">
<title>New components and behaviors</title>
<para>
- Several new components and behaviors have been added to <productname>RichFaces</productname> &VERSION;, some of which replace the functionality of deprecated elements. For full details on how to use these new components and behaviors, refer to the <citetitle>Developer Guide</citetitle>.
+ Several new components and behaviors have been added to <productname>RichFaces</productname> 4, some of which replace the functionality of deprecated elements. For full details on how to use these new components and behaviors, refer to the <citetitle>Developer Guide</citetitle>.
</para>
<section id="sect-Migration_Guide-New_components_and_behaviors-richbusyBehavior">
@@ -1007,13 +1027,13 @@
<section id="sect-Migration_Guide-Changes_and_new_features-Deprecated_components_and_behaviors">
<title>Deprecated components and behaviors</title>
<para>
- Some components and behaviors have been deprecated in <productname>RichFaces</productname> &VERSION;. For the most part these items have their functionality replicated by another component or behavior. Refer to <xref linkend="sect-Migration_Guide-Changes_and_new_features-Consolidated_or_renamed_components" /> for further details on consolidated functionality.
+ Some components and behaviors have been deprecated in <productname>RichFaces</productname> 4. For the most part these items have their functionality replicated by another component or behavior. Refer to <xref linkend="sect-Migration_Guide-Changes_and_new_features-Consolidated_or_renamed_components" /> for further details on consolidated functionality.
</para>
<section id="sect-Migration_Guide-Deprecated_components_and_behaviors-a4jpage">
<title><sgmltag><a4j:page></sgmltag></title>
<para>
- <productname>RichFaces</productname> &VERSION; drops support for the <sgmltag><a4j:page></sgmltag> component. The component was previously used for solving incompatibility in the JavaServer Pages (<acronym>JSP</acronym>) environment with Apache MyFaces in early Ajax4jsf versions.
+ <productname>RichFaces</productname> 4 drops support for the <sgmltag><a4j:page></sgmltag> component. The component was previously used for solving incompatibility in the JavaServer Pages (<acronym>JSP</acronym>) environment with Apache MyFaces in early Ajax4jsf versions.
</para>
</section>
@@ -1024,6 +1044,13 @@
</para>
</section>
+ <section id="sect-Migration_Guide-Deprecated_components_and_behaviors-richdataList_richdataDefinitionList_and_richdataOrderedList">
+ <title><sgmltag><rich:dataList></sgmltag>, <sgmltag><rich:dataDefinitionList></sgmltag>, and <sgmltag><rich:dataOrderedList></sgmltag></title>
+ <para>
+ The functionality of the old <sgmltag><rich:dataList></sgmltag>, <sgmltag><rich:dataDefinitionList></sgmltag>, and <sgmltag><rich:dataOrderedList></sgmltag> components is now available through the <sgmltag><rich:list></sgmltag> component.
+ </para>
+ </section>
+
<section id="sect-Migration_Guide-Deprecated_components_and_behaviors-richmodalPanel">
<title><sgmltag><rich:modalPanel></sgmltag></title>
<para>
@@ -1045,6 +1072,13 @@
</para>
</section>
+ <section id="sect-Migration_Guide-Deprecated_components_and_behaviors-richsimpleTogglePanel">
+ <title><sgmltag><rich:simpleTogglePanel></sgmltag></title>
+ <para>
+ The functionality of the old <sgmltag><rich:simpleTogglePanel></sgmltag> component is now available through the <sgmltag><rich:collapsiblePanel></sgmltag> component.
+ </para>
+ </section>
+
</section>
</chapter>
14 years, 3 months
JBoss Rich Faces SVN: r19360 - branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-09-28 21:08:39 -0400 (Tue, 28 Sep 2010)
New Revision: 19360
Added:
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java
Modified:
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java
Log:
CODING IN PROGRESS - issue RF-9323: CDK annotation @RendererSpecificComponent.attributes doesn't work
https://jira.jboss.org/browse/RF-9323
Added: branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java
===================================================================
--- branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java (rev 0)
+++ branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java 2010-09-29 01:08:39 UTC (rev 19360)
@@ -0,0 +1,45 @@
+/*
+ * $Id$
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.richfaces.component;
+
+import org.richfaces.cdk.annotations.Attribute;
+
+/**
+ * <p class="changed_added_4_0">Interface for concrete panel classes which can render simple text header.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface Panel {
+
+ /**
+ * <p class="changed_added_4_0">Panel header text. "header" attribute can be used for simple text header.
+ * For more complicated content can be put into "header" facet instead.</p>
+ * @return
+ */
+ @Attribute
+ String getHeader();
+
+ void setHeader(String header);
+
+}
Property changes on: branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java
===================================================================
--- branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java 2010-09-29 00:17:46 UTC (rev 19359)
+++ branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java 2010-09-29 01:08:39 UTC (rev 19360)
@@ -23,8 +23,10 @@
import javax.faces.component.UIComponentBase;
+import org.richfaces.cdk.annotations.Facet;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.cdk.annotations.RendererSpecificComponent;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
@@ -32,11 +34,24 @@
* JSF component class
*
*/
-@JsfComponent(tag = @Tag(type = TagType.Facelets),
- renderer = @JsfRenderer(type = "org.richfaces.PanelRenderer")
- )
+@JsfComponent(
+ type="org.richfaces.Panel",
+ family=UIPanel.COMPONENT_FAMILY,
+ components={
+ @RendererSpecificComponent(
+ type = "org.richfaces.HtmlPanel",
+ generate="org.richfaces.components.html.HtmlPanel",
+ tag = @Tag(type = TagType.Facelets,name="panel"),
+ renderer = @JsfRenderer(type = "org.richfaces.PanelRenderer"),
+ facets=@Facet(name="header",generate=false),
+ attributes={"core-props.xml","events-props.xml","i18n-props.xml"},
+ interfaces=Panel.class
+ )
+ }
+)
public class UIPanel extends UIComponentBase {
- private static final String COMPONENT_FAMILY = "org.richfaces.Panel";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.Panel";
public boolean getRendersChildren() {
return true;
14 years, 3 months
JBoss Rich Faces SVN: r19359 - in trunk/archetypes: rf-gae-sample/src/main/resources/archetype-resources and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-09-28 20:17:46 -0400 (Tue, 28 Sep 2010)
New Revision: 19359
Modified:
trunk/archetypes/rf-gae-sample/pom.xml
trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml
trunk/archetypes/richfaces-archetype-simpleapp/pom.xml
trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml
Log:
RF-9266 updated archetypes so that correct version is used in generated project
Modified: trunk/archetypes/rf-gae-sample/pom.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/pom.xml 2010-09-28 20:54:35 UTC (rev 19358)
+++ trunk/archetypes/rf-gae-sample/pom.xml 2010-09-29 00:17:46 UTC (rev 19359)
@@ -17,6 +17,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <!-- Setting this property for resource filtering so that generated project
+ uses correct version of richfaces.
+ -->
+ <archetype.project.version>${project.version}</archetype.project.version>
</properties>
<build>
@@ -34,6 +38,12 @@
<extensions>true</extensions>
</plugin>
</plugins>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
</build>
<profiles>
Modified: trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml 2010-09-28 20:54:35 UTC (rev 19358)
+++ trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml 2010-09-29 00:17:46 UTC (rev 19359)
@@ -26,7 +26,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <org.richfaces.bom.version>4.0.0.20100826-M2</org.richfaces.bom.version>
+ <!-- Setting this property for resource filtering so that generated project
+ uses correct version of richfaces.
+ -->
+ <org.richfaces.bom.version>${archetype.project.version}</org.richfaces.bom.version>
</properties>
<build>
Modified: trunk/archetypes/richfaces-archetype-simpleapp/pom.xml
===================================================================
--- trunk/archetypes/richfaces-archetype-simpleapp/pom.xml 2010-09-28 20:54:35 UTC (rev 19358)
+++ trunk/archetypes/richfaces-archetype-simpleapp/pom.xml 2010-09-29 00:17:46 UTC (rev 19359)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.richfaces</groupId>
@@ -17,6 +18,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <!-- Setting this property for resource filtering so that generated project
+ uses correct version of richfaces.
+ -->
+ <archetype.project.version>${project.version}</archetype.project.version>
</properties>
<build>
@@ -34,6 +39,12 @@
<extensions>true</extensions>
</plugin>
</plugins>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
</build>
<profiles>
@@ -76,7 +87,7 @@
</build>
</profile>
</profiles>
-
+
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/archetypes/richfac...</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/archetypes/richfaces-...</developerConnection>
Modified: trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml
===================================================================
--- trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml 2010-09-28 20:54:35 UTC (rev 19358)
+++ trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml 2010-09-29 00:17:46 UTC (rev 19359)
@@ -31,7 +31,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <org.richfaces.bom.version>4.0.0-SNAPSHOT</org.richfaces.bom.version>
+ <!-- Setting this property for resource filtering so that generated project
+ uses correct version of richfaces.
+ -->
+ <org.richfaces.bom.version>${archetype.project.version}</org.richfaces.bom.version>
</properties>
<build>
14 years, 3 months
JBoss Rich Faces SVN: r19358 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-28 16:54:35 -0400 (Tue, 28 Sep 2010)
New Revision: 19358
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
Log:
https://jira.jboss.org/browse/RF-7944
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2010-09-28 18:20:30 UTC (rev 19357)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2010-09-28 20:54:35 UTC (rev 19358)
@@ -1,4 +1,3 @@
-
.rf-tb-hdr {
white-space: nowrap;
border: "1px solid #{richSkin.panelBorderColor}";
@@ -10,6 +9,7 @@
background-position: top;
background-repeat: repeat-x;
background-color: "#{richSkin.tabBackgroundColor}";
+ color: '#{richSkin.generalTextColor}';
}
14 years, 3 months
JBoss Rich Faces SVN: r19356 - in branches/RF-8742/examples/validator-demo: src/main/java/org/richfaces/example and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-09-28 14:03:59 -0400 (Tue, 28 Sep 2010)
New Revision: 19356
Added:
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/Bean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/GraphValidatorBean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java
branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java
branches/RF-8742/examples/validator-demo/src/main/webapp/examples/ajaxValidation.xhtml
branches/RF-8742/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml
branches/RF-8742/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml
Modified:
branches/RF-8742/examples/validator-demo/pom.xml
Log:
import validator example code from 3.3.3
Modified: branches/RF-8742/examples/validator-demo/pom.xml
===================================================================
--- branches/RF-8742/examples/validator-demo/pom.xml 2010-09-28 16:43:40 UTC (rev 19355)
+++ branches/RF-8742/examples/validator-demo/pom.xml 2010-09-28 18:03:59 UTC (rev 19356)
@@ -39,14 +39,30 @@
<dependencies>
<dependency>
- <groupId>org.richfaces.ui.validator</groupId>
- <artifactId>richfaces-ui-validator-ui</artifactId>
- </dependency>
- <dependency>
<groupId>org.richfaces.examples</groupId>
<artifactId>template</artifactId>
<version>4.0.0-SNAPSHOT</version>
<type>war</type>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.validator</groupId>
+ <artifactId>richfaces-ui-validator-ui</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.validator</groupId>
+ <artifactId>richfaces-ui-validator-impl</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.validator</groupId>
+ <artifactId>richfaces-ui-validator-api</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
</dependencies>
</project>
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/Bean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/Bean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/Bean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,72 @@
+/**
+ * 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.example;
+
+import javax.validation.constraints.Pattern;
+
+
+
+
+/**
+ * JSF bean with text property validation.
+ */
+public class Bean {
+
+ /**
+ * Text property
+ */
+ private String email;
+
+ private String creditCardNumber;
+
+ /**
+ * @return the creditCardNumber
+ */
+ @Pattern(regexp="\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d")
+ public String getCreditCardNumber() {
+ return creditCardNumber;
+ }
+
+ /**
+ * @param creditCardNumber the creditCardNumber to set
+ */
+ public void setCreditCardNumber(String creditCardNumber) {
+ this.creditCardNumber = creditCardNumber;
+ }
+
+ /**
+ * @return the text
+ */
+// @Email
+// @Pattern(regexp="^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9](a)[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$")
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setEmail(String text) {
+ this.email = text;
+ }
+
+}
\ No newline at end of file
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,49 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.validation.Valid;
+import javax.validation.constraints.Max;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class DataBean {
+
+ private final List<Validable> beans;
+
+ /**
+ * @return the beans
+ */
+ @Valid
+ public List<Validable> getBeans() {
+ return beans;
+ }
+
+ public DataBean() {
+ beans = new ArrayList<Validable>(6);
+ beans.add(new NotNullBean());
+ beans.add(new NotEmptyBean());
+ beans.add(new LengthBean());
+ beans.add(new MinBean());
+ beans.add(new MaxBean());
+ beans.add(new MinMaxBean());
+ }
+
+ @Max(value=20,message="Total value should be less then 20")
+ public int getTotal(){
+ int total = 0;
+ for (Validable bean : beans) {
+ total += bean.getIntValue();
+ }
+ return total;
+ }
+
+
+}
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/GraphValidatorBean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/GraphValidatorBean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/GraphValidatorBean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,99 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class GraphValidatorBean implements Cloneable {
+
+ @Min(0)
+ @Max(10)
+ private int first ;
+
+ @Min(value=5,message="Value {0} should be more than {value}")
+ @Max(15)
+ private int second ;
+
+ @Min(0)
+ @Max(20)
+ private int third ;
+
+ private String actionResult;
+
+ /**
+ * @return the actionResult
+ */
+ public String getActionResult() {
+ return actionResult;
+ }
+
+ /**
+ * @param actionResult the actionResult to set
+ */
+ public void setActionResult(String actionResult) {
+ this.actionResult = actionResult;
+ }
+
+ /**
+ * @return the first
+ */
+ public int getFirst() {
+ return first;
+ }
+
+ /**
+ * @param first the first to set
+ */
+ public void setFirst(int first) {
+ this.first = first;
+ }
+
+ /**
+ * @return the second
+ */
+ public int getSecond() {
+ return second;
+ }
+
+ /**
+ * @param second the second to set
+ */
+ public void setSecond(int second) {
+ this.second = second;
+ }
+
+ /**
+ * @return the third
+ */
+ public int getThird() {
+ return third;
+ }
+
+ /**
+ * @param third the third to set
+ */
+ public void setThird(int third) {
+ this.third = third;
+ }
+
+ /**
+ * @return total summ of the list values.
+ */
+ @Max(value=20,message="Total value should be less then 20")
+ public int getSumm(){
+ return first+second+third;
+ }
+
+ public String action() {
+ // Persist your data here
+ setActionResult("Data have been saved");
+ return "ok";
+ }
+}
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,64 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Size;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class LengthBean implements Validable {
+
+ @Size(max=10,min=2,message="incorrect field length")
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Validate String Length, for a range 2-10 chars";
+ }
+
+ public String getIntDescription() {
+ return "Integer Value, no restrictions";
+ }
+
+ public String getIntSummary() {
+ return "Invalid user name";
+ }
+
+ public String getTextSummary() {
+ return "Invalid user name";
+ }
+
+}
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,69 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Pattern;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MaxBean implements Validable {
+
+ private String text;
+
+ @Max(10)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+// @CreditCardNumber
+ @Pattern(regexp="\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d")
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, should be correct credit card number";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, less then 10";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid number of items";
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid payment card";
+ }
+
+}
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,66 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Min;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MinBean implements Validable {
+
+ private String text;
+
+ @Min(2)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, more then 1";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid rooms qty";
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,68 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MinMaxBean implements Validable {
+
+ private String text;
+
+ @Min(value=2,message="Value {0} should be more than {value}")
+ @Max(10)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text Value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, valid values from 2 to 10";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid price";
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,67 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Size;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class NotEmptyBean implements Validable {
+
+ @Size(min=1)
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, Not Empty Validation";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid password";
+ }
+
+}
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,66 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class NotNullBean implements Validable {
+
+ @NotNull
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text Value, Not Null Validation";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid address";
+ }
+
+}
Added: branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,21 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+/**
+ * @author asmirnov
+ *
+ */
+public interface Validable {
+
+ public String getText();
+
+ public String getTextDescription();
+
+ public String getTextSummary();
+
+ public int getIntValue();
+
+ public String getIntSummary();
+}
Added: branches/RF-8742/examples/validator-demo/src/main/webapp/examples/ajaxValidation.xhtml
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/webapp/examples/ajaxValidation.xhtml (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/webapp/examples/ajaxValidation.xhtml 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:c="http://java.sun.com/jstl/core">
+<ui:composition template="/layout/template.xhtml">
+ <ui:param name="title" value="<rich:ajaxValidator> usage" />
+ <ui:param name="javaBean" value="org/richfaces/example/Bean.java" />
+ <!-- Page header -->
+ <ui:define name="header">
+ <h1><rich:ajaxValidator> usage</h1>
+ </ui:define>
+ <!-- content -->
+ <ui:define name="content">
+ <h:form id="form">
+ <h:panelGrid columns="3">
+ <h:outputLabel for="email" value="Email Address:" />
+ <h:inputText id="email" value="#{bean.email}" label="Email">
+ <rich:ajaxValidator event="onkeyup" summary="Invalid Email address" profiles="javax.validation.groups.Default"/>
+ </h:inputText>
+ <rich:message for="email"/>
+ <h:outputLabel for="card" value="Credit card number:" />
+ <h:inputText id="card" value="#{bean.creditCardNumber}" label="Credit card">
+ <rich:ajaxValidator event="onkeyup" summary="Invalid credit card number" profiles="javax.validation.groups.Default"/>
+ </h:inputText>
+ <rich:message for="card"/>
+ </h:panelGrid>
+ <h:commandButton value="Submit"></h:commandButton>
+ <rich:messages/>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Added: branches/RF-8742/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:c="http://java.sun.com/jstl/core">
+<ui:composition template="/layout/template.xhtml">
+ <ui:param name="title" value="<rich:beanValidator> usage" />
+ <ui:param name="javaBean" value="org/richfaces/example/Bean.java" />
+ <!-- Page header -->
+ <ui:define name="header">
+ <h1><rich:beanValidator> usage</h1>
+ </ui:define>
+ <!-- content -->
+ <ui:define name="content">
+ <h:form id="form">
+ <h:panelGrid columns="3">
+ <h:outputLabel for="email" value="Email Address:" />
+ <h:inputText id="email" value="#{bean.email}" label="Email">
+ <rich:beanValidator summary="Invalid Email address" />
+ </h:inputText>
+ <rich:message for="email"/>
+ <h:outputLabel for="card" value="Credit card number:" />
+ <h:inputText id="card" value="#{bean.creditCardNumber}" label="Credit card">
+ <rich:beanValidator summary="Invalid credit card number" profiles="javax.validation.groups.Default"/>
+ </h:inputText>
+ <rich:message for="card"/>
+ </h:panelGrid>
+ <h:commandButton value="Submit"></h:commandButton>
+ <rich:messages/>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
Added: branches/RF-8742/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml
===================================================================
--- branches/RF-8742/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml (rev 0)
+++ branches/RF-8742/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml 2010-09-28 18:03:59 UTC (rev 19356)
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:c="http://java.sun.com/jstl/core">
+<ui:composition template="/layout/template.xhtml">
+ <ui:param name="title" value="<rich:graphValidator> usage" />
+ <ui:param name="javaBean" value="org/richfaces/example/GraphValidatorBean.java" />
+ <!-- Page header -->
+ <ui:define name="header">
+ <h1><rich:graphValidator> usage</h1>
+ </ui:define>
+ <!-- content -->
+ <ui:define name="description">
+ <p>In that sampe <rich:graphValidator> component appends JSR-303 or Hibernate validators to all enclosed input components
+ that check restrictions for field values, and, in addition, validates whole bean.</p>
+ <p>JSF bean fields are annotated with @Min/@Max restrictions and getter for the 'total' attribute is also annotated by the @Max</p>
+ <p>As a result, even valid field values would make whole bean an invalid. For example, values '2','7','15' are valid for fields values but their sum exceed maximum total value '20'</p>
+ <p>Validator assignes new values to a cloned bean instance hence model is not updated with invalid values.</p>
+ </ui:define>
+ <ui:define name="content">
+ <h:form id="form">
+ <rich:graphValidator value="#{graphValidatorBean}" id="validator" profiles="javax.validation.groups.Default">
+ <h:panelGrid columns="4">
+ <h:outputText value=""/>
+ <h:outputText value="Input"/>
+ <h:outputText value="Message"/>
+ <h:outputText value="Model value"/>
+
+ <h:outputLabel for="value0" value="First value, integer from 0 to 10:" />
+ <h:inputText id="value0" value="#{graphValidatorBean.first}" label="First" />
+ <rich:message for="value0"/>
+ <h:outputText value="#{graphValidatorBean.first}"/>
+
+ <h:outputLabel for="value1" value="Second value,integer from 5 to 15:" />
+ <h:inputText id="value1" value="#{graphValidatorBean.second}" label="Second" />
+ <rich:message for="value1"/>
+ <h:outputText value="#{graphValidatorBean.second}"/>
+
+ <h:outputLabel for="value2" value="Third value,integer from 0 to 20:" />
+ <h:inputText id="value2" value="#{graphValidatorBean.third}" label="Third" />
+ <rich:message for="value2"/>
+ <h:outputText value="#{graphValidatorBean.third}"/>
+
+ <h:outputLabel for="total" value="Total, should be no more then 20:" />
+ <h:outputText id="total" value="#{graphValidatorBean.summ}"/>
+ </h:panelGrid>
+ <h:commandButton value="Submit" action="#{graphValidatorBean.action}"></h:commandButton>
+ <h:outputText id="result" value="#{graphValidatorBean.actionResult}"/>
+ </rich:graphValidator>
+ <rich:messages/>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
14 years, 3 months