Seam SVN: r9305 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-10-14 09:14:49 -0400 (Tue, 14 Oct 2008)
New Revision: 9305
Removed:
trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml
Modified:
trunk/doc/Seam_Reference_Guide/en-US/
Log:
Remove version info
Property changes on: trunk/doc/Seam_Reference_Guide/en-US
___________________________________________________________________
Name: svn:ignore
- resolved.xml
Version_Info.xml
+ resolved.xml
Deleted: trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml 2008-10-14 13:13:30 UTC (rev 9304)
+++ trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml 2008-10-14 13:14:49 UTC (rev 9305)
@@ -1,3 +0,0 @@
-
- <releaseinfo>2.1.0-SNAPSHOT</releaseinfo>
-
\ No newline at end of file
16 years, 2 months
Seam SVN: r9303 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-10-14 09:12:15 -0400 (Tue, 14 Oct 2008)
New Revision: 9303
Added:
trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Annotations.xml
trunk/doc/Seam_Reference_Guide/en-US/Author_Group.xml
trunk/doc/Seam_Reference_Guide/en-US/Book_Info.xml
trunk/doc/Seam_Reference_Guide/en-US/Cache.xml
trunk/doc/Seam_Reference_Guide/en-US/Components.xml
trunk/doc/Seam_Reference_Guide/en-US/Concepts.xml
trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
trunk/doc/Seam_Reference_Guide/en-US/Controls.xml
trunk/doc/Seam_Reference_Guide/en-US/Conversations.xml
trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml
trunk/doc/Seam_Reference_Guide/en-US/Drools.xml
trunk/doc/Seam_Reference_Guide/en-US/Elenhancements.xml
trunk/doc/Seam_Reference_Guide/en-US/Events.xml
trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
trunk/doc/Seam_Reference_Guide/en-US/Feedback.xml
trunk/doc/Seam_Reference_Guide/en-US/Framework.xml
trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml
trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
trunk/doc/Seam_Reference_Guide/en-US/Glassfish.xml
trunk/doc/Seam_Reference_Guide/en-US/Groovy.xml
trunk/doc/Seam_Reference_Guide/en-US/Gwt.xml
trunk/doc/Seam_Reference_Guide/en-US/Hsearch.xml
trunk/doc/Seam_Reference_Guide/en-US/I18n.xml
trunk/doc/Seam_Reference_Guide/en-US/Itext.xml
trunk/doc/Seam_Reference_Guide/en-US/Jbpm.xml
trunk/doc/Seam_Reference_Guide/en-US/Jms.xml
trunk/doc/Seam_Reference_Guide/en-US/Mail.xml
trunk/doc/Seam_Reference_Guide/en-US/Oc4j.xml
trunk/doc/Seam_Reference_Guide/en-US/Persistence.xml
trunk/doc/Seam_Reference_Guide/en-US/Preface.xml
trunk/doc/Seam_Reference_Guide/en-US/Remoting.xml
trunk/doc/Seam_Reference_Guide/en-US/Revision_History.xml
trunk/doc/Seam_Reference_Guide/en-US/Rss.xml
trunk/doc/Seam_Reference_Guide/en-US/Security.xml
trunk/doc/Seam_Reference_Guide/en-US/Spring.xml
trunk/doc/Seam_Reference_Guide/en-US/Testing.xml
trunk/doc/Seam_Reference_Guide/en-US/Text.xml
trunk/doc/Seam_Reference_Guide/en-US/Tools.xml
trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
trunk/doc/Seam_Reference_Guide/en-US/Validation.xml
trunk/doc/Seam_Reference_Guide/en-US/Weblogic.xml
trunk/doc/Seam_Reference_Guide/en-US/Webservices.xml
trunk/doc/Seam_Reference_Guide/en-US/Websphere.xml
trunk/doc/Seam_Reference_Guide/en-US/Wicket.xml
trunk/doc/Seam_Reference_Guide/en-US/Xml.xml
trunk/doc/Seam_Reference_Guide/en-US/master.xml
Log:
Fix crlf problems and set svn line eol style to native to stop it happening
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Annotations.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Author_Group.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Book_Info.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Cache.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Components.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Concepts.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Controls.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Conversations.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml 2008-10-14 12:56:52 UTC (rev 9302)
+++ trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml 2008-10-14 13:12:15 UTC (rev 9303)
@@ -148,24 +148,24 @@
<para>Required when using Seam's PDF features</para>
</entry>
</row>
-
- <row>
- <entry>
- <para><literal>jboss-seam-excel.jar</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>Required when using Seam's <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark> features</para>
- </entry>
- </row>
<row>
<entry>
+ <para><literal>jboss-seam-excel.jar</literal></para>
+ </entry>
+ <entry align="center">
+ <para>runtime</para>
+ </entry>
+ <entry align="center">
+ <para>war</para>
+ </entry>
+ <entry>
+ <para>Required when using Seam's <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark> features</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
<para><literal>jboss-seam-rss.jar</literal></para>
</entry>
<entry align="center">
@@ -567,73 +567,73 @@
</tgroup>
</table>
</section>
-
- <section>
- <title>Seam <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark></title>
-
- <table>
- <title>Seam <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark> Dependencies</title>
-
- <tgroup cols="4">
- <colspec colnum="1" colwidth="4*" />
- <colspec colnum="2" colwidth="2*" />
- <colspec colnum="3" colwidth="3*" />
- <colspec colnum="4" colwidth="5*" />
-
- <thead>
- <row>
- <entry align="center">
- <para>Name</para>
- </entry>
- <entry align="center">
- <para>Type</para>
- </entry>
- <entry align="center">
- <para>Scope</para>
- </entry>
- <entry align="center">
- <para>Notes</para>
- </entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>
- <para><literal>jxl.jar</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>JExcelAPI library</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para><literal>jboss-seam-excel.jar</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>Seam <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark> core library</para>
- </entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
- </section>
+ <section>
+ <title>Seam <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark></title>
+
+ <table>
+ <title>Seam <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark> Dependencies</title>
+
+ <tgroup cols="4">
+ <colspec colnum="1" colwidth="4*" />
+ <colspec colnum="2" colwidth="2*" />
+ <colspec colnum="3" colwidth="3*" />
+ <colspec colnum="4" colwidth="5*" />
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+ <entry align="center">
+ <para>Type</para>
+ </entry>
+ <entry align="center">
+ <para>Scope</para>
+ </entry>
+ <entry align="center">
+ <para>Notes</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para><literal>jxl.jar</literal></para>
+ </entry>
+ <entry align="center">
+ <para>runtime</para>
+ </entry>
+ <entry align="center">
+ <para>war</para>
+ </entry>
+ <entry>
+ <para>JExcelAPI library</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><literal>jboss-seam-excel.jar</literal></para>
+ </entry>
+ <entry align="center">
+ <para>runtime</para>
+ </entry>
+ <entry align="center">
+ <para>war</para>
+ </entry>
+ <entry>
+ <para>Seam <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark> core library</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
<section id="dependencies.rss">
<title>Seam RSS support</title>
@@ -789,7 +789,7 @@
</tgroup>
</table>
</section>
-
+
<section>
<title>JBoss Rules</title>
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Drools.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Elenhancements.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Events.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-10-14 12:56:52 UTC (rev 9302)
+++ trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-10-14 13:12:15 UTC (rev 9303)
@@ -1,1163 +1,1163 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
-<!ENTITY excel 'the Microsoft® Excel® spreadsheet application'>
-<!ENTITY Excel 'The Microsoft® Excel® spreadsheet application'>
-]>
-
-<chapter id="excel">
- <title>&Excel;</title>
- <para>
- Seam also supports generation of &excel; spreadsheets through the
- excellent <ulink url="http://jexcelapi.sourceforge.net/">JExcelAPI
- </ulink> library. The generated document is compatible with
- &excel; versions 95, 97, 2000, XP and 2003. Currently a limited
- subset of the library functionality is exposed but the ultimate
- goal is to be able to do everything the library allows for. Please
- refer to the JExcelAPI documentation for more information on
- capabilities and limitations.
- </para>
-
- <section id="excel.intro">
- <title>&Excel; support</title>
- <para>
- &Excel; <literal>jboss-seam-excel.jar</literal>. This JAR contains
- the &excel; JSF controls, which are used to construct views that can
- render the document, and the DocumentStore component, which serves
- the rendered document to the user. To include &excel; support in
- your application, included <literal>jboss-seam-excel.jar</literal>
- in your <literal>WEB-INF/lib</literal> directory along with the
- <literal>jxl.jar</literal> JAR file. Furthermore, you need to
- configure the DocumentStore servlet in your web.xml
- </para>
- <para>
- &Excel; Seam module requires the use of Facelets as the view
- technology. Additionally, it requires the use of the seam-ui package.
- </para>
- <para>
- The <literal>examples/excel</literal> project contains an example of
- &excel; support in action. It demonstrates proper deployment
- packaging, and it shows the exposed functionality.
- </para>
- <para>
- Customizing the module to support other kinds of &excel; spreadsheet
- API's has been made very easy. Implement the <literal>ExcelWorkbook
- </literal> interface, and register in components.xml.
- </para>
- <programlisting role="XML"><![CDATA[<excel:excelFactory>
- <property name="implementations">
- <key>myExcelExporter</key>
- <value>my.excel.exporter.ExcelExport</value>
- </property>
-</excel:excelFactory>]]>
- </programlisting>
- <para>
- and register the excel namespace in the components tag with
- </para>
- <programlisting role="XML"><![CDATA[xmlns:excel="http://jboss.com/products/seam/excel"]]></programlisting>
- <para>
- Then set the UIWorkbook type to <literal>myExcelExporter</literal> and your
- own exporter will be used. Default is "jxl", but support for CSV has also been
- added, using the type "csv".
- </para>
- <para>
- See <xref linkend="itext.configuration" /> for information on how to configure
- the document servlet for serving the documents with an .xls extension.
- </para>
- <para>
- If you are having problems accessing the generated file under IE (especially
- with https), make sure you are not using too strict restrictions in the browser
- (see <ulink url="http://www.nwnetworks.com/iezones.htm/"/>), too strict security
- constraint in web.xml or a combination of both.
- </para>
- </section>
- <section id="excel.usage">
- <title>Creating a simple workbook</title>
- <para>
- Basic usage of the worksheet support is simple; it is used like a
- familiar <literal><h:dataTable></literal> and you can bind to a
- <literal>List</literal>, <literal>Set</literal>,
- <literal>Map</literal>, <literal>Array</literal> or
- <literal>DataModel</literal>.
- </para>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook xmlns:e="http://jboss.com/products/seam/excel">
- <e:worksheet>
- <e:cell column="0" row="0" value="Hello world!"/>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- That's not terribly useful, so lets have a look at a more common case:
- </para>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook xmlns:e="http://jboss.com/products/seam/excel">
- <e:worksheet value="#{data}" var="item">
- <e:column>
- <e:cell value="#{item.value}"/>
- </e:column>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- First we have the top-level workbook element which serves as the
- container and it doesn't have any attributes. The child-element
- worksheet has two attributes; value="#{data}" is the
- EL-binding to the data and var="item" is the name of the
- current item. Nested inside the worksheet is a single column and within
- it you see the cell which is the final bind to the data within the
- currently iterated item
- </para>
- <para>
- This is all you know to get started dumping your data to worksheets!
- </para>
-
- </section>
- <section id="excel.workbook">
- <title>Workbooks</title>
- <para>
- Workbooks are the top-level parents of worksheets and stylesheet links.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:workbook></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>type</literal>
- —Defines which export module to be used. The
- value is a string and can be either "jxl" or
- "csv". The default is "jxl".
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>templateURI</literal>
- —A template that should be used as a basis
- for the workbook. The value is a string (URI).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>arrayGrowSize</literal>
- —The amount of memory by which to increase
- the amount of memory allocated to storing the
- workbook data. For processeses reading many small
- workbooks inside a WAS it might be necessary to
- reduce the default size Default value is 1
- megabyte. The value is a number (bytes).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>autoFilterDisabled</literal>
- —Should autofiltering be disabled?. The
- value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>cellValidationDisabled</literal>
- —Shoule cell validation be ignored? The
- value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>characterSet</literal>
- —The character set. This is only used when
- the spreadsheet is read, and has no effect when
- the spreadsheet is written. The value is a string
- (character set encoding).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>drawingsDisabled</literal>
- —Should drawings be disabled? The value is a
- boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>excelDisplayLanguage</literal>
- —The language in which the generated file
- will display. The value is a string (two character
- ISO 3166 country code).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>excelRegionalSettings</literal>
- —The regional settings for the generated
- excel file. The value is a string (two character
- ISO 3166 country code).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>formulaAdjust</literal>
- —Should formulas be adjusted? The value is a
- boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>gcDisabled</literal>
- —Should garbage collection be disabled? The
- value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ignoreBlanks</literal>
- —Should blanks be ignored? The value is a
- boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>initialFileSize</literal>
- —The initial amount of memory allocated to
- store the workbook data when reading a worksheet.
- For processeses reading many small workbooks
- inside a WAS it might be necessary to reduce the
- default size Default value is 5 megabytes. The
- value is a number (bytes).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>locale</literal>
- —The locale used by JExcelApi to generate
- the spreadsheet. Setting this value has no effect
- on the language or region of the generated excel
- file. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>mergedCellCheckingDisabled</literal>
- —Should merged cell checking be disabled?
- The value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>namesDisabled</literal>
- —Should handling of names be disabled? The
- value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>propertySets</literal>
- —Should any property sets be enabled (such
- as macros) to be copied along with the workbook?
- Leaving this feature enabled will result in the
- JXL process using more memory. The value is a
- boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>rationalization</literal>
- —Should the cell formats be rationalized
- before writing out the sheet? The value is a
- boolean. Default is true.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>supressWarnings</literal>
- —Should warnings be suppressed?. Due to the
- change in logging in version 2.4, this will now
- set the warning behaviour across the JVM
- (depending on the type of logger used). The value
- is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>
- temporaryFileDuringWriteDirectory
- </literal>
- —Used in conjunction with the
- <literal>useTemporaryFileDuringWrite</literal>
- setting to set the target directory for the
- temporary files. This value can be NULL, in which
- case the normal system default temporary directory
- is used instead. The value is a string (the
- directory to which temporary files should be
- written).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>useTemporaryFileDuringWrite</literal>
- —Should a temporary file is used during the
- generation of the workbook. If not set, the
- workbook will take place entirely in memory.
- Setting this flag involves an assessment of the
- trade-offs between memory usage and performance.
- The value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>workbookProtected</literal>
- —Should the workbook be protected? The value
- is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>filename</literal>
- —The filename to use for the download. The value
- is a string. Please not that if you map the DocumentServlet
- to some pattern, this file extension must also match.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>exportKey</literal>
- —A key under which to store the resulting data
- in a DocumentData object under the event scope. If used,
- there is no redirection.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal><e:link/></literal>
- —Zero or more stylesheet links (see
- <xref linkend="excel.fontsandlayout.link" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal><e:worksheet/></literal>
- —Zero or more worksheets (see
- <xref linkend="excel.worksheet" />
- ).
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:cell value="Hello World" row="0" column="0"/>
- </e:worksheet>
- <e:workbook>
- ]]>
- </programlisting>
- <para>defines a workbook with a worksheet and a greeting at A1</para>
-
- </section>
- <section id="excel.worksheet">
- <title>Worksheets</title>
- <para>
- Worksheets are the children of workbooks and the parent of columns and
- worksheet commands They can also contain explicitly placed cells,
- formulas, images and hyperlinks. They are the pages that make up the
- workbook.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:worksheet></literal>
- </para>
- </entry>
- <entry valign="top">
- <itemizedlist>
- <listitem>
- <para>
- <literal>value</literal>
- —An EL-expression to the backing data. The
- value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>var</literal>
- —The current row iterator variable name that
- can later be referenced in cell value attributes.
- The value is a string
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>name</literal>
- —The name of the worksheet. The valus is a
- string. Defaults to Sheet# where # is the
- worksheet index. If the given worksheet name
- exists, that sheet is selected. This can be used
- for merging several data sets into a single
- worksheet, just define the same name for them
- (using
- <literal>startRow</literal>
- and
- <literal>startCol</literal>
- to make sure that they don't occupy the same
- space).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>startRow</literal>
- —Defines the starting row for the data. The
- value is a number. Used for placing the data in
- other places than the upper-left corner
- (especially useful if having multiple data sets
- for a single worksheet). The defaults is 0.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>startColumn</literal>
- —Defines the starting column for the data.
- The value is a number. Used for placing the data
- in other places than the upper-left corner
- (especially useful if having multiple data sets
- for a single worksheet). The default is 0.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>automaticFormulaCalculation</literal>
- —Should formulas be automatically
- calculated? The value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>bottomMargin</literal>
- —The bottom margin. The value is a number
- (inches)
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>copies</literal>
- —The number of copies. The value is a
- number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>defaultColumnWidth</literal>
- —The default column width. The value is a
- number (characters * 256).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>defaultRowHeight</literal>
- —The default row height. The value is a
- number (1/20ths of a point).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>displayZeroValues</literal>
- —Should zero-values be displayed? The value
- is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>fitHeight</literal>
- —The number of pages vertically that this
- sheet will be printed into. The value is a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>fitToPages</literal>
- —Should printing be fit to pages? The value
- is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>fitWidth</literal>
- —The number of pages widthwise which this
- sheet should be printed into. The value is a
- number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>footerMargin</literal>
- —The margin for any page footer. The value
- is a number (inches).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>headerMargin</literal>
- —The margin for any page headers. The value
- is a number (inches).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>hidden</literal>
- —Should the worksheet be hidden? The value
- is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>horizontalCentre</literal>
- —Should the worksheet be centered
- horizontally? The value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>horizontalFreeze</literal>
- —The row at which the pane is frozen
- vertically. The value is a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>horizontalPrintResolution</literal>
- —The horizontal print resolution. The value
- is a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>leftMargin</literal>
- —The left margin. The value is a number
- (inches).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>normalMagnification</literal>
- —The normal magnificaton factor (not zoom or
- scale factor). The value is a number (percentage).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>orientation</literal>
- —The paper orientation for printing this
- sheet. The value is a string that can be either
- "landscape" or "portrait".
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>pageBreakPreviewMagnification</literal>
- —The page break preview magnificaton factor
- (not zoom or scale factors). the value is a number
- (percentage).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>pageBreakPreviewMode</literal>
- —Show page in preview mode? The value is a
- boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>pageStart</literal>
- —The page number at which to commence
- printing. The value is a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>paperSize</literal>
- —The paper size to be used when printing
- this sheet. The value is a string that can be one
- of "a4", "a3", "letter", "legal" etc (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.PaperSize
- </ulink>
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>password</literal>
- —The password for this sheet. The value is a
- string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>passwordHash</literal>
- —The password hash - used only when copying
- sheets. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>printGridLines</literal>
- —Should grid lines be printed? The value is
- a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>printHeaders</literal>
- —Should headers be printed? The value is a
- boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>sheetProtected</literal>
- —Should the sheet be protected (read-only)?
- The value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>recalculateFormulasBeforeSave</literal>
- —Should the formulas be re-calculated when
- the sheet is saved? The value is a boolean. false
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>rightMargin</literal>
- —The right margin. The value is a number
- (inches).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>scaleFactor</literal>
- —The scale factor for this sheet to be used
- when printing. The value is a number (percent).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>selected</literal>
- —Should the sheet be selected when the
- workbook opens? The value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>showGridLines</literal>
- —Should gridlines be shown? The value is a
- boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>topMargin</literal>
- —The top margin. The value is a number
- (inches).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>verticalCentre</literal>
- —Center verically? The value is a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>verticalFreeze</literal>
- —The row at which the pane is frozen
- vertically. The value is a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>verticalPrintResolution</literal>
- —The vertical print resolution. The value is
- a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>zoomFactor</literal>
- —T zoom factor. Do not confuse zoom factor
- (which relates to the on screen view) with scale
- factor (which refers to the scale factor when
- printing). The value is a number (percentage.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal><e:printArea/></literal>
- —Zero or more print area definitions (see
- <xref linkend="excel.printareatitles" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal><e:printTitle/></literal>
- —Zero or more print title definitions (see
- <xref linkend="excel.printareatitles" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal><e:headerFooter/></literal>
- —Zero or more header/footer definitions
- ((see
- <xref linkend="excel.headersfooters" />
- )).
- </para>
- </listitem>
- <listitem>
- <para>
- Zero or more worksheet commands (see
- <xref linkend="excel.worksheetcommands" />
- ).
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>header</literal>—Contents that will
- be placed at the top of the data block, above the
- column headers (if any)
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>footer</literal>—Contents that will
- be placed at the bottom of the data block, below the
- column footers (if any)
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet name="foo" startColumn="1" startRow="1">
- <e:column value="#{personList}" var="person">
- <f:facet name="header">
- <e:cell value="Last name"/>
- </f:facet>
- <e:cell value="#{person.lastName}"/>
- </e:column>
- </e:worksheet>
- <e:workbook>
- ]]>
- </programlisting>
- <para>defines a worksheet with the name "foo", starting at B2.</para>
- </section>
- <section id="excel.columns">
- <title>Columns</title>
- <para>
- Columns are the children of worksheets and the parents of cells,
- images, formulas and hyperlinks. They are the structure that control
- the iteration of the worksheet data. See <xref linkend="excel.fontsandlayout.columnsettings"/>
- for formatting.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:column></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal><e:cell/></literal>
- —Zero or more cells (see
- <xref linkend="excel.cells" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal><e:formula/></literal>
- —Zero or more formulas (see
- <xref linkend="excel.formulas" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal><e:image/></literal>
- —Zero or more images (see
- <xref linkend="excel.images" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal><e:hyperLink/></literal>
- —Zero or more hyperlinks (see
- <xref linkend="excel.hyperlinks" />
- ).
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>header</literal>
- —This facet can/will contain one
- <literal><e:cell></literal>
- ,
- <literal><e:formula></literal>
- ,
- <literal><e:image></literal>
- or
- <literal><e:hyperLink></literal>
- that will be used as header for the column.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>footer</literal>
- —This facet can/will contain one
- <literal><e:cell></literal>
- ,
- <literal><e:formula></literal>
- ,
- <literal><e:image></literal>
- or
- <literal><e:hyperLink></literal>
- that will be used as footer for the column.
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:column value="#{personList}" var="person">
- <f:facet name="header">
- <e:cell value="Last name"/>
- </f:facet>
- <e:cell value="#{person.lastName}"/>
- </e:column>
- </e:worksheet>
- <e:workbook>
- ]]>
- </programlisting>
- <para>defines a column with a header and an iterated output</para>
-
- </section>
- <section id="excel.cells">
- <title>Cells</title>
- <para>
- Cells are nested within columns (for iteration) or inside worksheets
- (for direct placement using the <literal>column</literal> and
- <literal>row</literal> attributes) and are responsible for outputting
- the value (usually though en EL-expression involving the
- <literal>var</literal>-attribute of the datatable. See
- <xref linkend="excel.fontsandlayout.cells"/>
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:cell></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>column</literal>
- —The column where to place the cell. The
- default is the internal counter. The value is a
- number. Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>row</literal>
- —The row where to place the cell. The
- default is the internal counter. The value is
- number. Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>value</literal>
- —The value to display. Usually an
- EL-expression referencing the var-attribute of the
- containing datatable. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>comment</literal>
- —A comment to add to the cell. The value is
- a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>commentHeight</literal>
- —The height of the comment. The value is a
- number (in pixels).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>commentWidth</literal>
- —A width of the comment. The value is a
- number (in pixels).
- </para>
- </listitem>
- </itemizedlist>
-
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal><e:font/></literal>
- —Zero or more font definitions (see
- <xref linkend="excel.cells.fonts" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal><e:border/></literal>
- —Zero or more border definitions (see
- <xref linkend="excel.cells.borders" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal><e:background/></literal>
- —Zero or more background definitions (see
- <xref linkend="excel.cells.backgrounds" />
- ).
- </para>
- </listitem>
- <listitem>
- <para>
- Zero or more validation conditions (see
- <xref linkend="excel.cells.validation" />
- ).
- </para>
- </listitem>
-
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:column value="#{personList}" var="person">
- <f:facet name="header">
- <e:cell value="Last name"/>
- </f:facet>
- <e:cell value="#{person.lastName}"/>
- </e:column>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>defines a column with a header and an iterated output</para>
- <section id="excel.cells.validation">
- <title>Validation</title>
- <para>
- Validations are nested inside cells, formulas or cell templates.
- They add constrains for the cell data.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:numericValidation></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>value</literal>
- —The limit (or lower limit where
- applicable) of the validation. The value is a
- number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>value2</literal>
- —The upper limit (where applicable) of
- the validation. The value is a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>condition</literal>
- —The validation condition. The value is a
- string.
- <itemizedlist>
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY excel 'the Microsoft® Excel® spreadsheet application'>
+<!ENTITY Excel 'The Microsoft® Excel® spreadsheet application'>
+]>
+
+<chapter id="excel">
+ <title>&Excel;</title>
+ <para>
+ Seam also supports generation of &excel; spreadsheets through the
+ excellent <ulink url="http://jexcelapi.sourceforge.net/">JExcelAPI
+ </ulink> library. The generated document is compatible with
+ &excel; versions 95, 97, 2000, XP and 2003. Currently a limited
+ subset of the library functionality is exposed but the ultimate
+ goal is to be able to do everything the library allows for. Please
+ refer to the JExcelAPI documentation for more information on
+ capabilities and limitations.
+ </para>
+
+ <section id="excel.intro">
+ <title>&Excel; support</title>
+ <para>
+ &Excel; <literal>jboss-seam-excel.jar</literal>. This JAR contains
+ the &excel; JSF controls, which are used to construct views that can
+ render the document, and the DocumentStore component, which serves
+ the rendered document to the user. To include &excel; support in
+ your application, included <literal>jboss-seam-excel.jar</literal>
+ in your <literal>WEB-INF/lib</literal> directory along with the
+ <literal>jxl.jar</literal> JAR file. Furthermore, you need to
+ configure the DocumentStore servlet in your web.xml
+ </para>
+ <para>
+ &Excel; Seam module requires the use of Facelets as the view
+ technology. Additionally, it requires the use of the seam-ui package.
+ </para>
+ <para>
+ The <literal>examples/excel</literal> project contains an example of
+ &excel; support in action. It demonstrates proper deployment
+ packaging, and it shows the exposed functionality.
+ </para>
+ <para>
+ Customizing the module to support other kinds of &excel; spreadsheet
+ API's has been made very easy. Implement the <literal>ExcelWorkbook
+ </literal> interface, and register in components.xml.
+ </para>
+ <programlisting role="XML"><![CDATA[<excel:excelFactory>
+ <property name="implementations">
+ <key>myExcelExporter</key>
+ <value>my.excel.exporter.ExcelExport</value>
+ </property>
+</excel:excelFactory>]]>
+ </programlisting>
+ <para>
+ and register the excel namespace in the components tag with
+ </para>
+ <programlisting role="XML"><![CDATA[xmlns:excel="http://jboss.com/products/seam/excel"]]></programlisting>
+ <para>
+ Then set the UIWorkbook type to <literal>myExcelExporter</literal> and your
+ own exporter will be used. Default is "jxl", but support for CSV has also been
+ added, using the type "csv".
+ </para>
+ <para>
+ See <xref linkend="itext.configuration" /> for information on how to configure
+ the document servlet for serving the documents with an .xls extension.
+ </para>
+ <para>
+ If you are having problems accessing the generated file under IE (especially
+ with https), make sure you are not using too strict restrictions in the browser
+ (see <ulink url="http://www.nwnetworks.com/iezones.htm/"/>), too strict security
+ constraint in web.xml or a combination of both.
+ </para>
+ </section>
+ <section id="excel.usage">
+ <title>Creating a simple workbook</title>
+ <para>
+ Basic usage of the worksheet support is simple; it is used like a
+ familiar <literal><h:dataTable></literal> and you can bind to a
+ <literal>List</literal>, <literal>Set</literal>,
+ <literal>Map</literal>, <literal>Array</literal> or
+ <literal>DataModel</literal>.
+ </para>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook xmlns:e="http://jboss.com/products/seam/excel">
+ <e:worksheet>
+ <e:cell column="0" row="0" value="Hello world!"/>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ That's not terribly useful, so lets have a look at a more common case:
+ </para>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook xmlns:e="http://jboss.com/products/seam/excel">
+ <e:worksheet value="#{data}" var="item">
+ <e:column>
+ <e:cell value="#{item.value}"/>
+ </e:column>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ First we have the top-level workbook element which serves as the
+ container and it doesn't have any attributes. The child-element
+ worksheet has two attributes; value="#{data}" is the
+ EL-binding to the data and var="item" is the name of the
+ current item. Nested inside the worksheet is a single column and within
+ it you see the cell which is the final bind to the data within the
+ currently iterated item
+ </para>
+ <para>
+ This is all you know to get started dumping your data to worksheets!
+ </para>
+
+ </section>
+ <section id="excel.workbook">
+ <title>Workbooks</title>
+ <para>
+ Workbooks are the top-level parents of worksheets and stylesheet links.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:workbook></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>type</literal>
+ —Defines which export module to be used. The
+ value is a string and can be either "jxl" or
+ "csv". The default is "jxl".
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>templateURI</literal>
+ —A template that should be used as a basis
+ for the workbook. The value is a string (URI).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>arrayGrowSize</literal>
+ —The amount of memory by which to increase
+ the amount of memory allocated to storing the
+ workbook data. For processeses reading many small
+ workbooks inside a WAS it might be necessary to
+ reduce the default size Default value is 1
+ megabyte. The value is a number (bytes).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>autoFilterDisabled</literal>
+ —Should autofiltering be disabled?. The
+ value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>cellValidationDisabled</literal>
+ —Shoule cell validation be ignored? The
+ value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>characterSet</literal>
+ —The character set. This is only used when
+ the spreadsheet is read, and has no effect when
+ the spreadsheet is written. The value is a string
+ (character set encoding).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>drawingsDisabled</literal>
+ —Should drawings be disabled? The value is a
+ boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>excelDisplayLanguage</literal>
+ —The language in which the generated file
+ will display. The value is a string (two character
+ ISO 3166 country code).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>excelRegionalSettings</literal>
+ —The regional settings for the generated
+ excel file. The value is a string (two character
+ ISO 3166 country code).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>formulaAdjust</literal>
+ —Should formulas be adjusted? The value is a
+ boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>gcDisabled</literal>
+ —Should garbage collection be disabled? The
+ value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ignoreBlanks</literal>
+ —Should blanks be ignored? The value is a
+ boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>initialFileSize</literal>
+ —The initial amount of memory allocated to
+ store the workbook data when reading a worksheet.
+ For processeses reading many small workbooks
+ inside a WAS it might be necessary to reduce the
+ default size Default value is 5 megabytes. The
+ value is a number (bytes).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>locale</literal>
+ —The locale used by JExcelApi to generate
+ the spreadsheet. Setting this value has no effect
+ on the language or region of the generated excel
+ file. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>mergedCellCheckingDisabled</literal>
+ —Should merged cell checking be disabled?
+ The value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>namesDisabled</literal>
+ —Should handling of names be disabled? The
+ value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>propertySets</literal>
+ —Should any property sets be enabled (such
+ as macros) to be copied along with the workbook?
+ Leaving this feature enabled will result in the
+ JXL process using more memory. The value is a
+ boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>rationalization</literal>
+ —Should the cell formats be rationalized
+ before writing out the sheet? The value is a
+ boolean. Default is true.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>supressWarnings</literal>
+ —Should warnings be suppressed?. Due to the
+ change in logging in version 2.4, this will now
+ set the warning behaviour across the JVM
+ (depending on the type of logger used). The value
+ is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>
+ temporaryFileDuringWriteDirectory
+ </literal>
+ —Used in conjunction with the
+ <literal>useTemporaryFileDuringWrite</literal>
+ setting to set the target directory for the
+ temporary files. This value can be NULL, in which
+ case the normal system default temporary directory
+ is used instead. The value is a string (the
+ directory to which temporary files should be
+ written).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>useTemporaryFileDuringWrite</literal>
+ —Should a temporary file is used during the
+ generation of the workbook. If not set, the
+ workbook will take place entirely in memory.
+ Setting this flag involves an assessment of the
+ trade-offs between memory usage and performance.
+ The value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>workbookProtected</literal>
+ —Should the workbook be protected? The value
+ is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>filename</literal>
+ —The filename to use for the download. The value
+ is a string. Please not that if you map the DocumentServlet
+ to some pattern, this file extension must also match.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>exportKey</literal>
+ —A key under which to store the resulting data
+ in a DocumentData object under the event scope. If used,
+ there is no redirection.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal><e:link/></literal>
+ —Zero or more stylesheet links (see
+ <xref linkend="excel.fontsandlayout.link" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal><e:worksheet/></literal>
+ —Zero or more worksheets (see
+ <xref linkend="excel.worksheet" />
+ ).
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:cell value="Hello World" row="0" column="0"/>
+ </e:worksheet>
+ <e:workbook>
+ ]]>
+ </programlisting>
+ <para>defines a workbook with a worksheet and a greeting at A1</para>
+
+ </section>
+ <section id="excel.worksheet">
+ <title>Worksheets</title>
+ <para>
+ Worksheets are the children of workbooks and the parent of columns and
+ worksheet commands They can also contain explicitly placed cells,
+ formulas, images and hyperlinks. They are the pages that make up the
+ workbook.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:worksheet></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>value</literal>
+ —An EL-expression to the backing data. The
+ value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>var</literal>
+ —The current row iterator variable name that
+ can later be referenced in cell value attributes.
+ The value is a string
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>name</literal>
+ —The name of the worksheet. The valus is a
+ string. Defaults to Sheet# where # is the
+ worksheet index. If the given worksheet name
+ exists, that sheet is selected. This can be used
+ for merging several data sets into a single
+ worksheet, just define the same name for them
+ (using
+ <literal>startRow</literal>
+ and
+ <literal>startCol</literal>
+ to make sure that they don't occupy the same
+ space).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>startRow</literal>
+ —Defines the starting row for the data. The
+ value is a number. Used for placing the data in
+ other places than the upper-left corner
+ (especially useful if having multiple data sets
+ for a single worksheet). The defaults is 0.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>startColumn</literal>
+ —Defines the starting column for the data.
+ The value is a number. Used for placing the data
+ in other places than the upper-left corner
+ (especially useful if having multiple data sets
+ for a single worksheet). The default is 0.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>automaticFormulaCalculation</literal>
+ —Should formulas be automatically
+ calculated? The value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>bottomMargin</literal>
+ —The bottom margin. The value is a number
+ (inches)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>copies</literal>
+ —The number of copies. The value is a
+ number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>defaultColumnWidth</literal>
+ —The default column width. The value is a
+ number (characters * 256).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>defaultRowHeight</literal>
+ —The default row height. The value is a
+ number (1/20ths of a point).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>displayZeroValues</literal>
+ —Should zero-values be displayed? The value
+ is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>fitHeight</literal>
+ —The number of pages vertically that this
+ sheet will be printed into. The value is a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>fitToPages</literal>
+ —Should printing be fit to pages? The value
+ is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>fitWidth</literal>
+ —The number of pages widthwise which this
+ sheet should be printed into. The value is a
+ number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>footerMargin</literal>
+ —The margin for any page footer. The value
+ is a number (inches).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>headerMargin</literal>
+ —The margin for any page headers. The value
+ is a number (inches).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>hidden</literal>
+ —Should the worksheet be hidden? The value
+ is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>horizontalCentre</literal>
+ —Should the worksheet be centered
+ horizontally? The value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>horizontalFreeze</literal>
+ —The row at which the pane is frozen
+ vertically. The value is a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>horizontalPrintResolution</literal>
+ —The horizontal print resolution. The value
+ is a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>leftMargin</literal>
+ —The left margin. The value is a number
+ (inches).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>normalMagnification</literal>
+ —The normal magnificaton factor (not zoom or
+ scale factor). The value is a number (percentage).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>orientation</literal>
+ —The paper orientation for printing this
+ sheet. The value is a string that can be either
+ "landscape" or "portrait".
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>pageBreakPreviewMagnification</literal>
+ —The page break preview magnificaton factor
+ (not zoom or scale factors). the value is a number
+ (percentage).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>pageBreakPreviewMode</literal>
+ —Show page in preview mode? The value is a
+ boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>pageStart</literal>
+ —The page number at which to commence
+ printing. The value is a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>paperSize</literal>
+ —The paper size to be used when printing
+ this sheet. The value is a string that can be one
+ of "a4", "a3", "letter", "legal" etc (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.PaperSize
+ </ulink>
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>password</literal>
+ —The password for this sheet. The value is a
+ string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>passwordHash</literal>
+ —The password hash - used only when copying
+ sheets. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>printGridLines</literal>
+ —Should grid lines be printed? The value is
+ a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>printHeaders</literal>
+ —Should headers be printed? The value is a
+ boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>sheetProtected</literal>
+ —Should the sheet be protected (read-only)?
+ The value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>recalculateFormulasBeforeSave</literal>
+ —Should the formulas be re-calculated when
+ the sheet is saved? The value is a boolean. false
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>rightMargin</literal>
+ —The right margin. The value is a number
+ (inches).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>scaleFactor</literal>
+ —The scale factor for this sheet to be used
+ when printing. The value is a number (percent).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>selected</literal>
+ —Should the sheet be selected when the
+ workbook opens? The value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>showGridLines</literal>
+ —Should gridlines be shown? The value is a
+ boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>topMargin</literal>
+ —The top margin. The value is a number
+ (inches).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>verticalCentre</literal>
+ —Center verically? The value is a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>verticalFreeze</literal>
+ —The row at which the pane is frozen
+ vertically. The value is a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>verticalPrintResolution</literal>
+ —The vertical print resolution. The value is
+ a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>zoomFactor</literal>
+ —T zoom factor. Do not confuse zoom factor
+ (which relates to the on screen view) with scale
+ factor (which refers to the scale factor when
+ printing). The value is a number (percentage.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal><e:printArea/></literal>
+ —Zero or more print area definitions (see
+ <xref linkend="excel.printareatitles" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal><e:printTitle/></literal>
+ —Zero or more print title definitions (see
+ <xref linkend="excel.printareatitles" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal><e:headerFooter/></literal>
+ —Zero or more header/footer definitions
+ ((see
+ <xref linkend="excel.headersfooters" />
+ )).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Zero or more worksheet commands (see
+ <xref linkend="excel.worksheetcommands" />
+ ).
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>header</literal>—Contents that will
+ be placed at the top of the data block, above the
+ column headers (if any)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>footer</literal>—Contents that will
+ be placed at the bottom of the data block, below the
+ column footers (if any)
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet name="foo" startColumn="1" startRow="1">
+ <e:column value="#{personList}" var="person">
+ <f:facet name="header">
+ <e:cell value="Last name"/>
+ </f:facet>
+ <e:cell value="#{person.lastName}"/>
+ </e:column>
+ </e:worksheet>
+ <e:workbook>
+ ]]>
+ </programlisting>
+ <para>defines a worksheet with the name "foo", starting at B2.</para>
+ </section>
+ <section id="excel.columns">
+ <title>Columns</title>
+ <para>
+ Columns are the children of worksheets and the parents of cells,
+ images, formulas and hyperlinks. They are the structure that control
+ the iteration of the worksheet data. See <xref linkend="excel.fontsandlayout.columnsettings"/>
+ for formatting.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:column></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal><e:cell/></literal>
+ —Zero or more cells (see
+ <xref linkend="excel.cells" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal><e:formula/></literal>
+ —Zero or more formulas (see
+ <xref linkend="excel.formulas" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal><e:image/></literal>
+ —Zero or more images (see
+ <xref linkend="excel.images" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal><e:hyperLink/></literal>
+ —Zero or more hyperlinks (see
+ <xref linkend="excel.hyperlinks" />
+ ).
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>header</literal>
+ —This facet can/will contain one
+ <literal><e:cell></literal>
+ ,
+ <literal><e:formula></literal>
+ ,
+ <literal><e:image></literal>
+ or
+ <literal><e:hyperLink></literal>
+ that will be used as header for the column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>footer</literal>
+ —This facet can/will contain one
+ <literal><e:cell></literal>
+ ,
+ <literal><e:formula></literal>
+ ,
+ <literal><e:image></literal>
+ or
+ <literal><e:hyperLink></literal>
+ that will be used as footer for the column.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:column value="#{personList}" var="person">
+ <f:facet name="header">
+ <e:cell value="Last name"/>
+ </f:facet>
+ <e:cell value="#{person.lastName}"/>
+ </e:column>
+ </e:worksheet>
+ <e:workbook>
+ ]]>
+ </programlisting>
+ <para>defines a column with a header and an iterated output</para>
+
+ </section>
+ <section id="excel.cells">
+ <title>Cells</title>
+ <para>
+ Cells are nested within columns (for iteration) or inside worksheets
+ (for direct placement using the <literal>column</literal> and
+ <literal>row</literal> attributes) and are responsible for outputting
+ the value (usually though en EL-expression involving the
+ <literal>var</literal>-attribute of the datatable. See
+ <xref linkend="excel.fontsandlayout.cells"/>
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:cell></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>column</literal>
+ —The column where to place the cell. The
+ default is the internal counter. The value is a
+ number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>row</literal>
+ —The row where to place the cell. The
+ default is the internal counter. The value is
+ number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>value</literal>
+ —The value to display. Usually an
+ EL-expression referencing the var-attribute of the
+ containing datatable. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>comment</literal>
+ —A comment to add to the cell. The value is
+ a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>commentHeight</literal>
+ —The height of the comment. The value is a
+ number (in pixels).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>commentWidth</literal>
+ —A width of the comment. The value is a
+ number (in pixels).
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal><e:font/></literal>
+ —Zero or more font definitions (see
+ <xref linkend="excel.cells.fonts" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal><e:border/></literal>
+ —Zero or more border definitions (see
+ <xref linkend="excel.cells.borders" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal><e:background/></literal>
+ —Zero or more background definitions (see
+ <xref linkend="excel.cells.backgrounds" />
+ ).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Zero or more validation conditions (see
+ <xref linkend="excel.cells.validation" />
+ ).
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:column value="#{personList}" var="person">
+ <f:facet name="header">
+ <e:cell value="Last name"/>
+ </f:facet>
+ <e:cell value="#{person.lastName}"/>
+ </e:column>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>defines a column with a header and an iterated output</para>
+ <section id="excel.cells.validation">
+ <title>Validation</title>
+ <para>
+ Validations are nested inside cells, formulas or cell templates.
+ They add constrains for the cell data.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:numericValidation></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>value</literal>
+ —The limit (or lower limit where
+ applicable) of the validation. The value is a
+ number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>value2</literal>
+ —The upper limit (where applicable) of
+ the validation. The value is a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>condition</literal>
+ —The validation condition. The value is a
+ string.
+ <itemizedlist>
<listitem>
- <para>
- "equal" - requires the cell value to
- match the one defined in the
+ <para>
+ "equal" - requires the cell value to
+ match the one defined in the
value-attribute
- </para>
- </listitem>
+ </para>
+ </listitem>
<listitem>
- <para>
+ <para>
"greater_equal" - requires the cell
value to be greater than or equal to
the value defined in the
value-attribute
- </para>
- </listitem>
+ </para>
+ </listitem>
<listitem>
- <para>
+ <para>
"less_equal" - requires the cell value
to be less than or equal to the value
defined in the value-attribute
- </para>
- </listitem>
+ </para>
+ </listitem>
<listitem>
<para>
"less_than" - requires the cell value
to be less than the value defined in
the value-attribute
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
"not_equal" - requires the cell value
to not match the one defined in the
value-attribute
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
"between" - requires the cell value to
be between the values defined in the
value- and value2 attributes
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
"not_between" - requires the cell
@@ -1165,2037 +1165,2037 @@
defined in the value- and value2
attributes
</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:column value="#{personList}" var="person">
- <e:cell value="#{person.age">
- <e:numericValidation condition="between" value="4"
- value2="18"/>
- </e:cell>
- </e:column>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- adds numeric validation to a cell specifying that the value must be
- between 4 and 18.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:rangeValidation></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>startColumn</literal>
- —The starting column of the range of
- values to validate against. The value is a
- number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>startRow</literal>
- —The starting row of the range of values
- to validate against. The value is a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>endColumn</literal>
- —The ending column of the range of values
- to validate against. The value is a number.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>endRow</literal>
- —The ending row of the range of values to
- validate against. The value is a number.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:column value="#{personList}" var="person">
- <e:cell value="#{person.position">
- <e:rangeValidation startColumn="0" startRow="0"
- endColumn="0" endRow="10"/>
- </e:cell>
- </e:column>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- adds validation to a cell specifying that the value must be in the
- values specified in range A1:A10.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:listValidation></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>
- Zero or more list validation items.
- </literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- e:listValidation is a just a container for holding multiple
- e:listValidationItem tags.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:listValidationItem></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>value</literal>
- —A values to validate against.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:column value="#{personList}" var="person">
- <e:cell value="#{person.position">
- <e:listValidation>
- <e:listValidationItem value="manager"/>
- <e:listValidationItem value="employee"/>
- </e:listValidation>
- </e:cell>
- </e:column>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- adds validation to a cell specifying that the value must be
- "manager" or "employee".
- </para>
- </section>
- <section id="excel.cells.formatmasks">
- <title>Format masks</title>
- <para>
- Format masks are defined in the mask attribute in cell templates,
- cells or formulas. <emphasis>Note that when using templates, the
- format mask must be placed in the first template</emphasis>
- to be cascaded since the constructor hierarchy in
- <literal>JExcelAPI</literal> used for copying cell formats makes
- it hard to change the format mask at a later stage. There are two
- types of format masks, one for numbers and one for dates
- </para>
- <section id="excel.formatmasks.numbers">
- <title>Number masks</title>
- <para>
- When encountering a format mask, first it is checked if it is in
- internal form, e.g "format1", "accounting_float" and so on (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/writ...">
- jxl.write.NumberFormats
- </ulink>
- ).
- </para>
- <para>
- if the mask is not in the list, it is treated as a custom mask
- (see
- <ulink
- url="http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html">
- java.text.DecimalFormat
- </ulink>
- ). e.g "0.00" and automatically converted to the closest match.
- </para>
- </section>
- <section id="excel.formatmasks.dates">
- <title>Date masks</title>
- <para>
- When encountering a format mask, first it is checked if it is in
- internal form, e.g "format1", "format2" and so on (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/writ...">
- jxl.write.DecimalFormats
- </ulink>
- ).
- </para>
- <para>
- if the mask is not in the list, it is treated as a custom mask
- (see
- <ulink
- url="http://java.sun.com/javase/6/docs/api/java/text/DateFormat.html">
- java.text.DateFormat
- </ulink>
- )., e.g "dd.MM.yyyy" and automatically converted to the closest
- match.
- </para>
- </section>
- </section>
- </section>
- <section id="excel.formulas">
- <title>Formulas</title>
- <para>
- Formulas are nested within columns (for iteration) or inside worksheets
- (for direct placement using the <literal>column</literal> and
- <literal>row</literal> attributes) and add calculations or functions to
- ranges of cells. They are essentially cells, see
- <xref linkend="excel.cells" /> for available attributes. Note that they
- can apply templates and have own font definitions etc just as normal
- cells.
- </para>
- <para>
- The formula of the cell in placed in the <literal>value</literal>
- -attribute as a normal &excel; notation. Note that when doing
- cross-sheet formulas, the worksheets must exist before referencing
- a formula against them. The value is a string.
- </para>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:cellTemplate name="fooTemplate">
- <e:font color="red"/>
- </e:cellTemplate>
- <e:worksheet name="fooSheet">
- <e:cell column="0" row="0" value="1"/>
- </e:worksheet>
- <e:worksheet name="barSheet">
- <e:cell column="0" row="0" value="2"/>
- <e:formula column="0" row="1"
- value="fooSheet!A1+barSheet1!A1"
- templates="fooTemplate">
- <e:font fontSize="12"/>
- </e:formula>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- defines an formula in B2 summing cells A1 in worksheets FooSheet and
- BarSheet
- </para>
- </section>
- <section id="excel.images">
- <title>Images</title>
- <para>
- Images are nested within columns (for iteration) or inside worksheets
- (for direct placement using the <literal>startColumn/startRow</literal>
- and <literal>rowSpan/columnSpan</literal> attributes). The spans are
- optional and if omitted, the image will be inserted without resizing.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:image></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>startColumn</literal>
- —The starting column of the image. The
- default is the internal counter. The value is a
- number. Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>startRow</literal>
- —The starting row of the image. The default
- is the internal counter. The value is a number.
- Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>columnSpan</literal>
- —The column span of the image. The default
- is one resulting in the default width of the
- image. The value is a float.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>rowSpan</literal>
- —The row span of the image. The default is
- the one resulting in the default height of the
- image. The value is a float.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>URI</literal>
- —The URI to the image. The value is a
- string.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:image startRow="0" startColumn="0" rowSpan="4"
- columnSpan="4" URI="http://foo.org/logo.jpg"/>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>defines an image in A1:E5 based on the given data</para>
-
- </section>
- <section id="excel.hyperlinks">
- <title>Hyperlinks</title>
- <para>
- Hyperlinks are nested within columns (for iteration) or inside
- worksheets (for direct placement using the
- <literal>startColumn/startRow</literal> and
- <literal>endColumn/endRow</literal> attributes). They add link
- navigation to URIs
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:hyperlink></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>startColumn</literal>
- —The starting column of the hyperlink. The
- default is the internal counter. The value is a
- number. Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>startRow</literal>
- —The starting row of the hyperlink. The
- default is the internal counter. The value is a
- number. Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>endColumn</literal>
- —The ending column of the hyperlink. The
- default is the internal counter. The value is a
- number. Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>endRow</literal>
- —The ending row of the hyperlink. The
- default is the internal counter. The value is a
- number. Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>URL</literal>
- —The URL to link. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>description</literal>
- —The description of the link. The value is a
- string.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:hyperLink startRow="0" startColumn="0" endRow="4"
- endColumn="4" URL="http://seamframework.org"
- description="The Seam Framework"/>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- defines a described hyperlink pointing to SFWK in the area A1:E5
- </para>
- </section>
- <section id="excel.headersfooters">
- <title>Headers and footers</title>
- <para>
- Headers and footers are childrens of worksheets and contain facets which
- in turn contains a string with commands that are parsed.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:header></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>left</literal>
- —The contents of the left header/footer
- part.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>center</literal>
- —The contents of the center header/footer
- part.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>right</literal>
- —The contents of the right header/footer
- part.
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:footer></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>left</literal>
- —The contents of the left header/footer
- part.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>center</literal>
- —The contents of the center header/footer
- part.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>right</literal>
- —The contents of the right header/footer
- part.
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- The content of the facets is a string that can contain various #-delimited
- commands as follows:
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>#date#</para>
- </entry>
- <entry valign="top">
- <para>Inserts the current date</para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#page_number#</para>
- </entry>
- <entry valign="top">
- <para>Inserts the current page number</para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#time#</para>
- </entry>
- <entry valign="top">
- <para>Inserts the current time</para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#total_pages#</para>
- </entry>
- <entry valign="top">
- <para>Inserts the total page count</para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#worksheet_name#</para>
- </entry>
- <entry valign="top">
- <para>Inserts the worksheet name</para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#workbook_name#</para>
- </entry>
- <entry valign="top">
- <para>Inserts the workbook name</para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#bold#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles bold font, use another #bold# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#italics#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles italic font, use another #italic# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#underline#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles underlining, use another #underline# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#double_underline#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles double underlining, use another #double_underline# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#outline#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles outlined font, use another #outline# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#shadow#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles shadowed font, use another #shadow# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#strikethrough#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles strikethrough font, use another #strikethrough# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#subscript#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles subscripted font, use another #subscript# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#superscript#</para>
- </entry>
- <entry valign="top">
- <para>
- Toggles superscript font, use another #superscript# to
- turn it off
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#font_name#</para>
- </entry>
- <entry valign="top">
- <para>
- Sets font name, used like #font_name=Verdana"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>#font_size#</para>
- </entry>
- <entry valign="top">
- <para>
- Sets font size, use like #font_size=12#
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:header>
- <f:facet name="left">
- This document was made on #date# and has #total_pages# pages
- </f:facet>
- <f:facet name="right">
- #time#
- </f:facet>
- </e:header>
- <e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- </section>
- <section id="excel.printareatitles">
- <title>Print areas and titles</title>
- <para>
- Print areas and titles childrens of worksheets and worksheet templates
- and provide... print areas and titles.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:printArea></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>firstColumn</literal>
- —The column of the top-left corner of the
- area. The parameter is a number. Note that the
- value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>firstRow</literal>
- —The row of the top-left corner of the area.
- The parameter is a number. Note that the value is
- 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>lastColumn</literal>
- —The column of the bottom-right corner of
- the area. The parameter is a number. Note that the
- value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>lastRow</literal>
- —The row of the bottom-right corner of the
- area. The parameter is a number. Note that the
- value is 0-based.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:printTitles firstRow="0" firstColumn="0"
- lastRow="0" lastColumn="9"/>
- <e:printArea firstRow="1" firstColumn="0"
- lastRow="9" lastColumn="9"/>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- defines a print title between A1:A10 and a print area between B2:J10.
- </para>
- </section>
- <section id="excel.worksheetcommands">
- <title>Worksheet Commands</title>
- <para>
- Worksheet commands are children of workbooks and are usually executed
- only once.
- </para>
- <section id="excel.worksheetcommands.grouping">
- <title>Grouping</title>
- <para>Provides grouping of columns and rows.</para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:groupRows></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>startRow</literal>
- —The row to start the grouping at. The
- value is a number. Note that the value is
- 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>endRow</literal>
- —The row to end the grouping at. The
- value is a number. Note that the value is
- 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>collapse</literal>
- —Should the grouping be collapsed
- initially? The value is a boolean.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elements</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:groupColumns></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>startColumn</literal>
- —The column to start the grouping at. The
- value is a number. Note that the value is
- 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>endColumn</literal>
- —The column to end the grouping at. The
- value is a number. Note that the value is
- 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>collapse</literal>
- —Should the grouping be collapsed
- initially? The value is a boolean.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elements</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:groupRows startRow="4" endRow="9" collapse="true"/>
- <e:groupColumns startColumn="0" endColumn="9" collapse="false"/>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>
- groups rows 5 trough 10 and columns 5 through 10 so that the rows
- are initially collapsed (but not the columns).
- </para>
-
- </section>
- <section id="excel.worksheetcommands.pagebreaks">
- <title>Page breaks</title>
- <para>Provides page breaks</para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:rowPageBreak></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>row</literal>
- —The row to break at. The value is a
- number. Note that the value is 0-based.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elements</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:rowPageBreak row="4"/>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>breaks page at row 5.</para>
- </section>
- <section id="excel.worksheetcommands.merging">
- <title>Merging</title>
- <para>Provides cell merging</para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:mergeCells></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>startRow</literal>
- —The row to start the merging from. The
- value is a number. Note that the value is
- 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>startColumn</literal>
- —The column to start the merging from.
- The value is a number. Note that the value is
- 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>endRow</literal>
- —The row to end the merging at. The value
- is a number. Note that the value is 0-based.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>endColumn</literal>
- —The column to end the merging at. The
- value is a number. Note that the value is
- 0-based.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elements</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:worksheet>
- <e:mergeCells startRow="0" startColumn="0" endRow="9" endColumn="9"/>
- </e:worksheet>
- </e:workbook>
- ]]>
- </programlisting>
- <para>merges the cells in the range A1:J10</para>
- </section>
- </section>
- <section id="excel.datatableexporter">
- <title>Datatable exporter</title>
- <para>
- If you prefer to export an existing JSF datatable instead of writing a
- dedicated XHTML document, this can also be achieved easily by executing
- the <literal>org.jboss.seam.excel.excelExporter.export</literal>
- component, passing in the id of the datatable as an Seam EL parameter.
- Consider you have a data table
- </para>
- <programlisting role="XML">
- <![CDATA[
- <h:form id="theForm">
- <h:dataTable id="theDataTable" value="#{personList.personList}"
- var="person">
- ...
- </h:dataTable>
- </h:form>
- ]]>
- </programlisting>
- <para>
- that you want to view as an
- <trademark class="registered">Microsoft</trademark>
- <trademark class="registered">Excel</trademark>
- spreadsheet. Place a
- </para>
- <programlisting role="XML">
- <![CDATA[
- <h:commandLink
- value="Export"
- action="#{excelExporter.export('theForm:theDataTable')}"
- />
- ]]>
- </programlisting>
- <para>
- in the form and you're done. You can of course execute the exporter
- with a button, s:link or other preferred method. There are also plans
- for a dedicated export tag that can be placed inside the datatable tag
- so you won't have to refer to the datatable by ID.
- </para>
- <para>
- See <xref linkend="excel.fontsandlayout"/> for formatting.
- </para>
- </section>
- <section id="excel.fontsandlayout">
- <title>Fonts and layout</title>
- <para>
- Controlling how the output look is done with a combination of CSSish
- style attributes and tag attributes. The most common ones (fonts, borders,
- backgrounds etc) are CSS and some more general settings are in tag attributes.
- </para>
- <para>
- The CSS attributes cascade down from parent to children and within one tag
- cascades over the CSS classes referenced in the <literal>styleClass</literal>
- attributes and finally over the CSS attributes defined in the
- <literal>style</literal>attribute. You can place them pretty much anywhere but
- e.g. placing a column width setting in a cell nested within that column makes
- little sense.
- </para>
- <section id="excel.fontsandlayout.link">
- <title>Stylesheet links</title>
- <para>
- External stylesheets are references with the e:link tag. They are placed as
- children of the workbook.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><e:link></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>URL</literal>
- —The URL to the stylesheet
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <programlisting role="XML">
- <![CDATA[
- <e:workbook>
- <e:link URL="/css/excel.css"/>
- </e:workbook>
- ]]>
- </programlisting>
- <para>References a stylesheet that can be found at /css/excel.css</para>
- </section>
-
- <section id="excel.fontsandlayout.fonts">
- <title>Fonts</title>
- <para>
- This group of XLS-CSS attributes define a font and its attributes
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>xls-font-family</para>
- </entry>
- <entry valign="top">
- <para>
- The name of the font. Make sure that it's one that is
- supported by your system.
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-font-size</para>
- </entry>
- <entry valign="top">
- <para>The font size. Use a plain number</para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-font-color</para>
- </entry>
- <entry valign="top">
- <para>
- The color of the font (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.Colour
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-font-bold</para>
- </entry>
- <entry valign="top">
- <para>
- Should the font be bold? Valid values are "true" and
- "false"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-font-italic</para>
- </entry>
- <entry valign="top">
- <para>
- Should the font be italic? Valid values are "true"
- and "false"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-font-script-style</para>
- </entry>
- <entry valign="top">
- <para>
- The script style of the font (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.ScriptStyle
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-font-underline-style</para>
- </entry>
- <entry valign="top">
- <para>
- The underline style of the font (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.UnderlineStyle
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-font-struck-out</para>
- </entry>
- <entry valign="top">
- <para>
- Should the font be struck out? Valid values are
- "true" and "false"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-font</para>
- </entry>
- <entry valign="top">
- <para>
- A shorthand notation for setting all the values. Place
- the font name last and use tick marks for fonts with
- spaces in them, e.g. 'Times New Roman'. Use "italic", "bold"
- and "struckout".
- </para>
- <para>
- Example style="xls-font: red bold italic 22 Verdana"
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="excel.fontsandlayout.borders">
- <title>Borders</title>
- <para>
- This group of XLS-CSS attributes define the borders of the cell
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>xls-border-left-color</para>
- </entry>
- <entry valign="top">
- <para>
- The border color of the left edge of the cell
- (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.Colour
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-left-line-style</para>
- </entry>
- <entry valign="top">
- <para>
- The border line style of the left edge of the cell (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.LineStyle
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-left</para>
- </entry>
- <entry valign="top">
- <para>
- A shorthand for setting color and line style of the left edge
- of the cell, e.g style="xls-border-left: red thick"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-top-color</para>
- </entry>
- <entry valign="top">
- <para>
- The border color of the top edge of the cell
- (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.Colour
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-top-line-style</para>
- </entry>
- <entry valign="top">
- <para>
- The border line style of the top edge of the cell (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.LineStyle
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-top</para>
- </entry>
- <entry valign="top">
- <para>
- A shorthand for setting color and line style of the top edge
- of the cell, e.g style="xls-border-left: red thick"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-right-color</para>
- </entry>
- <entry valign="top">
- <para>
- The border color of the right edge of the cell
- (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.Colour
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-right-line-style</para>
- </entry>
- <entry valign="top">
- <para>
- The border line style of the right edge of the cell (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.LineStyle
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-right</para>
- </entry>
- <entry valign="top">
- <para>
- A shorthand for setting color and line style of the right edge
- of the cell, e.g style="xls-border-right: red thick"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-bottom-color</para>
- </entry>
- <entry valign="top">
- <para>
- The border color of the bottom edge of the cell
- (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.Colour
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-bottom-line-style</para>
- </entry>
- <entry valign="top">
- <para>
- The border line style of the bottom edge of the cell (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.LineStyle
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border-bottom</para>
- </entry>
- <entry valign="top">
- <para>
- A shorthand for setting color and line style of the bottom edge
- of the cell, e.g style="xls-border-bottom: red thick"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-border</para>
- </entry>
- <entry valign="top">
- <para>
- A shorthand for setting color and line style all edges
- of the cell, e.g style="xls-border: red thick"
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="excel.fontsandlayout.background">
- <title>Background</title>
- <para>
- This group of XLS-CSS attributes define the background of the cell
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>xls-background-color</para>
- </entry>
- <entry valign="top">
- <para>
- The color of the background (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.LineStyle
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-background-pattern</para>
- </entry>
- <entry valign="top">
- <para>
- The pattern of the background (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.Pattern
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-background</para>
- </entry>
- <entry valign="top">
- <para>
- A shorthand for setting the background color and pattern. See above for rules.
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="excel.fontsandlayout.columnsettings">
- <title>Column settings</title>
- <para>
- This group of XLS-CSS attributes define the column widths etc.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>xls-column-width</para>
- </entry>
- <entry valign="top">
- <para>
- The width of the column. Use largeish values (~5000) to start with.
- Used by the e:column in xhtml mode.
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-column-widths</para>
- </entry>
- <entry valign="top">
- <para>
- The width of the column. Use largeish values (~5000) to start with.
- Used by the excel exporter, placed in the datatable style attribute.
- Use numerical values or * to bypass a column.
- </para>
- <para>
- Example style="xls-column-widths: 5000, 5000, *, 10000"
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-column-autosize</para>
- </entry>
- <entry valign="top">
- <para>
- Should an attempt be made to autosize the column? Valid values
- are "true" and "false".
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-column-hidden</para>
- </entry>
- <entry valign="top">
- <para>
- Should the column be hidden? Valid values are "true" and "false".
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="excel.fontsandlayout.cellsettings">
- <title>Cell settings</title>
- <para>
- This group of XLS-CSS attributes define the cell properties
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>xls-alignment</para>
- </entry>
- <entry valign="top">
- <para>
- The alignment of the cell value (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.Alignment
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-force-type</para>
- </entry>
- <entry valign="top">
- <para>
- The forced type of the cell data. The value is a string that can be one
- of "general", "number", "text", "date", "formula" or "bool". The type
- is automatically detected so there is rarely any use for this attribute.
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-format-mask</para>
- </entry>
- <entry valign="top">
- <para>
- The format mask of the cell, see <xref linkend="excel.cells.formatmasks" />
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-indentation</para>
- </entry>
- <entry valign="top">
- <para>
- The indentation of the cell value. The value is numeric.
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-locked</para>
- </entry>
- <entry valign="top">
- <para>
- Should the cell be locked. Use with workbook level locked.
- Valid values are "true" and "false".
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-orientation</para>
- </entry>
- <entry valign="top">
- <para>
- The orientation of the cell value (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.Orientation
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-vertical-alignment</para>
- </entry>
- <entry valign="top">
- <para>
- The vertical alignment of the cell value (see
- <ulink
- url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
- jxl.format.VerticalAlignment
- </ulink>
- ).
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-shrink-to-fit</para>
- </entry>
- <entry valign="top">
- <para>
- Should the cell values shrink to fit?
- Valid values are "true" and "false".
- </para>
- </entry>
- </row>
- <row>
- <entry valign="top">
- <para>xls-wrap</para>
- </entry>
- <entry valign="top">
- <para>
- Should the cell wrap with newlines?
- Valid values are "true" and "false".
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="excel.fontsandlayout.datatableexporter">
- <title>The datatable exporter</title>
- <para>
- The datatable exporter uses the same xls-css attributes as the xhtml
- document with the exception that column widths are defined with the
- <literal>xls-column-widths</literal> attribute on the datatable (since
- the UIColumn doesn't support the style or styleClass attributes).
- </para>
- </section>
- <section id="excel.fontsandlayout.examples">
- <title>Layout examples</title>
- <para>
- TODO
- </para>
- </section>
- <section id="excel.fontsandlayout.limitations">
- <title>Limitations</title>
- <para>
- In the current version there are some known limitations regarding
- CSS support
- </para>
- <itemizedlist>
- <listitem>
- <para>
- When using .xhtml documents, stylesheets must be referenced
- through the <literal><e:link> tag</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- When using the datatable exporter, CSS must be entered through
- style-attributes, external stylesheets are not supported
- </para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
- <section id="excel.links">
- <title>Links and further documentation</title>
- <para>
- The core of the &excel; functionality is based on the excellent
- JExcelAPI library which can be found on
- http://jexcelapi.sourceforge.net/ and most features and possible
- limitations are inherited from here.
- </para>
- <para>
- If you use the forum or mailing list, please remember that they don't
- know anything about Seam and the usage of their library, any issues are
- best reported in the JBoss Seam JIRA under the "excel" module.
- </para>
- </section>
-</chapter>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:column value="#{personList}" var="person">
+ <e:cell value="#{person.age">
+ <e:numericValidation condition="between" value="4"
+ value2="18"/>
+ </e:cell>
+ </e:column>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ adds numeric validation to a cell specifying that the value must be
+ between 4 and 18.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:rangeValidation></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>startColumn</literal>
+ —The starting column of the range of
+ values to validate against. The value is a
+ number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>startRow</literal>
+ —The starting row of the range of values
+ to validate against. The value is a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>endColumn</literal>
+ —The ending column of the range of values
+ to validate against. The value is a number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>endRow</literal>
+ —The ending row of the range of values to
+ validate against. The value is a number.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:column value="#{personList}" var="person">
+ <e:cell value="#{person.position">
+ <e:rangeValidation startColumn="0" startRow="0"
+ endColumn="0" endRow="10"/>
+ </e:cell>
+ </e:column>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ adds validation to a cell specifying that the value must be in the
+ values specified in range A1:A10.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:listValidation></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>
+ Zero or more list validation items.
+ </literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ e:listValidation is a just a container for holding multiple
+ e:listValidationItem tags.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:listValidationItem></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>value</literal>
+ —A values to validate against.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:column value="#{personList}" var="person">
+ <e:cell value="#{person.position">
+ <e:listValidation>
+ <e:listValidationItem value="manager"/>
+ <e:listValidationItem value="employee"/>
+ </e:listValidation>
+ </e:cell>
+ </e:column>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ adds validation to a cell specifying that the value must be
+ "manager" or "employee".
+ </para>
+ </section>
+ <section id="excel.cells.formatmasks">
+ <title>Format masks</title>
+ <para>
+ Format masks are defined in the mask attribute in cell templates,
+ cells or formulas. <emphasis>Note that when using templates, the
+ format mask must be placed in the first template</emphasis>
+ to be cascaded since the constructor hierarchy in
+ <literal>JExcelAPI</literal> used for copying cell formats makes
+ it hard to change the format mask at a later stage. There are two
+ types of format masks, one for numbers and one for dates
+ </para>
+ <section id="excel.formatmasks.numbers">
+ <title>Number masks</title>
+ <para>
+ When encountering a format mask, first it is checked if it is in
+ internal form, e.g "format1", "accounting_float" and so on (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/writ...">
+ jxl.write.NumberFormats
+ </ulink>
+ ).
+ </para>
+ <para>
+ if the mask is not in the list, it is treated as a custom mask
+ (see
+ <ulink
+ url="http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html">
+ java.text.DecimalFormat
+ </ulink>
+ ). e.g "0.00" and automatically converted to the closest match.
+ </para>
+ </section>
+ <section id="excel.formatmasks.dates">
+ <title>Date masks</title>
+ <para>
+ When encountering a format mask, first it is checked if it is in
+ internal form, e.g "format1", "format2" and so on (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/writ...">
+ jxl.write.DecimalFormats
+ </ulink>
+ ).
+ </para>
+ <para>
+ if the mask is not in the list, it is treated as a custom mask
+ (see
+ <ulink
+ url="http://java.sun.com/javase/6/docs/api/java/text/DateFormat.html">
+ java.text.DateFormat
+ </ulink>
+ )., e.g "dd.MM.yyyy" and automatically converted to the closest
+ match.
+ </para>
+ </section>
+ </section>
+ </section>
+ <section id="excel.formulas">
+ <title>Formulas</title>
+ <para>
+ Formulas are nested within columns (for iteration) or inside worksheets
+ (for direct placement using the <literal>column</literal> and
+ <literal>row</literal> attributes) and add calculations or functions to
+ ranges of cells. They are essentially cells, see
+ <xref linkend="excel.cells" /> for available attributes. Note that they
+ can apply templates and have own font definitions etc just as normal
+ cells.
+ </para>
+ <para>
+ The formula of the cell in placed in the <literal>value</literal>
+ -attribute as a normal &excel; notation. Note that when doing
+ cross-sheet formulas, the worksheets must exist before referencing
+ a formula against them. The value is a string.
+ </para>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:cellTemplate name="fooTemplate">
+ <e:font color="red"/>
+ </e:cellTemplate>
+ <e:worksheet name="fooSheet">
+ <e:cell column="0" row="0" value="1"/>
+ </e:worksheet>
+ <e:worksheet name="barSheet">
+ <e:cell column="0" row="0" value="2"/>
+ <e:formula column="0" row="1"
+ value="fooSheet!A1+barSheet1!A1"
+ templates="fooTemplate">
+ <e:font fontSize="12"/>
+ </e:formula>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ defines an formula in B2 summing cells A1 in worksheets FooSheet and
+ BarSheet
+ </para>
+ </section>
+ <section id="excel.images">
+ <title>Images</title>
+ <para>
+ Images are nested within columns (for iteration) or inside worksheets
+ (for direct placement using the <literal>startColumn/startRow</literal>
+ and <literal>rowSpan/columnSpan</literal> attributes). The spans are
+ optional and if omitted, the image will be inserted without resizing.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:image></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>startColumn</literal>
+ —The starting column of the image. The
+ default is the internal counter. The value is a
+ number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>startRow</literal>
+ —The starting row of the image. The default
+ is the internal counter. The value is a number.
+ Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>columnSpan</literal>
+ —The column span of the image. The default
+ is one resulting in the default width of the
+ image. The value is a float.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>rowSpan</literal>
+ —The row span of the image. The default is
+ the one resulting in the default height of the
+ image. The value is a float.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>URI</literal>
+ —The URI to the image. The value is a
+ string.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:image startRow="0" startColumn="0" rowSpan="4"
+ columnSpan="4" URI="http://foo.org/logo.jpg"/>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>defines an image in A1:E5 based on the given data</para>
+
+ </section>
+ <section id="excel.hyperlinks">
+ <title>Hyperlinks</title>
+ <para>
+ Hyperlinks are nested within columns (for iteration) or inside
+ worksheets (for direct placement using the
+ <literal>startColumn/startRow</literal> and
+ <literal>endColumn/endRow</literal> attributes). They add link
+ navigation to URIs
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:hyperlink></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>startColumn</literal>
+ —The starting column of the hyperlink. The
+ default is the internal counter. The value is a
+ number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>startRow</literal>
+ —The starting row of the hyperlink. The
+ default is the internal counter. The value is a
+ number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>endColumn</literal>
+ —The ending column of the hyperlink. The
+ default is the internal counter. The value is a
+ number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>endRow</literal>
+ —The ending row of the hyperlink. The
+ default is the internal counter. The value is a
+ number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>URL</literal>
+ —The URL to link. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>description</literal>
+ —The description of the link. The value is a
+ string.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:hyperLink startRow="0" startColumn="0" endRow="4"
+ endColumn="4" URL="http://seamframework.org"
+ description="The Seam Framework"/>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ defines a described hyperlink pointing to SFWK in the area A1:E5
+ </para>
+ </section>
+ <section id="excel.headersfooters">
+ <title>Headers and footers</title>
+ <para>
+ Headers and footers are childrens of worksheets and contain facets which
+ in turn contains a string with commands that are parsed.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:header></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>left</literal>
+ —The contents of the left header/footer
+ part.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>center</literal>
+ —The contents of the center header/footer
+ part.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>right</literal>
+ —The contents of the right header/footer
+ part.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:footer></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>left</literal>
+ —The contents of the left header/footer
+ part.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>center</literal>
+ —The contents of the center header/footer
+ part.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>right</literal>
+ —The contents of the right header/footer
+ part.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ The content of the facets is a string that can contain various #-delimited
+ commands as follows:
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>#date#</para>
+ </entry>
+ <entry valign="top">
+ <para>Inserts the current date</para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#page_number#</para>
+ </entry>
+ <entry valign="top">
+ <para>Inserts the current page number</para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#time#</para>
+ </entry>
+ <entry valign="top">
+ <para>Inserts the current time</para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#total_pages#</para>
+ </entry>
+ <entry valign="top">
+ <para>Inserts the total page count</para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#worksheet_name#</para>
+ </entry>
+ <entry valign="top">
+ <para>Inserts the worksheet name</para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#workbook_name#</para>
+ </entry>
+ <entry valign="top">
+ <para>Inserts the workbook name</para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#bold#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles bold font, use another #bold# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#italics#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles italic font, use another #italic# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#underline#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles underlining, use another #underline# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#double_underline#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles double underlining, use another #double_underline# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#outline#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles outlined font, use another #outline# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#shadow#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles shadowed font, use another #shadow# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#strikethrough#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles strikethrough font, use another #strikethrough# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#subscript#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles subscripted font, use another #subscript# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#superscript#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Toggles superscript font, use another #superscript# to
+ turn it off
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#font_name#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Sets font name, used like #font_name=Verdana"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>#font_size#</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Sets font size, use like #font_size=12#
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:header>
+ <f:facet name="left">
+ This document was made on #date# and has #total_pages# pages
+ </f:facet>
+ <f:facet name="right">
+ #time#
+ </f:facet>
+ </e:header>
+ <e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ </section>
+ <section id="excel.printareatitles">
+ <title>Print areas and titles</title>
+ <para>
+ Print areas and titles childrens of worksheets and worksheet templates
+ and provide... print areas and titles.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:printArea></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>firstColumn</literal>
+ —The column of the top-left corner of the
+ area. The parameter is a number. Note that the
+ value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>firstRow</literal>
+ —The row of the top-left corner of the area.
+ The parameter is a number. Note that the value is
+ 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>lastColumn</literal>
+ —The column of the bottom-right corner of
+ the area. The parameter is a number. Note that the
+ value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>lastRow</literal>
+ —The row of the bottom-right corner of the
+ area. The parameter is a number. Note that the
+ value is 0-based.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:printTitles firstRow="0" firstColumn="0"
+ lastRow="0" lastColumn="9"/>
+ <e:printArea firstRow="1" firstColumn="0"
+ lastRow="9" lastColumn="9"/>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ defines a print title between A1:A10 and a print area between B2:J10.
+ </para>
+ </section>
+ <section id="excel.worksheetcommands">
+ <title>Worksheet Commands</title>
+ <para>
+ Worksheet commands are children of workbooks and are usually executed
+ only once.
+ </para>
+ <section id="excel.worksheetcommands.grouping">
+ <title>Grouping</title>
+ <para>Provides grouping of columns and rows.</para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:groupRows></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>startRow</literal>
+ —The row to start the grouping at. The
+ value is a number. Note that the value is
+ 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>endRow</literal>
+ —The row to end the grouping at. The
+ value is a number. Note that the value is
+ 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>collapse</literal>
+ —Should the grouping be collapsed
+ initially? The value is a boolean.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elements</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:groupColumns></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>startColumn</literal>
+ —The column to start the grouping at. The
+ value is a number. Note that the value is
+ 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>endColumn</literal>
+ —The column to end the grouping at. The
+ value is a number. Note that the value is
+ 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>collapse</literal>
+ —Should the grouping be collapsed
+ initially? The value is a boolean.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elements</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:groupRows startRow="4" endRow="9" collapse="true"/>
+ <e:groupColumns startColumn="0" endColumn="9" collapse="false"/>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>
+ groups rows 5 trough 10 and columns 5 through 10 so that the rows
+ are initially collapsed (but not the columns).
+ </para>
+
+ </section>
+ <section id="excel.worksheetcommands.pagebreaks">
+ <title>Page breaks</title>
+ <para>Provides page breaks</para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:rowPageBreak></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>row</literal>
+ —The row to break at. The value is a
+ number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elements</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:rowPageBreak row="4"/>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>breaks page at row 5.</para>
+ </section>
+ <section id="excel.worksheetcommands.merging">
+ <title>Merging</title>
+ <para>Provides cell merging</para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:mergeCells></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>startRow</literal>
+ —The row to start the merging from. The
+ value is a number. Note that the value is
+ 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>startColumn</literal>
+ —The column to start the merging from.
+ The value is a number. Note that the value is
+ 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>endRow</literal>
+ —The row to end the merging at. The value
+ is a number. Note that the value is 0-based.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>endColumn</literal>
+ —The column to end the merging at. The
+ value is a number. Note that the value is
+ 0-based.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elements</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:worksheet>
+ <e:mergeCells startRow="0" startColumn="0" endRow="9" endColumn="9"/>
+ </e:worksheet>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>merges the cells in the range A1:J10</para>
+ </section>
+ </section>
+ <section id="excel.datatableexporter">
+ <title>Datatable exporter</title>
+ <para>
+ If you prefer to export an existing JSF datatable instead of writing a
+ dedicated XHTML document, this can also be achieved easily by executing
+ the <literal>org.jboss.seam.excel.excelExporter.export</literal>
+ component, passing in the id of the datatable as an Seam EL parameter.
+ Consider you have a data table
+ </para>
+ <programlisting role="XML">
+ <![CDATA[
+ <h:form id="theForm">
+ <h:dataTable id="theDataTable" value="#{personList.personList}"
+ var="person">
+ ...
+ </h:dataTable>
+ </h:form>
+ ]]>
+ </programlisting>
+ <para>
+ that you want to view as an
+ <trademark class="registered">Microsoft</trademark>
+ <trademark class="registered">Excel</trademark>
+ spreadsheet. Place a
+ </para>
+ <programlisting role="XML">
+ <![CDATA[
+ <h:commandLink
+ value="Export"
+ action="#{excelExporter.export('theForm:theDataTable')}"
+ />
+ ]]>
+ </programlisting>
+ <para>
+ in the form and you're done. You can of course execute the exporter
+ with a button, s:link or other preferred method. There are also plans
+ for a dedicated export tag that can be placed inside the datatable tag
+ so you won't have to refer to the datatable by ID.
+ </para>
+ <para>
+ See <xref linkend="excel.fontsandlayout"/> for formatting.
+ </para>
+ </section>
+ <section id="excel.fontsandlayout">
+ <title>Fonts and layout</title>
+ <para>
+ Controlling how the output look is done with a combination of CSSish
+ style attributes and tag attributes. The most common ones (fonts, borders,
+ backgrounds etc) are CSS and some more general settings are in tag attributes.
+ </para>
+ <para>
+ The CSS attributes cascade down from parent to children and within one tag
+ cascades over the CSS classes referenced in the <literal>styleClass</literal>
+ attributes and finally over the CSS attributes defined in the
+ <literal>style</literal>attribute. You can place them pretty much anywhere but
+ e.g. placing a column width setting in a cell nested within that column makes
+ little sense.
+ </para>
+ <section id="excel.fontsandlayout.link">
+ <title>Stylesheet links</title>
+ <para>
+ External stylesheets are references with the e:link tag. They are placed as
+ children of the workbook.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><e:link></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>URL</literal>
+ —The URL to the stylesheet
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting role="XML">
+ <![CDATA[
+ <e:workbook>
+ <e:link URL="/css/excel.css"/>
+ </e:workbook>
+ ]]>
+ </programlisting>
+ <para>References a stylesheet that can be found at /css/excel.css</para>
+ </section>
+
+ <section id="excel.fontsandlayout.fonts">
+ <title>Fonts</title>
+ <para>
+ This group of XLS-CSS attributes define a font and its attributes
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>xls-font-family</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The name of the font. Make sure that it's one that is
+ supported by your system.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-font-size</para>
+ </entry>
+ <entry valign="top">
+ <para>The font size. Use a plain number</para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-font-color</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The color of the font (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.Colour
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-font-bold</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Should the font be bold? Valid values are "true" and
+ "false"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-font-italic</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Should the font be italic? Valid values are "true"
+ and "false"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-font-script-style</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The script style of the font (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.ScriptStyle
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-font-underline-style</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The underline style of the font (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.UnderlineStyle
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-font-struck-out</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Should the font be struck out? Valid values are
+ "true" and "false"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-font</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ A shorthand notation for setting all the values. Place
+ the font name last and use tick marks for fonts with
+ spaces in them, e.g. 'Times New Roman'. Use "italic", "bold"
+ and "struckout".
+ </para>
+ <para>
+ Example style="xls-font: red bold italic 22 Verdana"
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="excel.fontsandlayout.borders">
+ <title>Borders</title>
+ <para>
+ This group of XLS-CSS attributes define the borders of the cell
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>xls-border-left-color</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The border color of the left edge of the cell
+ (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.Colour
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-left-line-style</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The border line style of the left edge of the cell (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.LineStyle
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-left</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ A shorthand for setting color and line style of the left edge
+ of the cell, e.g style="xls-border-left: red thick"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-top-color</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The border color of the top edge of the cell
+ (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.Colour
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-top-line-style</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The border line style of the top edge of the cell (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.LineStyle
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-top</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ A shorthand for setting color and line style of the top edge
+ of the cell, e.g style="xls-border-left: red thick"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-right-color</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The border color of the right edge of the cell
+ (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.Colour
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-right-line-style</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The border line style of the right edge of the cell (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.LineStyle
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-right</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ A shorthand for setting color and line style of the right edge
+ of the cell, e.g style="xls-border-right: red thick"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-bottom-color</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The border color of the bottom edge of the cell
+ (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.Colour
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-bottom-line-style</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The border line style of the bottom edge of the cell (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.LineStyle
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border-bottom</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ A shorthand for setting color and line style of the bottom edge
+ of the cell, e.g style="xls-border-bottom: red thick"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-border</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ A shorthand for setting color and line style all edges
+ of the cell, e.g style="xls-border: red thick"
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="excel.fontsandlayout.background">
+ <title>Background</title>
+ <para>
+ This group of XLS-CSS attributes define the background of the cell
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>xls-background-color</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The color of the background (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.LineStyle
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-background-pattern</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The pattern of the background (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.Pattern
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-background</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ A shorthand for setting the background color and pattern. See above for rules.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="excel.fontsandlayout.columnsettings">
+ <title>Column settings</title>
+ <para>
+ This group of XLS-CSS attributes define the column widths etc.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>xls-column-width</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The width of the column. Use largeish values (~5000) to start with.
+ Used by the e:column in xhtml mode.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-column-widths</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The width of the column. Use largeish values (~5000) to start with.
+ Used by the excel exporter, placed in the datatable style attribute.
+ Use numerical values or * to bypass a column.
+ </para>
+ <para>
+ Example style="xls-column-widths: 5000, 5000, *, 10000"
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-column-autosize</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Should an attempt be made to autosize the column? Valid values
+ are "true" and "false".
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-column-hidden</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Should the column be hidden? Valid values are "true" and "false".
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="excel.fontsandlayout.cellsettings">
+ <title>Cell settings</title>
+ <para>
+ This group of XLS-CSS attributes define the cell properties
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>xls-alignment</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The alignment of the cell value (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.Alignment
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-force-type</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The forced type of the cell data. The value is a string that can be one
+ of "general", "number", "text", "date", "formula" or "bool". The type
+ is automatically detected so there is rarely any use for this attribute.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-format-mask</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The format mask of the cell, see <xref linkend="excel.cells.formatmasks" />
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-indentation</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The indentation of the cell value. The value is numeric.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-locked</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Should the cell be locked. Use with workbook level locked.
+ Valid values are "true" and "false".
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-orientation</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The orientation of the cell value (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.Orientation
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-vertical-alignment</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ The vertical alignment of the cell value (see
+ <ulink
+ url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form...">
+ jxl.format.VerticalAlignment
+ </ulink>
+ ).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-shrink-to-fit</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Should the cell values shrink to fit?
+ Valid values are "true" and "false".
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry valign="top">
+ <para>xls-wrap</para>
+ </entry>
+ <entry valign="top">
+ <para>
+ Should the cell wrap with newlines?
+ Valid values are "true" and "false".
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="excel.fontsandlayout.datatableexporter">
+ <title>The datatable exporter</title>
+ <para>
+ The datatable exporter uses the same xls-css attributes as the xhtml
+ document with the exception that column widths are defined with the
+ <literal>xls-column-widths</literal> attribute on the datatable (since
+ the UIColumn doesn't support the style or styleClass attributes).
+ </para>
+ </section>
+ <section id="excel.fontsandlayout.examples">
+ <title>Layout examples</title>
+ <para>
+ TODO
+ </para>
+ </section>
+ <section id="excel.fontsandlayout.limitations">
+ <title>Limitations</title>
+ <para>
+ In the current version there are some known limitations regarding
+ CSS support
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ When using .xhtml documents, stylesheets must be referenced
+ through the <literal><e:link> tag</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When using the datatable exporter, CSS must be entered through
+ style-attributes, external stylesheets are not supported
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+ <section id="excel.links">
+ <title>Links and further documentation</title>
+ <para>
+ The core of the &excel; functionality is based on the excellent
+ JExcelAPI library which can be found on
+ http://jexcelapi.sourceforge.net/ and most features and possible
+ limitations are inherited from here.
+ </para>
+ <para>
+ If you use the forum or mailing list, please remember that they don't
+ know anything about Seam and the usage of their library, any issues are
+ best reported in the JBoss Seam JIRA under the "excel" module.
+ </para>
+ </section>
+</chapter>
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Feedback.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Framework.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Glassfish.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Groovy.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Gwt.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Hsearch.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/I18n.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Itext.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Jbpm.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Jms.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Mail.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Oc4j.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Persistence.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Preface.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Remoting.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Revision_History.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/doc/Seam_Reference_Guide/en-US/Rss.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Rss.xml 2008-10-14 12:56:52 UTC (rev 9302)
+++ trunk/doc/Seam_Reference_Guide/en-US/Rss.xml 2008-10-14 13:12:15 UTC (rev 9303)
@@ -1,269 +1,269 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
-
-<chapter id="rss">
- <title>RSS support</title>
- <para>
- It is now easy to integrate RSS feeds in Seam through the
- <ulink url="http://yarfraw.sourceforge.net/">YARFRAW</ulink>
- library. The RSS support is currently in the state of "tech preview"
- in the current release.
- </para>
-
- <section id="rss.installation">
- <title>Installation</title>
- <para>
- To enable RSS support, include the <literal>jboss-seam-rss.jar</literal>
- in your applications <literal>WEB-INF/lib</literal> directory. The RSS
- library also has some dependent libraries that should be placed in the
- same directory. See <xref linkend="dependencies.rss"/> for a list of
- libraries to include.
- </para>
- <para>
- The Seam RSS support requires the use of Facelets as the view
- technology.
- </para>
- </section>
- <section id="rss.usage">
- <title>Generating feeds</title>
- <para>
- The <literal>examples/rss</literal> project contains an example of
- RSS support in action. It demonstrates proper deployment
- packaging, and it shows the exposed functionality.
- </para>
- <para>
- A feed is a xhtml-page that consist of a feed and a list of nested
- entry items.
- </para>
- <programlisting role="XML">
- <![CDATA[
- <r:feed
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:r="http://jboss.com/products/seam/rss"
- title="#{rss.feed.title}"
- uid="#{rss.feed.uid}"
- subtitle="#{rss.feed.subtitle}"
- updated="#{rss.feed.updated}"
- link="#{rss.feed.link}">
- <ui:repeat value="#{rss.feed.entries}" var="entry">
- <r:entry
- uid="#{entry.uid}"
- title="#{entry.title}"
- link="#{entry.link}"
- author="#{entry.author}"
- summary="#{entry.summary}"
- published="#{entry.published}"
- updated="#{entry.updated}"
- />
- </ui:repeat>
- </r:feed>
- ]]>
- </programlisting>
- </section>
-
- <section id="rss.feeds">
- <title>Feeds</title>
- <para>
- Feeds are the top-level entities that describe the properties of the
- information source. It contains zero or more nested entries.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><r:feed></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>uid</literal>
- —An optional unique feed id. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>title</literal>
- —The title of the feed. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>subtitle</literal>
- —The subtitle of the feed. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>updated</literal>
- —When was the feed updated? The value is a date.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>link</literal>
- —The link to the source of the information.
- The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>feedFormat</literal>
- —The feed format. The value is a string and defaults
- to ATOM1. Valid values are RSS10, RSS20, ATOM03 and ATOM10.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>Zero or more feed entries</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
-
- <section id="rss.entries">
- <title>Entries</title>
- <para>
- Entries are the "headlines" in the feed.
- </para>
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*" />
- <colspec colnum="2" colwidth="3*" />
- <tbody>
- <row>
- <entry valign="top">
- <para>
- <literal><r:feed></literal>
- </para>
- </entry>
- <entry valign="top">
- <para>
- <emphasis>Attributes</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>uid</literal>
- —An optional unique entry id. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>title</literal>
- —The title of the entry. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>link</literal>
- —A link to the item. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>author</literal>
- —The author of the story. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>summary</literal>
- —The body of the story. The value is a string.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>textFormat</literal>
- —The format of the body and title of the story.
- The value is a string and valid values are "text" and
- "html". Defaults to "html".
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>published</literal>
- —When was the story first published? The value is a date.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>updated</literal>
- —When was the story updated? The value is a date.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Child elemenents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis>Facets</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>none</literal>
- </para>
- </listitem>
- </itemizedlist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
-
- <section id="rss.links">
- <title>Links and further documentation</title>
- <para>
- The core of the RSs functionality is based on the YARFRAW library
- which can be found on http://yarfraw.sourceforge.net/ and most
- features and possible limitations are inherited from here.
- </para>
- <para>
- For details on the ATOM 1.0 format, have a look at
- <ulink url="http://atompub.org/2005/07/11/draft-ietf-atompub-format-10.html">
- the specs</ulink>
- </para>
- <para>
- For details on the RSS 2.0 format, have a look at
- <ulink url="http://cyber.law.harvard.edu/rss/rss.html">the specs</ulink>
- </para>
- </section>
-</chapter>
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<chapter id="rss">
+ <title>RSS support</title>
+ <para>
+ It is now easy to integrate RSS feeds in Seam through the
+ <ulink url="http://yarfraw.sourceforge.net/">YARFRAW</ulink>
+ library. The RSS support is currently in the state of "tech preview"
+ in the current release.
+ </para>
+
+ <section id="rss.installation">
+ <title>Installation</title>
+ <para>
+ To enable RSS support, include the <literal>jboss-seam-rss.jar</literal>
+ in your applications <literal>WEB-INF/lib</literal> directory. The RSS
+ library also has some dependent libraries that should be placed in the
+ same directory. See <xref linkend="dependencies.rss"/> for a list of
+ libraries to include.
+ </para>
+ <para>
+ The Seam RSS support requires the use of Facelets as the view
+ technology.
+ </para>
+ </section>
+ <section id="rss.usage">
+ <title>Generating feeds</title>
+ <para>
+ The <literal>examples/rss</literal> project contains an example of
+ RSS support in action. It demonstrates proper deployment
+ packaging, and it shows the exposed functionality.
+ </para>
+ <para>
+ A feed is a xhtml-page that consist of a feed and a list of nested
+ entry items.
+ </para>
+ <programlisting role="XML">
+ <![CDATA[
+ <r:feed
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:r="http://jboss.com/products/seam/rss"
+ title="#{rss.feed.title}"
+ uid="#{rss.feed.uid}"
+ subtitle="#{rss.feed.subtitle}"
+ updated="#{rss.feed.updated}"
+ link="#{rss.feed.link}">
+ <ui:repeat value="#{rss.feed.entries}" var="entry">
+ <r:entry
+ uid="#{entry.uid}"
+ title="#{entry.title}"
+ link="#{entry.link}"
+ author="#{entry.author}"
+ summary="#{entry.summary}"
+ published="#{entry.published}"
+ updated="#{entry.updated}"
+ />
+ </ui:repeat>
+ </r:feed>
+ ]]>
+ </programlisting>
+ </section>
+
+ <section id="rss.feeds">
+ <title>Feeds</title>
+ <para>
+ Feeds are the top-level entities that describe the properties of the
+ information source. It contains zero or more nested entries.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><r:feed></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>uid</literal>
+ —An optional unique feed id. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>title</literal>
+ —The title of the feed. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>subtitle</literal>
+ —The subtitle of the feed. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>updated</literal>
+ —When was the feed updated? The value is a date.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>link</literal>
+ —The link to the source of the information.
+ The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>feedFormat</literal>
+ —The feed format. The value is a string and defaults
+ to ATOM1. Valid values are RSS10, RSS20, ATOM03 and ATOM10.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>Zero or more feed entries</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+
+ <section id="rss.entries">
+ <title>Entries</title>
+ <para>
+ Entries are the "headlines" in the feed.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+ <tbody>
+ <row>
+ <entry valign="top">
+ <para>
+ <literal><r:feed></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para>
+ <emphasis>Attributes</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>uid</literal>
+ —An optional unique entry id. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>title</literal>
+ —The title of the entry. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>link</literal>
+ —A link to the item. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>author</literal>
+ —The author of the story. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>summary</literal>
+ —The body of the story. The value is a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>textFormat</literal>
+ —The format of the body and title of the story.
+ The value is a string and valid values are "text" and
+ "html". Defaults to "html".
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>published</literal>
+ —When was the story first published? The value is a date.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>updated</literal>
+ —When was the story updated? The value is a date.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Child elemenents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>Facets</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>none</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+
+ <section id="rss.links">
+ <title>Links and further documentation</title>
+ <para>
+ The core of the RSs functionality is based on the YARFRAW library
+ which can be found on http://yarfraw.sourceforge.net/ and most
+ features and possible limitations are inherited from here.
+ </para>
+ <para>
+ For details on the ATOM 1.0 format, have a look at
+ <ulink url="http://atompub.org/2005/07/11/draft-ietf-atompub-format-10.html">
+ the specs</ulink>
+ </para>
+ <para>
+ For details on the RSS 2.0 format, have a look at
+ <ulink url="http://cyber.law.harvard.edu/rss/rss.html">the specs</ulink>
+ </para>
+ </section>
+</chapter>
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Rss.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Security.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Spring.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Testing.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Text.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Tools.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2008-10-14 12:56:52 UTC (rev 9302)
+++ trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2008-10-14 13:12:15 UTC (rev 9303)
@@ -2530,390 +2530,390 @@
</section>
</section>
-
- <section id="nestedbooking">
- <title>Nested conversations: extending the Hotel Booking example</title>
-
- <section>
- <title>Introduction</title>
-
- <para>Long-running conversations make it simple to maintain consistency of state in an application
-even in the face of multi-window operation and back-buttoning. Unfortunately, simply beginning and ending a
-long-running conversation is not always enough. Depending on the requirements of the application, inconsistencies
-between what the user's expectations and the reality of the application’s state can still result.</para>
-
- <para>The nested booking application extends the features of the hotel booking application to incorporate
-the selection of rooms. Each hotel has available rooms with descriptions for a user to select from. This requires
-the addition of a room selection page in the hotel reservation flow.</para>
-
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/nested-booking.png" align="center" scalefit="1"/>
- </imageobject>
- <imageobject role="html">
- <imagedata fileref="images/nested-booking.png" align="center"/>
- </imageobject>
- </mediaobject>
-
- <para>The user now has the option to select any available room to be included in the booking. As with the
-hotel booking application we saw previously, this can lead to issues with state consistency. As with storing state
-in the <varname>HTTPSession</varname>, if a conversation variable changes it affects all windows operating within
-the same conversation context.</para>
-
- <para>To demonstrate this, let’s suppose the user clones the room selection screen in a new window. The
-user then selects the <emphasis>Wonderful Room</emphasis> and proceeds to the confirmation screen. To see just how much
-it would cost to live the high-life, the user returns to the original window, selects the <emphasis>Fantastic
-Suite</emphasis> for booking, and again proceeds to confirmation. After reviewing the total cost, the user decides
-that practicality wins out and returns to the window showing <emphasis>Wonderful Room</emphasis> to confirm.</para>
-
- <para>In this scenario, if we simply store all state in the conversation, we are not protected from
-multi-window operation within the same conversation. Nested conversations allow us to achieve correct behavior even
-when context can vary within the same conversation.</para>
- </section>
-
- <section>
- <title>Understanding Nested Conversations</title>
-
- <para>Now let's see how the nested booking example extends the behavior of the hotel booking application through
-use of nested conversations. Again, we can read the class from top to bottom, as if it were a story.</para>
-
- <example>
- <title>RoomPreferenceAction.java</title>
- <!-- Can't use code hightlighting with callouts -->
- <programlistingco>
- <areaspec>
- <area id="nested-booking-load-rooms" coords="25"/>
- <area id="nested-booking-nested-conversation" coords="38"/>
- <area id="nested-booking-select-preference" coords="43"/>
- <area id="nested-booking-end-annotation" coords="58"/>
- </areaspec>
- <programlisting><![CDATA[@Stateful
-@Name("roomPreference")
-@Restrict("#{identity.loggedIn}")
-public class RoomPreferenceAction implements RoomPreference
-{
-
- @Logger
- private Log log;
-
- @In private Hotel hotel;
-
- @In private Booking booking;
-
- @DataModel(value="availableRooms")
- private List<Room> availableRooms;
-
- @DataModelSelection(value="availableRooms")
- private Room roomSelection;
-
- @In(required=false, value="roomSelection")
- @Out(required=false, value="roomSelection")
- private Room room;
-
- @Factory("availableRooms")
- public void loadAvailableRooms()
- {
- availableRooms = hotel.getAvailableRooms(booking.getCheckinDate(), booking.getCheckoutDate());
- log.info("Retrieved #0 available rooms", availableRooms.size());
- }
-
- public BigDecimal getExpectedPrice()
- {
- log.info("Retrieving price for room #0", roomSelection.getName());
-
- return booking.getTotal(roomSelection);
- }
-
- @Begin(nested=true)
- public String selectPreference()
- {
- log.info("Room selected");
-
- this.room = this.roomSelection;
-
- return "payment";
- }
-
- public String requestConfirmation()
- {
- // all validations are performed through the s:validateAll, so checks are already
- // performed
- log.info("Request confirmation from user");
-
- return "confirm";
- }
-
- @End(beforeRedirect=true)
- public String cancel()
- {
- log.info("ending conversation");
-
- return "cancel";
- }
-
- @Destroy @Remove
- public void destroy() {}
-}
-]]></programlisting>
- <calloutlist>
- <callout arearefs="nested-booking-load-rooms">
- <para> The <varname>hotel</varname> instance is injected from the conversation context. The hotel
- is loaded through an <emphasis>extended persistence context</emphasis> so that the entity
- remains managed throughout the conversation. This allows us to lazily load the
- <varname>availableRooms</varname> through an <varname>@Factory</varname> method by
- simply walking the assocation.
- </para>
- </callout>
- <callout arearefs="nested-booking-nested-conversation">
- <para> When <link linkend="begin-annotation">
- <literal>@Begin(nested=true)</literal>
- </link> is encountered, a nested conversation is pushed onto the conversation stack. When
- executing within a nested conversation, components still have access to all outer conversation
- state, but setting any values in the nested conversation’s state container does not affect
- the outer conversation. In addition, nested conversations can exist concurrently stacked on the
- same outer conversation, allowing independent state for each.</para>
- </callout>
- <callout arearefs="nested-booking-select-preference">
- <para>The <varname>roomSelection</varname> is outjected to the conversation based on the
- <varname>@DataModelSelection</varname>. Note that because the nested conversation has an
- independent context, the <varname>roomSelection</varname> is only set into the new nested
- conversation. Should the user select a different preference in another window or tab a new
- nested conversation would be started.</para>
- </callout>
- <callout arearefs="nested-booking-end-annotation">
- <para> The <link linkend="end-annotation">
- <literal>@End</literal>
- </link> annotation pops the conversation stack and resumes the outer conversation. The
- <varname>roomSelection</varname> is destroyed along with the conversation context.</para>
- </callout>
- </calloutlist>
- </programlistingco>
- </example>
-
- <para>When we being a nested conversation it is pushed onto the conversation stack. In the <varname>nestedbooking</varname>
-example, the conversation stack consists of the outer long-running conversation (the booking) and each of the nested conversations (room
-selections).</para>
-
- <example>
- <title>rooms.xhtml</title>
- <!-- Can't use code hightlighting with callouts -->
- <programlistingco>
- <areaspec>
- <area id="nested-booking-available-rooms" coords="19"/>
- <area id="nested-booking-selection-action" coords="36"/>
- <area id="nested-booking-cancel-action" coords="45"/>
- </areaspec>
- <programlisting><![CDATA[<div class="section">
- <h1>Room Preference</h1>
-</div>
-
-<div class="section">
- <h:form id="room_selections_form">
- <div class="section">
- <h:outputText styleClass="output"
- value="No rooms available for the dates selected: "
- rendered="#{availableRooms != null and availableRooms.rowCount == 0}"/>
- <h:outputText styleClass="output"
- value="Rooms available for the dates selected: "
- rendered="#{availableRooms != null and availableRooms.rowCount > 0}"/>
-
- <h:outputText styleClass="output" value="#{booking.checkinDate}"/> -
- <h:outputText styleClass="output" value="#{booking.checkoutDate}"/>
-
- <br/><br/>
-
- <h:dataTable value="#{availableRooms}" var="room"
- rendered="#{availableRooms.rowCount > 0}">
- <h:column>
- <f:facet name="header">Name</f:facet>
- #{room.name}
- </h:column>
- <h:column>
- <f:facet name="header">Description</f:facet>
- #{room.description}
- </h:column>
- <h:column>
- <f:facet name="header">Per Night</f:facet>
- <h:outputText value="#{room.price}">
- <f:convertNumber type="currency" currencySymbol="$"/>
- </h:outputText>
- </h:column>
- <h:column>
- <f:facet name="header">Action</f:facet>
- <h:commandLink id="selectRoomPreference"
- action="#{roomPreference.selectPreference}">Select</h:commandLink>
- </h:column>
- </h:dataTable>
- </div>
- <div class="entry">
- <div class="label"> </div>
- <div class="input">
- <s:button id="cancel" value="Revise Dates" view="/book.xhtml"/>
- </div>
- </div>
- </h:form>
-</div>
-]]></programlisting>
- <calloutlist>
- <callout arearefs="nested-booking-available-rooms">
- <para>When requested from EL, the <varname>#{availableRooms}</varname> are loaded by the <varname>@Factory</varname>
-method defined in <varname>RoomPreferenceAction</varname>. The <varname>@Factory</varname> method will only be executed once to load the values
-into the current context as a <link linkend="datamodel-annotation">
- <varname>@DataModel</varname>
-</link> instance.</para>
- </callout>
- <callout arearefs="nested-booking-selection-action">
- <para>Invoking the <varname>#{roomPreference.selectPreference}</varname> action results in the row being selected
-and set into the <varname>@DataModelSelection</varname>. This value is then outjected to the nested conversation context.</para>
- </callout>
- <callout arearefs="nested-booking-cancel-action">
- <para>Revising the dates simply returns to the <varname>/book.xhtml</varname>. Note that we have not yet nested
-a conversation (no room preference has been selected), so the current conversation can simply be resumed. The <varname><s:button></varname>
-component simply propagates the current conversation when displaying the <varname>/book.xhtml</varname> view.</para>
- </callout>
- </calloutlist>
- </programlistingco>
- </example>
-
- <para>Now that we have seen how to nest a conversation, let's see how we can confirm the booking once a room has been selected. This
-can be achieved by simply extending the behavior of the <varname>HotelBookingAction</varname>.</para>
-
- <example>
- <title>HotelBookingAction.java</title>
- <!-- Can't use code hightlighting with callouts -->
- <programlistingco>
- <areaspec>
- <area id="nested-booking-end-root" coords="77"/>
- <area id="nested-booking-confirm" coords="82"/>
- <area id="nested-booking-cancel" coords="89" />
- </areaspec>
- <programlisting><![CDATA[@Stateful
-@Name("hotelBooking")
-@Restrict("#{identity.loggedIn}")
-public class HotelBookingAction implements HotelBooking
-{
-
- @PersistenceContext(type=EXTENDED)
- private EntityManager em;
-
- @In
- private User user;
-
- @In(required=false) @Out
- private Hotel hotel;
-
- @In(required=false)
- @Out(required=false)
- private Booking booking;
-
- @In(required=false)
- private Room roomSelection;
-
- @In
- private FacesMessages facesMessages;
-
- @In
- private Events events;
-
- @Logger
- private Log log;
-
- @Begin
- public void selectHotel(Hotel selectedHotel)
- {
- log.info("Selected hotel #0", selectedHotel.getName());
- hotel = em.merge(selectedHotel);
- }
-
- public String setBookingDates()
- {
- // the result will indicate whether or not to begin the nested conversation
- // as well as the navigation. if a null result is returned, the nested
- // conversation will not begin, and the user will be returned to the current
- // page to fix validation issues
- String result = null;
-
- Calendar calendar = Calendar.getInstance();
- calendar.add(Calendar.DAY_OF_MONTH, -1);
-
- // validate what we have received from the user so far
- if ( booking.getCheckinDate().before( calendar.getTime() ) )
- {
- facesMessages.addToControl("checkinDate", "Check in date must be a future date");
- }
- else if ( !booking.getCheckinDate().before( booking.getCheckoutDate() ) )
- {
- facesMessages.addToControl("checkoutDate", "Check out date must be later than check in date");
- }
- else
- {
- result = "rooms";
- }
-
- return result;
- }
-
- public void bookHotel()
- {
- booking = new Booking(hotel, user);
- Calendar calendar = Calendar.getInstance();
- booking.setCheckinDate( calendar.getTime() );
- calendar.add(Calendar.DAY_OF_MONTH, 1);
- booking.setCheckoutDate( calendar.getTime() );
- }
-
- @End(root=true)
- public void confirm()
- {
- // on confirmation we set the room preference in the booking. the room preference
- // will be injected based on the nested conversation we are in.
- booking.setRoomPreference(roomSelection);
-
- em.persist(booking);
- facesMessages.add("Thank you, #{user.name}, your confimation number for #{hotel.name} is #{booking.id}");
- log.info("New booking: #{booking.id} for #{user.username}");
- events.raiseTransactionSuccessEvent("bookingConfirmed");
- }
-
- @End(root=true, beforeRedirect=true)
- public void cancel() {}
-
- @Destroy @Remove
- public void destroy() {}
-}
-]]></programlisting>
- <calloutlist>
- <callout arearefs="nested-booking-end-root">
- <para>Annotating an action with <link linkend="end-annotation">
- <varname>@End(root=true)</varname>
- </link> ends the root conversation which effectively destroys the entire conversation stack.
- When any conversation is ended, it's nested conversations are ended as well. As the root is
- the conversation that started it all, this is a simple way to destroy and release all state
- associated with a workspace once the booking is confirmed.</para>
- </callout>
- <callout arearefs="nested-booking-confirm">
- <para>The <varname>roomSelection</varname> is only associated with the <varname>booking</varname>
- on user confirmation. While outjecting values to the nested conversation context will not
- impact the outer conversation, any objects injected from the outer conversation are injected
- by reference. This means that any changing to these objects will be reflected in the parent
- conversation as well as other concurrent nested conversations.</para>
- </callout>
- <callout arearefs="nested-booking-cancel">
- <para>By simply annotating the cancellation action with <link linkend="end-annotation">
- <varname>@End(root=true, beforeRedirect=true)</varname>
- </link>
- we can easily destroy and release all state associated with the
- workspace prior to redirecting the user back to the hotel selection view.</para>
- </callout>
- </calloutlist>
- </programlistingco>
- </example>
-
- <para>Feel free to deploy the application, open many windows or tabs and attempt combinations of various hotels with
-various room preferences. Confirming a booking always results in the correct hotel and room preference thanks to the nested
-conversation model.</para>
- </section>
- </section>
+
+ <section id="nestedbooking">
+ <title>Nested conversations: extending the Hotel Booking example</title>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>Long-running conversations make it simple to maintain consistency of state in an application
+even in the face of multi-window operation and back-buttoning. Unfortunately, simply beginning and ending a
+long-running conversation is not always enough. Depending on the requirements of the application, inconsistencies
+between what the user's expectations and the reality of the application’s state can still result.</para>
+
+ <para>The nested booking application extends the features of the hotel booking application to incorporate
+the selection of rooms. Each hotel has available rooms with descriptions for a user to select from. This requires
+the addition of a room selection page in the hotel reservation flow.</para>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/nested-booking.png" align="center" scalefit="1"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="images/nested-booking.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+ <para>The user now has the option to select any available room to be included in the booking. As with the
+hotel booking application we saw previously, this can lead to issues with state consistency. As with storing state
+in the <varname>HTTPSession</varname>, if a conversation variable changes it affects all windows operating within
+the same conversation context.</para>
+
+ <para>To demonstrate this, let’s suppose the user clones the room selection screen in a new window. The
+user then selects the <emphasis>Wonderful Room</emphasis> and proceeds to the confirmation screen. To see just how much
+it would cost to live the high-life, the user returns to the original window, selects the <emphasis>Fantastic
+Suite</emphasis> for booking, and again proceeds to confirmation. After reviewing the total cost, the user decides
+that practicality wins out and returns to the window showing <emphasis>Wonderful Room</emphasis> to confirm.</para>
+
+ <para>In this scenario, if we simply store all state in the conversation, we are not protected from
+multi-window operation within the same conversation. Nested conversations allow us to achieve correct behavior even
+when context can vary within the same conversation.</para>
+ </section>
+
+ <section>
+ <title>Understanding Nested Conversations</title>
+
+ <para>Now let's see how the nested booking example extends the behavior of the hotel booking application through
+use of nested conversations. Again, we can read the class from top to bottom, as if it were a story.</para>
+
+ <example>
+ <title>RoomPreferenceAction.java</title>
+ <!-- Can't use code hightlighting with callouts -->
+ <programlistingco>
+ <areaspec>
+ <area id="nested-booking-load-rooms" coords="25"/>
+ <area id="nested-booking-nested-conversation" coords="38"/>
+ <area id="nested-booking-select-preference" coords="43"/>
+ <area id="nested-booking-end-annotation" coords="58"/>
+ </areaspec>
+ <programlisting><![CDATA[@Stateful
+@Name("roomPreference")
+@Restrict("#{identity.loggedIn}")
+public class RoomPreferenceAction implements RoomPreference
+{
+
+ @Logger
+ private Log log;
+
+ @In private Hotel hotel;
+
+ @In private Booking booking;
+
+ @DataModel(value="availableRooms")
+ private List<Room> availableRooms;
+
+ @DataModelSelection(value="availableRooms")
+ private Room roomSelection;
+
+ @In(required=false, value="roomSelection")
+ @Out(required=false, value="roomSelection")
+ private Room room;
+
+ @Factory("availableRooms")
+ public void loadAvailableRooms()
+ {
+ availableRooms = hotel.getAvailableRooms(booking.getCheckinDate(), booking.getCheckoutDate());
+ log.info("Retrieved #0 available rooms", availableRooms.size());
+ }
+
+ public BigDecimal getExpectedPrice()
+ {
+ log.info("Retrieving price for room #0", roomSelection.getName());
+
+ return booking.getTotal(roomSelection);
+ }
+
+ @Begin(nested=true)
+ public String selectPreference()
+ {
+ log.info("Room selected");
+
+ this.room = this.roomSelection;
+
+ return "payment";
+ }
+
+ public String requestConfirmation()
+ {
+ // all validations are performed through the s:validateAll, so checks are already
+ // performed
+ log.info("Request confirmation from user");
+
+ return "confirm";
+ }
+
+ @End(beforeRedirect=true)
+ public String cancel()
+ {
+ log.info("ending conversation");
+
+ return "cancel";
+ }
+
+ @Destroy @Remove
+ public void destroy() {}
+}
+]]></programlisting>
+ <calloutlist>
+ <callout arearefs="nested-booking-load-rooms">
+ <para> The <varname>hotel</varname> instance is injected from the conversation context. The hotel
+ is loaded through an <emphasis>extended persistence context</emphasis> so that the entity
+ remains managed throughout the conversation. This allows us to lazily load the
+ <varname>availableRooms</varname> through an <varname>@Factory</varname> method by
+ simply walking the assocation.
+ </para>
+ </callout>
+ <callout arearefs="nested-booking-nested-conversation">
+ <para> When <link linkend="begin-annotation">
+ <literal>@Begin(nested=true)</literal>
+ </link> is encountered, a nested conversation is pushed onto the conversation stack. When
+ executing within a nested conversation, components still have access to all outer conversation
+ state, but setting any values in the nested conversation’s state container does not affect
+ the outer conversation. In addition, nested conversations can exist concurrently stacked on the
+ same outer conversation, allowing independent state for each.</para>
+ </callout>
+ <callout arearefs="nested-booking-select-preference">
+ <para>The <varname>roomSelection</varname> is outjected to the conversation based on the
+ <varname>@DataModelSelection</varname>. Note that because the nested conversation has an
+ independent context, the <varname>roomSelection</varname> is only set into the new nested
+ conversation. Should the user select a different preference in another window or tab a new
+ nested conversation would be started.</para>
+ </callout>
+ <callout arearefs="nested-booking-end-annotation">
+ <para> The <link linkend="end-annotation">
+ <literal>@End</literal>
+ </link> annotation pops the conversation stack and resumes the outer conversation. The
+ <varname>roomSelection</varname> is destroyed along with the conversation context.</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+ </example>
+
+ <para>When we being a nested conversation it is pushed onto the conversation stack. In the <varname>nestedbooking</varname>
+example, the conversation stack consists of the outer long-running conversation (the booking) and each of the nested conversations (room
+selections).</para>
+
+ <example>
+ <title>rooms.xhtml</title>
+ <!-- Can't use code hightlighting with callouts -->
+ <programlistingco>
+ <areaspec>
+ <area id="nested-booking-available-rooms" coords="19"/>
+ <area id="nested-booking-selection-action" coords="36"/>
+ <area id="nested-booking-cancel-action" coords="45"/>
+ </areaspec>
+ <programlisting><![CDATA[<div class="section">
+ <h1>Room Preference</h1>
+</div>
+
+<div class="section">
+ <h:form id="room_selections_form">
+ <div class="section">
+ <h:outputText styleClass="output"
+ value="No rooms available for the dates selected: "
+ rendered="#{availableRooms != null and availableRooms.rowCount == 0}"/>
+ <h:outputText styleClass="output"
+ value="Rooms available for the dates selected: "
+ rendered="#{availableRooms != null and availableRooms.rowCount > 0}"/>
+
+ <h:outputText styleClass="output" value="#{booking.checkinDate}"/> -
+ <h:outputText styleClass="output" value="#{booking.checkoutDate}"/>
+
+ <br/><br/>
+
+ <h:dataTable value="#{availableRooms}" var="room"
+ rendered="#{availableRooms.rowCount > 0}">
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ #{room.name}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Description</f:facet>
+ #{room.description}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Per Night</f:facet>
+ <h:outputText value="#{room.price}">
+ <f:convertNumber type="currency" currencySymbol="$"/>
+ </h:outputText>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Action</f:facet>
+ <h:commandLink id="selectRoomPreference"
+ action="#{roomPreference.selectPreference}">Select</h:commandLink>
+ </h:column>
+ </h:dataTable>
+ </div>
+ <div class="entry">
+ <div class="label"> </div>
+ <div class="input">
+ <s:button id="cancel" value="Revise Dates" view="/book.xhtml"/>
+ </div>
+ </div>
+ </h:form>
+</div>
+]]></programlisting>
+ <calloutlist>
+ <callout arearefs="nested-booking-available-rooms">
+ <para>When requested from EL, the <varname>#{availableRooms}</varname> are loaded by the <varname>@Factory</varname>
+method defined in <varname>RoomPreferenceAction</varname>. The <varname>@Factory</varname> method will only be executed once to load the values
+into the current context as a <link linkend="datamodel-annotation">
+ <varname>@DataModel</varname>
+</link> instance.</para>
+ </callout>
+ <callout arearefs="nested-booking-selection-action">
+ <para>Invoking the <varname>#{roomPreference.selectPreference}</varname> action results in the row being selected
+and set into the <varname>@DataModelSelection</varname>. This value is then outjected to the nested conversation context.</para>
+ </callout>
+ <callout arearefs="nested-booking-cancel-action">
+ <para>Revising the dates simply returns to the <varname>/book.xhtml</varname>. Note that we have not yet nested
+a conversation (no room preference has been selected), so the current conversation can simply be resumed. The <varname><s:button></varname>
+component simply propagates the current conversation when displaying the <varname>/book.xhtml</varname> view.</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+ </example>
+
+ <para>Now that we have seen how to nest a conversation, let's see how we can confirm the booking once a room has been selected. This
+can be achieved by simply extending the behavior of the <varname>HotelBookingAction</varname>.</para>
+
+ <example>
+ <title>HotelBookingAction.java</title>
+ <!-- Can't use code hightlighting with callouts -->
+ <programlistingco>
+ <areaspec>
+ <area id="nested-booking-end-root" coords="77"/>
+ <area id="nested-booking-confirm" coords="82"/>
+ <area id="nested-booking-cancel" coords="89" />
+ </areaspec>
+ <programlisting><![CDATA[@Stateful
+@Name("hotelBooking")
+@Restrict("#{identity.loggedIn}")
+public class HotelBookingAction implements HotelBooking
+{
+
+ @PersistenceContext(type=EXTENDED)
+ private EntityManager em;
+
+ @In
+ private User user;
+
+ @In(required=false) @Out
+ private Hotel hotel;
+
+ @In(required=false)
+ @Out(required=false)
+ private Booking booking;
+
+ @In(required=false)
+ private Room roomSelection;
+
+ @In
+ private FacesMessages facesMessages;
+
+ @In
+ private Events events;
+
+ @Logger
+ private Log log;
+
+ @Begin
+ public void selectHotel(Hotel selectedHotel)
+ {
+ log.info("Selected hotel #0", selectedHotel.getName());
+ hotel = em.merge(selectedHotel);
+ }
+
+ public String setBookingDates()
+ {
+ // the result will indicate whether or not to begin the nested conversation
+ // as well as the navigation. if a null result is returned, the nested
+ // conversation will not begin, and the user will be returned to the current
+ // page to fix validation issues
+ String result = null;
+
+ Calendar calendar = Calendar.getInstance();
+ calendar.add(Calendar.DAY_OF_MONTH, -1);
+
+ // validate what we have received from the user so far
+ if ( booking.getCheckinDate().before( calendar.getTime() ) )
+ {
+ facesMessages.addToControl("checkinDate", "Check in date must be a future date");
+ }
+ else if ( !booking.getCheckinDate().before( booking.getCheckoutDate() ) )
+ {
+ facesMessages.addToControl("checkoutDate", "Check out date must be later than check in date");
+ }
+ else
+ {
+ result = "rooms";
+ }
+
+ return result;
+ }
+
+ public void bookHotel()
+ {
+ booking = new Booking(hotel, user);
+ Calendar calendar = Calendar.getInstance();
+ booking.setCheckinDate( calendar.getTime() );
+ calendar.add(Calendar.DAY_OF_MONTH, 1);
+ booking.setCheckoutDate( calendar.getTime() );
+ }
+
+ @End(root=true)
+ public void confirm()
+ {
+ // on confirmation we set the room preference in the booking. the room preference
+ // will be injected based on the nested conversation we are in.
+ booking.setRoomPreference(roomSelection);
+
+ em.persist(booking);
+ facesMessages.add("Thank you, #{user.name}, your confimation number for #{hotel.name} is #{booking.id}");
+ log.info("New booking: #{booking.id} for #{user.username}");
+ events.raiseTransactionSuccessEvent("bookingConfirmed");
+ }
+
+ @End(root=true, beforeRedirect=true)
+ public void cancel() {}
+
+ @Destroy @Remove
+ public void destroy() {}
+}
+]]></programlisting>
+ <calloutlist>
+ <callout arearefs="nested-booking-end-root">
+ <para>Annotating an action with <link linkend="end-annotation">
+ <varname>@End(root=true)</varname>
+ </link> ends the root conversation which effectively destroys the entire conversation stack.
+ When any conversation is ended, it's nested conversations are ended as well. As the root is
+ the conversation that started it all, this is a simple way to destroy and release all state
+ associated with a workspace once the booking is confirmed.</para>
+ </callout>
+ <callout arearefs="nested-booking-confirm">
+ <para>The <varname>roomSelection</varname> is only associated with the <varname>booking</varname>
+ on user confirmation. While outjecting values to the nested conversation context will not
+ impact the outer conversation, any objects injected from the outer conversation are injected
+ by reference. This means that any changing to these objects will be reflected in the parent
+ conversation as well as other concurrent nested conversations.</para>
+ </callout>
+ <callout arearefs="nested-booking-cancel">
+ <para>By simply annotating the cancellation action with <link linkend="end-annotation">
+ <varname>@End(root=true, beforeRedirect=true)</varname>
+ </link>
+ we can easily destroy and release all state associated with the
+ workspace prior to redirecting the user back to the hotel selection view.</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+ </example>
+
+ <para>Feel free to deploy the application, open many windows or tabs and attempt combinations of various hotels with
+various room preferences. Confirming a booking always results in the correct hotel and room preference thanks to the nested
+conversation model.</para>
+ </section>
+ </section>
<section id="dvdstore">
<title>A complete application featuring Seam and jBPM: the DVD Store example</title>
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Validation.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml (rev 0)
+++ trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml 2008-10-14 13:12:15 UTC (rev 9303)
@@ -0,0 +1,3 @@
+
+ <releaseinfo>2.1.0-SNAPSHOT</releaseinfo>
+
\ No newline at end of file
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Version_Info.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Weblogic.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Webservices.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Websphere.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Wicket.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/Xml.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/doc/Seam_Reference_Guide/en-US/master.xml
___________________________________________________________________
Name: svn:eol-style
+ native
16 years, 2 months
Seam SVN: r9302 - trunk.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-10-14 08:56:52 -0400 (Tue, 14 Oct 2008)
New Revision: 9302
Modified:
trunk/build.xml
Log:
OOps, don't want debug mode
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-10-14 12:54:48 UTC (rev 9301)
+++ trunk/build.xml 2008-10-14 12:56:52 UTC (rev 9302)
@@ -709,7 +709,6 @@
<copy file="${docs.pom}" tofile="${doc.ref.dir}/pom.xml" overwrite="true"/>
<maven target="compile" basedir="${doc.ref.dir}">
<jvmarg line="-Xms128m -Xmx512m" />
- <arg line="-X" />
<arg line="${maven.build.translations}" />
</maven>
<copy todir="${dist.ref.dir}">
16 years, 2 months
Seam SVN: r9301 - trunk.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-10-14 08:54:48 -0400 (Tue, 14 Oct 2008)
New Revision: 9301
Modified:
trunk/build.xml
Log:
Clean docs build as well
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-10-14 12:41:21 UTC (rev 9300)
+++ trunk/build.xml 2008-10-14 12:54:48 UTC (rev 9301)
@@ -158,6 +158,7 @@
<delete dir="${bootstrap.dir}/tmp" quiet="${quietclean}" />
<delete dir="${bootstrap.dir}/data" quiet="${quietclean}" />
<delete dir="${ui.dir}/target" quiet="${quietclean}"/>
+ <delete dir="${doc.ref.dir}/target" quiet="${quietclean}"/>
<delete dir="${seamgen.dir}/icefaces-staging" quiet="${quietclean}"/>
<cleanexample name="integration" path="${seam.dir}/src/test/integration" message="" />
</target>
@@ -708,6 +709,7 @@
<copy file="${docs.pom}" tofile="${doc.ref.dir}/pom.xml" overwrite="true"/>
<maven target="compile" basedir="${doc.ref.dir}">
<jvmarg line="-Xms128m -Xmx512m" />
+ <arg line="-X" />
<arg line="${maven.build.translations}" />
</maven>
<copy todir="${dist.ref.dir}">
16 years, 2 months
Seam SVN: r9300 - trunk/src/main/org/jboss/seam/util.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-10-14 08:41:21 -0400 (Tue, 14 Oct 2008)
New Revision: 9300
Modified:
trunk/src/main/org/jboss/seam/util/Reflections.java
Log:
JBSEAM-3556
Modified: trunk/src/main/org/jboss/seam/util/Reflections.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Reflections.java 2008-10-14 12:40:56 UTC (rev 9299)
+++ trunk/src/main/org/jboss/seam/util/Reflections.java 2008-10-14 12:41:21 UTC (rev 9300)
@@ -46,8 +46,10 @@
public static Object get(Field field, Object target) throws Exception
{
+ boolean accessible = field.isAccessible();
try
{
+ field.setAccessible(true);
return field.get(target);
}
catch (IllegalArgumentException iae)
@@ -56,6 +58,10 @@
" on: " + target.getClass().getName();
throw new IllegalArgumentException(message, iae);
}
+ finally
+ {
+ field.setAccessible(accessible);
+ }
}
public static void set(Field field, Object target, Object value) throws Exception
@@ -83,8 +89,10 @@
public static Object getAndWrap(Field field, Object target)
{
+ boolean accessible = field.isAccessible();
try
{
+ field.setAccessible(true);
return get(field, target);
}
catch (Exception e)
@@ -98,6 +106,10 @@
throw new IllegalArgumentException("exception setting: " + field.getName(), e);
}
}
+ finally
+ {
+ field.setAccessible(accessible);
+ }
}
public static void setAndWrap(Field field, Object target, Object value)
16 years, 2 months
Seam SVN: r9299 - trunk/src/main/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-10-14 08:40:56 -0400 (Tue, 14 Oct 2008)
New Revision: 9299
Modified:
trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java
Log:
avoid EL if possible
Modified: trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java 2008-10-14 12:36:51 UTC (rev 9298)
+++ trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java 2008-10-14 12:40:56 UTC (rev 9299)
@@ -36,6 +36,9 @@
{
private String expression;
+ private String permissionTarget;
+ private String permissionAction;
+
private Map<String, Object> methodRestrictions;
private Map<Integer,Set<String>> paramRestrictions;
private Set<String> roleRestrictions;
@@ -45,6 +48,16 @@
this.expression = expression;
}
+ public void setPermissionTarget(String target)
+ {
+ this.permissionTarget = target;
+ }
+
+ public void setPermissionAction(String action)
+ {
+ this.permissionAction = action;
+ }
+
public void addMethodRestriction(Object target, String action)
{
if (methodRestrictions == null)
@@ -123,6 +136,11 @@
Identity.instance().checkRole(role);
}
}
+
+ if (permissionTarget != null && permissionAction != null)
+ {
+ Identity.instance().checkPermission(permissionTarget, permissionAction);
+ }
}
}
}
@@ -169,8 +187,16 @@
if (restrict != null)
{
if (restriction == null) restriction = new Restriction();
- restriction.setExpression(!Strings.isEmpty( restrict.value() ) ?
- restrict.value() : createDefaultExpr(method));
+
+ if ( Strings.isEmpty(restrict.value()) )
+ {
+ restriction.setPermissionTarget(getComponent().getName());
+ restriction.setPermissionAction(method.getName());
+ }
+ else
+ {
+ restriction.setExpression(restrict.value());
+ }
}
for (Annotation annotation : method.getDeclaringClass().getAnnotations())
@@ -251,19 +277,6 @@
}
}
- /**
- * Creates a default security expression for a specified method. The method must
- * be a method of a Seam component.
- *
- * @param method The method for which to create a default permission expression
- * @return The generated security expression.
- */
- private String createDefaultExpr(Method method)
- {
- return String.format( "#{s:hasPermission('%s','%s')}",
- getComponent().getName(), method.getName() );
- }
-
public boolean isInterceptorEnabled()
{
return getComponent().isSecure() && !getComponent().beanClassHasAnnotation("javax.jws.WebService");
16 years, 2 months
Seam SVN: r9298 - trunk/src/wicket/org/jboss/seam/wicket.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-10-14 08:36:51 -0400 (Tue, 14 Oct 2008)
New Revision: 9298
Modified:
trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java
Log:
minor change to security restrictions
Modified: trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java 2008-10-14 12:10:54 UTC (rev 9297)
+++ trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java 2008-10-14 12:36:51 UTC (rev 9298)
@@ -200,7 +200,13 @@
{
Restrict restrict = (Restrict) annotation;
if (restrictions == null) restrictions = new HashSet<String>();
- restrictions.add(Strings.isEmpty(restrict.value()) ? "#{identity.loggedIn}" : restrict.value());
+
+ if ( Strings.isEmpty(restrict.value()) )
+ {
+ throw new IllegalStateException("@Restrict on a Wicket component must specify an expression");
+ }
+
+ restrictions.add(restrict.value());
}
if (annotation.annotationType().isAnnotationPresent(RoleCheck.class))
16 years, 2 months
Seam SVN: r9297 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-10-14 08:10:54 -0400 (Tue, 14 Oct 2008)
New Revision: 9297
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
Log:
minor fixes
Modified: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-10-14 11:55:54 UTC (rev 9296)
+++ trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-10-14 12:10:54 UTC (rev 9297)
@@ -43,24 +43,17 @@
API's has been made very easy. Implement the <literal>ExcelWorkbook
</literal> interface, and register in components.xml.
</para>
- <programlisting role="XML">
- <![CDATA[
- <excel:excelFactory>
- <property name="implementations">
- <key>myExcelExporter</key>
- <value>my.excel.exporter.ExcelExport</value>
- </property>
- </excel:excelFactory>
- ]]>
+ <programlisting role="XML"><![CDATA[<excel:excelFactory>
+ <property name="implementations">
+ <key>myExcelExporter</key>
+ <value>my.excel.exporter.ExcelExport</value>
+ </property>
+</excel:excelFactory>]]>
</programlisting>
<para>
and register the excel namespace in the components tag with
</para>
- <programlisting role="XML">
- <![CDATA[
- xmlns:excel="http://jboss.com/products/seam/excel"
- ]]>
- </programlisting>
+ <programlisting role="XML"><![CDATA[xmlns:excel="http://jboss.com/products/seam/excel"]]></programlisting>
<para>
Then set the UIWorkbook type to <literal>myExcelExporter</literal> and your
own exporter will be used. Default is "jxl", but support for CSV has also been
@@ -1122,40 +1115,56 @@
—The validation condition. The value is a
string.
<itemizedlist>
- <listitem>
- "equal" - requires the cell value to
- match the one defined in the
- value-attribute
+ <listitem>
+ <para>
+ "equal" - requires the cell value to
+ match the one defined in the
+ value-attribute
+ </para>
</listitem>
- <listitem>
- "greater_equal" - requires the cell value
- to be greater than or equal to the value
- defined in the value-attribute
+ <listitem>
+ <para>
+ "greater_equal" - requires the cell
+ value to be greater than or equal to
+ the value defined in the
+ value-attribute
+ </para>
</listitem>
- <listitem>
- "less_equal" - requires the cell value to
- be less than or equal to the value
- defined in the value-attribute
+ <listitem>
+ <para>
+ "less_equal" - requires the cell value
+ to be less than or equal to the value
+ defined in the value-attribute
+ </para>
</listitem>
- <listitem>
- "less_than" - requires the cell value to
- be less than the value defined in the
- value-attribute
+ <listitem>
+ <para>
+ "less_than" - requires the cell value
+ to be less than the value defined in
+ the value-attribute
+ </para>
</listitem>
- <listitem>
- "not_equal" - requires the cell value to
- not match the one defined in the
- value-attribute
+ <listitem>
+ <para>
+ "not_equal" - requires the cell value
+ to not match the one defined in the
+ value-attribute
+ </para>
</listitem>
- <listitem>
- "between" - requires the cell value to be
- between the values defined in the value-
- and value2 attributes
+ <listitem>
+ <para>
+ "between" - requires the cell value to
+ be between the values defined in the
+ value- and value2 attributes
+ </para>
</listitem>
- <listitem>
- "not_between" - requires the cell value
- not to be between the values defined in
- the value- and value2 attributes
+ <listitem>
+ <para>
+ "not_between" - requires the cell
+ value not to be between the values
+ defined in the value- and value2
+ attributes
+ </para>
</listitem>
</itemizedlist>
</para>
16 years, 2 months