JBoss Rich Faces SVN: r2407 - trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-08-22 13:20:24 -0400 (Wed, 22 Aug 2007)
New Revision: 2407
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/CustomEvent.js
Log:
Add unbreakableEach for custom event fire method.
If by some reason it throw exception it can loose processing of the rest event handlers.
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/CustomEvent.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/CustomEvent.js 2007-08-22 16:15:25 UTC (rev 2406)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/CustomEvent.js 2007-08-22 17:20:24 UTC (rev 2407)
@@ -47,7 +47,7 @@
});
var args = $A(arguments);
- subscribersToNotify.each(function(subscriber) {
+ subscribersToNotify.unbreakableEach(function(subscriber) {
subscriber.callback.apply(subscriber.callback, args);
});
}
18 years, 8 months
JBoss Rich Faces SVN: r2406 - in trunk/ui/modal-panel/src/main: java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-22 12:15:25 -0400 (Wed, 22 Aug 2007)
New Revision: 2406
Modified:
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
Log:
RF-663 fixed
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2007-08-22 14:51:53 UTC (rev 2405)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2007-08-22 16:15:25 UTC (rev 2406)
@@ -143,14 +143,6 @@
</property>
<property>
- <name>showWhenRendered</name>
- <classname>boolean</classname>
- <description>
- If 'true' modalPanel should be rendered after first page loading
- </description>
- </property>
-
- <property>
<name>keepVisualState</name>
<classname>boolean</classname>
<description>
@@ -187,7 +179,7 @@
<name>showWhenRendered</name>
<classname>boolean</classname>
<description>
- iA "true" value for this attribute makes a modal panel opened as default.
+ If "true" value for this attribute makes a modal panel opened as default.
</description>
<defaultvalue>false</defaultvalue>
</property>
Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
===================================================================
--- trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2007-08-22 14:51:53 UTC (rev 2405)
+++ trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2007-08-22 16:15:25 UTC (rev 2406)
@@ -134,7 +134,7 @@
public String getShowScript(FacesContext context, UIModalPanel panel) {
StringBuffer result = new StringBuffer();
- if (panel.isKeepVisualState() && panel.isShowWhenRendered()) {
+ if (panel.isKeepVisualState() || panel.isShowWhenRendered()) {
result.append("Richfaces.showModalPanel('" + panel.getClientId(context) + "', {");
Iterator it = panel.getVisualOptions().entrySet().iterator();
18 years, 8 months
JBoss Rich Faces SVN: r2405 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-08-22 10:51:53 -0400 (Wed, 22 Aug 2007)
New Revision: 2405
Modified:
trunk/docs/userguide/en/src/main/docbook/included/log.xml
trunk/docs/userguide/en/src/main/docbook/included/paint2D.xml
trunk/docs/userguide/en/src/main/docbook/included/status.xml
Log:
http://jira.jboss.com/jira/browse/RF-625
Modified: trunk/docs/userguide/en/src/main/docbook/included/log.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/log.xml 2007-08-22 14:32:36 UTC (rev 2404)
+++ trunk/docs/userguide/en/src/main/docbook/included/log.xml 2007-08-22 14:51:53 UTC (rev 2405)
@@ -62,7 +62,9 @@
<property>"popup"</property>
</emphasis>
attribute on the component. </para>
- <para>Example:</para><programlisting role="XML"><![CDATA[<a4j:log level="ALL" popup="false" width="400" height="200"/>]]></programlisting>
+ <para><emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<a4j:log level="ALL" popup="false" width="400" height="200"/>]]></programlisting>
<para>The component defined this way is decoded on a page as <emphasis role="bold"><property><div></property></emphasis> inside a page, where all the information beginning with informational message is generated.</para>
<note>
<title>Note:</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/paint2D.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/paint2D.xml 2007-08-22 14:32:36 UTC (rev 2404)
+++ trunk/docs/userguide/en/src/main/docbook/included/paint2D.xml 2007-08-22 14:51:53 UTC (rev 2405)
@@ -111,7 +111,8 @@
</emphasis> and <emphasis>
<property>"data"</property>
</emphasis> attributes.</para>
- <para>Example:</para>
+ <para><emphasis role="bold">Example:</emphasis>
+ </para>
<para>
<emphasis role="bold">Example:</emphasis>
Modified: trunk/docs/userguide/en/src/main/docbook/included/status.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/status.xml 2007-08-22 14:32:36 UTC (rev 2404)
+++ trunk/docs/userguide/en/src/main/docbook/included/status.xml 2007-08-22 14:51:53 UTC (rev 2405)
@@ -96,7 +96,8 @@
</listitem>
</itemizedlist></para>
<para>The component creates two <emphasis role="bold"><property><span></property></emphasis> elements with content defined for each status, one of the elements (start) is initially hidden. At the beginning of an Ajax request, elements state is inversed, hence the second element is shown and the first is hidden. At the end of a response processing, elements display states return to its initial values.</para>
- <para>Example:</para>
+ <para><emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<a4j:status startText="Started" stopText="stopped" layout="block"/>]]></programlisting>
<para>is decoded on a page as:</para><programlisting role="XML"><![CDATA[<span id="j_id20:status.start" style="display: none">
Started
18 years, 8 months
JBoss Rich Faces SVN: r2403 - trunk/docs/xslt/en/src/main/xslt.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-08-22 10:30:12 -0400 (Wed, 22 Aug 2007)
New Revision: 2403
Modified:
trunk/docs/xslt/en/src/main/xslt/html.xsl
trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl
Log:
http://jira.jboss.com/jira/browse/RF-600
done for multipage version
Modified: trunk/docs/xslt/en/src/main/xslt/html.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/html.xsl 2007-08-22 14:24:21 UTC (rev 2402)
+++ trunk/docs/xslt/en/src/main/xslt/html.xsl 2007-08-22 14:30:12 UTC (rev 2403)
@@ -22,6 +22,7 @@
version="1.0"
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default">
+
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
<xsl:include href="./collapsing-navigation.xsl"></xsl:include>
Modified: trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl 2007-08-22 14:24:21 UTC (rev 2402)
+++ trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl 2007-08-22 14:30:12 UTC (rev 2403)
@@ -25,6 +25,9 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
+<xsl:include href="./collapsing-navigation.xsl"></xsl:include>
+
+
<!--###################################################
HTML Settings
################################################### -->
18 years, 8 months
JBoss Rich Faces SVN: r2402 - in trunk: samples/calendar-sample/src/main/webapp/pages and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-08-22 10:24:21 -0400 (Wed, 22 Aug 2007)
New Revision: 2402
Modified:
trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
Rf-650
Rf-659
Updated calendar-demo application.
Modified: trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
===================================================================
--- trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2007-08-22 14:19:52 UTC (rev 2401)
+++ trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2007-08-22 14:24:21 UTC (rev 2402)
@@ -42,12 +42,13 @@
private boolean popup;
private boolean readonly;
+ private boolean showInput;
+ private boolean enableManualInput;
private String pattern;
private Date currentDate;
private Date selectedDate;
private String jointPoint;
private String direction;
- private String inputType;
private String boundary;
private boolean useCustomDayLabels;
@@ -84,18 +85,28 @@
jointPoint = "bottom-left";
direction = "bottom-right";
readonly = true;
- inputType = "readonly";
+ enableManualInput=false;
+ showInput=true;
boundary = "inactive";
}
+
+
+ public boolean isShowInput() {
+ return showInput;
+ }
- public String getInputType() {
- return inputType;
+ public void setShowInput(boolean showInput) {
+ this.showInput = showInput;
}
- public void setInputType(String inputType) {
- this.inputType = inputType;
+ public boolean isEnableManualInput() {
+ return enableManualInput;
}
+ public void setEnableManualInput(boolean enableManualInput) {
+ this.enableManualInput = enableManualInput;
+ }
+
public boolean isReadonly() {
return readonly;
}
Modified: trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
===================================================================
--- trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-08-22 14:19:52 UTC (rev 2401)
+++ trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-08-22 14:24:21 UTC (rev 2402)
@@ -45,7 +45,8 @@
jointPoint="#{calendarBean.jointPoint}"
direction="#{calendarBean.direction}"
buttonLabel="PopUp"
- inputType="#{calendarBean.inputType}"
+ enableManualInput="#{calendarBean.enableManualInput}"
+ showInput="#{calendarBean.showInput}"
boundaryDatesMode="#{calendarBean.boundary}">
<f:facet name="optionalHeader">
<h:outputText value="optionalHeader Facet" />
@@ -100,18 +101,20 @@
<f:selectItem itemLabel="top-left" itemValue="top-left"/>
<f:selectItem itemLabel="auto" itemValue="auto"/>
</h:selectOneRadio>
- <h:outputText value="InputType:" />
- <h:selectOneRadio onchange="submit()" value="#{calendarBean.inputType}">
- <f:selectItem itemLabel="readonly" itemValue="readonly"/>
- <f:selectItem itemLabel="hidden" itemValue="hidden"/>
- <f:selectItem itemLabel="editable" itemValue="editable"/>
- </h:selectOneRadio>
<h:outputText value="BoundaryDatesMode:" />
<h:selectOneRadio onclick="submit()" value="#{calendarBean.boundary}">
<f:selectItem itemLabel="inactive" itemValue="inactive"/>
<f:selectItem itemLabel="select" itemValue="select"/>
<f:selectItem itemLabel="scroll" itemValue="scroll"/>
</h:selectOneRadio>
+ <h:outputText value="EnableManualInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.enableManualInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+ <h:outputText value="ShowInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.showInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-22 14:19:52 UTC (rev 2401)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-22 14:24:21 UTC (rev 2402)
@@ -159,17 +159,24 @@
<defaultvalue>"batch"</defaultvalue>
</property>
<property>
- <name>inputType</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue>"readonly"</defaultvalue>
- </property>
- <property>
<name>boundaryDatesMode</name>
<classname>java.lang.String</classname>
<description></description>
<defaultvalue>"inactive"</defaultvalue>
</property>
+ <property>
+ <name> enableManualInput </name>
+ <classname>boolean</classname>
+ <description>False value for this attribute makes a text field "read-only", so the value can be
+ changed only from a handle</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name> showInput </name>
+ <classname>boolean</classname>
+ <description>False value for this attribute makes text a field invisible</description>
+ <defaultvalue>true</defaultvalue>
+ </property>
</component>
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-08-22 14:19:52 UTC (rev 2401)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-08-22 14:24:21 UTC (rev 2402)
@@ -88,34 +88,35 @@
boolean popup = getUtils().isBooleanAttribute(component, "popup");
if (popup) {
addPopupToAjaxRendered(context, component);
- Boolean readonly = Boolean.FALSE;
- String hidden = "text";
- String onclick =null;
- String inputType = component.getAttributes().get("inputType").toString();
- if(inputType.equals("readonly")){
- readonly=Boolean.TRUE;
+
+ boolean showInput = getUtils().isBooleanAttribute(component, "showInput");
+ boolean manualInput = getUtils().isBooleanAttribute(component, "enableManualInput");
+ String onclick =null;
+ String type="text";
+ if(manualInput){
+ variables.setVariable("manualInput",new Boolean(!manualInput));
+ }
+ else{
+ variables.setVariable("manualInput",new Boolean(!manualInput));
onclick = "$('"+clientId+"').component.doExpand();";
+ }
+ if (!showInput){
+ type="hidden";
}
- else{
- if (inputType.equals("hidden")){
- hidden = inputType;
- }
- }
- variables.setVariable("readonly",readonly);
- variables.setVariable("hidden",hidden);
+
variables.setVariable("onclick",onclick);
+ variables.setVariable("type",type);
]]>
</jsp:scriptlet>
<f:resource name="org.richfaces.renderkit.html.iconimages.CalendarIcon" var="icon" />
<span id="#{clientId}Popup" >
<input
- x:passThruWithExclusions="name"
id="#{clientId}InputDate"
name="#{clientId}InputDate"
value="#{this:getInputValue(context,component)}"
- type="#{hidden}"
- readonly="#{readonly}"
+ type="#{type}"
+ readonly="#{manualInput}"
disabled="#{component.attributes['disabled']}"
accesskey="#{component.attributes['accesskey']}"
maxlength="#{component.attributes['maxlength']}"
18 years, 8 months
JBoss Rich Faces SVN: r2401 - in trunk/ui: menu-components/src/test/java/org/richfaces/renderkit/html/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-08-22 10:19:52 -0400 (Wed, 22 Aug 2007)
New Revision: 2401
Modified:
trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java
trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/MenuNodeImageTest.java
Log:
Modified: trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java
===================================================================
--- trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java 2007-08-22 14:12:20 UTC (rev 2400)
+++ trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java 2007-08-22 14:19:52 UTC (rev 2401)
@@ -44,7 +44,7 @@
assertNotNull(results);
- Color color2 = new Color(results);
+ Color color2 = new Color(results.intValue());
assertEquals(color1, color2);
}
Modified: trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/MenuNodeImageTest.java
===================================================================
--- trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/MenuNodeImageTest.java 2007-08-22 14:12:20 UTC (rev 2400)
+++ trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/MenuNodeImageTest.java 2007-08-22 14:19:52 UTC (rev 2401)
@@ -53,8 +53,8 @@
MenuNodeImageData nodeData = (MenuNodeImageData)img.deserializeData(data);
assertNotNull(nodeData);
- assertEquals(color1, new Color(nodeData.getGeneralColor()));
- assertEquals(color2, new Color(nodeData.getDisabledColor()));
+ assertEquals(color1, new Color(nodeData.getGeneralColor().intValue()));
+ assertEquals(color2, new Color(nodeData.getDisabledColor().intValue()));
}
}
18 years, 8 months
JBoss Rich Faces SVN: r2400 - trunk/docs/userguide/en/src/main/docbook.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-22 10:12:20 -0400 (Wed, 22 Aug 2007)
New Revision: 2400
Modified:
trunk/docs/userguide/en/src/main/docbook/master.xml
Log:
http://jira.jboss.com/jira/browse/RF-655 - table of content worked over
Modified: trunk/docs/userguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/master.xml 2007-08-22 14:12:01 UTC (rev 2399)
+++ trunk/docs/userguide/en/src/main/docbook/master.xml 2007-08-22 14:12:20 UTC (rev 2400)
@@ -3,17 +3,17 @@
"../../../../../resources/support/docbook-dtd/docbookx.dtd"
[ <!ENTITY rfcintro SYSTEM "modules/RFCintro.xml">
-<!--<!ENTITY rfcdocumentroadmap SYSTEM "modules/RFCdocumentroadmap.xml"> -->
-
<!ENTITY rfctechreqs SYSTEM "modules/RFCtechreqs.xml">
-<!ENTITY rfcsetwebappl SYSTEM "modules/RFCsetwebappl.xml">
+<!ENTITY rfcGettingStarted SYSTEM "modules/RFCGettingStarted.xml">
+<!ENTITY rfcSettings SYSTEM "modules/RFCSettings.xml">
<!ENTITY wadParams SYSTEM "modules/AUGWADParams.xml">
<!ENTITY rfcarchitectover SYSTEM "modules/RFCarchitectover.xml">
<!ENTITY rfclibrary SYSTEM "modules/RFClibrary.xml">
+<!ENTITY rfcidesupport SYSTEM "modules/RFCidesupport.xml">
+<!ENTITY rfclinks SYSTEM "modules/RFClinks.xml">
+<!ENTITY rfcFAQ SYSTEM "modules/RFCfaq.xml">
-
-
-<!ENTITY richfaces_table SYSTEM "../../../target/generated/rich.xml">
+<!--ENTITY richfaces_table SYSTEM "../../../target/generated/rich.xml"-->
<!ENTITY dataFilterSlider_table SYSTEM "../../../target/generated/dataFilterSlider.xml">
<!ENTITY dataScroller_table SYSTEM "../../../target/generated/datascroller.xml">
<!ENTITY dataTable_table SYSTEM "../../../target/generated/dataTable.xml">
@@ -39,20 +39,10 @@
<!ENTITY panelMenu_table SYSTEM "../../../target/generated/panelmenu.xml">
<!ENTITY message_table SYSTEM "../../../target/generated/message.xml">
<!ENTITY calendar_table SYSTEM "../../../target/generated/calendar.xml">
-
<!ENTITY tooltip_table SYSTEM "../../../target/generated/tooltip.xml">
<!ENTITY insert_table SYSTEM "../../../target/generated/insert.xml">
-
<!ENTITY coreComponents_table SYSTEM "../../../target/generated/a4j.xml">
-
-
-<!ENTITY rfcidesupport SYSTEM "modules/RFCidesupport.xml">
-<!ENTITY rfclinks SYSTEM "modules/RFClinks.xml">
-<!ENTITY rfcFAQ SYSTEM "modules/RFCfaq.xml">
-
-
-
]>
<book>
@@ -68,14 +58,11 @@
<toc/>
&rfcintro;
- &rfcdocumentroadmap;
&rfctechreqs;
- &rfcsetwebappl;
+ &rfcGettingStarted;
+ &rfcSettings;
&rfcarchitectover;
- &rfcFAQ;
-
-
<chapter role="NotInToc" id="RichFacesComponentsLibrary" xreflabel="RichFacesComponentsLibrary">
<?dbhtml filename="RichFacesComponentsLibrary.html"?>
<title>The RichFaces Components</title>
@@ -116,9 +103,7 @@
</chapter>
+ &rfcFAQ;
&rfcidesupport;
&rfclinks;
-
-
-
</book>
18 years, 8 months
JBoss Rich Faces SVN: r2399 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-22 10:12:01 -0400 (Wed, 22 Aug 2007)
New Revision: 2399
Added:
trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
Removed:
trunk/docs/userguide/en/src/main/docbook/modules/RFCdocumentroadmap.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCsetwebappl.xml
trunk/docs/userguide/en/src/main/docbook/modules/a4jUGskinnability.xml
Log:
http://jira.jboss.com/jira/browse/RF-655 - table of content worked over
Added: trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2007-08-22 14:12:01 UTC (rev 2399)
@@ -0,0 +1,241 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="GettingStarted" xreflabel="GettingStarted">
+ <?dbhtml filename="GettingStarted.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>MyFaces</keyword>
+
+ <keyword>JSF</keyword>
+
+ <keyword>RichFaces</keyword>
+
+ </keywordset>
+ </chapterinfo>
+ <title>Getting Started with RichFaces</title>
+ <section id="DownloadingAjax4jsf">
+ <?dbhtml filename="DownloadingAjax4jsf.html" ?>
+ <title>Downloading RichFaces 3.1.0</title>
+ <para>The latest release of <property>RichFaces</property> is available for download at:<simplelist>
+ <member>
+ <ulink url="http://labs.jboss.com/jbossrichfaces/downloads"
+ >http://labs.jboss.com/jbossrichfaces/downloads</ulink>
+ </member>
+ </simplelist> in the <property>RichFaces</property> project area under JBoss.</para>
+ </section>
+ <section id="Installation">
+ <?dbhtml filename="Installation.html" ?>
+ <title>Installation</title>
+ <itemizedlist>
+ <listitem> Unzip <emphasis>
+ <property>"ajax4jsf.zip"</property>
+ </emphasis> file to the chosen folder. </listitem>
+ <listitem> Copy <emphasis>
+ <property>"ajax4jsf.jar"</property>
+ </emphasis> and <emphasis>
+ <property>"oscache-2.3.2.jar"</property>
+ </emphasis> files into the <emphasis>
+ <property>"WEB-INF/lib"</property>
+ </emphasis> folder of your application. </listitem>
+ <note>
+ <title>Note:</title>
+ <para>Starting from Ajax4jsf 1.1.1, the oscache library is not required to be in the
+ classpath anymore. </para>
+ </note>
+ <listitem> Add the following content into the <emphasis>
+ <property>"WEB-INF/web.xml"</property>
+ </emphasis> file of your application: <programlisting role="XML"><![CDATA[<filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>]]></programlisting>
+ <note>
+ <title>Note:</title>
+ <para>You can copy and paste the above text from the <emphasis>
+ <property>"README.txt"</property>
+ </emphasis> file.</para>
+ </note>
+ </listitem>
+ <listitem>
+
+ <para>Add the following line for each JSP page of your application where you are going to
+ bring in Ajax functionality.</para>
+ <programlisting role="XML"> <![CDATA[<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>]]></programlisting>
+ <para>For XHTML pages:</para>
+ <programlisting role="XML"><xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"></programlisting>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="SimpleAJAXEchoProject">
+ <?dbhtml filename="SimpleAJAXEchoProject.html" ?>
+ <title>Simple Ajax Echo Project </title>
+ <para> In our JSF project you need only one JSP page that has a form with a couple of child
+ tags: <emphasis role="bold">
+ <property><h:inputText></property>
+ </emphasis> and <emphasis role="bold">
+ <property><h:outputText></property>
+ </emphasis>. </para>
+ <para>This simple application let you input some text into the <emphasis role="bold">
+ <property><h:inputText></property>
+ </emphasis>, send data to the server, and see the server response as a value of <emphasis
+ role="bold">
+ <property><h:outputText></property>
+ </emphasis>. </para>
+ <section id="JSPPage">
+ <?dbhtml filename="JSPPage.html"?>
+ <title>JSP Page</title>
+ <para>Here is the necessary page (echo.jsp):</para>
+ <programlisting role="JSP"> <![CDATA[<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+ <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+ <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+ <html>
+ <head>
+ <title>repeater </title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <h:inputText size="50" value="#{bean.text}" >
+ <a4j:support event="onkeyup" reRender="rep"/>
+ </h:inputText>
+ <h:outputText value="#{bean.text}" id="rep"/>
+ </h:form>
+ </f:view>
+ </body>
+ </html>]]></programlisting>
+ <para>The only line that distinguishes this page from a "regular" JSF one is</para>
+ <programlisting role="XML"><![CDATA[<a4j:support event="onkeyup" reRender="rep"/>]]></programlisting>
+ <para>The line adds an Ajax support to the parent <emphasis role="bold">
+ <property><h:inputText></property>
+ </emphasis> tag. This support is bound to "onkeyup" JavaScript event, so
+ that each time when this event is fired on the parent tag, our application sends an Ajax
+ request to the server. It means that the text field pointed to our managed bean property
+ contains up-to-date value of our input. </para>
+ <para> The value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute of the <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> tag defines which part(s) of our page is (are) to be updated. In this case, the
+ only part of the page to update is the <emphasis role="bold">
+ <property><h:outputText></property>
+ </emphasis> tag because its ID value matches to the value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute. As you see, it's not difficult to update multiple elements
+ on the page, only list their IDs as the value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis>. </para>
+ </section>
+ <section id="DataBean">
+ <?dbhtml filename="DataBean.html"?>
+ <title>Data Bean</title>
+ <para>In order to build this application, you should create a managed bean:</para>
+ <programlisting role="JAVA">package demo;
+
+ public class Bean {
+ private String text;
+ public Bean() {
+ }
+ public String getText() {
+ return text;
+ }
+ public void setText(String text) {
+ this.text = text;
+ }
+ }</programlisting>
+ </section>
+ <section id="faces-config.xml">
+ <?dbhtml filename="faces-config.xml.html"?>
+ <title>faces-config.xml</title>
+ <para>Next, it's necessary to register your bean inside of the faces-config.xml file:</para>
+ <programlisting role="XML"> <![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+ <faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>demo.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>text</property-name>
+ <value/>
+ </managed-property>
+ </managed-bean>
+ </faces-config>]]></programlisting>
+ <para>
+ <note>
+ <title>Note:</title>
+ <para>Nothing that relates directly to Ajax4jsf is required in the configuration
+ file.</para>
+ </note>
+ </para>
+ </section>
+ <section id="Web.xml">
+ <?dbhtml filename="Web.xml.html"?>
+ <title>Web.xml</title>
+ <para>It is also necessary to add jar files (see <ulink
+ url="GettingStartedWithAjax4jsf.html#Installation">installation chapter</ulink>) and
+ modify the "web.xml" file: </para>
+ <programlisting role="XML"> <![CDATA[<?xml version="1.0"?>
+ <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>a4jEchoText</display-name>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-map>
+ <listener>
+ <listener-class>
+ com.sun.faces.config.ConfigureListener
+ </listener-class>
+ </listener>
+
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>
+ javax.faces.webapp.FacesServlet
+ </servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+ </web-app>]]></programlisting>
+ <para>Now your application should work.</para>
+ </section>
+ <section id="Deployment">
+ <?dbhtml filename="Deployment.html"?>
+ <title>Deployment</title>
+ <para>Finally, you should be able to place this application on your Web server.To start your
+ project, point your browser at <ulink url="http://localhost:8080/a4jEchoText/echo.jsf"
+ >http://localhost:8080/a4jEchoText/echo.jsf</ulink>
+ </para>
+ </section>
+ </section>
+</chapter>
Added: trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2007-08-22 14:12:01 UTC (rev 2399)
@@ -0,0 +1,215 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="SettingsForDifferentEnvironments" xreflabel="SettingsForDifferentEnvironments">
+ <?dbhtml filename="SettingsForDifferentEnvironments.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>MyFaces</keyword>
+
+ <keyword>JSF</keyword>
+
+ <keyword>RichFaces</keyword>
+
+ </keywordset>
+ </chapterinfo>
+
+ <title>Settings for different environments</title>
+ <para>RichFaces comes with support for all tags (components) included in the JavaServer Faces
+ specification. To add RichFaces capabilities to the existing JSF project you should just put the
+ RichFaces libraries into the lib folder of the project and add filter mapping. The behavior of
+ the existing project doesn't change just because of RichFaces.</para>
+ &wadParams;
+ <section id="SunJSFRI">
+ <?dbhtml filename="SunJSFRI.html"?>
+ <title>Sun JSF RI</title>
+ <para>RichFaces works with any implementation of <property>JSF</property> (both JSF 1.1 and JSF
+ 1.2) and with most <property>JSF</property> component libraries without any additional
+ settings. For more information look at:</para>
+
+ <simplelist>
+ <member>
+ <ulink url="http://java.sun.com/javaee/javaserverfaces/">java.sun.com</ulink>
+ </member>
+ </simplelist>
+
+ </section>
+ <section id="ApacheMyFaces">
+ <?dbhtml filename="ApacheMyFaces.html"?>
+ <title>Apache MyFaces</title>
+ <para>RichFaces works with all <property>Apache MyFaces</property> versions (1.1.1 - 1.1.5)
+ including specific libraries like Tomahawk Sandbox and Trinidad (the previous ADF Faces).
+ However, there are some considerations to take into account for configuring applications to
+ work with <property>MyFaces</property> and RichFaces.</para>
+ <para>There are some problems with different filters defined in the web.xml file clashing. To
+ avoid these problems, the RichFaces filter must be the first one among other filters in the
+ web.xml configuration file.</para>
+ <para>For more information look at:<ulink url="http://myfaces.apache.org"
+ >http://myfaces.apache.org</ulink></para>
+ <para> There's one more problem while using <property>MyFaces + Seam</property>. If you
+ use this combination you should use <emphasis role="bold">
+ <property><a4j:page></property>
+ </emphasis> inside<emphasis role="bold">
+ <property><f:view></property>
+ </emphasis>(right after it in your code) wrapping another content inside your pages because of
+ some problems in realization of <emphasis role="bold">
+ <property><f:view></property>
+ </emphasis> in myFaces. </para>
+ <para>The problem is to be overcome in the nearest future.</para>
+ </section>
+ <section id="FaceletsSupport">
+ <?dbhtml filename="FaceletsSupport.html"?>
+ <title>Facelets Support</title>
+ <para>A high-level support for <property>Facelets</property> is one of our main support
+ features. When working with RichFaces, there is no difference what release of
+ <property>Facelets</property> is used. </para>
+ <para>You should also take into account that some JSF frameworks such as
+ <property>Facelets</property> use their own ViewHandler and need to have it first in the chain
+ of ViewHandlers and the RichFaces AjaxViewHandler is not an exception. At first RichFaces
+ installs its ViewHandler in any case, so in case of two frameworks, for example RichFaces +
+ Facelets, no changes in settings are required. Although, when more then one framework (except
+ RichFaces) is used, it's possible to use the VIEW_HANDLERS parameter defining these frameworks
+ view handlers according to its usage order in it. For example, the declaration:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"> <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param></programlisting>
+ <para>says that <property>Facelets</property> will officially be the first, however
+ AjaxViewHandler will be a little ahead temporarily to do some small, but very important job. </para>
+ <note>
+ <title>Note:</title>
+ <para>In this case you don't have to define <property>FaceletViewHandler</property>
+ in the WEB-INF/faces-config.xml.</para>
+ </note>
+ </section>
+ <section id="JBossSeamSupport">
+ <?dbhtml filename="JBossSeamSupport.html"?>
+ <title>JBoss Seam Support</title>
+ <para>RichFaces now works out-of-the-box with <property>JBoss Seam </property>and Facelets
+ running inside JBoss AS 4.0.4 and higher. There is no more shared JAR files needed. You just
+ have to package the RichFaces library with your application. </para>
+ <para> Your web.xml still must be like this: </para>
+ <programlisting role="XML"><![CDATA[web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <!-- Seam -->
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+
+ <!-- richfaces -->
+ <filter>
+ <display-name>RichFaces Filter</display-name>
+ <filter-name>richfaces</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>richfaces</filter-name>
+ <url-pattern>*.seam</url-pattern>
+ </filter-mapping>
+
+ <!-- Propagate conversations across redirects -->
+ <filter>
+ <filter-name>Seam Redirect Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>Seam Redirect Filter</filter-name>
+ <url-pattern>*.seam</url-pattern>
+ </filter-mapping>
+
+ <filter>
+ <filter-name>Seam Exception Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Exception Filter</filter-name>
+ <url-pattern>*.jsf</url-pattern>
+ </filter-mapping>
+
+ <!-- JSF -->
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>DEFAULT</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <!-- MyFaces -->
+ <listener>
+ <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ </listener>
+</web-app>]]> </programlisting>
+ <para>Only one issue still persists while using <property>Seam</property> with MyFaces. Look at
+ myFaces part of this section.</para>
+ </section>
+ <section id="Portlet Support">
+ <title>Portlet Support</title>
+ <para><property>Portlets</property> have support since version Ajax4jsf 1.1.1. This support is
+ improved in Richfaces 3.1.0. Provide your feedback on compatible with RichFaces if you face
+ some problems.</para>
+ </section>
+ <section id="Sybase EAServer">
+ <title>Sybase EAServer</title>
+ <para>The load-on-startup for the Faces Servlet had to be set to 0 in web.xml.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+...
+]]></programlisting>
+ <para> This is because, EAServer calls servlet init() before the ServletContextInitializer. Not
+ an EAServer bug, this is in Servlet 2.3 spec.</para>
+ </section>
+</chapter>
Deleted: trunk/docs/userguide/en/src/main/docbook/modules/RFCdocumentroadmap.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCdocumentroadmap.xml 2007-08-22 13:37:24 UTC (rev 2398)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCdocumentroadmap.xml 2007-08-22 14:12:01 UTC (rev 2399)
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "docbookV4.2/docbookx.dtd" []> -->
-<chapter id="DocumentRoadmap" xreflabel="DocumentRoadmap">
-<?dbhtml filename="DocumentRoadmap.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>RichFaces</keyword>
-
- <keyword>JSF</keyword>
-
- <keyword>Ajax4jsf</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Roadmap to Learning RichFaces</title>
-
- <para>In this Developer Guide, you will learn how to get up and running
- quickly with <property>RichFaces</property>. The Developer Guide covers
- everything from system requirements to how to use each particular component.
- It is also supplemented by a <ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">RichFaces Tag
- Library Reference</ulink> and a <ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">RichFaces API
- Reference</ulink>.</para>
-
- <section id="BackgroundKnowledge">
- <?dbhtml filename="BackgroundKnowledge.html"?>
- <title>Background Knowledge</title>
-
- <para>In order to take full advantage of this guide, you do need to start
- out with some knowledge of JavaServer Faces. Some understanding of
- <property>Facelets</property> and <property>JBoss Seam</property> would
- also be beneficial. To get extra information on these topics, follow these
- links to the appropriate external Web site:</para>
-
- <simplelist>
- <member><ulink
- url="http://java.sun.com/javaee/javaserverfaces/">JavaServer
- Faces</ulink></member>
-
- <member><ulink url="http://myfaces.apache.org/index.html">Apache
- MyFaces</ulink></member>
-
- <member><ulink
- url="https://facelets.dev.java.net/">Facelets</ulink></member>
-
- <member><ulink url="http://www.jboss.com/products/seam">JBoss
- Seam</ulink></member>
- </simplelist>
- </section>
-
- <section id="Ajax4jsf">
- <?dbhtml filename="Ajax4jsf.html"?>
- <title>Ajax4jsf</title>
-
- <para>Also, while working through this guide keep in mind that the
- RichFaces library is based on the Ajax4jsf framework and needs a properly
- set up Ajax4jsf library in order to work. This means that you should also
- learn know something about Ajax4jsf to get the most out RichFaces. To find
- out more about Ajax4jsf go to the <ulink url="http://labs.jboss.com/portal/jbossajax4jsf">official Ajax4jsf
- project site</ulink>.</para>
- </section>
-
- <!--
- <para>To get support on the project, contact the support team:</para>
-
- <itemizedlist>
- <listitem>
- Write on the mailing list of the
-
- <ulink
- url="http://www.jboss.org/projects/jbossrichfaces">RichFaces</ulink>
-
- project
- </listitem>
-
- <listitem>
- Write in the
-
- <ulink url="http://forum.exadel.com/index.php">support</ulink>
-
- topic on the
-
- <ulink url="http://forum.exadel.com/index.php">official Exadel site
- forum</ulink>
- </listitem>
-
- <listitem>
- Sent an email to
-
- <ulink url="mailto:support@exadel.com">support(a)exadel.com</ulink>
- </listitem>
- </itemizedlist>
--->
-</chapter>
\ No newline at end of file
Deleted: trunk/docs/userguide/en/src/main/docbook/modules/RFCsetwebappl.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCsetwebappl.xml 2007-08-22 13:37:24 UTC (rev 2398)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCsetwebappl.xml 2007-08-22 14:12:01 UTC (rev 2399)
@@ -1,461 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter id="SettingsForDifferentEnvironments" xreflabel="SettingsForDifferentEnvironments">
- <?dbhtml filename="SettingsForDifferentEnvironments.html"?>
-<chapterinfo>
- <keywordset>
- <keyword>MyFaces</keyword>
-
- <keyword>JSF</keyword>
-
- <keyword>RichFaces</keyword>
-
- </keywordset>
- </chapterinfo>
-
- <title>Settings for different environments</title>
- <para>RichFaces comes with support for all tags (components) included in the
- JavaServer Faces specification. To add RichFaces capabilities to the existing
- JSF project you should just put the RichFaces libraries into the lib folder of
- the project and add filter mapping. The behavior of the existing project
- doesn't change just because of RichFaces.</para>
-&wadParams;
-<section id="SunJSFRI">
-<?dbhtml filename="SunJSFRI.html"?>
- <title>Sun JSF RI</title>
- <para>RichFaces works with any implementation of <property>JSF</property> (both JSF 1.1 and
- JSF 1.2) and with most <property>JSF</property> component libraries without any additional settings.
- For more information look at:</para>
-
-<simplelist>
-<member>
- <ulink url="http://java.sun.com/javaee/javaserverfaces/">java.sun.com</ulink>
-</member>
-</simplelist>
-
- </section>
- <section id="ApacheMyFaces">
- <?dbhtml filename="ApacheMyFaces.html"?>
- <title>Apache MyFaces</title>
- <para>RichFaces works with all <property>Apache MyFaces</property> versions (1.1.1 - 1.1.5)
- including specific libraries like Tomahawk Sandbox and
- Trinidad (the previous ADF Faces). However, there are some considerations
- to take into account for configuring applications to work with <property>MyFaces</property> and
- RichFaces.</para>
- <para>There are some problems with different filters defined in
- the web.xml file clashing. To avoid these problems, the RichFaces filter
- must be the first one among other filters in the web.xml configuration
- file.</para>
- <para>For more information look at:<ulink url="http://myfaces.apache.org">http://myfaces.apache.org</ulink></para>
- <para>
- There's one more problem while using <property>MyFaces + Seam</property>. If you use this combination you should use
- <emphasis role="bold">
- <property><a4j:page></property>
- </emphasis> inside<emphasis role="bold">
- <property><f:view></property>
- </emphasis>(right after it in your code) wrapping another content
- inside your pages because of some problems in realization of <emphasis role="bold">
- <property><f:view></property>
- </emphasis> in myFaces.
- </para>
- <para>The problem is to be overcome in the nearest future.</para>
- </section>
- <section id="FaceletsSupport">
- <?dbhtml filename="FaceletsSupport.html"?>
- <title>Facelets Support</title>
- <para>A high-level support for <property>Facelets</property> is one of our main support
- features. When working with RichFaces, there is no difference what release
- of <property>Facelets</property> is used. </para>
- <para>You should also take into account that some JSF frameworks such as <property>Facelets</property> use their own
- ViewHandler and need to have it first in the chain of ViewHandlers and the
- RichFaces AjaxViewHandler is not an exception. At first RichFaces installs its ViewHandler in any case, so in case of two frameworks, for example RichFaces + Facelets, no changes in settings are required. Although, when more then one framework (except RichFaces) is used, it's possible to use the VIEW_HANDLERS parameter defining these frameworks view handlers according to its usage order in it.
- For example, the
- declaration:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"> <context-param>
- <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
- <param-value>com.sun.facelets.FaceletViewHandler</param-value>
- </context-param></programlisting>
- <para>says that <property>Facelets</property> will officially be the first, however AjaxViewHandler
- will be a little ahead temporarily to do some small, but very
- important job. </para>
- <note>
- <title>Note:</title>
- <para>In this case you don't have to define <property>FaceletViewHandler</property> in the
- WEB-INF/faces-config.xml.</para>
- </note>
- </section>
- <section id="JBossSeamSupport">
- <?dbhtml filename="JBossSeamSupport.html"?>
- <title>JBoss Seam Support</title>
- <para>RichFaces now works out-of-the-box with <property>JBoss Seam </property>and Facelets running inside JBoss AS 4.0.4 and higher.
- There is no more shared JAR files needed. You just have to package the RichFaces library with your application.
- </para>
- <para>
- Your web.xml still must be like this:
- </para>
- <programlisting role="XML"><![CDATA[web-app version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <!-- Seam -->
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
-
- <!-- richfaces -->
- <filter>
- <display-name>RichFaces Filter</display-name>
- <filter-name>richfaces</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>richfaces</filter-name>
- <url-pattern>*.seam</url-pattern>
- </filter-mapping>
-
- <!-- Propagate conversations across redirects -->
- <filter>
- <filter-name>Seam Redirect Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>Seam Redirect Filter</filter-name>
- <url-pattern>*.seam</url-pattern>
- </filter-mapping>
-
- <filter>
- <filter-name>Seam Exception Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>Seam Exception Filter</filter-name>
- <url-pattern>*.jsf</url-pattern>
- </filter-mapping>
-
- <!-- JSF -->
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>client</param-value>
- </context-param>
-
- <context-param>
- <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
- <param-value>com.sun.facelets.FaceletViewHandler</param-value>
- </context-param>
-
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.REFRESH_PERIOD</param-name>
- <param-value>2</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.validateXml</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.verifyObjects</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.SKIN</param-name>
- <param-value>DEFAULT</param-value>
- </context-param>
-
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- Faces Servlet Mapping -->
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.seam</url-pattern>
- </servlet-mapping>
-
- <!-- MyFaces -->
- <listener>
- <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
- </listener>
-</web-app>]]> </programlisting>
- <para>Only one issue still persists while using <property>Seam</property> with MyFaces. Look at myFaces part of this section.</para>
- </section>
- <section id="Portlet Support">
- <title>Portlet Support</title>
- <para><property>Portlets</property> have support since version Ajax4jsf 1.1.1. This support is improved in Richfaces 3.1.0.
- Provide your feedback on compatible with RichFaces if you face some problems.</para>
- </section>
- <section id="Sybase EAServer">
- <title>Sybase EAServer</title>
- <para>The load-on-startup for the Faces Servlet had to be set to 0 in web.xml.</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
- </servlet>
-...
-]]></programlisting>
- <para> This is because, EAServer calls servlet init() before the ServletContextInitializer. Not an EAServer bug, this is in Servlet 2.3 spec.</para>
- </section>
- <!-- <title>Getting Started with Ajax4jsf</title>
- -->
- <section id="Environment">
- <?dbhtml filename="Environment.html" ?>
- <title>Environment</title>
- <para>
- To use RichFaces 3.1.0 framework you need JDK 1.4 or higher, any JSF implementation
- and your favorite Servlet Container. To read more on the <property>Environments</property>, see further chapters.</para>
- <para>
- RichFaces 3.1.0 is designed in an easy-to-use way, so that you should do only a few simple steps to get Ajax functionality in your JSF application.
- </para>
- </section>
- <section id="DownloadingAjax4jsf">
- <?dbhtml filename="DownloadingAjax4jsf.html" ?>
- <title>Downloading RichFaces 3.1.0</title>
- <para>The latest release of <property>RichFaces</property> is available for download at:<simplelist><member><ulink url="http://labs.jboss.com/jbossrichfaces/downloads">http://labs.jboss.com/jbossrichfaces/downloads</ulink></member></simplelist>
- in the <property>RichFaces</property> project area under JBoss.</para>
- </section>
- <section id="Installation">
- <?dbhtml filename="Installation.html" ?>
- <title>Installation</title>
- <itemizedlist>
- <listitem>
-
- Unzip <emphasis >
- <property>"ajax4jsf.zip"</property>
- </emphasis> file to the chosen folder.
-
- </listitem>
- <listitem>
-
- Copy <emphasis ><property>"ajax4jsf.jar"</property></emphasis> and <emphasis ><property>"oscache-2.3.2.jar"</property></emphasis> files into the <emphasis >
- <property>"WEB-INF/lib"</property>
- </emphasis> folder of your application.
-
- </listitem>
- <note>
- <title>Note:</title>
- <para>Starting from Ajax4jsf 1.1.1, the oscache library is not required to be in the classpath anymore.
- </para>
- </note>
- <listitem>
- Add the following content into the <emphasis >
- <property>"WEB-INF/web.xml"</property>
- </emphasis> file of your application:
-
- <programlisting role="XML"><![CDATA[<filter>
- <display-name>Ajax4jsf Filter</display-name>
- <filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- </filter-mapping>]]></programlisting>
- <note>
- <title>Note:</title>
- <para>You can copy and paste the above text from the <emphasis >
- <property>"README.txt"</property>
- </emphasis> file.</para>
- </note>
- </listitem>
- <listitem>
-
- <para>Add the following line for each JSP page of your application where you are going to bring in Ajax functionality.</para>
- <programlisting role="XML"> <![CDATA[<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>]]></programlisting>
- <para>For XHTML pages:</para>
- <programlisting role="XML"><xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"></programlisting>
- </listitem>
- </itemizedlist>
- </section>
- <section id="SimpleAJAXEchoProject">
- <?dbhtml filename="SimpleAJAXEchoProject.html" ?>
- <title>Simple Ajax Echo Project </title>
- <para>
- In our JSF project you need only one JSP page that has a form with a couple of child tags:
- <emphasis role="bold">
- <property><h:inputText></property>
- </emphasis> and <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis>.
- </para>
- <para>This simple application let you input some text into the <emphasis role="bold">
- <property><h:inputText></property>
- </emphasis>,
- send data to the server, and see the server response as a value of <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis>.
- </para>
- <section id="JSPPage">
- <?dbhtml filename="JSPPage.html"?>
- <title>JSP Page</title>
- <para>Here is the necessary page (echo.jsp):</para>
- <programlisting role="JSP"> <![CDATA[<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
- <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
- <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
- <html>
- <head>
- <title>repeater </title>
- </head>
- <body>
- <f:view>
- <h:form>
- <h:inputText size="50" value="#{bean.text}" >
- <a4j:support event="onkeyup" reRender="rep"/>
- </h:inputText>
- <h:outputText value="#{bean.text}" id="rep"/>
- </h:form>
- </f:view>
- </body>
- </html>]]></programlisting>
- <para>The only line that distinguishes this page from a "regular" JSF one is</para>
- <programlisting role="XML"><![CDATA[<a4j:support event="onkeyup" reRender="rep"/>]]></programlisting>
- <para>The line adds an Ajax support to the parent <emphasis role="bold">
- <property><h:inputText></property>
- </emphasis> tag. This support is
- bound to "onkeyup" JavaScript event, so that each time when this event is fired on the
- parent tag, our application sends an Ajax request to the server. It means that the
- text field pointed to our managed bean property contains up-to-date value of our input.
- </para>
- <para>
- The value of <emphasis ><property>"reRender"</property></emphasis> attribute of the <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis> tag defines which part(s) of our
- page is (are) to be updated. In this case, the only part of the page to
- update is the <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis> tag because its ID value matches to the value of <emphasis ><property>"reRender"</property></emphasis>
- attribute. As you see, it's not difficult to update multiple elements on the page, only list their IDs
- as the value of <emphasis ><property>"reRender"</property></emphasis>.
- </para>
- </section>
- <section id="DataBean">
- <?dbhtml filename="DataBean.html"?>
- <title>Data Bean</title>
- <para>In order to build this application, you should create a managed bean:</para>
- <programlisting role="JAVA">package demo;
-
-public class Bean {
- private String text;
- public Bean() {
- }
- public String getText() {
- return text;
- }
- public void setText(String text) {
- this.text = text;
- }
-}</programlisting>
- </section>
- <section id="faces-config.xml">
- <?dbhtml filename="faces-config.xml.html"?>
- <title>faces-config.xml</title>
- <para>Next, it's necessary to register your bean inside of the faces-config.xml file:</para>
- <programlisting role="XML"> <![CDATA[<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
- <faces-config>
- <managed-bean>
- <managed-bean-name>bean</managed-bean-name>
- <managed-bean-class>demo.Bean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>text</property-name>
- <value/>
- </managed-property>
- </managed-bean>
- </faces-config>]]></programlisting>
- <para> <note>
- <title>Note:</title>
- <para>Nothing that relates directly to Ajax4jsf is required
- in the configuration file.</para>
- </note></para>
- </section>
- <section id="Web.xml">
- <?dbhtml filename="Web.xml.html"?>
- <title>Web.xml</title>
- <para>It is also necessary to add jar files (see <ulink url="GettingStartedWithAjax4jsf.html#Installation">installation chapter</ulink>) and modify the "web.xml" file:
- </para>
- <programlisting role="XML"> <![CDATA[<?xml version="1.0"?>
- <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <display-name>a4jEchoText</display-name>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
- <filter>
- <display-name>Ajax4jsf Filter</display-name>
- <filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- </filter-map>
- <listener>
- <listener-class>
- com.sun.faces.config.ConfigureListener
- </listener-class>
- </listener>
-
- <!-- Faces Servlet -->
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>
- javax.faces.webapp.FacesServlet
- </servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- Faces Servlet Mapping -->
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <login-config>
- <auth-method>BASIC</auth-method>
- </login-config>
- </web-app>]]></programlisting>
- <para>Now your application should work.</para>
- </section>
- <section id="Deployment">
- <?dbhtml filename="Deployment.html"?>
- <title>Deployment</title>
- <para>Finally, you should be able to place this application on your Web
- server.To start your project, point
- your browser at
-<ulink url="http://localhost:8080/a4jEchoText/echo.jsf">http://localhost:8080/a4jEchoText/echo.jsf</ulink>
-</para>
- </section>
- </section>
- <section id="Relevant_src">
- <title>Other Relevant Resources</title>
- <para><ulink url="http://jsf.javabeat.net/articles/2007/06/introduction-to-ajax4jsf/3">Introduction to Ajax4Jsf - Sample Application</ulink> by Shunmuga Raja</para>
- </section>
-</chapter>
Deleted: trunk/docs/userguide/en/src/main/docbook/modules/a4jUGskinnability.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/a4jUGskinnability.xml 2007-08-22 13:37:24 UTC (rev 2398)
+++ trunk/docs/userguide/en/src/main/docbook/modules/a4jUGskinnability.xml 2007-08-22 14:12:01 UTC (rev 2399)
@@ -1,79 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter id="Built-inSkinnabilityInAjax4jsf" xreflabel="Built-inSkinnabilityInAjax4jsf">
- <?dbhtml filename="Built-inSkinnabilityInAjax4jsf.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>Skinnability</keyword>
-
- <keyword>skins</keyword>
-
- <keyword>custom skin</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Built-in skinnability in Ajax4jsf</title>
- <para>Ajax4jsf gives an opportunity to incorporate <property>skinnability</property> into UI
- design. With this framework you can easily use named skin parameters in
- properties files to control the appearance of the skins that are applied
- consistently to a whole set of components. You can look at examples of
- predefined skins at:</para>
- <simplelist>
- <member>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/">http://livedemo.exadel.com/richfaces-demo/</ulink>
- </member>
- </simplelist>
- <para>
- You may simply control the look-and-feel of your application by using the <property>skinnability</property> service
- of the Ajax4jsf framework. With the means of this service you can define the same style for rendering
- standard JSF components and custom JSF components built with the help of Ajax4jsf.
- </para>
- <para>To find out more on <property>skinnability</property> possibilities, follow these
- steps:</para>
- <itemizedlist>
- <listitem>
- Create a custom render kit and register it in the faces-config.xml
- like this:
- <programlisting role="XML"><![CDATA[<render-kit>
- <render-kit-id>NEW_SKIN</render-kit-id>
- <render-kit-class>
- org.ajax4jsf.framework.renderer.ChameleonRenderKitImpl
- </render-kit-class>
-</render-kit>]]></programlisting>
- </listitem>
- <listitem>
- Then you need to create and register custom renderers for the
- component based on the look-and-feel predefined variables:
- <programlisting role="XML"><![CDATA[<renderer>
- <component-family>javax.faces.Command</component-family>
- <renderer-type>javax.faces.Link</renderer-type>
- <renderer-class>
- newskin.HtmlCommandLinkRenderer
- </renderer-class>
-</renderer>]]></programlisting>
- </listitem>
- <listitem>
- Finally, you need to place a properties file with skin parameters
- into the class path root. There are two requirements for the properties
- file:
- <itemizedlist>
- <listitem>
- The file must be named <emphasis role="bold"><property><skinName></property></emphasis>.skin.properties, in this case, it would be called
- <filename>newskin.skin.properties</filename>.
- </listitem>
- <listitem>
- The first line in this file should be render.kit=
- <emphasis role="bold"><property><render-kit-id></property>,</emphasis> in this case, it would be called
- render.kit=NEW_SKIN.
- </listitem>
- </itemizedlist>
- </listitem>
- </itemizedlist>
- <para>Extra information on custom renderers creation can be found
- at:</para>
- <simplelist>
- <member>
- <ulink url="http://java.sun.com/javaee/javaserverfaces/reference/docs/index.html">http://java.sun.com/javaee/javaserverfaces/reference/docs/index.html</ulink>
- </member>
- </simplelist>
-</chapter>
18 years, 8 months
JBoss Rich Faces SVN: r2398 - in trunk/ui: calendar/src/test/java/org/richfaces/renderkit and 21 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-08-22 09:37:24 -0400 (Wed, 22 Aug 2007)
New Revision: 2398
Added:
trunk/ui/calendar/src/test/java/org/richfaces/renderkit/
trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/
trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/
trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/CalendarIconTest.java
trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/
trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/
trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/
trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/
trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java
trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/
trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/MenuNodeImageTest.java
trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/
trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/
trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/
trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/iconimages/
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/iconimages/ScrollableDataTableIconBasicTest.java
trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/
trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/BevelSeparatorImageTest.java
trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/SimpleSeparatorImageTest.java
trunk/ui/toolBar/src/test/java/org/richfaces/renderkit/
trunk/ui/toolBar/src/test/java/org/richfaces/renderkit/html/
trunk/ui/toolBar/src/test/java/org/richfaces/renderkit/html/images/
trunk/ui/toolBar/src/test/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImageTest.java
Log:
test for checking skin parameters after deserializing
Added: trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/CalendarIconTest.java
===================================================================
--- trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/CalendarIconTest.java (rev 0)
+++ trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/CalendarIconTest.java 2007-08-22 13:37:24 UTC (rev 2398)
@@ -0,0 +1,58 @@
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class CalendarIconTest extends AbstractAjax4JsfTestCase{
+
+ public CalendarIconTest(String name) {
+ super(name);
+ }
+
+ public void testSaveResources(){
+
+ CalendarIcon icon = new CalendarIcon();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String skinParameter = "headerBackgroundColor";
+ String headerTextColor = (String) skin.getParameter(facesContext, skinParameter);
+
+ if (null == headerTextColor || "".equals(headerTextColor))
+ headerTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
+
+ assertNotNull(headerTextColor);
+
+ Color color1 = HtmlColor.decode(headerTextColor);
+
+ skinParameter = "selectControlColor";
+
+ String headerBackgroundColor = (String) skin.getParameter(facesContext, skinParameter);
+ if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
+ headerBackgroundColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
+
+ assertNotNull(headerBackgroundColor);
+
+ Color color2 = HtmlColor.decode(headerBackgroundColor);
+
+ byte [] data = (byte []) icon.getDataToStore(facesContext, null);
+
+ assertNotNull(data);
+
+ Object [] results = (Object [])icon.deserializeData(data);
+
+ assertNotNull(results);
+
+ assertEquals(color1, results[0]);
+ assertEquals(color2, results[1]);
+ }
+}
Added: trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java
===================================================================
--- trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java (rev 0)
+++ trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java 2007-08-22 13:37:24 UTC (rev 2398)
@@ -0,0 +1,52 @@
+
+package org.richfaces.renderkit.html.images.buttons;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class SpinnerButtonImageTest extends AbstractAjax4JsfTestCase {
+
+
+ public SpinnerButtonImageTest(String name) {
+ super(name);
+ }
+
+ public void testSaveResources(){
+
+ SpinnerButtonImage img = new SpinnerButtonUp();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String skinParameter = "headerTextColor";
+ String headerTextColor = (String) skin.getParameter(facesContext, skinParameter);
+
+ if (null == headerTextColor || "".equals(headerTextColor))
+ headerTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
+
+ headerTextColor = headerTextColor == null ? "#000000" : headerTextColor;
+
+ Color color1 = HtmlColor.decode(headerTextColor);
+
+ byte [] data = (byte []) img.getDataToStore(facesContext, null);
+
+ assertNotNull(data);
+
+ Integer results = (Integer)img.deserializeData(data);
+
+ assertNotNull(results);
+
+ Color color2 = new Color(results);
+
+ assertEquals(color1, color2);
+ }
+
+}
Added: trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/MenuNodeImageTest.java
===================================================================
--- trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/MenuNodeImageTest.java (rev 0)
+++ trunk/ui/menu-components/src/test/java/org/richfaces/renderkit/html/images/MenuNodeImageTest.java 2007-08-22 13:37:24 UTC (rev 2398)
@@ -0,0 +1,60 @@
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.renderkit.html.images.MenuNodeImage.MenuNodeImageData;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class MenuNodeImageTest extends AbstractAjax4JsfTestCase {
+
+ public MenuNodeImageTest(String name) {
+ super(name);
+ }
+
+ public void testSaveResources(){
+
+ MenuNodeImage img = new MenuNodeImage();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String skinParameter1 = "generalTextColor";
+ String generalTextColor = (String) skin.getParameter(facesContext, skinParameter1);
+
+ if (null == generalTextColor || "".equals(generalTextColor))
+ generalTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter1);
+
+ generalTextColor = generalTextColor == null ? "#4A75B5": generalTextColor;
+
+ Color color1 = HtmlColor.decode(generalTextColor);
+
+ String skinParameter2 = "tabDisabledTextColor";
+
+ String textColor = (String) skin.getParameter(facesContext, skinParameter2);
+
+ if (null == textColor || "".equals(textColor))
+ textColor = (String) defaultSkin.getParameter(facesContext, skinParameter2);
+
+ textColor = textColor == null ? "#6A92CF" : textColor;
+
+ Color color2 = HtmlColor.decode(textColor);
+
+ byte [] data = (byte []) img.getDataToStore(facesContext, null);
+
+ assertNotNull(data);
+
+ MenuNodeImageData nodeData = (MenuNodeImageData)img.deserializeData(data);
+
+ assertNotNull(nodeData);
+ assertEquals(color1, new Color(nodeData.getGeneralColor()));
+ assertEquals(color2, new Color(nodeData.getDisabledColor()));
+ }
+
+}
Added: trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java
===================================================================
--- trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java (rev 0)
+++ trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java 2007-08-22 13:37:24 UTC (rev 2398)
@@ -0,0 +1,49 @@
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class PanelMenuIconBasicTest extends AbstractAjax4JsfTestCase {
+
+ public PanelMenuIconBasicTest(String name) {
+ super(name);
+ }
+
+public void testSaveResources(){
+
+ PanelMenuIconBasic icon = new PanelMenuIconBasic();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String skinParameter = "headerTextColor";
+ String headerTextColor = (String) skin.getParameter(facesContext, skinParameter);
+
+ if (null == headerTextColor || "".equals(headerTextColor))
+ headerTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
+
+ assertNotNull(headerTextColor);
+
+ Color color1 = HtmlColor.decode(headerTextColor);
+
+ byte [] data = (byte []) icon.getDataToStore(facesContext, null);
+
+ assertNotNull(data);
+
+ Object results = (Object)icon.deserializeData(data);
+
+ assertNotNull(results);
+
+ assertEquals(color1, results);
+
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/iconimages/ScrollableDataTableIconBasicTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/iconimages/ScrollableDataTableIconBasicTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/iconimages/ScrollableDataTableIconBasicTest.java 2007-08-22 13:37:24 UTC (rev 2398)
@@ -0,0 +1,63 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Anton Belevichs
+ *
+ */
+public class ScrollableDataTableIconBasicTest extends AbstractAjax4JsfTestCase{
+
+
+ public ScrollableDataTableIconBasicTest(String name) {
+ super(name);
+ }
+
+ public void testSaveResources(){
+
+ ScrollableDataTableIconBasic icon = new ScrollableDataTableIconSortAsc();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String skinParameter = "headerTextColor";
+ String headerTextColor = (String) skin.getParameter(facesContext, skinParameter);
+
+ if (null == headerTextColor || "".equals(headerTextColor))
+ headerTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
+
+ assertNotNull(headerTextColor);
+
+ Color color1 = HtmlColor.decode(headerTextColor);
+
+ skinParameter = "headerBackgroundColor";
+
+ String headerBackgroundColor = (String) skin.getParameter(facesContext, skinParameter);
+ if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
+ headerBackgroundColor = (String) defaultSkin.getParameter(facesContext, skinParameter);
+
+ assertNotNull(headerBackgroundColor);
+
+ Color color2 = HtmlColor.decode(headerBackgroundColor);
+
+ byte [] data = (byte []) icon.getDataToStore(facesContext, null);
+
+ assertNotNull(data);
+
+ Object [] results = (Object [])icon.deserializeData(data);
+
+ assertNotNull(results);
+
+ assertEquals(color1, results[0]);
+ assertEquals(color2, results[1]);
+ }
+
+}
Added: trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/BevelSeparatorImageTest.java
===================================================================
--- trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/BevelSeparatorImageTest.java (rev 0)
+++ trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/BevelSeparatorImageTest.java 2007-08-22 13:37:24 UTC (rev 2398)
@@ -0,0 +1,67 @@
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.component.html.HtmlSeparator;
+import org.richfaces.renderkit.html.images.BevelSeparatorImage.SeparatorData;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class BevelSeparatorImageTest extends AbstractAjax4JsfTestCase {
+
+ public BevelSeparatorImageTest(String name) {
+ super(name);
+ }
+
+ public void testSaveResources(){
+
+ BevelSeparatorImage img = new BevelSeparatorImage();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String skinParameter1 = "interfaceLevel3D";
+ String interfaceLevel = (String) skin.getParameter(facesContext, skinParameter1);
+ interfaceLevel = interfaceLevel == null ? "5" : interfaceLevel;
+
+ int level3D = Integer.parseInt(interfaceLevel);
+
+ String skinParameter2 = "headerBackgroundColor";
+ String headerBackgroundColor = (String) skin.getParameter(facesContext, skinParameter2);
+
+ if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
+ headerBackgroundColor = (String) defaultSkin.getParameter(facesContext, skinParameter2);
+
+ headerBackgroundColor = headerBackgroundColor == null ? "#4169E1" : headerBackgroundColor;
+
+ Color color1 = HtmlColor.decode(headerBackgroundColor);
+
+ String skinParameter3 = "overAllBackground";
+ String overAllBackgroundColor = (String) skin.getParameter(facesContext, skinParameter3);
+ if (null == overAllBackgroundColor || "".equals(overAllBackgroundColor))
+ overAllBackgroundColor = (String) defaultSkin.getParameter(facesContext, skinParameter3);
+ overAllBackgroundColor = overAllBackgroundColor == null ? "#FFFFFF" : overAllBackgroundColor;
+
+ Color color2 = HtmlColor.decode(overAllBackgroundColor);
+
+ HtmlSeparator separator = new HtmlSeparator();
+
+ byte [] data = (byte []) img.getDataToStore(facesContext, separator);
+ assertNotNull(data);
+
+ SeparatorData separatorData = (SeparatorData)img.deserializeData(data);
+
+ assertNotNull(separatorData);
+
+ assertEquals(level3D, separatorData.getLevel3D());
+ assertEquals(color1, new Color(separatorData.getBgColor()));
+ assertEquals(color2, new Color(separatorData.getGradColor()));
+ }
+
+}
Added: trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/SimpleSeparatorImageTest.java
===================================================================
--- trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/SimpleSeparatorImageTest.java (rev 0)
+++ trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/images/SimpleSeparatorImageTest.java 2007-08-22 13:37:24 UTC (rev 2398)
@@ -0,0 +1,47 @@
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.component.html.HtmlSeparator;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class SimpleSeparatorImageTest extends AbstractAjax4JsfTestCase {
+
+ public SimpleSeparatorImageTest(String name) {
+ super(name);
+ }
+
+ public void testSaveResources(){
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ SimpleSeparatorImage img = new SimpleSeparatorImage();
+
+ String skinParameter1 = "headerBackgroundColor";
+ String headerBackgroundColor = (String) skin.getParameter(facesContext, skinParameter1);
+
+ if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
+ headerBackgroundColor = (String) defaultSkin.getParameter(facesContext, skinParameter1);
+
+ headerBackgroundColor = headerBackgroundColor == null ? "#4169E1" : headerBackgroundColor;
+
+ Color color1 = HtmlColor.decode(headerBackgroundColor);
+
+ HtmlSeparator separator = new HtmlSeparator();
+
+ byte [] data = (byte []) img.getDataToStore(facesContext, separator);
+ assertNotNull(data);
+
+ SimpleSeparatorImage.SimpleSeparatorData separatorData = (SimpleSeparatorImage.SimpleSeparatorData)img.deserializeData(data);
+ assertEquals(color1, new Color(separatorData.getColor()));
+
+ }
+}
Added: trunk/ui/toolBar/src/test/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImageTest.java
===================================================================
--- trunk/ui/toolBar/src/test/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImageTest.java (rev 0)
+++ trunk/ui/toolBar/src/test/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImageTest.java 2007-08-22 13:37:24 UTC (rev 2398)
@@ -0,0 +1,85 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.component.html.HtmlToolBar;
+import org.richfaces.renderkit.html.images.ToolBarSeparatorImage.SeparatorData;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ToolBarSeparatorImageTest extends AbstractAjax4JsfTestCase {
+
+ public ToolBarSeparatorImageTest(String name) {
+ super(name);
+ }
+
+ public void testSaveResources(){
+
+ ToolBarSeparatorImage img = new DotSeparatorImage();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String skinParameter1 = "headerBackgroundColor";
+ String headerBackgroundColor = (String) skin.getParameter(facesContext, skinParameter1);
+
+ if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
+ headerBackgroundColor = (String) defaultSkin.getParameter(facesContext, skinParameter1);
+
+ headerBackgroundColor = headerBackgroundColor == null ? "#224986" : headerBackgroundColor;
+
+ Color color1 = HtmlColor.decode(headerBackgroundColor);
+
+ String skinParameter2 = "headerGradientColor";
+ String headerGradientColor = (String) skin.getParameter(facesContext, skinParameter2);
+
+ if (null == headerGradientColor || "".equals(headerGradientColor))
+ headerGradientColor = (String) defaultSkin.getParameter(facesContext, skinParameter2);
+
+ headerGradientColor = headerGradientColor == null ? "#CCCCFF" : headerGradientColor;
+
+ Color color2 = HtmlColor.decode(headerGradientColor);
+
+ String skinParameter3 = "headerTextColor";
+ String headerTextColor = (String) skin.getParameter(facesContext, skinParameter3);
+
+ if (null == headerTextColor || "".equals(headerTextColor))
+ headerTextColor = (String) defaultSkin.getParameter(facesContext, skinParameter3);
+
+ headerTextColor = headerTextColor == null ? "#000000" : headerTextColor;
+
+ Color color3 = HtmlColor.decode(headerTextColor);
+
+ String skinParameter4 = "headerSizeFont";
+ String headerSizeFont = (String) skin.getParameter(facesContext, skinParameter4);
+
+ if (null == headerSizeFont || "".equals(headerSizeFont))
+ headerSizeFont = (String) defaultSkin.getParameter(facesContext, skinParameter4);
+
+ headerSizeFont = headerSizeFont == null ? "11px" : headerSizeFont;
+
+ headerSizeFont = headerSizeFont.substring(0, headerSizeFont.indexOf("px"));
+
+ HtmlToolBar toolBar = new HtmlToolBar();
+
+ byte [] data = (byte []) img.getDataToStore(facesContext, toolBar);
+ assertNotNull(data);
+ SeparatorData separatorData = (SeparatorData)img.deserializeData(data);
+
+ assertNotNull(separatorData);
+ assertEquals(color1, new Color(separatorData.getHeaderBackgroundColor()));
+ assertEquals(color2, new Color(separatorData.getHeaderGradientColor()));
+ assertEquals(color3, new Color(separatorData.getHeaderTextColor()));
+ assertEquals(Integer.parseInt(headerSizeFont), separatorData.getFontSize());
+
+ }
+}
18 years, 8 months