You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by me...@apache.org on 2009/06/07 14:55:40 UTC
svn commit: r782382 -
/incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml
Author: medgar
Date: Sun Jun 7 12:55:40 2009
New Revision: 782382
URL: http://svn.apache.org/viewvc?rev=782382&view=rev
Log:
updated doco
Modified:
incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml
Modified: incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml?rev=782382&r1=782381&r2=782382&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml (original)
+++ incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml Sun Jun 7 12:55:40 2009
@@ -133,8 +133,72 @@
strategy is configured with the Click application mode element in the
"<filename>click.xml</filename>" config file, covered next.
</para>
+ </sect2>
+
+
+ <sect2 id="type-converter-class" remap="h3">
+ <title>Type Converter Class</title>
+
+ <para>
+ The ClickServlet uses the OGNL library for type coercion when binding
+ request parameters to bindable fields. The default type converter class
+ use is <ulink url="click-api/org/apache/click/util/RequestTypeConverter.html">RequestTypeConverter</ulink>.
+ To specify your own type converter configure a <literal>type-converter-class</literal>
+ init parameter with the ClickServlet. For example:
+ </para>
+
+ <programlisting language="xml">
+ <servlet>
+ <servlet-name>ClickServlet</servlet-name>
+ <servlet-class>org.apache.click.ClickServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ <init-param>
+ <param-name>type-converter-class</param-name>
+ <param-value>com.mycorp.util.CustomTypeConverter</param-value>
+ </init-param>
+ </servlet>
+ </programlisting>
+
+ </sect2>
+
+ <sect2 id="config-service-class" remap="h3">
+ <title>Config Service Classs</title>
+ <para>
+ Click uses a single application configuration service which is
+ instantiated by the ClickServlet at startup. This service defines the
+ applications configuration and is used the ClickServlet to map request
+ to pages amongst other things.
+ </para>
+
+ <para>
+ Once the ConfigService has been initialized it is stored in the
+ ServletContext using the key <ulink url="click-api/org/apache/click/service/ConfigService.html">ConfigService</ulink>
+ The default ConfigService is <ulink url="click-api/org/apache/click/service/XmlConfigService.html">XmlConfigService</ulink>.
+ To us an alternative configuration service specify a <literal>config-service-class</literal>
+ context parameter. For example:
+ </para>
+
+ <programlisting language="xml">
+<web-app 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"
+ version="2.4">
+
+ ...
+
+ <context-param>
+ <param-name>config-service-class</param-name>
+ <param-value>com.mycorp.service.CustomConfigSerivce</param-value>
+ </context-param>
+
+ ...
+
+ </web-app>
+ </programlisting>
+
</sect2>
+
</sect1>
<sect1 id="application-configuration" remap="h2">