Author: artdaw
Date: 2008-08-14 09:35:11 -0400 (Thu, 14 Aug 2008)
New Revision: 10094
Added:
trunk/docs/cdkguide/en/src/main/resources/examples/inputDate-1.0-SNAPSHOT.jar
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/pcreate.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/protoui.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/register.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/rendererbase.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/taghandler.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/ui_conf.xml
trunk/docs/cdkguide/en/src/main/docbook/master.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/namingconv.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/ref.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/temptags.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/test.xml
trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.jspx
trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xml
trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - 'inputDate component development'
chapter checked.
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/pcreate.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/pcreate.xml 2008-08-14 12:24:54 UTC
(rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/pcreate.xml 2008-08-14 13:35:11 UTC
(rev 10094)
@@ -121,14 +121,6 @@
Used to store images
</entry>
</row>
- <row>
- <entry>
- src/main/resources/org/mycompany/renderkit/html/scripts
- </entry>
- <entry>
- Used to store JavaScript files
- </entry>
- </row>
<row>
<entry>
src/main/templates/org/mycompany
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/protoui.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/protoui.xml 2008-08-14 12:24:54 UTC
(rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/protoui.xml 2008-08-14 13:35:11 UTC
(rev 10094)
@@ -23,7 +23,8 @@
<img class="overlay" src="inputDateOverlay.png" />
</div>
...]]> </programlisting>
- <para> As it is shown in the listing above there are three HTML attributes -
<emphasis>
+
+ <!--para> As it is shown in the listing above there are three HTML attributes -
<emphasis>
<property>"title"</property>
</emphasis>, <emphasis>
<property>"name"</property>
@@ -31,7 +32,7 @@
<property>"value"</property>
</emphasis> - are needed to be parameterize the generated markup.
</para>
<para>
- You map the HTML attributes to the corresponding
<code>UIComponent</code> attributes:
+You map the HTML attributes to the corresponding <code>UIComponent</code>
attributes:
</para>
<programlisting role="XML"><![CDATA[...
<div title="[title]">
@@ -40,6 +41,7 @@
</div>
...]]>
</programlisting>
+ -->
<para>
All information about styles applied to the <emphasis
role="bold">
<property><inputDate></property>
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/register.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/register.xml 2008-08-14 12:24:54 UTC
(rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/register.xml 2008-08-14 13:35:11 UTC
(rev 10094)
@@ -43,17 +43,6 @@
</resource>
...]]></programlisting>
</listitem>
- <listitem>
- <para>
- the <property>inputDate.js</property> file
- </para>
- <programlisting role="XML"><![CDATA[...
-<resource>
- <name>org/mycompany/renderkit/html/scripts/inputDate.js</name>
- <path>org/mycompany/renderkit/html/scripts/inputDate.js</path>
-</resource>
-...]]></programlisting>
- </listitem>
</itemizedlist>
<para>
<ulink url="examples/resource-config.xml">Here</ulink> you could
find a full example of the <property>resource-config.xml</property>
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/rendererbase.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/rendererbase.xml 2008-08-14 12:24:54
UTC (rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/rendererbase.xml 2008-08-14 13:35:11
UTC (rev 10094)
@@ -14,9 +14,35 @@
After the component tree is restored on the <property>Restore View Phase
</property>,
each component in the tree extracts its new value from the request parameters
by using its <code>decode()</code> method. Then the value is stored locally
on the component.
- So in the <code>InputDateRendererBase</code> class you need to override
- the <code>decode()</code> method:
+ </para>
+ <para>
+ In order to create <code>InputDateRendererBase</code> class you should
proceed to the
+ <property>src/main/java/org/mycompany/renderkit</property>
+ directory and create this class there:
</para>
+ <programlisting role="JAVA"><![CDATA[package
org.mycompany.renderkit;
+import java.io.IOException;
+import java.util.Map;
+import java.util.TimeZone;
+import javax.faces.component.UIComponent;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.DateTimeConverter;
+import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.mycompany.component.UIInputDate;
+
+public abstract class InputDateRendererBase extends HeaderResourcesRendererBase {
+ ...
+}]]></programlisting>
+<para>
+ The <code>InputDateRendererBase</code> class extends a
<code>HeaderResourcesRendererBase</code>
+ class. In the <code>HeaderResourcesRendererBase</code> class all the
<code>encode()</code> methods for
+ the right resources encoding
+ are already realized, so in the <code>InputDateRendererBase</code> class you
need to override
+ the <code>decode()</code> method only:
+ </para>
<programlisting role="JAVA"><![CDATA[ ...
public void decode(FacesContext context, UIComponent component){
ExternalContext external = context.getExternalContext();
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2008-08-14 12:24:54 UTC (rev
10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2008-08-14 13:35:11 UTC (rev
10094)
@@ -19,6 +19,16 @@
<property>Built-in skinnability in RichFaces</property>,
<property>XCSS file format</property>, <property>Plug-n-Skin
feature</property>, etc. there.
</para>
<para>
+ It's time to create XCSS file. You should go to the
<property>src/main/resources/org/mycompany/renderkit/html/css</property>
+ and create <property>inputDate.xcss</property> file there with the
following skeleton:
+ </para>
+ <programlisting role="XML"><![CDATA[<?xml
version="1.0" encoding="UTF-8"?>
+<f:template
xmlns:f='http:/jsf.exadel.com/template'
+
xmlns:u='http:/jsf.exadel.com/template/util'
+
xmlns="http://www.w3.org/1999/xhtml">
+ ...
+</f:template>]]></programlisting>
+ <para>
According to the <emphasis
role="bold"><property><inputDate></property></emphasis>
markup you need to
define following selectors and classes in the
<property>inputDate.xcss</property>:
</para>
@@ -43,21 +53,21 @@
</u:selector>
...]]></programlisting>
</listitem>
- <listitem>
+ <listitem>
<para>
<code>.my-inputDate-input</code>,
<code>.my-inputDate-icon</code>, and
<code>.my-inputDate-caption</code> classes
</para>
<programlisting role="CSS"><![CDATA[...
.my-inputDate-input{
- background-color: #EBEBE4;
- border: 1px solid #7F9DB9;
- float:left;
+background-color: #EBEBE4;
+border: 1px solid #7F9DB9;
+float:left;
}
.my-inputDate-icon{
- margin-left: 3px;
+margin-left: 3px;
}
.my-inputDate-caption{
- color: #000000;
+color: #000000;
}
...]]></programlisting>
</listitem>
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/taghandler.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/taghandler.xml 2008-08-14 12:24:54
UTC (rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/taghandler.xml 2008-08-14 13:35:11
UTC (rev 10094)
@@ -42,6 +42,6 @@
</para>
<para>
Well done! The <emphasis
role="bold"><property><inputDate></property></emphasis>
component is created.
- The <property>inputDate-1.0-SNAPSHOT.jar</property> for the component usage
could be found in the <property>inputDate/target</property> folder.
+ The <ulink
url="examples/inputDate-1.0-SNAPSHOT.jar">inputDate-1.0-SNAPSHOT.jar</ulink>
for the component usage could be found in the
<property>inputDate/target</property> folder.
</para>
</section>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-08-14 12:24:54 UTC
(rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-08-14 13:35:11 UTC
(rev 10094)
@@ -49,24 +49,10 @@
<para>
<emphasis
role="bold"><property><div></property></emphasis>-wrapper
element with
<emphasis><property>"title"</property></emphasis>,
-<emphasis><property>"value"</property></emphasis>,
-<emphasis><property>"name"</property></emphasis>,
-<emphasis><property>"type"</property></emphasis>,
<emphasis><property>"id"</property></emphasis>
attributes and with
the<emphasis><property>"caption"</property></emphasis>
facet
</para>
<programlisting role="XML"><![CDATA[...
-<c:object var="caption"
type="javax.faces.component.UIComponent"/>
-<jsp:scriptlet>
- caption = component.getFacet("caption");
- if(caption !=null && caption.isRendered()) {
-</jsp:scriptlet>
-<div id="#{clientId}_caption" class="my-inputDate-caption
#{component.attributes['captionClass']}">
- <f:insertComponent value="#{caption}"/>
-</div>
-<jsp:scriptlet>
- }
-</jsp:scriptlet>
<div id="#{clientId}" title="#{value}"
x:passThruWithExclusions="value,name,type,id">
...
</div>
@@ -110,15 +96,10 @@
</listitem>
</itemizedlist>
<para>
- The <emphasis
role="bold"><property><inputDate></property></emphasis>
component uses styles and scripts that should
- be defined in the template with the help of <emphasis
role="bold"><property><h:styles></property></emphasis>
and
- <emphasis
role="bold"><property><h:scripts></property></emphasis>
tags:
+ The <emphasis
role="bold"><property><inputDate></property></emphasis>
component uses styles that should
+ be defined in the template with the help of <emphasis
role="bold"><property><h:styles></property></emphasis>
tag:
</para>
<programlisting role="XML"><![CDATA[...
-<h:scripts>
- new org.ajax4jsf.javascript.PrototypeScript(),
- /org/mycompany/renderkit/html/scripts/inputDate.js
-</h:scripts>
<h:styles>/org/mycompany/renderkit/html/css/inputDate.xcss</h:styles>
...]]></programlisting>
<para>
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/ui_conf.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/ui_conf.xml 2008-08-14 12:24:54 UTC
(rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/ui_conf.xml 2008-08-14 13:35:11 UTC
(rev 10094)
@@ -107,6 +107,13 @@
<defaultvalue>"inputDate"</defaultvalue>
</property>
<property>
+ <name>name</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Defines a name of the component
+ </description>
+</property>
+<property>
<name>styleClass</name>
<classname>java.lang.String</classname>
<description>
@@ -193,6 +200,10 @@
&ui_input_attributes;
...]]></programlisting>
<para>
+ <ulink url="examples/inputDate.xml">Here</ulink> is a full
example of the <property>inputDate.xml</property> for the
+ <emphasis
role="bold"><property><inputDate></property></emphasis>
component.
+ </para>
+ <para>
More information about the <property>common attributes</property> you could
find in the
<link linkend="attr_entity">Including common attributes</link>
section.
</para>
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-08-14 12:24:54 UTC (rev
10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-08-14 13:35:11 UTC (rev
10094)
@@ -29,7 +29,7 @@
<book>
<bookinfo>
<title>RichFaces CDK Developer Guide</title>
-
+ <subtitle>This documentation is work in progress, thus some mistakes or
incompleteness is possible</subtitle>
<copyright>
<year>2008</year>
<holder>Red Hat</holder>
@@ -166,6 +166,6 @@
</keywordset>
</chapterinfo>
<title>Button component development</title>
- <para> Command Ajax components TBD with RichFaces CDK. </para>
+ <para> Work in progress... </para>
</chapter> &ide; &namingconv; &ref; &temptags; </book>
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml 2008-08-14 12:24:54 UTC (rev
10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml 2008-08-14 13:35:11 UTC (rev
10094)
@@ -11,7 +11,7 @@
<title>Creating projects in different IDEs</title>
<para>
- Eclipse, IDEA.
+ Work in progress...
</para>
</chapter>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/namingconv.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/namingconv.xml 2008-08-14 12:24:54 UTC
(rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/namingconv.xml 2008-08-14 13:35:11 UTC
(rev 10094)
@@ -11,7 +11,7 @@
<title>Naming conventions</title>
<para>
- Naming
+ Work in progress...
</para>
</chapter>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml 2008-08-14 12:24:54 UTC
(rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml 2008-08-14 13:35:11 UTC
(rev 10094)
@@ -11,7 +11,7 @@
</chapterinfo>
<title>Component usage overview</title>
<para>
- overview
+ Work in progress...
</para>
<!--
TBD
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/ref.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/ref.xml 2008-08-14 12:24:54 UTC (rev
10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/ref.xml 2008-08-14 13:35:11 UTC (rev
10094)
@@ -11,7 +11,7 @@
<title>CDK Tag Reference</title>
<para>
- Tag Reference
+ Work in progress...
</para>
</chapter>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml 2008-08-14 12:24:54 UTC (rev
10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml 2008-08-14 13:35:11 UTC (rev
10094)
@@ -120,8 +120,7 @@
<listitem>
<para> Create a file named <property>pom.xml</property> in
the directory with the
following content: </para>
- <programlisting role="XML"><![CDATA[...
-<?xml version="1.0" encoding="UTF-8"?>
+ <programlisting role="XML"><![CDATA[<?xml
version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -182,8 +181,7 @@
<version>3.2.1.GA</version>
</dependency>
</dependencies>
-</project>
-...]]>
+</project>]]>
</programlisting>
</listitem>
<listitem>
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/temptags.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/temptags.xml 2008-08-14 12:24:54 UTC
(rev 10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/temptags.xml 2008-08-14 13:35:11 UTC
(rev 10094)
@@ -11,7 +11,7 @@
<title>Template tags overview</title>
<para>
- tags
+ Work in progress...
</para>
</chapter>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/test.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/test.xml 2008-08-14 12:24:54 UTC (rev
10093)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/test.xml 2008-08-14 13:35:11 UTC (rev
10094)
@@ -9,10 +9,8 @@
<keyword>Guide</keyword>
</keywordset>
</chapterinfo>
-
<title>Generating unit tests</title>
<para>
- Unit Tests
+ Work in progress...
</para>
-
</chapter>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.jspx
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.jspx 2008-08-14
12:24:54 UTC (rev 10093)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.jspx 2008-08-14
13:35:11 UTC (rev 10094)
@@ -14,18 +14,17 @@
<f:clientid var="clientId"/>
<h:styles>/org/mycompany/renderkit/html/css/inputDate.xcss</h:styles>
<f:resource name="/org/mycompany/renderkit/html/images/inputDate.png"
var="icon" />
- <c:object var="caption" type="javax.faces.component.UIComponent"
/>
- <jsp:scriptlet>
- <![CDATA[
- caption = component.getFacet("caption");
- if(caption !=null && caption.isRendered()) {]]>
- </jsp:scriptlet>
+ <jsp:scriptlet>
+ <![CDATA[if(component.getFacet("caption")!=null &&
component.getFacet("caption").isRendered()) {]]>
+ </jsp:scriptlet>
<div id="#{clientId}_caption" class="my-inputDate-caption
#{component.attributes['captionClass']}">
- <f:insertComponent value="#{caption}" />
- </div>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
+ <u:insertFacet name="caption" />
+ </div>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
<div id="#{clientId}" title="#{value}"
x:passThruWithExclusions="value,name,type,id">
<input id="#{clientId}"
name="#{clientId}"
Added: trunk/docs/cdkguide/en/src/main/resources/examples/inputDate-1.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/docs/cdkguide/en/src/main/resources/examples/inputDate-1.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xml 2008-08-14 12:24:54
UTC (rev 10093)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xml 2008-08-14 13:35:11
UTC (rev 10094)
@@ -34,8 +34,14 @@
The value of the component
</description>
</property>
-
<property>
+ <name>name</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Defines a name of the component
+ </description>
+ </property>
+ <property>
<name>title</name>
<classname>java.lang.String</classname>
<description>
Modified: trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml 2008-08-14
12:24:54 UTC (rev 10093)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml 2008-08-14
13:35:11 UTC (rev 10094)
@@ -4,10 +4,6 @@
<name>org/mycompany/renderkit/html/images/inputDate.png</name>
<path>org/mycompany/renderkit/html/images/inputDate.png</path>
</resource>
- <resource>
- <name>org/mycompany/renderkit/html/scripts/inputDate.js</name>
- <path>org/mycompany/renderkit/html/scripts/inputDate.js</path>
- </resource>
<resource>
<name>org/mycompany/renderkit/html/css/inputDate.xcss</name>
<path>org/mycompany/renderkit/html/css/inputDate.xcss</path>