Author: artdaw
Date: 2008-07-25 04:36:53 -0400 (Fri, 25 Jul 2008)
New Revision: 9778
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
trunk/docs/cdkguide/en/src/main/docbook/master.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - Templating creation
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-07-24 18:32:32 UTC
(rev 9777)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-07-25 08:36:53 UTC
(rev 9778)
@@ -10,8 +10,7 @@
</keywordset>
</sectioninfo>
<title>Templating</title>
- <para> The <property>Component Development Kit (CDK)</property>
allows to use the
- <property>templates</property> for generation
<property>Renderer</property> class. </para>
+ <para> The <property>Component Development Kit (CDK)</property>
allows to use <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 with the help of <property>scriptlets</property>.
@@ -19,7 +18,7 @@
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
calls on the place of these elements. </para>
- <para> Let's create the template. At first you should proceed to the
+ <para> Let's create the template for <property>HTML
4.0</property> markup. At first you should proceed to the
<property>inputDate/src/main/templates/org/mycompany</property>
directory where
<property>htmlInputDate.jspx</property> template file is stored.
This file contains a
<property>Template Skeleton</property> like this one:
</para>
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-07-24 18:32:32 UTC (rev 9777)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-07-25 08:36:53 UTC (rev 9778)
@@ -84,6 +84,24 @@
responsible for the converting information coming from the client to the
proper type
for the component (for example, a string value from the request is
converted to a
strongly type <code>Date</code> object). </para>
+ <para>
+ It is necessary to create following renderer classes for the <emphasis
role="bold">
+ <property><inputDate></property>
+ </emphasis> component:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>InputDateRenderer</code> class where you should override
<code>encode()</code> method
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>InputDateRendererBase</code> class where you should override
<code>decode()</code> method.
+ You could also define associated converter in this class.
+ </para>
+ </listitem>
+ </itemizedlist>
<para> You could actually implement the renderer-specific component
subclass that
exposes client-side attributes such as <emphasis>
<property>"style"</property>
@@ -95,9 +113,12 @@
<property><inputDate></property>
</emphasis> is a simple <code>UIInput</code> component,
therefore
<code>InputDateRenderer</code> class generates all the
markup itself. </para>
- <para> It is a time to start creating the
<property>Renderer</property>. </para>
- <para> One of the most convenient features of the
<property>Component Development Kit
- (CDK)</property> is a
<property>Templating</property> mechanism. </para>
+ <para> It is a time to start creating the
<code>InputDateRenderer</code> class.
+ The smartest way to create the <code>InputDateRenderer</code> class is a
<property>Templating</property> mechanism,
+ one of the most convenient features of the <property>Component Development Kit
(CDK)</property>.
+ </para>
+
+
&template; &rendererbase; &skin; </section> ®ister;
&ui;
&taghandler; </chapter> &test; &overview; <chapter
id="button"
xreflabel="button">