JBoss Rich Faces SVN: r10044 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/listShuttle and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-08-12 04:46:25 -0400 (Tue, 12 Aug 2008)
New Revision: 10044
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ListShuttleTest.java
Log:
Add fireMouseEvent
Modified: trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml 2008-08-12 08:33:55 UTC (rev 10043)
+++ trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml 2008-08-12 08:46:25 UTC (rev 10044)
@@ -70,6 +70,22 @@
element.style.cssText = 'background-color: white';
element.innerHTML = 'No';
}
+
+ function fireMouseEvent(id, eventName, x, y) {
+ var e = $(id);
+ var evt;
+ if (document.createEvent) {
+ evt = document.createEvent("MouseEvents");
+ evt.initMouseEvent(eventName, true, true, window,0, x, y, x, y, false, false, false, false, 0, null);
+ evt.srcElement = e;
+ e.dispatchEvent(evt);
+ return evt;
+ }else {
+ if (e[eventName]) {
+ return e[eventName]();
+ }
+ }
+ }
</script>
<style type="text/css">
<ui:insert name="style"/>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml 2008-08-12 08:33:55 UTC (rev 10043)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml 2008-08-12 08:46:25 UTC (rev 10044)
@@ -11,21 +11,6 @@
</ui:define>
<ui:define name="component">
- <script type="text/javascript">
- function _selectItem(id) {
- var e = $(id);
- if (document.createEvent) {
- evt = document.createEvent("MouseEvents");
- evt.initMouseEvent("click", true, true, window,0, 0, 0, 0, 0, false, false, false, false, 0, null);
- evt.srcElement = e;
- e.dispatchEvent(evt);
- }else {
- if (e.click) {
- e.click();
- }
- }
- }
- </script>
<a4j:outputPanel>
<h:messages></h:messages>
</a4j:outputPanel>
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-08-12 08:33:55 UTC (rev 10043)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-08-12 08:46:25 UTC (rev 10044)
@@ -832,4 +832,17 @@
* @return
*/
public abstract String getTestUrl();
+
+ /**
+ * Simulates mouse event for element
+ * @param id - Element ID
+ * @param eventName - Mouse event Name
+ * @param x - X mouse position
+ * @param y - Y mouse position
+ * @return - Event
+ */
+ public String fireMouseEvent(String id, String eventName, int x, int y) {
+ return runScript("fireMouseEvent('" + id + "','" + eventName + "', "
+ + x + "," + y + ");");
+ }
}
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ListShuttleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-08-12 08:33:55 UTC (rev 10043)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-08-12 08:46:25 UTC (rev 10044)
@@ -225,7 +225,7 @@
private void _selectItem(String itemId) {
writeStatus("Select item id: " + itemId);
try {
- runScript("_selectItem('" + itemId + "')");
+ fireMouseEvent(itemId, "click", 0, 0);
} catch (Exception e) {
writeStatus("Selection item id: " + itemId + " failed.");
Assert.fail("No item was found. Item id: " + itemId + e);
16 years, 5 months
JBoss Rich Faces SVN: r10043 - trunk/test-applications/jsp/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-08-12 04:33:55 -0400 (Tue, 12 Aug 2008)
New Revision: 10043
Modified:
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Validator.xml
Log:
bean -> beanValidator
data -> dataValidator
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Validator.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Validator.xml 2008-08-12 08:33:16 UTC (rev 10042)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Validator.xml 2008-08-12 08:33:55 UTC (rev 10043)
@@ -3,12 +3,12 @@
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<managed-bean>
- <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-name>beanValidator</managed-bean-name>
<managed-bean-class>validator.Bean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
- <managed-bean-name>data</managed-bean-name>
+ <managed-bean-name>dataValidator</managed-bean-name>
<managed-bean-class>validator.DataBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
16 years, 5 months
JBoss Rich Faces SVN: r10042 - trunk/test-applications/jsp/src/main/webapp/Validator.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-08-12 04:33:16 -0400 (Tue, 12 Aug 2008)
New Revision: 10042
Modified:
trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp
trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorProperty.jsp
trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorStraightforward.jsp
Log:
bean -> beanValidator
data -> dataValidator
Modified: trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp 2008-08-12 08:26:30 UTC (rev 10041)
+++ trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp 2008-08-12 08:33:16 UTC (rev 10042)
@@ -17,10 +17,10 @@
<a4j:region>
<h2>Input fields with label and message in the JSF dataTable.
Each field validated by AJAX on "onchange" event</h2>
- <rich:graphValidator value="#{data}"
- binding="#{data.graphValidatorComponent}" id="graphValidatorID"
- rendered="#{data.rendered}">
- <rich:dataTable value="#{data.beans}" var="dataBean" id="table">
+ <rich:graphValidator value="#{dataValidator}"
+ binding="#{dataValidator.graphValidatorComponent}" id="graphValidatorID"
+ rendered="#{dataValidator.rendered}">
+ <rich:dataTable value="#{dataValidator.beans}" var="dataBean" id="table">
<f:facet name="header">
<h:outputText
value="Validate values in the data table. Total sum for an all integer values validated for a value less then 20" />
Modified: trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorProperty.jsp 2008-08-12 08:26:30 UTC (rev 10041)
+++ trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorProperty.jsp 2008-08-12 08:33:16 UTC (rev 10042)
@@ -5,7 +5,7 @@
<f:subview id="validatorPropertySubviewID">
<a4j:commandButton value="add(ajaxValidator) test" action="#{validator.add}"></a4j:commandButton>
- <a4j:commandButton value="add(graphValidator) test" action="#{data.add}"></a4j:commandButton>
+ <a4j:commandButton value="add(graphValidator) test" action="#{dataValidator.add}"></a4j:commandButton>
<br />
<br />
<h:panelGrid columns="2" style="display:block; vertical-align:top;">
@@ -67,12 +67,12 @@
<h:panelGrid columns="2" border="2" style="float:top;">
- <h:commandButton actionListener="#{data.checkBinding}"
+ <h:commandButton actionListener="#{dataValidator.checkBinding}"
value="Binding" />
- <h:outputText value="#{data.bindLabel}" />
+ <h:outputText value="#{dataValidator.bindLabel}" />
<h:outputText value="rendered" />
- <h:selectBooleanCheckbox value="#{data.rendered}"
+ <h:selectBooleanCheckbox value="#{dataValidator.rendered}"
onchange="submit();" />
</h:panelGrid>
Modified: trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorStraightforward.jsp 2008-08-12 08:26:30 UTC (rev 10041)
+++ trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorStraightforward.jsp 2008-08-12 08:33:16 UTC (rev 10042)
@@ -4,7 +4,7 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="validatorStraightforwardSubviewID">
<a4j:region>
- <rich:dataTable value="#{data.data}" var="dataBean" id="SizeValidationID">
+ <rich:dataTable value="#{dataValidator.data}" var="dataBean" id="SizeValidationID">
showSummary="true" />
<rich:column>
<f:facet name="header">
@@ -62,8 +62,8 @@
<a4j:region>
<h:outputText value="Enter quantity of lines [2-8]" />
<h:panelGroup>
- <h:inputText value="#{data.length}"/>
- <a4j:commandButton action="#{data.addNewItem}" value="ok"
+ <h:inputText value="#{dataValidator.length}"/>
+ <a4j:commandButton action="#{dataValidator.addNewItem}" value="ok"
reRender="SizeValidationID"></a4j:commandButton>
</h:panelGroup>
</a4j:region>
16 years, 5 months
JBoss Rich Faces SVN: r10041 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-08-12 04:26:30 -0400 (Tue, 12 Aug 2008)
New Revision: 10041
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
RF-3819: Documenting. Tree built-in drag-and-drop.
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-08-12 08:21:51 UTC (rev 10040)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-08-12 08:26:30 UTC (rev 10041)
@@ -766,7 +766,7 @@
<para>This code renders following tree:</para>
<figure>
- <title>DnD operations</title>
+ <title>Drag-and-drop operations</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/tree5.png"/>
16 years, 5 months
JBoss Rich Faces SVN: r10040 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-08-12 04:21:51 -0400 (Tue, 12 Aug 2008)
New Revision: 10040
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
RF-3819: Documenting. Tree built-in drag-and-drop.
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-08-12 08:14:47 UTC (rev 10039)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-08-12 08:21:51 UTC (rev 10040)
@@ -1,76 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<section>
- <sectioninfo>
- <keywordset>
- <keyword>presentation of data</keyword>
- <keyword>rich:tree</keyword>
- <keyword>HtmlTree</keyword>
- </keywordset>
- </sectioninfo>
+ <sectioninfo>
+ <keywordset>
+ <keyword>presentation of data</keyword>
+ <keyword>rich:tree</keyword>
+ <keyword>HtmlTree</keyword>
+ </keywordset>
+ </sectioninfo>
- <table>
- <title>Component identification parameters </title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Value</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>component-type</entry>
- <entry>org.richfaces.Tree</entry>
- </row>
- <row>
- <entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlTree</entry>
- </row>
- <row>
- <entry>component-family</entry>
- <entry>org.richfaces.Tree</entry>
- </row>
- <row>
- <entry>renderer-type</entry>
- <entry>org.richfaces.TreeRenderer</entry>
- </row>
- <row>
- <entry>tag-class</entry>
- <entry>org.richfaces.taglib.TreeTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ <table>
+ <title>Component identification parameters </title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+ <entry>org.richfaces.Tree</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.richfaces.component.html.HtmlTree</entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+ <entry>org.richfaces.Tree</entry>
+ </row>
+ <row>
+ <entry>renderer-type</entry>
+ <entry>org.richfaces.TreeRenderer</entry>
+ </row>
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.TreeTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <section>
- <title>Creating the Component with a Page Tag</title>
- <para>There are two ways to set up a tree: 1) with <emphasis role="bold">
- <property><rich:recursiveTreeNodesAdaptor></property>
- </emphasis> or <emphasis role="bold">
- <property><rich:treeNodesAdaptor></property>
- </emphasis> 2) and without them. The first method allows to omit<emphasis>
- <property>"value"</property>
- </emphasis> and <emphasis>
- <property>"var"</property>
- </emphasis> attributes definition as follows: </para>
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+ <para>There are two ways to set up a tree: 1) with <emphasis role="bold">
+ <property><rich:recursiveTreeNodesAdaptor></property>
+ </emphasis> or <emphasis role="bold">
+ <property><rich:treeNodesAdaptor></property>
+ </emphasis> 2) and without them. The first method allows to omit<emphasis>
+ <property>"value"</property>
+ </emphasis> and <emphasis>
+ <property>"var"</property>
+ </emphasis> attributes definition as follows: </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<rich:tree>
<rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}" var="item" nodes="#{item.nodes}" />
</rich:tree>
...]]></programlisting>
- <para> The second way requires defining some attributes, as
- it's shown in the example: </para>
+ <para> The second way requires defining some attributes, as it's shown
+ in the example: </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:tree value="#{library.data}" var="item" >
<rich:treeNode icon="/images/tree/singer.png" >
<h:outputText value="#{item.name}" />
@@ -78,19 +78,19 @@
...
</rich:tree>
...]]></programlisting>
- </section>
- <section>
- <title>Creating the Component Dynamically Using Java</title>
+ </section>
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlTree;
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlTree;
...
HtmlTree myTree = new HtmlTree();
...]]></programlisting>
- </section>
- <!--section>
+ </section>
+ <!--section>
<title>Details of Usage</title>
<para>As it has been mentioned <link linkend="tree">above</link> the <emphasis role="bold">
<property><rich:tree></property>
@@ -309,71 +309,76 @@
</section-->
- <section>
- <title>Details of Usage</title>
- <para>As it has been mentioned <link linkend="tree">above</link> the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component allows rendering any tree-like data model.</para>
- <para>The component interacts with data model via
- <code>"TreeNode"</code> interface (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.model.TreeNode</ulink>) that is used for tree nodes representation. The <emphasis>
- <property>"value"</property>
- </emphasis> attribute of the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component contains a nodes structure defined in a bean property. The property
- keeps a structure of objects that implements <code>"TreeNode"</code>
- interface.</para>
- <para><emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> has a property
- <property>"data"</property> (see <ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.model.TreeNode</ulink>). Data contained in the property is placed in a
- request scope variable, which name is defined with <emphasis>
- <property>"var"</property>
- </emphasis> attribute for the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component.</para>
- <para>You can develop and use your own pattern of the
- <code>"TreeNode"</code> interface or use a default implementation,
- which is defined with a default class <code>"TreeNodeImpl"</code>
- (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.model.TreeNodeImpl</ulink>).</para>
- <para>There is a <code>"XmlTreeDataBuilder"</code> class (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.component.xml.XmlTreeDataBuilder</ulink>) that allows transforming XML into
- structures of objects containing <code>"XmlNodeData"</code> (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.component.xml.XmlNodeData</ulink>) instances as data, which could be
- represented by the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component.</para>
- <para>It's possible to define a visual representation of a node data model (to define a
- node icon) and its behavior in correspondence with the data contained in this node (with a value of
- the <emphasis>
- <property>"var"</property>
- </emphasis> attribute). The node behavior is defined by the components nested into the <emphasis
- role="bold">
- <property><rich:treeNode></property>
- </emphasis> (e.g. links or buttons). For these purposes you should use <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute. For each tree node a value of <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute is evaluated and <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> with a value of <emphasis>
- <property>"type"</property>
- </emphasis> attribute equal to a value of <emphasis>
- <property>"nodeFace"</property>
- </emphasis> is used for node representation. See an example below.</para>
+ <section>
+ <title>Details of Usage</title>
+ <para>As it has been mentioned <link linkend="tree">above</link> the <emphasis
+ role="bold">
+ <property><rich:tree></property>
+ </emphasis> component allows rendering any tree-like data model.</para>
+ <para>The component interacts with data model via
+ <code>"TreeNode"</code> interface (<ulink
+ url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ >org.richfaces.model.TreeNode</ulink>) that is used for tree
+ nodes representation. The <emphasis>
+ <property>"value"</property>
+ </emphasis> attribute of the <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> component contains a nodes structure defined in a bean
+ property. The property keeps a structure of objects that implements
+ <code>"TreeNode"</code> interface.</para>
+ <para><emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> has a property
+ <property>"data"</property> (see <ulink
+ url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ >org.richfaces.model.TreeNode</ulink>). Data contained in
+ the property is placed in a request scope variable, which name is
+ defined with <emphasis>
+ <property>"var"</property>
+ </emphasis> attribute for the <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> component.</para>
+ <para>You can develop and use your own pattern of the
+ <code>"TreeNode"</code> interface or use a
+ default implementation, which is defined with a default class
+ <code>"TreeNodeImpl"</code> (<ulink
+ url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ >org.richfaces.model.TreeNodeImpl</ulink>).</para>
+ <para>There is a <code>"XmlTreeDataBuilder"</code> class
+ (<ulink
+ url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ >org.richfaces.component.xml.XmlTreeDataBuilder</ulink>)
+ that allows transforming XML into structures of objects containing
+ <code>"XmlNodeData"</code> (<ulink
+ url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ >org.richfaces.component.xml.XmlNodeData</ulink>) instances
+ as data, which could be represented by the <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> component.</para>
+ <para>It's possible to define a visual representation of a node data
+ model (to define a node icon) and its behavior in correspondence with
+ the data contained in this node (with a value of the <emphasis>
+ <property>"var"</property>
+ </emphasis> attribute). The node behavior is defined by the components
+ nested into the <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> (e.g. links or buttons). For these purposes you should use <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute. For each tree node a value of <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute is evaluated and <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> with a value of <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute equal to a value of <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> is used for node representation. See an example below.</para>
- <para id="example">
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para id="example">
+ <emphasis role="bold">Example:</emphasis>
+ </para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:form>
<rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
<rich:treeNode type="artist" iconLeaf="/images/tree/singer.png" icon="/images/tree/singer.png">
@@ -388,111 +393,132 @@
</rich:tree>
</h:form>
...]]></programlisting>
- <para>This is a result: </para>
- <figure>
- <title>The <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute usage</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tree2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>In the example above, when each node of data model is processed, data contained in the <code>"data"</code> property
- of
- <property>"TreeNode"</property> interface is assigned to a request scope variable, which name is defined with <emphasis>
- <property>"var"</property>
- </emphasis> attribute. The value of the <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute is evaluated in correspondence with the data assigned to the <emphasis>
- <property>"var"</property>
- </emphasis> attribute. The corresponding <emphasis role="bold"><property><rich:treeNode></property></emphasis> component (with a value of <emphasis>
- <property>"type"</property>
- </emphasis> attribute equal to a value of <emphasis>
- <property>"nodeFace"</property>
- </emphasis>) is used for the node representation. For example, during data model processing, an object with a name "Chris
- Rea" was inserted in the <emphasis>
- <property>"var"</property>
- </emphasis> attribute. Then the value of <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute was evaluated as <code>"artist"</code>. Thus, for the node
- representation the <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> with <emphasis>
- <property>"type"</property>
- </emphasis> equal to "<code>artist</code>" was used.</para>
- <para>You can also assign an EL-expression as value of the <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute. See an example below: </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[
+ <para>This is a result: </para>
+ <figure>
+ <title>The <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tree2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the example above, when each node of data model is processed, data
+ contained in the <code>"data"</code> property of
+ <property>"TreeNode"</property> interface
+ is assigned to a request scope variable, which name is defined with <emphasis>
+ <property>"var"</property>
+ </emphasis> attribute. The value of the <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute is evaluated in correspondence with the data
+ assigned to the <emphasis>
+ <property>"var"</property>
+ </emphasis> attribute. The corresponding <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> component (with a value of <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute equal to a value of <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis>) is used for the node representation. For example, during
+ data model processing, an object with a name "Chris
+ Rea" was inserted in the <emphasis>
+ <property>"var"</property>
+ </emphasis> attribute. Then the value of <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute was evaluated as
+ <code>"artist"</code>. Thus, for the node
+ representation the <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> with <emphasis>
+ <property>"type"</property>
+ </emphasis> equal to "<code>artist</code>" was used.</para>
+ <para>You can also assign an EL-expression as value of the <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute. See an example below: </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[
nodeFace="#{data.name != 'param-value' ? 'artist' : 'album'}"
]]></programlisting>
- <para>There are some essential points in a <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute usage: you need to define notions for <property>typeless</property> and a <property>default</property> nodes.
- </para>
+ <para>There are some essential points in a <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute usage: you need to define notions for
+ <property>typeless</property> and a
+ <property>default</property> nodes. </para>
- <para>The <property>typeless node</property> is the first <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> component (from all children nodes nested to the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component) with not defined <emphasis>
- <property>"type"</property>
- </emphasis> attribute and defined <emphasis>
- <property>"rendered"</property>
- </emphasis> attribute. The <property>typeless node</property> is used for representation when <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute is null.</para>
- <para><property>Default node</property> has the following interior presentation:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>The <property>typeless node</property> is the first <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> component (from all children nodes nested to the <emphasis
+ role="bold">
+ <property><rich:tree></property>
+ </emphasis> component) with not defined <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute and defined <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attribute. The <property>typeless node</property> is used
+ for representation when <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute is null.</para>
+ <para><property>Default node</property> has the following interior presentation:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<h:outputText value="#{varAttributeName}">
...]]></programlisting>
- <para>
- <emphasis><property>"varAttributeName"</property></emphasis> is a value for <emphasis>
- <property>"var"</property>
- </emphasis> attribute. </para>
- <para><property>Default node</property> is used in the following cases:</para>
- <itemizedlist>
- <listitem><para><emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute is defined, but its value isn't equal to any <emphasis>
- <property>"type"</property>
- </emphasis> attribute value from all children nodes;</para></listitem>
- <listitem><para><emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute is defined and its value is equal to a value of some <emphasis>
- <property>"type"</property>
- </emphasis> attribute from all children nodes, but the value of <emphasis>
- <property>"rendered"</property>
- </emphasis> attribute for this node is
- <property>"false"</property>.</para></listitem>
- </itemizedlist>
- <para>There is also one thing that has to be remembered using <emphasis>
- <property>"type"</property>
- </emphasis> and <emphasis>
- <property>"rendered"</property>
- </emphasis> attributes: it's possible to define several <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> components with equal values of <emphasis>
- <property>"type"</property>
- </emphasis> attribute and different values of <emphasis>
- <property>"rendered"</property>
- </emphasis> attribute. It provides a possibility to define different representation styles for the
- same node types. In the example with artists and their albums (see <link linkend="example"
- >above</link>) it's possible to represent albums that are available for sale and
- albums that are not available. Please study the example below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para>
+ <emphasis>
+ <property>"varAttributeName"</property>
+ </emphasis> is a value for <emphasis>
+ <property>"var"</property>
+ </emphasis> attribute. </para>
+ <para><property>Default node</property> is used in the following cases:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute is defined, but its value
+ isn't equal to any <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute value from all children
+ nodes;</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute is defined and its value is
+ equal to a value of some <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute from all children nodes, but
+ the value of <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attribute for this node is
+ <property>"false"</property>.</para>
+ </listitem>
+ </itemizedlist>
+ <para>There is also one thing that has to be remembered using <emphasis>
+ <property>"type"</property>
+ </emphasis> and <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attributes: it's possible to define several
+ <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> components with equal values of <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute and different values of <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attribute. It provides a possibility to define different
+ representation styles for the same node types. In the example with
+ artists and their albums (see <link linkend="example">above</link>)
+ it's possible to represent albums that are available for sale
+ and albums that are not available. Please study the example below:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:form>
<rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
...
@@ -508,64 +534,78 @@
</rich:tree>
</h:form>
...]]></programlisting>
- <para>This is a result of the code: </para>
- <figure>
- <title>The <emphasis>
- <property>"type"</property>
- </emphasis> and the <emphasis>
- <property>"rendered"</property>
- </emphasis> attributes usage</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tree4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>In the example the <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> components has equal values of the <emphasis>
- <property>"type"</property>
- </emphasis> attribute. Depending on value of the <emphasis>
- <property>"rendered"</property>
- </emphasis> attribute the corresponding <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> component is selected for node representation. If an album is available for sale
- the value of the <emphasis>
- <property>"rendered"</property>
- </emphasis> for the first <emphasis>
- <property><rich:treeNode></property>
- </emphasis> component is "true", for the second one is
- "false". Thus, the first <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> is selected for node representation. </para>
- <para>Tree node can be run in tree modes. Modes can be specified with <emphasis>
- <property>"switchType"</property>
- </emphasis> attribute for<emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component.</para>
- <itemizedlist>
- <listitem><para><code>Ajax</code> (default value) - Ajax submission is used performing the functionality.
-Note, that for collapse/expand operations an Ajax request is sent to the server and it can cause a short delay.</para></listitem>
- <listitem><para><code>Server</code> - regular form of submission request is used.</para></listitem>
- <listitem><para><code>Client</code> – all operations are performed totally on the client; no interaction with a server is involved. Full page content is reloaded after every action.</para></listitem>
- </itemizedlist>
- <para> The <emphasis>
- <property>"icon"</property>
- </emphasis>, <emphasis>
- <property>"iconCollapsed"</property>
- </emphasis>, <emphasis>
- <property>"iconExpanded"</property>
- </emphasis>, <emphasis>
- <property>"iconLeaf"</property>
- </emphasis> attributes set the icons' images for the component. You can also define icons using facets with the same names.
+ <para>This is a result of the code: </para>
+ <figure>
+ <title>The <emphasis>
+ <property>"type"</property>
+ </emphasis> and the <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attributes usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tree4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the example the <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> components has equal values of the <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute. Depending on value of the <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attribute the corresponding <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> component is selected for node representation. If an album
+ is available for sale the value of the <emphasis>
+ <property>"rendered"</property>
+ </emphasis> for the first <emphasis>
+ <property><rich:treeNode></property>
+ </emphasis> component is "true", for the second one
+ is "false". Thus, the first <emphasis role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> is selected for node representation. </para>
+ <para>Tree node can be run in tree modes. Modes can be specified with <emphasis>
+ <property>"switchType"</property>
+ </emphasis> attribute for<emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> component.</para>
+ <itemizedlist>
+ <listitem>
+ <para><code>Ajax</code> (default value) - Ajax submission is
+ used performing the functionality. Note, that for
+ collapse/expand operations an Ajax request is sent
+ to the server and it can cause a short
+ delay.</para>
+ </listitem>
+ <listitem>
+ <para><code>Server</code> - regular form of submission
+ request is used.</para>
+ </listitem>
+ <listitem>
+ <para><code>Client</code> – all operations are performed
+ totally on the client; no interaction with a
+ server is involved. Full page content is reloaded
+ after every action.</para>
+ </listitem>
+ </itemizedlist>
+ <para> The <emphasis>
+ <property>"icon"</property>
+ </emphasis>, <emphasis>
+ <property>"iconCollapsed"</property>
+ </emphasis>, <emphasis>
+ <property>"iconExpanded"</property>
+ </emphasis>, <emphasis>
+ <property>"iconLeaf"</property>
+ </emphasis> attributes set the icons' images for the
+ component. You can also define icons using facets with the same names.
+ If the facets are defined, the corresponding attributes are ignored
+ and facets' content is used as icons. By default the width of
+ a rendered facet area is 16px. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
-If the facets are defined, the corresponding attributes are ignored and
- facets' content is used as icons. By default the width of a rendered facet area is 16px. </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<rich:tree value="#{library.data}" var="item">
...
<f:facet name="icon">
@@ -583,333 +623,408 @@
...
</rich:tree>
...]]></programlisting>
-
- <para> The <emphasis role="bold">
- <property><rich: tree></property>
- </emphasis> component can be used together with <emphasis role="bold">
- <property><rich: treeNodeAdaptor></property>
- </emphasis>. In this case there is no need to specify the attributes <emphasis>
- <property>"value"</property>
- </emphasis> and <emphasis>
- <property>"var"</property>
- </emphasis>. Besides, visual representation shouldn't be defined right in the
- <property>tree</property>. In this case a <emphasis role="bold"><property><rich: tree></property></emphasis> tag is applied mainly for defining common
- attributes such as <emphasis>
- <property>"ajaxSubmitSelection"</property>
- </emphasis> etc. </para>
- <para>
- Information about the <emphasis><property>"process"</property></emphasis> attribute usage you can find <link linkend="process">here</link>.
- </para>
- <tip>
- <title>Tip:</title>
- <para>
- <emphasis><property>"rowKeyConverter"</property></emphasis> support for the <emphasis role="bold"><property><rich:tree></property></emphasis> is pending!
- </para>
- </tip>
- </section>
- <section>
- <title>Built-In Drag and Drop</title>
- <para>The <emphasis role="bold">
- <property><rich: tree></property>
- </emphasis> component functionality provides a built-in support for Drag and Drop operations.
- The main usage principles are similar to RichFaces DnD wrapper components. Hence, to get
- additional information on the issue, read the corresponding chapters:<link linkend="dndParam"
- >"rich:dndParam"</link>, <link linkend="dragSupport"
- >"rich:dragSupport"</link>, <link linkend="dragIndicator"
- >"rich:dragIndicator"</link>, <link linkend="dropSupport"
- >"rich:dropSupport"</link>. Since <property>treeNodes</property>can be assigned as
- Drag, Drop or Drag-and-Drop elements, a <property>tree</property> can include the following
- groups of attributes.</para>
- <table>
- <title>Drag group</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Attribute Name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>dragValue</entry>
- <entry>Element value drag passed into processing after a Drop event</entry>
- </row>
+ <para> The <emphasis role="bold">
+ <property><rich: tree></property>
+ </emphasis> component can be used together with <emphasis role="bold">
+ <property><rich: treeNodeAdaptor></property>
+ </emphasis>. In this case there is no need to specify the attributes <emphasis>
+ <property>"value"</property>
+ </emphasis> and <emphasis>
+ <property>"var"</property>
+ </emphasis>. Besides, visual representation shouldn't be
+ defined right in the <property>tree</property>. In this case a
+ <emphasis role="bold">
+ <property><rich: tree></property>
+ </emphasis> tag is applied mainly for defining common attributes such
+ as <emphasis>
+ <property>"ajaxSubmitSelection"</property>
+ </emphasis> etc. </para>
+ <para> Information about the <emphasis>
+ <property>"process"</property>
+ </emphasis> attribute usage you can find <link linkend="process"
+ >here</link>. </para>
+ <tip>
+ <title>Tip:</title>
+ <para>
+ <emphasis>
+ <property>"rowKeyConverter"</property>
+ </emphasis> support for the <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> is pending! </para>
+ </tip>
+ </section>
-
-
- <row>
- <entry>dragListener</entry>
- <entry>A listener that processes a Drag event</entry>
- </row>
- <row>
- <entry>dragIndicator</entry>
- <entry>Id of a component that is used as a drag pointer during the drag operation</entry>
- </row>
- <row>
- <entry>dragType</entry>
- <entry>Defines a drag zone type that is used for definition of a dragged element, which
- can be accepted by a drop zone</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Drop group</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Attribute Name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>dropValue</entry>
- <entry>Element value drop passed into processing after Drop events </entry>
- </row>
-
- <row>
- <entry>dropListener</entry>
- <entry>A listener that processes a Drop event. </entry>
- </row>
- <row>
- <entry>acceptedTypes</entry>
- <entry>Drag zone names are allowed to be processed with a Drop zone</entry>
- </row>
- <row>
- <entry>typeMapping</entry>
- <entry>Drag zones names mapping on the corresponding drop zone parameters</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <para>Please see an example below.</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="XML"><![CDATA[...
+ <section id="tsebro" role="updated">
+ <title>Built-In Drag and Drop</title>
+ <para>Words "built-in" in this context mean,
+ that <emphasis role="bold"><property><rich:tree></property></emphasis> component has its own attributes, that provide <property>drag-and-drop</property> capability.
+ These attributes can be divided into two groups: those ones which provide <property>drag</property> and those which provide <property>drop</property> operations (see the tables below).
+ </para>
+
+ <table>
+ <title>Drag group</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute Name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>dragValue</entry>
+ <entry>Element value drag passed into processing after a Drop event</entry>
+ </row>
+ <row>
+ <entry>dragListener</entry>
+ <entry>A listener that processes a Drag event</entry>
+ </row>
+ <row>
+ <entry>dragIndicator</entry>
+ <entry>Id of a component that is used as a drag pointer during the drag
+ operation</entry>
+ </row>
+ <row>
+ <entry>dragType</entry>
+ <entry>Defines a drag zone type that is used for definition of a dragged element, which
+ can be accepted by a drop zone</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Drop group</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute Name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>dropValue</entry>
+ <entry>Element value drop passed into processing after Drop events </entry>
+ </row>
+ <row>
+ <entry>dropListener</entry>
+ <entry>A listener that processes a Drop event. </entry>
+ </row>
+ <row>
+ <entry>acceptedTypes</entry>
+ <entry>Drag zone names are allowed to be processed with a Drop zone</entry>
+ </row>
+ <row>
+ <entry>typeMapping</entry>
+ <entry>Drag zones names mapping on the corresponding drop zone parameters</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Consider <property>drag-and-drop</property> inside a tree.
+ All zones, which are assumed to be dragged, must be marked.
+ In terms of <emphasis role="bold"><property><rich:tree></property></emphasis> these zones completely correspond to tree nodes.
+ So, all dragging nodes should be marked with <emphasis><property>"dragType"</property></emphasis> attribute, which value must be the same as value for node’s <emphasis><property>"type"</property></emphasis> attribute.
+ Then, to mark zone(-s), where the dragging node could be dropped, pass the type of dragging node to the <emphasis><property>"acceptedTypes"</property></emphasis> attribute of the drop zone.
+ It would be good to itemize, that each tree node in the <emphasis role="bold"><property><rich:tree></property></emphasis> component’s structure has its own <emphasis>key</emphasis>.
+ Depending on how the component is used, these keys can be generated by the component itself or can be taken from the component’s data model.
+ Keys help to identify each node in a tree; key is what exactly being passing from one node to another in <property>drag-and-drop</property> operations.
+ Finally, the method binding, that will process <property>drag-and-drop</property> operation, should be pointed via <emphasis><property>"dropListener"</property></emphasis> attribute of the <emphasis role="bold"><property><rich:tree></property></emphasis>.
+ </para>
+ <para>
+ Chapters "<link linkend="ch1">6.40 <dragIndicator></link>" and "<link linkend="dndParam">6.39 <dndParam></link>" describes how to apply visual element, that show some additional information (e.g. dragging item name) while operating with <property>drag-and-drop</property>.
+ </para>
+ <para>
+ Page code, that describes a tree with built in <property>drag-and-drop</property> in the way it is considered, is shown below.
+ </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
<h:form>
- <rich:tree dragIndicator=":treeDragIndicator" dropListener="#{libraryAjaxTree.processDrop}" style="width:300px" value="#{libraryAjaxTree.data}" var="item" nodeFace="#{item.type}">
- <rich:treeNode type="artist" acceptedTypes="album" iconLeaf="/images/tree/group.png" icon="/images/tree/group.png">
- <h:outputText value="#{item.name}" />
- </rich:treeNode>
- <rich:treeNode type="album" dragType="album" acceptedTypes="song" iconLeaf="/images/tree/cd.png" icon="/images/tree/cd.png">
- <h:outputText value="#{item.title}" />
- <rich:dndParam name="label" type="drag" value="Album: #{item.title}" />
- </rich:treeNode>
- <rich:treeNode type="song" dragType="song" iconLeaf="/images/tree/music.png" icon="/images/tree/music.png">
- <h:outputText value="#{item.title}" />
- <rich:dndParam name="label" type="drag" value="Song: #{item.title}" />
- </rich:treeNode>
+ <rich:tree style="width:300px" value="#{libraryAjaxTree.data}" nodeFace="#{item.type}" var="item" dropListener="#{libraryAjaxTree.processDrop}" dragIndicator=":treeDragIndicator">
+ <rich:treeNode type="artist" icon="/images/tree/group.png" iconLeaf="/images/tree/group.png" acceptedTypes="album">
+ <h:outputText value="#{item.name}" />
+ </rich:treeNode>
+ <rich:treeNode type="album" icon="/images/tree/cd.png" iconLeaf="/images/tree/cd.png" dragType="album" acceptedTypes="song">
+ <h:outputText value="#{item.title}" />
+ <rich:dndParam name="label" type="drag" value="Album: #{item.title}" />
+ </rich:treeNode>
+ <rich:treeNode type="song" icon="/images/tree/music.png" iconLeaf="/images/tree/music.png" dragType="song">
+ <h:outputText value="#{item.title}" />
+ <rich:dndParam name="label" type="drag" value="Song: #{item.title}" />
+ </rich:treeNode>
</rich:tree>
</h:form>
-...]]>
-</programlisting>
+...]]></programlisting>
+
+ <para>This code renders following tree:</para>
+
+ <figure>
+ <title>DnD operations</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tree5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Events handling</title>
+ <para>Listeners classes that process events on the server side are defined with
+ the help of:</para>
+ <itemizedlist>
+ <listitem>
+ <para><property>changeExpandListener</property> processes
+ expand/collapse event of a
+ <property>treeNode</property></para>
+ </listitem>
+ <listitem>
+ <para><property>dropListener</property> processes a Drop
+ event</para>
+ </listitem>
+ <listitem>
+ <para><property>dragListener</property> processes a Drag
+ event</para>
+ </listitem>
+ <listitem>
+ <para><property>nodeSelectListener</property> is called
+ during request sending on a node selecting event
+ (if request sending on this event is
+ defined)</para>
+ </listitem>
+ </itemizedlist>
- <para>
+ <para>Listener methods can be defined using the <link linkend="treeNodeKF"
+ >following attributes</link> or using nested tags.</para>
+ <para>Client event attributes are:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>
+ <property>"onexpand"</property>
+ </emphasis> is a script expression to invoke when
+ a node is expanded</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>
+ <property>"oncollapse"</property>
+ </emphasis> is a script expression to invoke when
+ a node is collapsed</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>
+ <property>"ondragexit"</property>
+ </emphasis> is a script expression to invoke when
+ an element passing out from a tree zone</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>
+ <property>"ondragstart"</property>
+ </emphasis> is a script expression to invoke when
+ dragging starts</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>
+ <property>"ondragend"</property>
+ </emphasis> is a script expression to invoke when
+ dragging ends (a drop event)</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>
+ <property>"ondragenter"</property>
+ </emphasis>is a script expression to invoke when a
+ dragged element appears on a tree</para>
+ </listitem>
+ </itemizedlist>
-In the shown example a song from one album can be dragged into another because attribute
- <code>acceptedTypes="song"</code> defined in the second <property>treeNode</property>
- with <code>type="album"</code>. Its value is equal to the value of the<emphasis>
- <property>"type"</property></emphasis>attribute defined in the third <property>treeNode</property> (see picture below). An album can be also
- dragged into <property>treeNode</property> with <code>type="artist"</code> property.
+ <para>They can be used to add some JavaScript effects.</para>
-</para>
+ <para> Standart HTML event attributes like<emphasis>
+ <property>"onclick"</property>
+ </emphasis>, <emphasis>
+ <property>"onmousedown"</property>
+ </emphasis>, <emphasis>
+ <property>"onmouseover"</property>
+ </emphasis> etc. can be also used. Event handlers of a <emphasis
+ role="bold">
+ <property><rich:tree></property>
+ </emphasis> component capture events occured on any
+ <property>tree</property> part. But event handlers of
+ <property>treeNode</property> capture events occured on
+ <property>treeNode</property> only, except for children
+ events. </para>
+ </section>
- <figure>
- <title>DnD operations</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tree5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <section>
+ <title>Look-and-Feel Customization</title>
- </section>
- <section>
- <title>Events handling</title>
- <para>Listeners classes that process events on the server side are defined with the help of:</para>
- <itemizedlist>
- <listitem><para><property>changeExpandListener</property> processes expand/collapse event of a <property>treeNode</property></para></listitem>
- <listitem><para><property>dropListener</property> processes a Drop event</para></listitem>
- <listitem><para><property>dragListener</property> processes a Drag event</para></listitem>
- <listitem><para><property>nodeSelectListener</property> is called during request sending on a node selecting event (if request sending on this event is defined)</para></listitem>
- </itemizedlist>
+ <para>For skinnability implementation, the components use a <emphasis>
+ <property>style class redefinition method.</property>
+ </emphasis> Default style classes are mapped on <emphasis>
+ <property>skin parameters.</property>
+ </emphasis></para>
- <para>Listener methods can be defined using the <link linkend="treeNodeKF">following
- attributes</link> or using nested tags.</para>
- <para>Client event attributes are:</para>
- <itemizedlist>
- <listitem><para><emphasis><property>"onexpand"</property></emphasis> is a script expression to invoke when a node is expanded</para></listitem>
- <listitem><para><emphasis><property>"oncollapse"</property></emphasis> is a script expression to invoke when a node is collapsed</para></listitem>
- <listitem><para><emphasis><property>"ondragexit"</property></emphasis> is a script expression to invoke when an element passing out from a tree zone</para></listitem>
- <listitem><para><emphasis><property>"ondragstart"</property></emphasis> is a script expression to invoke when dragging starts</para></listitem>
- <listitem><para><emphasis><property>"ondragend"</property></emphasis> is a script expression to invoke when dragging ends (a drop event)</para></listitem>
- <listitem><para><emphasis><property>"ondragenter"</property></emphasis>is a script expression to invoke when a dragged element appears on a tree</para></listitem>
- </itemizedlist>
+ <para>There are two ways to redefine the appearance of all <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> components at once:</para>
- <para>They can be used to add some JavaScript effects.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Redefine the corresponding skin parameters</para>
+ </listitem>
- <para> Standart HTML event attributes like<emphasis><property>"onclick"</property></emphasis>, <emphasis>
- <property>"onmousedown"</property>
- </emphasis>, <emphasis>
- <property>"onmouseover"</property>
- </emphasis> etc. can be also used. Event handlers of a <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component capture events occured on any <property>tree</property> part. But event
- handlers of <property>treeNode</property> capture events occured on
- <property>treeNode</property> only, except for children events. </para>
- </section>
+ <listitem>
+ <para>Add to your style sheets <emphasis>
+ <property>style classes</property>
+ </emphasis> used by a <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> component</para>
+ </listitem>
+ </itemizedlist>
+ </section>
- <section>
- <title>Look-and-Feel Customization</title>
+ <section>
+ <title>Skin Parameters Redefinition:</title>
+ <para>There is only one skin parameter for <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis>. As it's a wrapper component for <emphasis
+ role="bold">
+ <property><rich:treeNode></property>
+ </emphasis> components, look and feel customization is described in
+ the <link linkend="SPRofTN">corresponding section</link>.</para>
+ <table>
+ <title>Skin parameters for a wrapper element</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>overAllBackground</entry>
+ <entry>background-color </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Definition of Custom Style Classes</title>
- <para>For skinnability implementation, the components use a <emphasis>
- <property>style class redefinition method.</property>
- </emphasis> Default style classes are mapped on <emphasis>
- <property>skin parameters.</property>
- </emphasis></para>
+ <table id="tab_cn7">
+ <title>Classes names that define a component appearance</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-tree</entry>
+ <entry>Defines styles for a wrapper
+ <div> element of
+ a tree</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <para>There are two ways to redefine the appearance of all <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> components at once:</para>
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> components on a page using CSS, it's enough to
+ create classes with the same names (possible classes could be found in
+ the table <link linkend="tab_cn7">above</link>) and define necessary
+ properties in them. An example is placed below:</para>
- <itemizedlist>
- <listitem>
- <para>Redefine the corresponding skin parameters</para>
- </listitem>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
+ .rich-tree{
+ font-weight:bold;
+}
+...]]></programlisting>
- <listitem>
- <para>Add to your style sheets <emphasis>
- <property>style classes</property>
- </emphasis> used by a <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component</para>
- </listitem>
- </itemizedlist>
- </section>
+ <para>This is a result:</para>
- <section>
- <title>Skin Parameters Redefinition:</title>
- <para>There is only one skin parameter for <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis>. As it's a wrapper component for <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> components, look and feel customization is described in the <link
- linkend="SPRofTN">corresponding section</link>.</para>
- <table>
- <title>Skin parameters for a wrapper element</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>overAllBackground</entry>
- <entry>background-color </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
- <section>
- <title>Definition of Custom Style Classes</title>
-
- <table id="tab_cn7">
- <title>Classes names that define a component appearance</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>rich-tree</entry>
- <entry>Defines styles for a wrapper <div> element of a tree</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ <figure>
+ <title>Redefinition styles with predefined classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tree_pc.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>In order to redefine styles for all <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> components on a page using CSS, it's enough to create classes with the
- same names (possible classes could be found in the table <link linkend="tab_cn7">above</link>) and define necessary properties in them. An example is placed below:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="CSS"><![CDATA[...
- .rich-tree{
- font-weight:bold;
-}
-...]]></programlisting>
-
- <para>This is a result:</para>
-
- <figure>
- <title>Redefinition styles with predefined classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tree_pc.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the example a tree font weight was changed to bold.</para>
- <para>Also it's possible to change styles of a particular <emphasis role="bold"
- ><property><rich:tree></property></emphasis> component. In this case you should create own style classes and use them in corresponding <emphasis role="bold"
- ><property><rich:tree></property></emphasis> <property>styleClass</property> attributes. An example is placed below:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="CSS"><![CDATA[...
+ <para>In the example a tree font weight was changed to bold.</para>
+ <para>Also it's possible to change styles of a particular <emphasis
+ role="bold">
+ <property><rich:tree></property>
+ </emphasis> component. In this case you should create own style
+ classes and use them in corresponding <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis>
+ <property>styleClass</property> attributes. An example is placed
+ below:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
.myClass{
font-weight:bold;
}
-...]]></programlisting>
- <para>The <emphasis><property>"highlightedClass"</property></emphasis> attribute for <emphasis role="bold"
- ><property><rich:tree> </property></emphasis> is defined as it's shown in the example below:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<rich:tree ... styleClass="myClass"/>
-]]></programlisting>
-
- <para>This is a result:</para>
-
- <figure>
- <title>Redefinition styles with own classes and styleClass attributes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tree_oc.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As it's shown on the picture above, font weight of highlighted text node of a <property>tree</property> was changed to bold.</para>
- </section>
-
- <section>
- <title>Relevant Resources Links</title>
- <para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=tree">Here</ulink>
- you can see the example of <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> usage and sources for the given example. </para>
- <para>How to Expand/Collapse Tree Nodes from code, see <ulink
- url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes">here</ulink>. </para>
- </section>
+...]]></programlisting>
+ <para>The <emphasis>
+ <property>"highlightedClass"</property>
+ </emphasis> attribute for <emphasis role="bold">
+ <property><rich:tree> </property>
+ </emphasis> is defined as it's shown in the example below:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<rich:tree ... styleClass="myClass"/>
+]]></programlisting>
+
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Redefinition styles with own classes and styleClass attributes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tree_oc.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As it's shown on the picture above, font weight of highlighted
+ text node of a <property>tree</property> was changed to bold.</para>
+ </section>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>
+ <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=tree"
+ >Here</ulink> you can see the example of <emphasis
+ role="bold">
+ <property><rich:tree></property>
+ </emphasis> usage and sources for the given example. </para>
+ <para>How to Expand/Collapse Tree Nodes from code, see <ulink
+ url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes"
+ >here</ulink>. </para>
+ </section>
+
</section>
16 years, 5 months
JBoss Rich Faces SVN: r10039 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-08-12 04:14:47 -0400 (Tue, 12 Aug 2008)
New Revision: 10039
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
RF-3819: Avoiding of calendar incorrect appearance. The note has been added into the "6.24.5. Details of usage" section of the guide.
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-08-12 07:59:50 UTC (rev 10038)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-08-12 08:14:47 UTC (rev 10039)
@@ -1,331 +1,401 @@
<?xml version="1.0" encoding="UTF-8"?>
<section>
- <sectioninfo>
- <keywordset>
- <keyword>rich:calendar</keyword>
- </keywordset>
- </sectioninfo>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:calendar</keyword>
+ </keywordset>
+ </sectioninfo>
- <table>
- <title>Component identification parameters</title>
+ <table>
+ <title>Component identification parameters</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Name</entry>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
- <entry>Value</entry>
- </row>
- </thead>
+ <entry>Value</entry>
+ </row>
+ </thead>
- <tbody>
- <row>
- <entry>component-type</entry>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
- <entry>org.richfaces.Calendar</entry>
- </row>
+ <entry>org.richfaces.Calendar</entry>
+ </row>
- <row>
- <entry>component-class</entry>
+ <row>
+ <entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlCalendar</entry>
- </row>
+ <entry>org.richfaces.component.html.HtmlCalendar</entry>
+ </row>
- <row>
- <entry>component-family</entry>
+ <row>
+ <entry>component-family</entry>
- <entry>org.richfaces.Calendar</entry>
- </row>
+ <entry>org.richfaces.Calendar</entry>
+ </row>
- <row>
- <entry>renderer-type</entry>
+ <row>
+ <entry>renderer-type</entry>
- <entry>org.richfaces.CalendarRenderer</entry>
- </row>
+ <entry>org.richfaces.CalendarRenderer</entry>
+ </row>
- <row>
- <entry>tag-class</entry>
+ <row>
+ <entry>tag-class</entry>
- <entry>org.richfaces.taglib.CalendarTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ <entry>org.richfaces.taglib.CalendarTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <section>
- <title>Creating the Component with a Page Tag</title>
+ <section>
+ <title>Creating the Component with a Page Tag</title>
- <para>To create the simplest variant on a page use the following syntax:</para>
+ <para>To create the simplest variant on a page use the following syntax:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:calendar popup="false"/>
...]]></programlisting>
- </section>
+ </section>
- <section>
- <title>Creating the Component Dynamically Using Java</title>
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlCalendar;
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlCalendar;
...
HtmlCalendar myCalendar = new HtmlCalendar();
...
]]></programlisting>
- </section>
+ </section>
- <section>
- <title>Details of Usage</title>
- <para>The <emphasis>
- <property>"popup"
- </property>
- </emphasis> attribute defines calendar representation mode on a page. If it's
- "true" the calendar is represented on a page as an input field and a button.
- Clicking on the button calls the calendar popup as it's shown on the picture below. </para>
- <figure>
- <title>Using the <emphasis>
- <property>"popup"</property>
- </emphasis> attribute: calendar calls after you click on the button.</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar_init.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Usage <emphasis>
- <property>"currentDate"</property>
- </emphasis> attribute isn't available in the popup mode.</para>
- <para>The <emphasis><property>"value"</property></emphasis> attribute stores selected date currently.</para>
- <para>With help of the <emphasis><property>"currentDate"</property></emphasis> attribute
- you can define month and year which will be displayed currently.</para>
- <para>
- The <emphasis><property>"todayControlMode"</property></emphasis> attribute defines the mode for "today" control.
- Possible values are:
- </para>
- <itemizedlist>
- <listitem>
- <para>"hidden" - in this mode "Today" button will not be displayed</para>
- </listitem>
- <listitem>
- <para>"select" - (default) in this state "Today" button activation will scroll the calendar to the current date and it become selected date</para>
- </listitem>
- <listitem>
- <para>"scroll" - in this mode "Today" activation will simply scroll the calendar to current month without changing selected day.</para>
- </listitem>
- </itemizedlist>
- <para>The <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> component can render pages of days in two modes. A mode could be
- defined with the <emphasis>
- <property>"mode"</property>
- </emphasis> attribute with two possible parameters: "<code>ajax</code>" and "<code>client</code>". Default value is
- <code>"client"</code>.</para>
- <itemizedlist>
- <listitem>
- <para><code>Ajax</code></para>
- </listitem>
- </itemizedlist>
- <para>Calendar requests portions of data from Data Model for a page rendering. If <emphasis>
- <property>"dataModel"</property>
- </emphasis> attribute has "null" value, data requests
- are not sent. In this case the "<code>ajax</code>" mode is equal to the
- "<code>client</code>". </para>
- <itemizedlist>
- <listitem>
- <para><code>Client</code></para>
- </listitem>
- </itemizedlist>
- <para>Calendar loads an initial portion of data in a specified range and use this data to render
- months. Additional data requests are not sent.</para>
- <note>
- <title>Note:</title><para><emphasis>
- <property>"preloadDateRangeBegin"</property>
- </emphasis> and <emphasis>
- <property>"preloadDateRangeEnd"</property>
- </emphasis> attributes were designed only for the
- "<code>client</code>" mode to load some data initially.</para></note>
- <para><emphasis>
- <property>"ondataselect"</property>
- </emphasis> attribute is used to define an event that is triggered before date selection.</para>
- <para><emphasis>
- <property>"ondateselected"</property>
- </emphasis> attribute is used to define an event that is triggered after date selection. </para>
- <para>For example, to fire some event after date selection you should use <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis>. And it should be bound to <emphasis>
- <property>"ondateselected"</property>
- </emphasis> event as it's shown in the example below:</para>
- <programlisting role="XML"><![CDATA[...
+ <section>
+ <title>Details of Usage</title>
+ <para>The <emphasis>
+ <property>"popup" </property>
+ </emphasis> attribute defines calendar representation mode on a page.
+ If it's "true" the calendar is represented
+ on a page as an input field and a button. Clicking on the button calls
+ the calendar popup as it's shown on the picture below. </para>
+ <figure>
+ <title>Using the <emphasis>
+ <property>"popup"</property>
+ </emphasis> attribute: calendar calls after you click on the
+ button.</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar_init.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Usage <emphasis>
+ <property>"currentDate"</property>
+ </emphasis> attribute isn't available in the popup mode.</para>
+ <para>The <emphasis>
+ <property>"value"</property>
+ </emphasis> attribute stores selected date currently.</para>
+ <para>With help of the <emphasis>
+ <property>"currentDate"</property>
+ </emphasis> attribute you can define month and year which will be
+ displayed currently.</para>
+ <para> The <emphasis>
+ <property>"todayControlMode"</property>
+ </emphasis> attribute defines the mode for "today"
+ control. Possible values are: </para>
+ <itemizedlist>
+ <listitem>
+ <para>"hidden" - in this mode
+ "Today" button will not be
+ displayed</para>
+ </listitem>
+ <listitem>
+ <para>"select" - (default) in this state
+ "Today" button activation will
+ scroll the calendar to the current date and it
+ become selected date</para>
+ </listitem>
+ <listitem>
+ <para>"scroll" - in this mode
+ "Today" activation will simply
+ scroll the calendar to current month without
+ changing selected day.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component can render pages of days in two modes. A mode
+ could be defined with the <emphasis>
+ <property>"mode"</property>
+ </emphasis> attribute with two possible parameters:
+ "<code>ajax</code>" and
+ "<code>client</code>". Default value is
+ <code>"client"</code>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>Ajax</code>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>Calendar requests portions of data from Data Model for a page rendering.
+ If <emphasis>
+ <property>"dataModel"</property>
+ </emphasis> attribute has "null" value, data
+ requests are not sent. In this case the
+ "<code>ajax</code>" mode is equal to the
+ "<code>client</code>". </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>Client</code>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>Calendar loads an initial portion of data in a specified range and use
+ this data to render months. Additional data requests are not sent.</para>
+ <note>
+ <title>Note:</title>
+ <para><emphasis>
+ <property>"preloadDateRangeBegin"</property>
+ </emphasis> and <emphasis>
+ <property>"preloadDateRangeEnd"</property>
+ </emphasis> attributes were designed only for the
+ "<code>client</code>" mode to
+ load some data initially.</para>
+ </note>
+ <para><emphasis>
+ <property>"ondataselect"</property>
+ </emphasis> attribute is used to define an event that is triggered
+ before date selection.</para>
+ <para><emphasis>
+ <property>"ondateselected"</property>
+ </emphasis> attribute is used to define an event that is triggered
+ after date selection. </para>
+ <para>For example, to fire some event after date selection you should use
+ <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis>. And it should be bound to <emphasis>
+ <property>"ondateselected"</property>
+ </emphasis> event as it's shown in the example below:</para>
+ <programlisting role="XML"><![CDATA[...
<rich:calendar id="date" value="#{bean.dateTest}">
<a4j:support event="ondateselected" reRender="mainTable"/>
</rich:calendar>
...]]></programlisting>
- <para><emphasis>
- <property>"ondataselect"</property>
- </emphasis> could be used for possibility of date selection canceling. See an example below:</para>
- <programlisting role="XML"><![CDATA[...
+ <para><emphasis>
+ <property>"ondataselect"</property>
+ </emphasis> could be used for possibility of date selection canceling.
+ See an example below:</para>
+ <programlisting role="XML"><![CDATA[...
<rich:calendar id="date" value="#{bean.dateTest}" ondateselect="if (!confirm('Are you sure to change date?')){return false;}"/>
...]]></programlisting>
- <para>
-
- <emphasis>
- <property>"oncurrentdataselected"</property>
- </emphasis> event is fired when the "next/previous month" or "next/previous year" button is pressed,
- and the value is applied.
- </para>
- <para>
- <emphasis>
- <property>"oncurrentdataselect"</property>
- </emphasis> event is fired when the "next/previous month" or "next/previous year" button is pressed,
- but the value is not applied yet (you can change the logic of applying the value). Also this event could be used for possibility of "next/previous month" or "next/previous year" selection canceling. See an example below:
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis>
+ <property>"oncurrentdataselected"</property>
+ </emphasis> event is fired when the "next/previous month" or
+ "next/previous year" button is pressed, and the value is applied. </para>
+ <para>
+ <emphasis>
+ <property>"oncurrentdataselect"</property>
+ </emphasis> event is fired when the "next/previous month" or
+ "next/previous year" button is pressed, but the value is not applied
+ yet (you can change the logic of applying the value). Also this event
+ could be used for possibility of "next/previous month" or
+ "next/previous year" selection canceling. See an example below: </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:calendar id="date" value="#{bean.dateTest}" oncurrentdateselect="if (!confirm('Are you sure to change month(year)?')){return false;}"
oncurrentdateselected="alert('month(year) select:'+event.rich.date.toString());"/>
...]]></programlisting>
- <para>How to use these attributes see also on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092275#..."
- >RichFaces Users Forum</ulink>.</para>
- <para>
- Information about the <emphasis><property>"process"</property></emphasis> attribute usage you can find <link linkend="process">here</link>.
- </para>
- <para>There are three button-related attributes:</para>
- <itemizedlist>
- <listitem>
- <para><emphasis>
- <property>"buttonLabel"</property>
- </emphasis> defines a label for the button. If the attribute is set <emphasis><property>"buttonIcon"</property></emphasis> and
- <emphasis><property>"buttonIconDisabled"</property></emphasis> are ignored </para>
- </listitem>
- <listitem>
- <para><emphasis>
- <property>"buttonIcon"</property>
- </emphasis> defines an icon for the button</para>
- </listitem>
- <listitem>
- <para><emphasis>
- <property>"buttonIconDisabled"</property>
- </emphasis> defines an icon for the disabled state of the button</para>
- </listitem>
- </itemizedlist>
- <para>The <emphasis>
- <property>"direction"</property>
- </emphasis> and <emphasis>
- <property>"jointPoint"</property>
- </emphasis> attributes are used for defining aspects of calendar appearance.</para>
- <para>The possible values for the <emphasis>
- <property>"direction"</property>
- </emphasis> are: </para>
- <itemizedlist>
- <listitem><para>"top-left" - a calendar drops to the top and left</para></listitem>
- <listitem><para>"top-right" - a calendar drops to the top and right</para></listitem>
- <listitem><para>"bottom-left" - a calendar drops to the bottom and left</para></listitem>
- <listitem><para>"bottom-right" - a calendar drops to the bottom and right</para></listitem>
- <listitem><para>"auto" - smart positioning activation</para></listitem>
- </itemizedlist>
- <para> By default, the <emphasis>
- <property>"direction"</property>
- </emphasis> attribute is set to "bottom-right".</para>
- <para>The possible values for the <emphasis>
- <property>"jointPoint"</property>
- </emphasis> are: </para>
- <itemizedlist>
- <listitem><para>"top-left" - a calendar docked to the top-left point of the button element</para></listitem>
- <listitem><para>"top-right" - a calendar docked to the top-right point of the button element</para></listitem>
- <listitem><para>"bottom-left" - a calendar docked to the bottom-left point of the button element</para></listitem>
- <listitem><para>"bottom-right" - a calendar docked to the bottom-right point of the button element</para></listitem>
- <listitem><para>"auto" - smart positioning activation</para></listitem>
- </itemizedlist>
- <para> By default, the <emphasis>
- <property>"jointPoint"</property>
- </emphasis> attribute is set to "bottom-left".</para>
- <para>
- The <emphasis>
- <property>"label"</property>
- </emphasis> attribute is a generic attribute.
- The <emphasis>
- <property>"label"</property>
- </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
- This attribute defines the parameters of localized error and informational messages that
- occur as a result of conversion, validation, or other application actions during the request
- processing lifecycle. With the help of this attribute you can replace the
- last parameter substitution token shown in the messages. For example, {1} for <code>"DoubleRangeValidator.MAXIMUM"</code>, {2}
- for <code>"ShortConverter.SHORT"</code>.
- </para>
- <para>The <emphasis><property>"defaultTime"</property></emphasis> attribute to set the default time value for the current date in two cases:</para>
- <itemizedlist>
- <listitem>
- <para>
- If time is not set
- </para>
- </listitem>
- <listitem>
- <para>
- If another date is selected and the value of the <emphasis><property>"resetTimeOnDateSelect"</property></emphasis> attribute is set to "true"
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The
- <emphasis>
- <property>
- "enableManualInput"
- </property>
- </emphasis>
- attribute enables/disables input field, so when
- <code>
- enableManualInput = "false"
- </code>,
- user can only pick the date manually and has no possibility to type in the date (default value is "false").
- </para>
- <para>The <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> component allows to use <emphasis>
- <property>"header"</property>
- </emphasis>, <emphasis>
- <property>"footer"</property>
- </emphasis>, <emphasis>
- <property>"optionalHeader"</property>
- </emphasis>, <emphasis>
- <property>"optionalFooter"</property>
- </emphasis> facets. The following elements are available in these facets:
- <code>{currentMonthControl}</code>, <code>{nextMonthControl}</code>, <code>{nextYearControl}</code>, <code>{previousYearControl}</code>,
- <code>{previousMonthControl}</code>, <code>{todayControl}</code>, <code>{selectedDateControl}</code>. These elements could be used
- for labels output.</para>
- <para>Also you can use <emphasis>
- <property>"weekNumber"</property>
- </emphasis> facet with available <code>{weekNumber}</code>, <code>{elementId}</code> elements and <emphasis>
- <property>"weekDay"</property>
- </emphasis> facet with <code>{weekDayLabel}</code>, <code>{weekDayLabelShort}</code>, <code>{weekDayNumber}</code>, <code>{isWeekend}</code>,
- <code>{elementId}</code> elements. <code>{weekNumber}</code>, <code>{weekDayLabel}</code>, <code>{weekDayLabelShort}</code>, <code>{weekDayNumber}</code>
- elements could be used for labels output, <code>{isWeekend}</code>, <code>{elementId}</code> - for additional processing
- in JavaScript code.</para>
- <para>These elements are shown on the picture below.</para>
+ <para>How to use these attributes see also on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092275#..."
+ >RichFaces Users Forum</ulink>.</para>
+ <para> Information about the <emphasis>
+ <property>"process"</property>
+ </emphasis> attribute usage you can find <link linkend="process"
+ >here</link>. </para>
+ <para>There are three button-related attributes:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>
+ <property>"buttonLabel"</property>
+ </emphasis> defines a label for the button. If the
+ attribute is set <emphasis>
+ <property>"buttonIcon"</property>
+ </emphasis> and <emphasis>
+ <property>"buttonIconDisabled"</property>
+ </emphasis> are ignored </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>
+ <property>"buttonIcon"</property>
+ </emphasis> defines an icon for the button</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>
+ <property>"buttonIconDisabled"</property>
+ </emphasis> defines an icon for the disabled state
+ of the button</para>
+ </listitem>
+ </itemizedlist>
+ <para>The <emphasis>
+ <property>"direction"</property>
+ </emphasis> and <emphasis>
+ <property>"jointPoint"</property>
+ </emphasis> attributes are used for defining aspects of calendar
+ appearance.</para>
+ <para>The possible values for the <emphasis>
+ <property>"direction"</property>
+ </emphasis> are: </para>
+ <itemizedlist>
+ <listitem>
+ <para>"top-left" - a calendar drops to the
+ top and left</para>
+ </listitem>
+ <listitem>
+ <para>"top-right" - a calendar drops to
+ the top and right</para>
+ </listitem>
+ <listitem>
+ <para>"bottom-left" - a calendar drops to
+ the bottom and left</para>
+ </listitem>
+ <listitem>
+ <para>"bottom-right" - a calendar drops to
+ the bottom and right</para>
+ </listitem>
+ <listitem>
+ <para>"auto" - smart positioning
+ activation</para>
+ </listitem>
+ </itemizedlist>
+ <para> By default, the <emphasis>
+ <property>"direction"</property>
+ </emphasis> attribute is set to "bottom-right".</para>
+ <para>The possible values for the <emphasis>
+ <property>"jointPoint"</property>
+ </emphasis> are: </para>
+ <itemizedlist>
+ <listitem>
+ <para>"top-left" - a calendar docked to
+ the top-left point of the button element</para>
+ </listitem>
+ <listitem>
+ <para>"top-right" - a calendar docked to
+ the top-right point of the button element</para>
+ </listitem>
+ <listitem>
+ <para>"bottom-left" - a calendar docked to
+ the bottom-left point of the button element</para>
+ </listitem>
+ <listitem>
+ <para>"bottom-right" - a calendar docked
+ to the bottom-right point of the button
+ element</para>
+ </listitem>
+ <listitem>
+ <para>"auto" - smart positioning
+ activation</para>
+ </listitem>
+ </itemizedlist>
+ <para> By default, the <emphasis>
+ <property>"jointPoint"</property>
+ </emphasis> attribute is set to "bottom-left".</para>
+ <para> The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute. The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and
+ the message that the component (indirectly) produced. This attribute
+ defines the parameters of localized error and informational messages
+ that occur as a result of conversion, validation, or other application
+ actions during the request processing lifecycle. With the help of this
+ attribute you can replace the last parameter substitution token shown
+ in the messages. For example, {1} for
+ <code>"DoubleRangeValidator.MAXIMUM"</code>,
+ {2} for <code>"ShortConverter.SHORT"</code>. </para>
+ <para>The <emphasis>
+ <property>"defaultTime"</property>
+ </emphasis> attribute to set the default time value for the current
+ date in two cases:</para>
+ <itemizedlist>
+ <listitem>
+ <para> If time is not set </para>
+ </listitem>
+ <listitem>
+ <para> If another date is selected and the value of the <emphasis>
+ <property>"resetTimeOnDateSelect"</property>
+ </emphasis> attribute is set to
+ "true" </para>
+ </listitem>
+ </itemizedlist>
+ <para> The <emphasis>
+ <property> "enableManualInput" </property>
+ </emphasis> attribute enables/disables input field, so when <code>
+ enableManualInput = "false" </code>, user
+ can only pick the date manually and has no possibility to type in the
+ date (default value is "false"). </para>
+ <para>The <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component allows to use <emphasis>
+ <property>"header"</property>
+ </emphasis>, <emphasis>
+ <property>"footer"</property>
+ </emphasis>, <emphasis>
+ <property>"optionalHeader"</property>
+ </emphasis>, <emphasis>
+ <property>"optionalFooter"</property>
+ </emphasis> facets. The following elements are available in these
+ facets: <code>{currentMonthControl}</code>,
+ <code>{nextMonthControl}</code>, <code>{nextYearControl}</code>,
+ <code>{previousYearControl}</code>,
+ <code>{previousMonthControl}</code>,
+ <code>{todayControl}</code>, <code>{selectedDateControl}</code>. These
+ elements could be used for labels output.</para>
+ <para>Also you can use <emphasis>
+ <property>"weekNumber"</property>
+ </emphasis> facet with available <code>{weekNumber}</code>,
+ <code>{elementId}</code> elements and <emphasis>
+ <property>"weekDay"</property>
+ </emphasis> facet with <code>{weekDayLabel}</code>,
+ <code>{weekDayLabelShort}</code>,
+ <code>{weekDayNumber}</code>, <code>{isWeekend}</code>,
+ <code>{elementId}</code> elements.
+ <code>{weekNumber}</code>, <code>{weekDayLabel}</code>,
+ <code>{weekDayLabelShort}</code>,
+ <code>{weekDayNumber}</code> elements could be used for labels output,
+ <code>{isWeekend}</code>, <code>{elementId}</code> - for
+ additional processing in JavaScript code.</para>
+ <para>These elements are shown on the picture below.</para>
- <figure>
- <title>Available elements</title>
+ <figure>
+ <title>Available elements</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>Simple example of usage is placed below.</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="CSS"><![CDATA[...
+ <para>Simple example of usage is placed below.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
<!-- Styles for cells -->
<style>
.width100{
@@ -336,8 +406,8 @@
}
</style>
...]]></programlisting>
-
- <programlisting role="XML"><![CDATA[...
+
+ <programlisting role="XML"><![CDATA[...
<rich:calendar id="myCalendar" popup="true" locale="#{calendarBean.locale}" value="#{bean.date}"
preloadRangeBegin="#{bean.date}" preloadRangeEnd="#{bean.date}" cellWidth="40px" cellHeight="40px">
@@ -369,64 +439,70 @@
</rich:calendar>
...]]></programlisting>
- <para>This is a result:</para>
- <figure>
- <title>Facets usage</title>
+ <para>This is a result:</para>
+ <figure>
+ <title>Facets usage</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>As it's shown on the picture above <code>{selectedDateControl}</code>, <code>{todayControl}</code> elements
- are placed in the <emphasis>
- <property>"header"</property>
- </emphasis> facet, <code>{previousMonthControl}</code>, <code>{currentMonthControl}</code>, <code>{nextMonthControl}</code> - in the <emphasis>
- <property>"footer"</property>
- </emphasis> facet, <code>{weekDayLabelShort}</code> - in the <emphasis>
- <property>"weekDay"</property>
- </emphasis> facet, <code>{nextYearControl}</code>, <code>{previousYearControl}</code> are absent. Numbers of weeks are
- red colored.</para>
+ <para>As it's shown on the picture above
+ <code>{selectedDateControl}</code>, <code>{todayControl}</code>
+ elements are placed in the <emphasis>
+ <property>"header"</property>
+ </emphasis> facet, <code>{previousMonthControl}</code>,
+ <code>{currentMonthControl}</code>,
+ <code>{nextMonthControl}</code> - in the <emphasis>
+ <property>"footer"</property>
+ </emphasis> facet, <code>{weekDayLabelShort}</code> - in the <emphasis>
+ <property>"weekDay"</property>
+ </emphasis> facet, <code>{nextYearControl}</code>,
+ <code>{previousYearControl}</code> are absent. Numbers of
+ weeks are red colored.</para>
- <para>
- It is possible to show and manage date. Except scrolling controls you can use quick month and year selection feature.
- It's necessary to click on its field, i.e. current month control, and choose required month and year.
- </para>
- <figure>
- <title>Quick month and year selection</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Also the <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> component allows to show and manage time. It's necessary to define time
- in a pattern (for example, it could be defined as "<code>d/M/yy HH:mm</code>"). Then after
- you choose some data in the calendar, it becomes possible to manage time for this date. For time editing
- it's necessary to click on its field (see a picture below). To clean the field click
- on the "Clean".</para>
-
- <figure>
- <title>Timing</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <para> It is possible to show and manage date. Except scrolling controls you can
+ use quick month and year selection feature. It's necessary to
+ click on its field, i.e. current month control, and choose required
+ month and year. </para>
+ <figure>
+ <title>Quick month and year selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Also the <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component allows to show and manage time. It's
+ necessary to define time in a pattern (for example, it could be
+ defined as "<code>d/M/yy HH:mm</code>"). Then after
+ you choose some data in the calendar, it becomes possible to manage
+ time for this date. For time editing it's necessary to click
+ on its field (see a picture below). To clean the field click on the
+ "Clean".</para>
+ <figure>
+ <title>Timing</title>
- <para>It's possible to handle events for calendar from JavaScript code. A simplest
- example of usage JavaScript API is placed below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>It's possible to handle events for calendar from JavaScript code.
+ A simplest example of usage JavaScript API is placed below:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:calendar value="#{calendarBean.selectedDate}" id="calendarID"
locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}"
@@ -435,155 +511,210 @@
<a4j:commandLink onclick="$('formID:calendarID').component.doExpand(event)" value="Expand"/>
...]]></programlisting>
- <para>Also the discussion about this problem can be found on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078301#..."
- >RichFaces Users Forum</ulink>.</para>
- <para>The <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> component provides the possibility to use a special Data Model to define data for
- element rendering. Data Model includes two major interfaces: </para>
- <itemizedlist>
- <listitem><para><code>CalendarDataModel</code></para></listitem>
- <listitem><para><code>CalendarDataModelItem</code></para></listitem>
- </itemizedlist>
- <para><code>CalendarDataModel</code> provides the following function:</para>
- <itemizedlist>
- <listitem><para><code>CalendarDataModelItem[] getData(Date[])</code>;</para></listitem>
- </itemizedlist>
- <para>This method is called when it's necessary to represent the next block of
- <code>CalendarDataItems</code>. It happens during navigation to the next (previous) month or in any other
- case when calendar renders. This method is called in <emphasis>
- <property>"Ajax"</property>
- </emphasis> mode when the calendar renders a new page. </para>
- <para><code>CalendarDataModelItem</code> provides the following function:</para>
- <itemizedlist>
- <listitem><para>Date <code>getDate()</code> - returns date from the item. Default implementation returns date.</para></listitem>
- <listitem><para>Boolean <code>isEnabled()</code> - returns "true"
- if date is <emphasis>
- <property>"selectable"</property>
- </emphasis> on the calendar. Default implementation returns "true".</para></listitem>
- <listitem><para>String <code>getStyleClass()</code> - returns string appended to the style class for the date
- span. For example it could be "relevant holyday". It means that the class
- could be defined like the "rich-cal-day-relevant-holyday" one. Default
- implementation returns empty string.</para></listitem>
- <listitem><para>Object <code>getData()</code> - returns any additional payload that must be JSON-serializable
- object. It could be used in the custom date representation on the calendar (inside the
- custom facet).</para></listitem>
- </itemizedlist>
-
- <para>
- The <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> component provides the possibility to use internationalization method to redefine and localize the labels.
- You could use application resource bundle and define
- <code>RICH_CALENDAR_APPLY_LABEL</code>,
- <code>RICH_CALENDAR_TODAY_LABEL</code>,
- <code>RICH_CALENDAR_CLOSE_LABEL</code>,
- <code>RICH_CALENDAR_OK_LABEL</code>,
- <code>RICH_CALENDAR_CLEAN_LABEL</code>,
- <code>RICH_CALENDAR_CANCEL_LABEL </code> there.
- </para>
- <para>You could also pack <code>org.richfaces.renderkit.calendar</code> <ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >resource</ulink> bundle with your JARs defining the same properties.
- </para>
- </section>
+ <para>Also the discussion about this problem can be found on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078301#..."
+ >RichFaces Users Forum</ulink>.</para>
+ <para>The <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component provides the possibility to use a special Data
+ Model to define data for element rendering. Data Model includes two
+ major interfaces: </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>CalendarDataModel</code>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>CalendarDataModelItem</code>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para><code>CalendarDataModel</code> provides the following function:</para>
+ <itemizedlist>
+ <listitem>
+ <para><code>CalendarDataModelItem[]
+ getData(Date[])</code>;</para>
+ </listitem>
+ </itemizedlist>
+ <para>This method is called when it's necessary to represent the next
+ block of <code>CalendarDataItems</code>. It happens during navigation
+ to the next (previous) month or in any other case when calendar
+ renders. This method is called in <emphasis>
+ <property>"Ajax"</property>
+ </emphasis> mode when the calendar renders a new page. </para>
+ <para><code>CalendarDataModelItem</code> provides the following function:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Date <code>getDate()</code> - returns date from the
+ item. Default implementation returns date.</para>
+ </listitem>
+ <listitem>
+ <para>Boolean <code>isEnabled()</code> - returns
+ "true" if date is <emphasis>
+ <property>"selectable"</property>
+ </emphasis> on the calendar. Default
+ implementation returns
+ "true".</para>
+ </listitem>
+ <listitem>
+ <para>String <code>getStyleClass()</code> - returns string
+ appended to the style class for the date span. For
+ example it could be "relevant
+ holyday". It means that the class could
+ be defined like the
+ "rich-cal-day-relevant-holyday"
+ one. Default implementation returns empty
+ string.</para>
+ </listitem>
+ <listitem>
+ <para>Object <code>getData()</code> - returns any additional
+ payload that must be JSON-serializable object. It
+ could be used in the custom date representation on
+ the calendar (inside the custom facet).</para>
+ </listitem>
+ </itemizedlist>
- <section>
- <title>JavaScript API</title>
- <table>
- <title>JavaScript API</title>
+ <para> The <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component provides the possibility to use
+ internationalization method to redefine and localize the labels. You
+ could use application resource bundle and define
+ <code>RICH_CALENDAR_APPLY_LABEL</code>,
+ <code>RICH_CALENDAR_TODAY_LABEL</code>,
+ <code>RICH_CALENDAR_CLOSE_LABEL</code>,
+ <code>RICH_CALENDAR_OK_LABEL</code>,
+ <code>RICH_CALENDAR_CLEAN_LABEL</code>,
+ <code>RICH_CALENDAR_CANCEL_LABEL </code> there. </para>
+ <para>You could also pack <code>org.richfaces.renderkit.calendar</code>
+ <ulink
+ url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ >resource</ulink> bundle with your JARs defining the same
+ properties.
+ </para>
+ <note>
+ <title>Note:</title>
+ <para>Only for Internet Explorer 6 and later.
+ To make <emphasis role="bold"><property><rich:calendar></property></emphasis> inside <emphasis role="bold"><property><rich:modalPanel></property></emphasis> rendered properly, enable the standards-compliant mode.
+ Explore <ulink url="http://msdn.microsoft.com/en-us/library/ms535242(VS.85).aspx">!DOCTYPE reference at MSDN</ulink> to find out how to do this.
+ </para>
+ </note>
+
+ </section>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Function</entry>
+ <section>
+ <title>JavaScript API</title>
+ <table>
+ <title>JavaScript API</title>
- <entry>Description</entry>
- </row>
- </thead>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Function</entry>
- <tbody>
+ <entry>Description</entry>
+ </row>
+ </thead>
- <row>
- <entry>selectDate(date)</entry>
+ <tbody>
- <entry>Selects the date specified. If the date isn't in current month -
- performs request to select</entry>
- </row>
+ <row>
+ <entry>selectDate(date)</entry>
- <row>
- <entry role="tbi">isDateEnabled(date)</entry>
+ <entry>Selects the date specified. If
+ the date isn't in
+ current month - performs
+ request to select</entry>
+ </row>
- <entry role="tbi">Checks if given date is selectable (to be implemented)</entry>
- </row>
+ <row>
+ <entry role="tbi">isDateEnabled(date)</entry>
- <row>
- <entry role="tbi">enableDate(date)</entry>
+ <entry role="tbi">Checks if given date
+ is selectable (to be
+ implemented)</entry>
+ </row>
- <entry role="tbi">Enables date cell control on the calendar (to be implemented)</entry>
- </row>
+ <row>
+ <entry role="tbi">enableDate(date)</entry>
- <row>
- <entry role="tbi">disableDate(date)</entry>
+ <entry role="tbi">Enables date cell
+ control on the calendar (to be
+ implemented)</entry>
+ </row>
- <entry role="tbi">Disables date cell control on the calendar (to be implemented)</entry>
- </row>
+ <row>
+ <entry role="tbi">disableDate(date)</entry>
- <row>
- <entry role="tbi">enableDates(date[])</entry>
+ <entry role="tbi">Disables date cell
+ control on the calendar (to be
+ implemented)</entry>
+ </row>
- <entry role="tbi">Enables dates cell controls set on the calendar (to be implemented)</entry>
- </row>
+ <row>
+ <entry role="tbi">enableDates(date[])</entry>
- <row>
- <entry role="tbi">disableDates(date[])</entry>
+ <entry role="tbi">Enables dates cell
+ controls set on the calendar
+ (to be implemented)</entry>
+ </row>
- <entry role="tbi">Disables dates cell controls set on the calendar (to be implemented)</entry>
- </row>
+ <row>
+ <entry role="tbi">disableDates(date[])</entry>
- <row>
- <entry>nextMonth()</entry>
+ <entry role="tbi">Disables dates cell
+ controls set on the calendar
+ (to be implemented)</entry>
+ </row>
- <entry>Navigates to next month</entry>
- </row>
+ <row>
+ <entry>nextMonth()</entry>
- <row>
- <entry>nextYear()</entry>
+ <entry>Navigates to next month</entry>
+ </row>
- <entry>Navigates to next year</entry>
- </row>
+ <row>
+ <entry>nextYear()</entry>
- <row>
- <entry>prevMonth()</entry>
+ <entry>Navigates to next year</entry>
+ </row>
- <entry>Navigates to previous month </entry>
- </row>
+ <row>
+ <entry>prevMonth()</entry>
- <row>
- <entry>prevYear()</entry>
+ <entry>Navigates to previous month
+ </entry>
+ </row>
- <entry>Navigates to previous year</entry>
- </row>
+ <row>
+ <entry>prevYear()</entry>
- <row>
- <entry>today()</entry>
+ <entry>Navigates to previous
+ year</entry>
+ </row>
- <entry>Selects today date</entry>
- </row>
+ <row>
+ <entry>today()</entry>
- <row>
- <entry>getSelectedDate()</entry>
+ <entry>Selects today date</entry>
+ </row>
- <entry>Returns currently selected date</entry>
- </row>
+ <row>
+ <entry>getSelectedDate()</entry>
- <row>
- <entry>Object getData()</entry>
+ <entry>Returns currently selected
+ date</entry>
+ </row>
- <entry>Returns additional data for the date</entry>
- </row>
+ <row>
+ <entry>Object getData()</entry>
- <!--
+ <entry>Returns additional data for the
+ date</entry>
+ </row>
+
+ <!--
<row>
<entry>enable()</entry>
@@ -595,1171 +726,1263 @@
<entry>Disables calendar</entry>
</row>
- -->
+ -->
- <row>
- <entry>getCurrentMonth()</entry>
+ <row>
+ <entry>getCurrentMonth()</entry>
- <entry>Returns number of the month currently being viewed</entry>
- </row>
+ <entry>Returns number of the month
+ currently being viewed</entry>
+ </row>
- <row>
- <entry>getCurrentYear()</entry>
+ <row>
+ <entry>getCurrentYear()</entry>
- <entry>Returns number of the year currently being viewed</entry>
- </row>
+ <entry>Returns number of the year
+ currently being viewed</entry>
+ </row>
- <row>
- <entry>doCollapse()</entry>
+ <row>
+ <entry>doCollapse()</entry>
- <entry>Collapses calendar element</entry>
- </row>
+ <entry>Collapses calendar
+ element</entry>
+ </row>
- <row>
- <entry>doExpand()</entry>
+ <row>
+ <entry>doExpand()</entry>
- <entry>Expands calendar element</entry>
- </row>
-
- <row>
- <entry>resetSelectedDate()</entry>
-
- <entry>Clears a selected day value</entry>
- </row>
-
- <row>
- <entry>doSwitch()</entry>
-
- <entry>Inverts a state for the popup calendar</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
+ <entry>Expands calendar element</entry>
+ </row>
- </section>
+ <row>
+ <entry>resetSelectedDate()</entry>
+ <entry>Clears a selected day
+ value</entry>
+ </row>
- <section>
- <title>Look-and-Feel Customization</title>
+ <row>
+ <entry>doSwitch()</entry>
- <para>For skinnability implementation, the components use a <emphasis>
- <property>style class redefinition method.</property>
- </emphasis> Default style classes are mapped on <emphasis>
- <property>skin parameters.</property>
- </emphasis></para>
+ <entry>Inverts a state for the popup
+ calendar</entry>
+ </row>
- <para>There are two ways to redefine the appearance of all <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> components at once:</para>
+ </tbody>
+ </tgroup>
+ </table>
- <itemizedlist>
- <listitem>
- <para>Redefine the corresponding skin parameters</para>
- </listitem>
+ </section>
- <listitem>
- <para>Add to your style sheets <emphasis>
- <property>style classes</property>
- </emphasis> used by a <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> component</para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Skin Parameters Redefinition</title>
+ <section>
+ <title>Look-and-Feel Customization</title>
- <table>
- <title>Skin parameters redefinition for a popup element</title>
+ <para>For skinnability implementation, the components use a <emphasis>
+ <property>style class redefinition method.</property>
+ </emphasis> Default style classes are mapped on <emphasis>
+ <property>skin parameters.</property>
+ </emphasis></para>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <para>There are two ways to redefine the appearance of all <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> components at once:</para>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <itemizedlist>
+ <listitem>
+ <para>Redefine the corresponding skin parameters</para>
+ </listitem>
- <tbody>
- <row>
- <entry>panelBorderColor</entry>
+ <listitem>
+ <para>Add to your style sheets <emphasis>
+ <property>style classes</property>
+ </emphasis> used by a <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component</para>
+ </listitem>
+ </itemizedlist>
+ </section>
- <entry>border-color</entry>
- </row>
+ <section>
+ <title>Skin Parameters Redefinition</title>
- </tbody>
- </tgroup>
- </table>
+ <table>
+ <title>Skin parameters redefinition for a popup element</title>
- <table>
- <title>Skin parameters redefinition for headers (header, optional header)</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
- <tbody>
- <row>
- <entry>panelBorderColor</entry>
+ <entry>border-color</entry>
+ </row>
- <entry>border-bottom-color</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>additionalBackgroundColor</entry>
+ <table>
+ <title>Skin parameters redefinition for headers (header, optional
+ header)</title>
- <entry>background-color</entry>
- </row>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- <row>
- <entry>generalSizeFont</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>font-size</entry>
- </row>
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
- <row>
- <entry>generalFamilyFont</entry>
+ <entry>border-bottom-color</entry>
+ </row>
- <entry>font-family</entry>
- </row>
+ <row>
+ <entry>additionalBackgroundColor</entry>
- </tbody>
- </tgroup>
- </table>
+ <entry>background-color</entry>
+ </row>
- <table>
- <title>Skin parameters redefinition for footers (footer, optional footer) and names of working
- days</title>
+ <row>
+ <entry>generalSizeFont</entry>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <entry>font-size</entry>
+ </row>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <row>
+ <entry>generalFamilyFont</entry>
- <tbody>
- <row>
- <entry>panelBorderColor</entry>
+ <entry>font-family</entry>
+ </row>
- <entry>border-top-color</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>panelBorderColor</entry>
+ <table>
+ <title>Skin parameters redefinition for footers (footer, optional
+ footer) and names of working days</title>
- <entry>border-right-color</entry>
- </row>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- <row>
- <entry>additionalBackgroundColor</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>background</entry>
- </row>
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
- <row>
- <entry>generalSizeFont</entry>
+ <entry>border-top-color</entry>
+ </row>
- <entry>font-size</entry>
- </row>
+ <row>
+ <entry>panelBorderColor</entry>
- <row>
- <entry>generalFamilyFont</entry>
+ <entry>border-right-color</entry>
+ </row>
- <entry>font-family</entry>
- </row>
+ <row>
+ <entry>additionalBackgroundColor</entry>
- </tbody>
- </tgroup>
- </table>
+ <entry>background</entry>
+ </row>
- <table>
- <title>Skin parameters redefinition for weeks numbers</title>
+ <row>
+ <entry>generalSizeFont</entry>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <entry>font-size</entry>
+ </row>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <row>
+ <entry>generalFamilyFont</entry>
- <tbody>
- <row>
- <entry>panelBorderColor</entry>
+ <entry>font-family</entry>
+ </row>
- <entry>border-bottom-color</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>panelBorderColor</entry>
+ <table>
+ <title>Skin parameters redefinition for weeks numbers</title>
- <entry>border-right-color</entry>
- </row>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- <row>
- <entry>additionalBackgroundColor</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>background</entry>
- </row>
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
- <row>
- <entry>calendarWeekBackgroundColor</entry>
+ <entry>border-bottom-color</entry>
+ </row>
- <entry>background-color</entry>
- </row>
+ <row>
+ <entry>panelBorderColor</entry>
- <row>
- <entry>generalSizeFont</entry>
+ <entry>border-right-color</entry>
+ </row>
- <entry>font-size</entry>
- </row>
+ <row>
+ <entry>additionalBackgroundColor</entry>
- <row>
- <entry>generalFamilyFont</entry>
+ <entry>background</entry>
+ </row>
- <entry>font-family</entry>
- </row>
+ <row>
+ <entry>calendarWeekBackgroundColor</entry>
- </tbody>
- </tgroup>
- </table>
+ <entry>background-color</entry>
+ </row>
- <table>
- <title>Skin parameters redefinition for a toolBar and names of months</title>
+ <row>
+ <entry>generalSizeFont</entry>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <entry>font-size</entry>
+ </row>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <row>
+ <entry>generalFamilyFont</entry>
- <tbody>
- <row>
- <entry>headerBackgroundColor</entry>
+ <entry>font-family</entry>
+ </row>
- <entry>background-color</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>headerSizeFont</entry>
+ <table>
+ <title>Skin parameters redefinition for a toolBar and names of months</title>
- <entry>font-size</entry>
- </row>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- <row>
- <entry>headerFamilyFont</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>font-family</entry>
- </row>
+ <tbody>
+ <row>
+ <entry>headerBackgroundColor</entry>
- <row>
- <entry>headerWeightFont</entry>
+ <entry>background-color</entry>
+ </row>
- <entry>font-weight</entry>
- </row>
+ <row>
+ <entry>headerSizeFont</entry>
- <row>
- <entry>headerTextColor</entry>
+ <entry>font-size</entry>
+ </row>
- <entry>color</entry>
- </row>
+ <row>
+ <entry>headerFamilyFont</entry>
- </tbody>
- </tgroup>
- </table>
+ <entry>font-family</entry>
+ </row>
- <table>
- <title>Skin parameters redefinition for cells with days</title>
+ <row>
+ <entry>headerWeightFont</entry>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <entry>font-weight</entry>
+ </row>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <row>
+ <entry>headerTextColor</entry>
- <tbody>
- <row>
- <entry>panelBorderColor</entry>
+ <entry>color</entry>
+ </row>
- <entry>border-bottom-color</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>panelBorderColor</entry>
+ <table>
+ <title>Skin parameters redefinition for cells with days</title>
- <entry>border-right-color</entry>
- </row>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- <row>
- <entry>generalBackgroundColor</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>background-color</entry>
- </row>
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
- <row>
- <entry>generalSizeFont</entry>
+ <entry>border-bottom-color</entry>
+ </row>
- <entry>font-size</entry>
- </row>
+ <row>
+ <entry>panelBorderColor</entry>
- <row>
- <entry>generalFamilyFont</entry>
+ <entry>border-right-color</entry>
+ </row>
- <entry>font-family</entry>
- </row>
+ <row>
+ <entry>generalBackgroundColor</entry>
- </tbody>
- </tgroup>
- </table>
+ <entry>background-color</entry>
+ </row>
- <table>
- <title>Skin parameters redefinition for holiday</title>
+ <row>
+ <entry>generalSizeFont</entry>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <entry>font-size</entry>
+ </row>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <row>
+ <entry>generalFamilyFont</entry>
- <tbody>
- <row>
- <entry>calendarHolidaysBackgroundColor</entry>
+ <entry>font-family</entry>
+ </row>
- <entry>background-color</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>calendarHolidaysTextColor</entry>
+ <table>
+ <title>Skin parameters redefinition for holiday</title>
- <entry>color</entry>
- </row>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- </tbody>
- </tgroup>
- </table>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <table>
- <title>Skin parameters redefinition for cell with a current date</title>
+ <tbody>
+ <row>
+ <entry>calendarHolidaysBackgroundColor</entry>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <entry>background-color</entry>
+ </row>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <row>
+ <entry>calendarHolidaysTextColor</entry>
- <tbody>
- <row>
- <entry>calendarCurrentBackgroundColor</entry>
+ <entry>color</entry>
+ </row>
- <entry>background-color</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>calendarCurrentTextColor</entry>
+ <table>
+ <title>Skin parameters redefinition for cell with a current date</title>
- <entry>color</entry>
- </row>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- </tbody>
- </tgroup>
- </table>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <table>
- <title>Skin parameters redefinition for a selected day</title>
+ <tbody>
+ <row>
+ <entry>calendarCurrentBackgroundColor</entry>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
+ <entry>background-color</entry>
+ </row>
- <entry>CSS properties</entry>
- </row>
- </thead>
+ <row>
+ <entry>calendarCurrentTextColor</entry>
- <tbody>
- <row>
- <entry>headerBackgroundColor</entry>
+ <entry>color</entry>
+ </row>
- <entry>background-color</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>headerTextColor</entry>
+ <table>
+ <title>Skin parameters redefinition for a selected day</title>
- <entry>color</entry>
- </row>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
- <row>
- <entry>headerWeightFont</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>font-weight</entry>
- </row>
+ <tbody>
+ <row>
+ <entry>headerBackgroundColor</entry>
- </tbody>
- </tgroup>
- </table>
-
- <!-- Quick year & month selection-->
- <table>
- <title>Skin parameters redefinition for a popup element during quick month and year selection</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>tableBackgroundColor</entry>
- <entry>background</entry>
- </row>
-
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-color</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Skin parameters redefinition for a shadow</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>shadowBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
+ <entry>background-color</entry>
+ </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a selected month and year</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>calendarCurrentBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
-
- <row>
- <entry>calendarCurrentTextColor</entry>
- <entry>color</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a hovered month and year</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-color</entry>
- </row>
-
- <row>
- <entry>calendarSpecBackgroundColor</entry>
- <entry>background</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a month items near split line</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-right-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a hovered toolbar items</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>calendarWeekBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
-
- <row>
- <entry>generalTextColor</entry>
- <entry>color</entry>
- </row>
-
- <row>
- <entry>tableBackgroundColor</entry>
- <entry>border-color</entry>
- </row>
-
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-right-color</entry>
- </row>
-
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-bottom-color</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a pressed toolbar items</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-color</entry>
- </row>
-
- <row>
- <entry>tableBackgroundColor</entry>
- <entry>border-right-color</entry>
- </row>
-
- <row>
- <entry>tableBackgroundColor</entry>
- <entry>border-bottom-color</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for "ok" and "cancel" buttons</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>additionalBackgroundColor</entry>
- <entry>background</entry>
- </row>
-
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-top-color</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <!-- Time selection-->
-
- <table>
- <title>Skin parameters redefinition for a popup element during time selection</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>additionalBackgroundColor</entry>
- <entry>background</entry>
- </row>
-
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-color</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a wrapper <td> element for an input field</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>controlBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
-
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-color</entry>
- </row>
-
- <row>
- <entry>subBorderColor</entry>
- <entry>border-bottom-color</entry>
- </row>
-
- <row>
- <entry>subBorderColor</entry>
- <entry>border-right-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for an input field</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>buttonSizeFont</entry>
- <entry>font-size</entry>
- </row>
-
- <row>
- <entry>buttonFamilyFont</entry>
- <entry>font-family</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a wrapper <td> element for spinner buttons</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>headerBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
-
- <row>
- <entry>headerBackgroundColor</entry>
- <entry>border-color</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- </section>
+ <row>
+ <entry>headerTextColor</entry>
- <section>
- <title>Definition of Custom Style Classes</title>
+ <entry>color</entry>
+ </row>
- <para>On the screenshot there are classes names that define styles for component elements.</para>
+ <row>
+ <entry>headerWeightFont</entry>
- <figure>
- <title>Style classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar_cn1.png" scalefit="1"/>
- </imageobject>
- </mediaobject>
- </figure>
- <figure>
- <title>Style classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar_cn2.png" scalefit="1"/>
- </imageobject>
- </mediaobject>
- </figure>
- <figure>
- <title>Style classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar_cn3.png" scalefit="1"/>
- </imageobject>
- </mediaobject>
-
- </figure>
- <figure>
- <title>Style classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar_cn4.png" scalefit="1"/>
- </imageobject>
- </mediaobject>
-
- </figure>
- <table id="tab_cn3">
- <title>Classes names that define an input field and a button appearance</title>
+ <entry>font-weight</entry>
+ </row>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
+ </tbody>
+ </tgroup>
+ </table>
- <entry>Description</entry>
- </row>
- </thead>
+ <!-- Quick year & month selection-->
+ <table>
+ <title>Skin parameters redefinition for a popup element during quick
+ month and year selection</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <tbody>
- <row>
- <entry>rich-calendar-input </entry>
+ <tbody>
- <entry>Defines styles for an input field</entry>
- </row>
+ <row>
+ <entry>tableBackgroundColor</entry>
+ <entry>background</entry>
+ </row>
- <row>
- <entry>rich-calendar-button</entry>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-color</entry>
+ </row>
- <entry>Defines styles for a popup button</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table>
+ <title>Skin parameters redefinition for a shadow</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- </tbody>
- </tgroup>
- </table>
+ <tbody>
- <table>
- <title>Classes names that define a days appearance</title>
+ <row>
+ <entry>shadowBackgroundColor</entry>
+ <entry>background-color</entry>
+ </row>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
+ </tbody>
+ </tgroup>
+ </table>
- <entry>Description</entry>
- </row>
- </thead>
+ <table>
+ <title>Skin parameters redefinition for a selected month and year</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <tbody>
+ <tbody>
- <row>
- <entry>rich-calendar-days</entry>
+ <row>
+ <entry>calendarCurrentBackgroundColor</entry>
+ <entry>background-color</entry>
+ </row>
- <entry>Defines styles for names of working days in a header</entry>
- </row>
+ <row>
+ <entry>calendarCurrentTextColor</entry>
+ <entry>color</entry>
+ </row>
- <row>
- <entry>rich-calendar-weekends</entry>
+ </tbody>
+ </tgroup>
+ </table>
- <entry>Defines styles for names of weekend in a header</entry>
- </row>
+ <table>
+ <title>Skin parameters redefinition for a hovered month and year</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <row>
- <entry>rich-calendar-week</entry>
+ <tbody>
- <entry>Defines styles for weeks numbers</entry>
- </row>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-color</entry>
+ </row>
- <row>
- <entry>rich-calendar-today</entry>
+ <row>
+ <entry>calendarSpecBackgroundColor</entry>
+ <entry>background</entry>
+ </row>
- <entry>Defines styles for cell with a current date</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>rich-calendar-cell</entry>
+ <table>
+ <title>Skin parameters redefinition for a month items near split line</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-right-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <entry>Defines styles for cells with days</entry>
- </row>
+ <table>
+ <title>Skin parameters redefinition for a hovered toolbar items</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <row>
- <entry>rich-calendar-holly</entry>
+ <tbody>
- <entry>Defines styles for holiday</entry>
- </row>
+ <row>
+ <entry>calendarWeekBackgroundColor</entry>
+ <entry>background-color</entry>
+ </row>
- <row>
- <entry>rich-calendar-select</entry>
+ <row>
+ <entry>generalTextColor</entry>
+ <entry>color</entry>
+ </row>
- <entry>Defines styles for a selected day</entry>
- </row>
+ <row>
+ <entry>tableBackgroundColor</entry>
+ <entry>border-color</entry>
+ </row>
- <row>
- <entry>rich-calendar-hover</entry>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-right-color</entry>
+ </row>
- <entry>Defines styles for a hovered day</entry>
- </row>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-bottom-color</entry>
+ </row>
- </tbody>
- </tgroup>
- </table>
+ </tbody>
+ </tgroup>
+ </table>
- <table>
- <title>Classes names that define a popup element</title>
+ <table>
+ <title>Skin parameters redefinition for a pressed toolbar items</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
+ <tbody>
- <entry>Description</entry>
- </row>
- </thead>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-color</entry>
+ </row>
- <tbody>
- <row>
- <entry>rich-calendar-popup</entry>
+ <row>
+ <entry>tableBackgroundColor</entry>
+ <entry>border-right-color</entry>
+ </row>
- <entry>Defines styles for a popup element</entry>
- </row>
- <row>
- <entry>rich-calendar-exterior</entry>
+ <row>
+ <entry>tableBackgroundColor</entry>
+ <entry>border-bottom-color</entry>
+ </row>
- <entry>Defines styles for a popup element exterior</entry>
- </row>
+ </tbody>
+ </tgroup>
+ </table>
- <row>
- <entry>rich-calendar-tool</entry>
+ <table>
+ <title>Skin parameters redefinition for "ok" and
+ "cancel" buttons</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>Defines styles for toolbars</entry>
- </row>
+ <tbody>
- <row>
- <entry>rich-calendar-month</entry>
+ <row>
+ <entry>additionalBackgroundColor</entry>
+ <entry>background</entry>
+ </row>
- <entry>Defines styles for names of months</entry>
- </row>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-top-color</entry>
+ </row>
- <row>
- <entry>rich-calendar-header-optional</entry>
+ </tbody>
+ </tgroup>
+ </table>
- <entry>Defines styles for an optional header</entry>
- </row>
+ <!-- Time selection-->
- <row>
- <entry>rich-calendar-footer-optional</entry>
+ <table>
+ <title>Skin parameters redefinition for a popup element during time
+ selection</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <entry>Defines styles for an optional footer</entry>
- </row>
+ <tbody>
- <row>
- <entry>rich-calendar-header</entry>
+ <row>
+ <entry>additionalBackgroundColor</entry>
+ <entry>background</entry>
+ </row>
- <entry>Defines styles for a header</entry>
- </row>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-color</entry>
+ </row>
- <row>
- <entry>rich-calendar-footer</entry>
+ </tbody>
+ </tgroup>
+ </table>
- <entry>Defines styles for a footer</entry>
- </row>
+ <table>
+ <title>Skin parameters redefinition for a wrapper <td>
+ element for an input field</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- <row>
- <entry>rich-calendar-boundary-dates</entry>
+ <tbody>
- <entry>Defines styles for an active boundary button</entry>
- </row>
+ <row>
+ <entry>controlBackgroundColor</entry>
+ <entry>background-color</entry>
+ </row>
- <row>
- <entry>rich-calendar-btn</entry>
+ <row>
+ <entry>panelBorderColor</entry>
+ <entry>border-color</entry>
+ </row>
- <entry>Defines styles for an inactive boundary date</entry>
- </row>
+ <row>
+ <entry>subBorderColor</entry>
+ <entry>border-bottom-color</entry>
+ </row>
- <row>
- <entry>rich-calendar-toolfooter</entry>
+ <row>
+ <entry>subBorderColor</entry>
+ <entry>border-right-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <entry>Defines styles for a today control date</entry>
- </row>
+ <table>
+ <title>Skin parameters redefinition for an input field</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
- </tbody>
- </tgroup>
- </table>
+ <tbody>
- <table>
- <title>Classes names that define a popup element during quick month and year selection</title>
-
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>rich-calendar-date-layout</entry>
- <entry>Defines styles for a popup element during quick year selection</entry>
- </row>
- <row>
- <entry>rich-calendar-editor-layout-shadow</entry>
- <entry>Defines styles for a shadow</entry>
- </row>
- <row>
- <entry>rich-calendar-editor-btn</entry>
- <entry>Defines styles for an inactive boundary date</entry>
- </row>
- <row>
- <entry>rich-calendar-date-layout-split</entry>
- <entry>Defines styles for a wrapper <td> element for month items near split line</entry>
- </row>
- <row>
- <entry>rich-calendar-editor-btn-selected</entry>
- <entry>Defines styles for an selected boundary date</entry>
- </row>
- <row>
- <entry>rich-calendar-editor-btn-over</entry>
- <entry>Defines styles for a boundary date when pointer was moved onto</entry>
- </row>
-
- <row>
- <entry>rich-calendar-editor-tool-over</entry>
- <entry>Defines styles for a hovered toolbar items</entry>
- </row>
-
- <row>
- <entry>rich-calendar-editor-tool-press</entry>
- <entry>Defines styles for a pressed toolbar items</entry>
- </row>
-
- <row>
- <entry>rich-calendar-date-layout-ok</entry>
- <entry>Defines styles for a "ok" button</entry>
- </row>
- <row>
- <entry>rich-calendar-date-layout-cancel</entry>
- <entry>Defines styles for a "cancel" button</entry>
- </row>
+ <row>
+ <entry>buttonSizeFont</entry>
+ <entry>font-size</entry>
+ </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Classes names that define a popup element during time selection</title>
-
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>rich-calendar-time-layout</entry>
- <entry>Defines styles for a popup element during time selection</entry>
- </row>
- <row>
- <entry>rich-calendar-editor-layout-shadow</entry>
- <entry>Defines styles for a shadow</entry>
- </row>
- <row>
- <entry>rich-calendar-time-layout-fields</entry>
- <entry>Defines styles for a wrapper <td> element for input fields and buttons</entry>
- </row>
- <row>
- <entry>rich-calendar-spinner-input-container</entry>
- <entry>Defines styles for a wrapper <td> element for an input field</entry>
- </row>
- <row>
- <entry>rich-calendar-spinner-input</entry>
- <entry>Defines styles for an input field</entry>
- </row>
- <row>
- <entry>rich-calendar-spinner-buttons</entry>
- <entry>Defines styles for a wrapper <td> element for spinner buttons</entry>
- </row>
- <row>
- <entry>rich-calendar-spinner-up</entry>
- <entry>Defines styles for a "up" button</entry>
- </row>
- <row>
- <entry>rich-calendar-spinner-down</entry>
- <entry>Defines styles for a "down" button</entry>
- </row>
- <row>
- <entry>rich-calendar-time-layout-ok</entry>
- <entry>Defines styles for a "ok" button</entry>
- </row>
- <row>
- <entry>rich-calendar-time-layout-cancel</entry>
- <entry>Defines styles for a "cancel" button</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <para>In order to redefine styles for all <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> components on a page using CSS, it's enough to create classes with the
- same names (possible classes could be found in the tables <link linkend="tab_cn3"> above</link>) and define necessary properties in them. </para>
+ <row>
+ <entry>buttonFamilyFont</entry>
+ <entry>font-family</entry>
+ </row>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="CSS"><![CDATA[...
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for a wrapper <td>
+ element for spinner buttons</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>headerBackgroundColor</entry>
+ <entry>background-color</entry>
+ </row>
+
+ <row>
+ <entry>headerBackgroundColor</entry>
+ <entry>border-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+
+ <para>On the screenshot there are classes names that define styles for component
+ elements.</para>
+
+ <figure>
+ <title>Style classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar_cn1.png"
+ scalefit="1"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure>
+ <title>Style classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar_cn2.png"
+ scalefit="1"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure>
+ <title>Style classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar_cn3.png"
+ scalefit="1"/>
+ </imageobject>
+ </mediaobject>
+
+ </figure>
+ <figure>
+ <title>Style classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar_cn4.png"
+ scalefit="1"/>
+ </imageobject>
+ </mediaobject>
+
+ </figure>
+ <table id="tab_cn3">
+ <title>Classes names that define an input field and a button
+ appearance</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-calendar-input </entry>
+
+ <entry>Defines styles for an input
+ field</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-button</entry>
+
+ <entry>Defines styles for a popup
+ button</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define a days appearance</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>rich-calendar-days</entry>
+
+ <entry>Defines styles for names of
+ working days in a
+ header</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-weekends</entry>
+
+ <entry>Defines styles for names of
+ weekend in a header</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-week</entry>
+
+ <entry>Defines styles for weeks
+ numbers</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-today</entry>
+
+ <entry>Defines styles for cell with a
+ current date</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-cell</entry>
+
+ <entry>Defines styles for cells with
+ days</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-holly</entry>
+
+ <entry>Defines styles for
+ holiday</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-select</entry>
+
+ <entry>Defines styles for a selected
+ day</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-hover</entry>
+
+ <entry>Defines styles for a hovered
+ day</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define a popup element</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-calendar-popup</entry>
+
+ <entry>Defines styles for a popup
+ element</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-exterior</entry>
+
+ <entry>Defines styles for a popup
+ element exterior</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-tool</entry>
+
+ <entry>Defines styles for
+ toolbars</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-month</entry>
+
+ <entry>Defines styles for names of
+ months</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-header-optional</entry>
+
+ <entry>Defines styles for an optional
+ header</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-footer-optional</entry>
+
+ <entry>Defines styles for an optional
+ footer</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-header</entry>
+
+ <entry>Defines styles for a
+ header</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-footer</entry>
+
+ <entry>Defines styles for a
+ footer</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-boundary-dates</entry>
+
+ <entry>Defines styles for an active
+ boundary button</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-btn</entry>
+
+ <entry>Defines styles for an inactive
+ boundary date</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-toolfooter</entry>
+
+ <entry>Defines styles for a today
+ control date</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define a popup element during quick month
+ and year selection</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-calendar-date-layout</entry>
+ <entry>Defines styles for a popup
+ element during quick year
+ selection</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-editor-layout-shadow</entry>
+ <entry>Defines styles for a
+ shadow</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-editor-btn</entry>
+ <entry>Defines styles for an inactive
+ boundary date</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-date-layout-split</entry>
+ <entry>Defines styles for a wrapper
+ <td> element for
+ month items near split
+ line</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-editor-btn-selected</entry>
+ <entry>Defines styles for an selected
+ boundary date</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-editor-btn-over</entry>
+ <entry>Defines styles for a boundary
+ date when pointer was moved
+ onto</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-editor-tool-over</entry>
+ <entry>Defines styles for a hovered
+ toolbar items</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-editor-tool-press</entry>
+ <entry>Defines styles for a pressed
+ toolbar items</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-date-layout-ok</entry>
+ <entry>Defines styles for a
+ "ok"
+ button</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-date-layout-cancel</entry>
+ <entry>Defines styles for a
+ "cancel"
+ button</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define a popup element during time selection</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-calendar-time-layout</entry>
+ <entry>Defines styles for a popup
+ element during time
+ selection</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-editor-layout-shadow</entry>
+ <entry>Defines styles for a
+ shadow</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-time-layout-fields</entry>
+ <entry>Defines styles for a wrapper
+ <td> element for
+ input fields and
+ buttons</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-spinner-input-container</entry>
+ <entry>Defines styles for a wrapper
+ <td> element for
+ an input field</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-spinner-input</entry>
+ <entry>Defines styles for an input
+ field</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-spinner-buttons</entry>
+ <entry>Defines styles for a wrapper
+ <td> element for
+ spinner buttons</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-spinner-up</entry>
+ <entry>Defines styles for a
+ "up"
+ button</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-spinner-down</entry>
+ <entry>Defines styles for a
+ "down"
+ button</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-time-layout-ok</entry>
+ <entry>Defines styles for a
+ "ok"
+ button</entry>
+ </row>
+ <row>
+ <entry>rich-calendar-time-layout-cancel</entry>
+ <entry>Defines styles for a
+ "cancel"
+ button</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> components on a page using CSS, it's enough to
+ create classes with the same names (possible classes could be found in
+ the tables <link linkend="tab_cn3"> above</link>) and define necessary
+ properties in them. </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
.rich-calendar-today {
background-color: #FF0000;
}
-...]]></programlisting>
-
- <para>This is a result:</para>
-
- <figure>
- <title>Redefinition styles with predefined classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar_pc.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the example an active cell background color was changed.</para>
-
- <para>Also it's possible to change styles of particular <emphasis role="bold"
- ><property><rich:calendar></property></emphasis> component. In this case you should create own style classes and use them in corresponding <emphasis role="bold"
- ><property><rich:calendar></property></emphasis> <emphasis><property>styleClass</property></emphasis> attributes. An example is placed below:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="CSS"><![CDATA[...
+...]]></programlisting>
+
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Redefinition styles with predefined classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar_pc.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the example an active cell background color was changed.</para>
+
+ <para>Also it's possible to change styles of particular <emphasis
+ role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component. In this case you should create own style
+ classes and use them in corresponding <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis>
+ <emphasis>
+ <property>styleClass</property>
+ </emphasis> attributes. An example is placed below:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
.myFontClass{
font-style: italic;
}
-...]]></programlisting>
- <para>The <emphasis><property>"inputClass"</property></emphasis> attribute for <emphasis role="bold"
- ><property><rich:calendar> </property></emphasis> is defined as it's shown in the example below:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<rich:calendar ... inputClass="myFontClass"/>
-]]></programlisting>
-
- <para>This is a result:</para>
-
- <figure>
- <title>Redefinition styles with own classes and <emphasis><property>styleClass</property></emphasis> attributes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/calendar_oc.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As it could be seen on the picture above, the font style for output text was changed.</para>
-
-
- </section>
+...]]></programlisting>
+ <para>The <emphasis>
+ <property>"inputClass"</property>
+ </emphasis> attribute for <emphasis role="bold">
+ <property><rich:calendar> </property>
+ </emphasis> is defined as it's shown in the example below:</para>
- <section>
- <title>Relevant Resources Links</title>
- <para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar"
- >Here</ulink> you can see the example of <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> usage and sources for the given example. </para>
- <para>How to use JavaScript API see on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078301#..."
- >RichFaces Users Forum</ulink>.</para>
- </section>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<rich:calendar ... inputClass="myFontClass"/>
+]]></programlisting>
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Redefinition styles with own classes and <emphasis>
+ <property>styleClass</property>
+ </emphasis> attributes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar_oc.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As it could be seen on the picture above, the font style for output text
+ was changed.</para>
+
+
+ </section>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para><ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar"
+ >Here</ulink> you can see the example of <emphasis
+ role="bold">
+ <property><rich:calendar></property>
+ </emphasis> usage and sources for the given example. </para>
+ <para>How to use JavaScript API see on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078301#..."
+ >RichFaces Users Forum</ulink>.</para>
+ </section>
+
</section>
16 years, 5 months
JBoss Rich Faces SVN: r10038 - in trunk/test-applications/seleniumTest/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-08-12 03:59:50 -0400 (Tue, 12 Aug 2008)
New Revision: 10038
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ListShuttleTest.java
Log:
List Shuttle Test refactoring
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml 2008-08-12 06:46:35 UTC (rev 10037)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml 2008-08-12 07:59:50 UTC (rev 10038)
@@ -11,9 +11,25 @@
</ui:define>
<ui:define name="component">
+ <script type="text/javascript">
+ function _selectItem(id) {
+ var e = $(id);
+ if (document.createEvent) {
+ evt = document.createEvent("MouseEvents");
+ evt.initMouseEvent("click", true, true, window,0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ evt.srcElement = e;
+ e.dispatchEvent(evt);
+ }else {
+ if (e.click) {
+ e.click();
+ }
+ }
+ }
+ </script>
<a4j:outputPanel>
<h:messages></h:messages>
</a4j:outputPanel>
+ <p id="crack"></p>
<h:form id="_form">
<rich:listShuttle id="ls" sourceValue="#{listShuttle.freeItems}"
targetValue="#{listShuttle.items}" var="items" listHeight="300"
@@ -31,7 +47,7 @@
</h:outputLink>
</rich:column>
<rich:column>
- <h:outputText value="#{items.name}"></h:outputText>
+ <h:outputText value="#{items.name}" id="item"></h:outputText>
</rich:column>
</rich:listShuttle>
<a4j:commandLink id="reset" value="Reset" actionListener="#{listShuttle.reset}" reRender="ls"></a4j:commandLink><br/>
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ListShuttleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-08-12 06:46:35 UTC (rev 10037)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-08-12 07:59:50 UTC (rev 10038)
@@ -225,10 +225,10 @@
private void _selectItem(String itemId) {
writeStatus("Select item id: " + itemId);
try {
- clickById(itemId);
+ runScript("_selectItem('" + itemId + "')");
} catch (Exception e) {
writeStatus("Selection item id: " + itemId + " failed.");
- Assert.fail("No item was found. Item id: " + itemId);
+ Assert.fail("No item was found. Item id: " + itemId + e);
}
}
16 years, 5 months
JBoss Rich Faces SVN: r10037 - in trunk/ui/extendedDataTable/src/test/java/org/richfaces: component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-08-12 02:46:35 -0400 (Tue, 12 Aug 2008)
New Revision: 10037
Added:
trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedRowsRendererTest.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedRowsRenderer.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedTableRenderer.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ResponseWriterMock.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/TableDragDropRendererTest.java
Log:
JUnit tests
Added: trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java (rev 0)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java 2008-08-12 06:46:35 UTC (rev 10037)
@@ -0,0 +1,58 @@
+package org.richfaces.component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.richfaces.component.UIExtendedDataTable;
+import org.richfaces.model.FilterField;
+import org.richfaces.model.SortField2;
+import org.richfaces.model.selection.Selection;
+
+/**
+ * @author mpopiolek
+ *
+ */
+public class DefaultExtendedDataTable extends UIExtendedDataTable {
+
+ @Override
+ public Object getActiveRowKey() {
+ return "activeRowKey";
+ }
+
+ @Override
+ public void setActiveRowKey(Object activeRowKey) {
+ }
+
+ @Override
+ public String getSortMode() {
+ return null;
+ }
+
+ @Override
+ public void setSortMode(String sortMode) {
+ }
+
+ public Selection getSelection() {
+ return null;
+ }
+
+ public void setSelection(Selection selection) {
+ }
+
+ public List<SortField2> getSortFields() {
+ List<SortField2> list = new ArrayList<SortField2>();
+ return list;
+ }
+
+ public void setSortFields(List<SortField2> sortFields) {
+ }
+
+ public List<FilterField> getFilterFields() {
+ List<FilterField> list = new ArrayList<FilterField>();
+ return list;
+ }
+
+ public void setFilterFields(List<FilterField> filterFields) {
+ }
+
+}
Added: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedRowsRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedRowsRendererTest.java (rev 0)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedRowsRendererTest.java 2008-08-12 06:46:35 UTC (rev 10037)
@@ -0,0 +1,171 @@
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.faces.component.UIOutput;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIExtendedDataTable;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * @author mpopiolek
+ *
+ */
+public class AbstractExtendedRowsRendererTest extends AbstractAjax4JsfTestCase {
+
+ private ExtendedRowsRenderer rr;
+ private UIExtendedDataTable table;
+
+ public AbstractExtendedRowsRendererTest(String name) {
+ super(name);
+ rr = new ExtendedRowsRenderer();
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ application.addComponent(UIExtendedDataTable.COMPONENT_TYPE,
+ "org.richfaces.component.DefaultExtendedDataTable");
+ table = (UIExtendedDataTable) application
+ .createComponent(UIExtendedDataTable.COMPONENT_TYPE);
+ facesContext.getViewRoot().getChildren().add(table);
+ table.setId("extDT");
+ }
+
+ public void tearDown() throws Exception {
+ table = null;
+ super.tearDown();
+ }
+
+ public void testGetRendersChildren() {
+ assertTrue(rr.getRendersChildren());
+ }
+
+ public void testProcess() {
+ Object rowKey = 100;
+ ExtendedTableHolder eth = new ExtendedTableHolder(table);
+ int count = eth.getRowCounter();
+ Object argument = (Object) eth;
+ try {
+ rr.process(facesContext, rowKey, argument);
+ eth = (ExtendedTableHolder) argument;
+ assertEquals(count + 1, eth.getRowCounter());
+ assertEquals(100, eth.getLastKey());
+ assertEquals(100, eth.getTable().getRowKey());
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ eth = (ExtendedTableHolder) argument;
+ assertEquals(count + 1, ((ExtendedTableHolder) argument)
+ .getRowCounter());
+
+ }
+
+ public void testEncodeRowsFacesContextUIComponentExtendedTableHolder() {
+ ExtendedTableHolder eth = new ExtendedTableHolder(table);
+ try {
+ rr.encodeRows(facesContext, table, eth);
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testEncodeCaption() {
+ UIOutput caption = new UIOutput();
+ caption.setValue("test");
+ table.getFacets().put("caption", caption);
+ try {
+ setupResponseWriter();
+ rr.encodeCaption(facesContext, table);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement capt = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("caption")) {
+ capt = node;
+ }
+ }
+
+ assertNotNull(capt);
+
+ String className = capt.getAttributeValue("class");
+ assertNotNull(className);
+ assertEquals("extdt-caption rich-extdt-caption", className);
+
+ className = capt.getAttributeValue("id");
+ assertNotNull(className);
+ assertEquals("extDT:caption", className);
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testEncodeStyleClass() {
+ ResponseWriterMock writer = new ResponseWriterMock();
+ try {
+ rr.encodeStyleClass(writer, null, "predefined", "parent", "custom");
+ ArrayList<String> attr = writer.attr;
+ assertTrue(attr.contains("class predefined parent custom"));
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testEncodeStyle() {
+ ResponseWriterMock writer = new ResponseWriterMock();
+ try {
+ rr.encodeStyle(writer, null, "predefined", "parent", "custom");
+ ArrayList<String> attr = writer.attr;
+ assertTrue(attr.contains("style predefined parent custom"));
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testEncodeTableHeaderFacet() {
+ UIOutput footer = new UIOutput();
+ footer.setValue("test");
+ table.getFacets().put("footer", footer);
+ try {
+ setupResponseWriter();
+ rr.encodeTableHeaderFacet(facesContext, 10, writer, footer,
+ "skinFirstRowClass", "skinRowClass", "skinCellClass",
+ "footerClass", "element", "facetName");
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement n = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("element")) {
+ n = node;
+ }
+ }
+
+ assertNotNull(n);
+
+ String className = n.getAttributeValue("colspan");
+ assertNotNull(className);
+ assertEquals("10", className);
+
+ className = n.getAttributeValue("scope");
+ assertNotNull(className);
+ assertEquals("colgroup", className);
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+}
Added: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java (rev 0)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java 2008-08-12 06:46:35 UTC (rev 10037)
@@ -0,0 +1,477 @@
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.faces.component.UIInput;
+import javax.faces.component.UIOutput;
+import javax.faces.component.html.HtmlOutputText;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIColumn;
+import org.richfaces.component.UIExtendedDataTable;
+import org.richfaces.model.Ordering;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * @author mpopiolek
+ *
+ */
+public class AbstractExtendedTableRendererTest extends AbstractAjax4JsfTestCase {
+
+ private ExtendedTableRenderer renderer;
+ private UIExtendedDataTable table;
+
+ public AbstractExtendedTableRendererTest(String name) {
+ super(name);
+ renderer = new ExtendedTableRenderer();
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ application.addComponent(UIExtendedDataTable.COMPONENT_TYPE,
+ "org.richfaces.component.DefaultExtendedDataTable");
+ table = (UIExtendedDataTable) application
+ .createComponent(UIExtendedDataTable.COMPONENT_TYPE);
+
+ table.setFirst(0);
+ table.setRows(40);
+
+ facesContext.getViewRoot().getChildren().add(table);
+ table.setId("extDT");
+
+ for (int i = 0; i < 4; i++) {
+ UIColumn column = (UIColumn) application
+ .createComponent(UIColumn.COMPONENT_TYPE);
+ column.setId("columnId" + i);
+ column.setRendered(true);
+ column.setSortable(true);
+ if (i == 0) {
+ column.setSortOrder(Ordering.ASCENDING);
+ }
+
+ table.getChildren().add(column);
+ }
+
+ }
+
+ public void tearDown() throws Exception {
+ table = null;
+ super.tearDown();
+ }
+
+ public void testEncodeOneRow() {
+ try {
+ setupResponseWriter();
+ ExtendedTableHolder holder = new ExtendedTableHolder(table);
+
+ table.setRowKey(10);
+ renderer.encodeOneRow(facesContext, holder);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement capt = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("div")) {
+ capt = node;
+
+ assertNotNull(capt);
+
+ String className = capt.getAttributeValue("class");
+ assertNotNull(className);
+ assertEquals("extdt-cell-div", className);
+ }
+ }
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testEncodeColumns() {
+ try {
+ setupResponseWriter();
+ renderer.encodeColumns(facesContext, table);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement element = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("col")) {
+ element = node;
+ assertNotNull(element);
+ String className = element.getAttributeValue("width");
+ if (!className.isEmpty()) {
+ assertEquals("100", className);
+ }
+ }
+ }
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testEncodeHeader() {
+ try {
+ UIOutput text = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class
+ .getName(), null, null, null);
+ table.getFacets().put("header", text);
+ setupResponseWriter();
+ renderer.encodeHeader(facesContext, table);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement element = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("thead")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("id");
+ assertNotNull(className);
+ assertEquals("extDT:header", className);
+ } else if (node.getNodeName().equalsIgnoreCase("tr")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("id");
+ assertNotNull(className);
+ if (!className.isEmpty())
+ assertEquals("extDT:fakeIeRow", className);
+ } else if (node.getNodeName().equalsIgnoreCase("thead")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("th");
+ assertNotNull(className);
+
+ assertEquals(
+ "extdt-headercell extdt-fakeierow rich-extdt-headercell ",
+ className);
+ }
+ }
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testIsColumnFacetPresent() {
+ assertFalse(renderer.isColumnFacetPresent(table, "header"));
+ UIOutput text = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ table.getSortedColumns().next().getFacets().put("header", text);
+ assertTrue(renderer.isColumnFacetPresent(table, "header"));
+ }
+
+ public void testIsColumnRendered() {
+ table.setRendered(false);
+ assertFalse(renderer.isColumnRendered(table));
+ table.setRendered(true);
+ assertTrue(renderer.isColumnRendered(table));
+ }
+
+ public void testEncodeHeaderFacets() {
+ try {
+ UIOutput text = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class
+ .getName(), null, null, null);
+ // header
+ table.getFacets().put("header", text);
+ setupResponseWriter();
+ renderer
+ .encodeHeaderFacets(
+ facesContext,
+ writer,
+ table,
+ table.getSortedColumns(),
+ "extdt-dr-menucell extdt-subheadercell rich-extdt-subheadercell",
+ (String) table.getAttributes().get("headerClass"),
+ "header", "th", 4);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement element = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+
+ if (node.getNodeName().equalsIgnoreCase("th")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("scope");
+ assertNotNull(className);
+ assertEquals("col", className);
+ }
+ }
+ // footer
+ table.getFacets().put("footer", text);
+ setupResponseWriter();
+ renderer
+ .encodeHeaderFacets(
+ facesContext,
+ writer,
+ table,
+ table.getSortedColumns(),
+ "extdt-dr-menucell extdt-subheadercell rich-extdt-subheadercell",
+ (String) table.getAttributes().get("headerClass"),
+ "header", "td", 4);
+ page = processResponseWriter();
+
+ elementIterator = page.getAllHtmlChildElements();
+
+ element = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+
+ if (node.getNodeName().equalsIgnoreCase("td")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("scope");
+ assertNotNull(className);
+ assertEquals("col", className);
+ }
+ }
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testEncodeFooter() {
+ try {
+ UIOutput text = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class
+ .getName(), null, null, null);
+
+ table.getFacets().put("footer", text);
+ setupResponseWriter();
+ renderer.encodeFooter(facesContext, table);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement element = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+
+ if (node.getNodeName().equalsIgnoreCase("tfoot")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("id");
+ assertNotNull(className);
+ assertEquals("extDT:footer", className);
+ }
+ }
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testRowGroupChanged() {
+
+ }
+
+ public void testEncodeRowStartFacesContextStringUIDataTableTableHolderResponseWriter() {
+ try {
+ setupResponseWriter();
+ table.setRowKey(10);
+
+ ExtendedTableHolder holder = new ExtendedTableHolder(table);
+ renderer.encodeRowStart(facesContext, "extdt-row rich-extdt-row",
+ "rowClass", table, holder, writer);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement element = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+
+ if (node.getNodeName().equalsIgnoreCase("test")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("id");
+ assertNotNull(className);
+ assertEquals("j_id0:10:n:0", className);
+ }
+ }
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testEncodeRowId() {
+ try {
+ setupResponseWriter();
+ table.setRowKey(10);
+
+ writer.startElement("test", table);
+ renderer.encodeRowId(facesContext, writer, table, 0);
+ writer.endElement("test");
+
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement element = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+
+ if (node.getNodeName().equalsIgnoreCase("test")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("id");
+ assertNotNull(className);
+ assertEquals("extDT:10:n:0", className);
+ }
+ }
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testGetColumnsCount() {
+ assertEquals(4, renderer.getColumnsCount(table));
+ }
+
+ public void testCalculateRowColumns() {
+ assertEquals(4, renderer.calculateRowColumns(table.columns()));
+ }
+
+ public void testEncodeScriptIfNecessary() {
+ try {
+ setupResponseWriter();
+ renderer.encodeScriptIfNecessary(facesContext, table);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement element = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+
+ if (node.getNodeName().equalsIgnoreCase("script")) {
+ element = node;
+ assertNotNull(element);
+
+ String className = element.getAttributeValue("type");
+ assertNotNull(className);
+ assertEquals("text/javascript", className);
+ }
+ }
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ // JSFunction or JSFunctionDefinition return:
+
+ // public void testGetSortFunctionDefFacesContextUIDataTable() {
+ // }
+ //
+ // public void testGetSortFunctionDefFacesContextUIDataTableBoolean() {
+ // }
+ //
+ // public void testGetSortFunction() {
+ // }
+ //
+ // public void testGetOnGroupToggleFunctionDef() {
+ // }
+ //
+ // public void testGetGroupFunction() {
+ // }
+ //
+ // public void testGetOnResizeFunctionDef() {
+ // }
+ //
+ // public void testGetChangeColumnVisibilityFunction() {
+ // }
+ //
+ // public void testGetPreSendAjaxRequestFunction() {
+ // }
+ //
+ // public void testBuildAjaxFunction() {
+ // }
+
+ public void testDoDecodeFacesContextUIComponent() {
+ // facesContext.getExternalContext().getRequestParameterMap().put(
+ // table.getClientId(facesContext), "fsp");
+ // facesContext.getExternalContext().getRequestParameterMap().put(
+ // "fsp", "extDT:columnId0");
+ // renderer.doDecode(facesContext, table);
+ }
+
+ // public void testEncodeEndFacesContextUIComponent() {
+ //
+ // }
+
+ public void testAddInplaceInput() {
+ UIColumn column = (UIColumn) application
+ .createComponent(UIColumn.COMPONENT_TYPE);
+ column.setId("columnId");
+ column.setFilterValue("test");
+ // filter event == null
+ try {
+ setupResponseWriter();
+ renderer.addInplaceInput(facesContext, column, "buffer");
+ UIInput input = (UIInput) column.getFacets()
+ .get("filterValueInput");
+ assertEquals("buffer", input.getAttributes().get("onchange"));
+ assertEquals("test", input.getValue());
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ // with set filter event
+ column.getAttributes().put("filterEvent", "testEvent");
+ try {
+ setupResponseWriter();
+ renderer.addInplaceInput(facesContext, column, "buffer");
+ UIInput input = (UIInput) column.getFacets()
+ .get("filterValueInput");
+ assertEquals("buffer", input.getAttributes().get("testEvent"));
+ assertEquals("test", input.getValue());
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testGetJavaScriptVarName() {
+ assertEquals("window.ExtendedDataTable.DataTable_extDT", renderer
+ .getJavaScriptVarName(facesContext, table));
+ }
+
+ public void testGetOnAjaxCompleteFunction() {
+ assertNull(renderer.getOnAjaxCompleteFunction(facesContext, table));
+ }
+
+}
Added: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedRowsRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedRowsRenderer.java (rev 0)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedRowsRenderer.java 2008-08-12 06:46:35 UTC (rev 10037)
@@ -0,0 +1,27 @@
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author mpopiolek
+ *
+ */
+public class ExtendedRowsRenderer extends AbstractExtendedRowsRenderer {
+
+ public ExtendedRowsRenderer() {
+ }
+
+ @Override
+ public void encodeOneRow(FacesContext context, ExtendedTableHolder holder)
+ throws IOException {
+ }
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return null;
+ }
+
+}
Added: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedTableRenderer.java (rev 0)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedTableRenderer.java 2008-08-12 06:46:35 UTC (rev 10037)
@@ -0,0 +1,18 @@
+package org.richfaces.renderkit;
+
+import javax.faces.component.UIComponent;
+
+import org.richfaces.component.UIExtendedDataTable;
+
+/**
+ * @author mpopiolek
+ *
+ */
+public class ExtendedTableRenderer extends AbstractExtendedTableRenderer {
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return UIExtendedDataTable.class;
+ }
+
+}
Added: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ResponseWriterMock.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ResponseWriterMock.java (rev 0)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ResponseWriterMock.java 2008-08-12 06:46:35 UTC (rev 10037)
@@ -0,0 +1,90 @@
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.ResponseWriter;
+
+/**
+ * @author mpopiolek
+ *
+ */
+public class ResponseWriterMock extends ResponseWriter {
+
+ public ArrayList<String> attr;
+
+ public ResponseWriterMock() {
+ attr = new ArrayList<String>();
+ }
+
+ @Override
+ public void startElement(String name, UIComponent component)
+ throws IOException {
+ }
+
+ @Override
+ public void writeAttribute(String name, Object value, String property)
+ throws IOException {
+ attr.add(name + " " + value);
+ }
+
+ @Override
+ public void endElement(String name) throws IOException {
+ }
+
+ @Override
+ public ResponseWriter cloneWithWriter(Writer writer) {
+ return null;
+ }
+
+ @Override
+ public void endDocument() throws IOException {
+ }
+
+ @Override
+ public void flush() throws IOException {
+ }
+
+ @Override
+ public String getCharacterEncoding() {
+ return null;
+ }
+
+ @Override
+ public String getContentType() {
+ return null;
+ }
+
+ @Override
+ public void startDocument() throws IOException {
+ }
+
+ @Override
+ public void writeComment(Object comment) throws IOException {
+ }
+
+ @Override
+ public void writeText(Object text, String property) throws IOException {
+ }
+
+ @Override
+ public void writeText(char[] text, int off, int len) throws IOException {
+ }
+
+ @Override
+ public void writeURIAttribute(String name, Object value, String property)
+ throws IOException {
+ }
+
+ @Override
+ public void close() throws IOException {
+ }
+
+ @Override
+ public void write(char[] cbuf, int off, int len) throws IOException {
+ attr.add(String.valueOf(cbuf));
+ }
+
+}
Added: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/TableDragDropRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/TableDragDropRendererTest.java (rev 0)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/TableDragDropRendererTest.java 2008-08-12 06:46:35 UTC (rev 10037)
@@ -0,0 +1,117 @@
+package org.richfaces.renderkit.html;
+
+import java.util.Iterator;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIColumn;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * @author mpopiolek
+ *
+ */
+public class TableDragDropRendererTest extends AbstractAjax4JsfTestCase {
+
+ private TableDragDropRenderer renderer;
+
+ private UIColumn column1;
+
+ public TableDragDropRendererTest(String name) {
+ super(name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ column1 = (UIColumn) application
+ .createComponent(UIColumn.COMPONENT_TYPE);
+ column1.setId("columnId1");
+ facesContext.getViewRoot().getChildren().add(column1);
+
+ renderer = TableDragDropRenderer.getInstance(facesContext);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ renderer = null;
+ column1 = null;
+ }
+
+ public void testEncodeChildScripts() {
+
+ }
+
+ public void testRenderDragSupport() {
+ try {
+ setupResponseWriter();
+ renderer.renderDragSupport(column1, "dragSourceId", "indicatorId",
+ "dragLabel");
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement script = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("script")) {
+ script = node;
+ }
+ }
+
+ assertNotNull(script);
+
+ String className = script.getAttributeValue("id");
+
+ assertNotNull(className);
+
+ assertEquals("columnId1:dnd_drag_script", className);
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testRenderDropSupport() {
+
+ try {
+ setupResponseWriter();
+ renderer.renderDropSupport(column1, "dropTargetId", true);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement script = null;
+
+ while (elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("script")) {
+ script = node;
+ }
+ }
+
+ assertNotNull(script);
+
+ String className = script.getAttributeValue("id");
+
+ assertNotNull(className);
+
+ assertEquals("columnId1:dnd_drop_script_left", className);
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+}
16 years, 5 months
JBoss Rich Faces SVN: r10036 - in trunk: ui/extendedDataTable and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-08-11 21:20:41 -0400 (Mon, 11 Aug 2008)
New Revision: 10036
Modified:
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
trunk/ui/extendedDataTable/pom.xml
Log:
Fix build in the Linux box.
Return default demo load...strategy to "ALL"
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-08-11 16:55:56 UTC (rev 10035)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-08-12 01:20:41 UTC (rev 10036)
@@ -54,11 +54,11 @@
<context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
- <param-value>DEFAULT</param-value>
+ <param-value>ALL</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
- <param-value>DEFAULT</param-value>
+ <param-value>ALL</param-value>
</context-param>
<filter>
Modified: trunk/ui/extendedDataTable/pom.xml
===================================================================
--- trunk/ui/extendedDataTable/pom.xml 2008-08-11 16:55:56 UTC (rev 10035)
+++ trunk/ui/extendedDataTable/pom.xml 2008-08-12 01:20:41 UTC (rev 10036)
@@ -89,7 +89,7 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
- <artifactId>jquery</artifactId>
+ <artifactId>jQuery</artifactId>
<version>3.2.2-SNAPSHOT</version>
</dependency>
16 years, 5 months
JBoss Rich Faces SVN: r10035 - in trunk/docs/userguide/en/src/main: resources/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-08-11 12:55:56 -0400 (Mon, 11 Aug 2008)
New Revision: 10035
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
trunk/docs/userguide/en/src/main/resources/css/html.css
Log:
RF-3875 - "large spaces between list items in IE" - done (and corrected some lists for rich:calendar)
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-08-11 16:53:59 UTC (rev 10034)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-08-11 16:55:56 UTC (rev 10035)
@@ -206,15 +206,11 @@
</emphasis> defines a label for the button. If the attribute is set <emphasis><property>"buttonIcon"</property></emphasis> and
<emphasis><property>"buttonIconDisabled"</property></emphasis> are ignored </para>
</listitem>
- </itemizedlist>
- <itemizedlist>
<listitem>
<para><emphasis>
<property>"buttonIcon"</property>
</emphasis> defines an icon for the button</para>
</listitem>
- </itemizedlist>
- <itemizedlist>
<listitem>
<para><emphasis>
<property>"buttonIconDisabled"</property>
Modified: trunk/docs/userguide/en/src/main/resources/css/html.css
===================================================================
--- trunk/docs/userguide/en/src/main/resources/css/html.css 2008-08-11 16:53:59 UTC (rev 10034)
+++ trunk/docs/userguide/en/src/main/resources/css/html.css 2008-08-11 16:55:56 UTC (rev 10035)
@@ -72,7 +72,6 @@
text-align:left;
font-size: 11px;
}
-
.css_normal {
line-height:0px;
color:#000000;
@@ -148,4 +147,14 @@
}
div.table-contents table{
font-size:12px;
+}
+.itemizedlist ul {
+ padding-top: 5px;
+}
+.itemizedlist ul li {
+ margin-top: 5px;
+ padding-bottom: 0px;
+}
+.itemizedlist ul li p {
+ margin-top: -10px;
}
\ No newline at end of file
16 years, 5 months