Author: artdaw
Date: 2008-07-23 12:37:37 -0400 (Wed, 23 Jul 2008)
New Revision: 9756
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - Templating creation
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml 2008-07-23 16:34:59 UTC
(rev 9755)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml 2008-07-23 16:37:37 UTC
(rev 9756)
@@ -39,6 +39,5 @@
<para>
If you want to rebuild the component you could use the following command:
</para>
- <programlisting role="XML"><![CDATA[mvn clean install]]>
- </programlisting>
+ <programlisting role="XML"><![CDATA[mvn clean
install]]></programlisting>
</section>
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-07-23 16:34:59 UTC
(rev 9755)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-07-23 16:37:37 UTC
(rev 9756)
@@ -14,7 +14,7 @@
<property>templates</property> for generation
<property>Renderer</property> class. </para>
<para> Templates are JSP-like markup pages with special tags that are converted
into
<property>Renderer</property> by a build script. </para>
- <para> It's possible to use evaluated expressions in components
templates.
+ <para> It's possible to use evaluated expressions in components
templates with the help of <property>scriptlets</property>.
It's also possible to create the <property>base
class</property> for a template to
implement additional functions in it, so as the functions could be called from
the template.
Hence, in the generated <property>Renderer</property> class there are
corresponding function
@@ -43,8 +43,79 @@
</f:root>
]]></programlisting>
<para> According to the created <property>UI prototype</property>
you need to extend
- <property>Template Skeleton</property> with proper elements. Here
is a full example for
+ <property>Template Skeleton</property> with proper elements:
+</para>
+<itemizedlist>
+ <listitem>
+ <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>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis
role="bold"><property><input></property></emphasis>
element with
+<emphasis><property>"id"</property></emphasis>,
+<emphasis><property>"value"</property></emphasis>,
+<emphasis><property>"name"</property></emphasis>,
+<emphasis><property>"type"</property></emphasis>,
+<emphasis><property>"class"</property></emphasis>,
+<emphasis><property>"style"</property></emphasis>
attributes and with
+the
<emphasis><property>"icon"</property></emphasis>
facet used to define an icon of the component.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis
role="bold"><property><img></property></emphasis>
element with
+<emphasis><property>"src"</property></emphasis>,
+<emphasis><property>"class"</property></emphasis>,
+<emphasis><property>"style"</property></emphasis>
attributes.
+ </para>
+ </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. How to register all resources is explained in the
+ <property>"Component resources registration"</property>
chapter.
+</para>
+<important>
+ <title>Important:</title>
+ <para>
+ Don't forget to add namespace <code>xmlns:h="
http://ajax4jsf.org/cdk/h"</code> to the
+ <emphasis
role="bold"><property><f:root></property></emphasis>
element:
+ </para>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ ...
+ xmlns:h="
http://ajax4jsf.org/cdk/h"
+ ...
+ >
+ ...
+</f:root>]]></programlisting>
+</important>
+<para>
+Here is a full example of the template for
the <emphasis role="bold">
<property><inputDate></property>
- </emphasis> component: </para>
- <ulink
url="jspx/htmlInputDate.jspx">htmlInputDate.jspx</ulink>.
</section>
+ </emphasis> component:
+ <ulink
url="jspx/htmlInputDate.jspx">htmlInputDate.jspx</ulink>.
+ </para>
+ <note>
+ <title>Note:</title>
+ <para>
+ In the <property>Template Skeleton</property> Renderer Baseclass is
<code>org.ajax4jsf.renderkit.AjaxComponentRendererBase</code>, but
+ you need to define Renderer Baseclass special for <emphasis
role="bold"><property><inputDate></property></emphasis>
component.
+ In the next section <link linkend="rendererbase">"Creating a
Renderer Base class"</link> we will define Renderer Baseclass
<code>org.mycompany.renderkit.InputDateRendererBase</code>.
+ </para>
+ </note>
+ <para>
+ All the Template tags you could find in the <property>"Template tags
overview"</property> chapter.
+ </para>
+ </section>