Seam SVN: r11664 - tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: laubai
Date: 2009-11-24 00:27:45 -0500 (Tue, 24 Nov 2009)
New Revision: 11664
Modified:
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Mail.xml
Log:
Edited Mail chapter.
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Mail.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Mail.xml 2009-11-24 04:55:22 UTC (rev 11663)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Mail.xml 2009-11-24 05:27:45 UTC (rev 11664)
@@ -1,7 +1,7 @@
<chapter id="mail">
<title>Email</title>
<para>
- Seam now includes an optional components for templating and sending emails.
+ Seam now includes an optional component for templating and sending emails.
</para>
<para>
@@ -11,13 +11,13 @@
</para>
<para>
- The examples/mail project contains an example of the email support in
+ The <filename>examples/mail</filename> project contains an example of the email support in
action. It demonstrates proper packaging, and it contains a number of
example that demonstrate the key features currently supported.
</para>
<para>
- You can also test your mail's using Seam's integration testing environment.
+ You can also test your mail using Seam's integration testing environment.
See <xref linkend="testing.mail" />.
</para>
@@ -26,7 +26,7 @@
<para>
You don't need to learn a whole new templating language to use Seam Mail
- — an email is just facelet!
+ — an email is just a facelet!
</para>
<programlisting role="XHTML"><![CDATA[<m:message xmlns="http://www.w3.org/1999/xhtml"
@@ -90,7 +90,7 @@
<title>Attachments</title>
<para>
Seam makes it easy to attach files to an email. It supports most of
- the standard java types used when working with files.
+ the standard Java types used when working with files.
</para>
<para>
@@ -160,7 +160,7 @@
<para>
You may be wondering what <literal>cid:#{...}</literal> does. Well, the
- IETF specified that by putting this as the src for your image, the
+ IETF specified that by putting this as the <varname>src</varname> for your image, the
attachments will be looked at when trying to locate the image (the
<literal>Content-ID</literal>'s must match) — magic!
</para>
@@ -224,8 +224,7 @@
<title>Templating</title>
<para>
- The mail templating example shows that facelets templating Just Works
- with the Seam mail tags.
+ The mail templating example shows facelets templating working with the Seam mail tags.
</para>
<para>
@@ -258,7 +257,7 @@
You can also use facelets source tags in your email, but you must place
them in a jar in <literal>WEB-INF/lib</literal> - referencing the
<literal>.taglib.xml</literal> from <literal>web.xml</literal> isn't
- reliable when using Seam Mail (if you send your mail asynchrounously
+ reliable when using Seam Mail (if you send your mail asynchronously
Seam Mail doesn't have access to the full JSF or Servlet context, and
so doesn't know about <literal>web.xml</literal> configuration
parameters).
@@ -274,10 +273,10 @@
</section>
<section>
- <title>Internationalisation</title>
+ <title>Internationalization</title>
<para>
- Seam supports sending internationalised messages. By default, the
+ Seam supports sending internationalized messages. By default, the
encoding provided by JSF is used, but this can be overridden on the
template:
</para>
@@ -329,14 +328,14 @@
JBoss AS has a number of limitations (and isn't bundled in some versions)
therefore we recommend using the <literal>mail-ra.rar</literal>
distributed with Seam is recommended (it's in the <literal>extras/</literal>
- directory in the Seam bundle). <literal>mail-ra.rar</literal> should
+ directory in the Seam bundle). <literal>mail-ra.rar</literal> should
be placed in <literal>$JBOSS_HOME/server/default/deploy</literal>; if the
version of JBoss AS you use already has this file, replace it.
</para>
<note>
<title>Technology preview </title>
- <para>Distributed mail-ra.rar in Seam is marked as technology preview, so standard support is not guaranteed.</para>
+ <para>Distributed <literal>mail-ra.rar</literal> in Seam is marked as technology preview, so standard support is not guaranteed.</para>
</note>
@@ -371,10 +370,10 @@
musn't access the persistence context.
</para>
- <para>
+ <!--<para>
You can find more information on<literal>mail-ra.rar</literal>
at <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=InboundJavaMail">http://wiki.jboss.org/wiki/Wiki.jsp?page=InboundJavaMail</ulink>.
- </para>
+ </para>-->
<para>
If you aren't using JBoss AS you can still use <literal>mail-ra.rar</literal>
@@ -428,8 +427,8 @@
The JBossAS <literal>deploy/mail-service.xml</literal> configures a
JavaMail session binding into JNDI. The default service
configuration will need altering for your network.
- <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=JavaMail">http://wiki.jboss.org/wiki/Wiki.jsp?page=JavaMail</ulink>
- describes the service in more detail.
+ <!--<ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=JavaMail">http://wiki.jboss.org/wiki/Wiki.jsp?page=JavaMail</ulink>
+ describes the service in more detail.-->
</para>
<programlisting role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components"
@@ -515,7 +514,7 @@
<para>
Here we've created two users, <literal>duke</literal>, who has two email
- addresses and an administrator with the username <literal>root</literal>.
+ addresses, and an administrator with the username <literal>root</literal>.
</para>
</section>
@@ -580,7 +579,7 @@
<term><m:from></term>
<listitem>
<para>
- Set's the From: address for the email. You can only have one of
+ Sets the From: address for the email. You can only have one of
these per email.
</para>
<itemizedlist>
@@ -603,7 +602,7 @@
<term><m:replyTo></term>
<listitem>
<para>
- Set's the Reply-to: address for the email. You can only have one
+ Sets the Reply-to: address for the email. You can only have one
of these per email.
</para>
<itemizedlist>
@@ -642,7 +641,7 @@
<term><m:cc></term>
<listitem>
<para>
- Add a cc recipient to the email. Use multiple <m:cc> tags
+ Adds a carbon copy (CC) recipient to the email. Use multiple <m:cc> tags
for multiple ccs. This tag can be safely placed inside a iterator
tag such as <ui:repeat>.
</para>
@@ -665,8 +664,8 @@
<term><m:bcc></term>
<listitem>
<para>
- Add a bcc recipient to the email. Use multiple <m:bcc>
- tags for multiple bccs. This tag can be safely placed inside a
+ Add a BCC recipient to the email. Use multiple <m:bcc>
+ tags for multiple BCCs. This tag can be safely placed inside a
repeat tag such as <ui:repeat>.
</para>
<itemizedlist>
@@ -753,7 +752,7 @@
</para>
</listitem>
</itemizedlist>
- <para>If the value attribute is ommitted:</para>
+ <para>If the value attribute is omitted:</para>
<itemizedlist>
<listitem>
<para>
@@ -781,7 +780,7 @@
<listitem>
<para>
<literal>contentType</literal> — Specify the MIME type
- of the attached file
+ of the attached file.
</para>
</listitem>
</itemizedlist>
@@ -799,7 +798,7 @@
<term><m:body></term>
<listitem>
<para>
- Set's the body for the email. Supports an <literal>alternative</literal>
+ Sets the body for the email. Supports an <literal>alternative</literal>
facet which, if an HTML email is generated can contain
alternative text for a mail reader which doesn't support html.
</para>
14 years, 6 months
Seam SVN: r11663 - tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: laubai
Date: 2009-11-23 23:55:22 -0500 (Mon, 23 Nov 2009)
New Revision: 11663
Modified:
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jms.xml
Log:
Edited JMS chapter.
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jms.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jms.xml 2009-11-24 04:46:42 UTC (rev 11662)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jms.xml 2009-11-24 04:55:22 UTC (rev 11663)
@@ -9,7 +9,7 @@
</para>
<para>
- But for many usecases, JMS is overkill. Seam layers a simple asynchronous method and event
+ But for many use cases, JMS is overkill. Seam layers a simple asynchronous method and event
facility over your choice of <emphasis>dispatchers</emphasis>:
</para>
@@ -46,8 +46,8 @@
<programlisting role="XML"><![CDATA[<async:timer-service-dispatcher/>]]></programlisting>
<para>
- then your asynchronous tasks will be processed by the container's EJB timer service. If
- you're not familiar with the Timer service, don't worry, you don't need to interact with
+ Your asynchronous tasks will be processed by the container's EJB timer service. If
+ you are not familiar with the Timer service, don't worry, you don't need to interact with
it directly if you want to use asynchronous methods in Seam. The important thing to know
is that any good EJB 3.0 implementation will have the option of using persistent timers,
which gives some guarantee that the tasks will eventually be processed.
@@ -250,7 +250,7 @@
processor.schedulePayment(new Date(), 60*60*1000, cal.getTime(), payment);
]]></programlisting>
- <para>Note that the method returns the <literal>QuartzTriggerHandle</literal> object, which you can use later to stop, pause, and resume the scheduler. The <literal>QuartzTriggerHandle</literal> object is serializable, so you can save it into the database if you need to keep it around for extended period of time.</para>
+ <para>Note that the method returns the <literal>QuartzTriggerHandle</literal> object, which you can use later to stop, pause, and resume the scheduler. The <literal>QuartzTriggerHandle</literal> object is serializable, so you can save it into the database if you need to keep it around for an extended period of time.</para>
<programlisting role="JAVA"><![CDATA[QuartzTriggerHandle handle =
processor.schedulePayment(payment.getPaymentDate(),
@@ -286,7 +286,7 @@
processor.schedulePayment(new Date(), "0 10,44 14 ? 3 WED", payment);
]]></programlisting>
- <para>The <literal>@IntervalBusinessDay</literal> annotation supports invocation on the "nth Business Day" scenario. For instance, the following asynchronous method runs at 14:00 on the 2nd business day of each month. By default, it excludes all weekends and US federal holidays until 2010 from the business days.
+ <para>The <literal>@IntervalBusinessDay</literal> annotation supports invocation on the "nth Business Day" scenario. For instance, the following asynchronous method runs at 14:00 on the second business day of each month. By default, it excludes all weekends and US federal holidays until 2010 from the business days.
</para>
<programlisting role="JAVA"><![CDATA[
@@ -307,7 +307,7 @@
new NthBusinessDay(2, "14:00", WEEKLY), payment);
]]></programlisting>
- <para>The <literal>NthBusinessDay</literal> object contains the configuration of the invocation trigger. You can specify more holidays (e.g., company holidays, non-US holidays etc.) via the <literal>additionalHolidays</literal> property.</para>
+ <para>The <literal>NthBusinessDay</literal> object contains the configuration of the invocation trigger. You can specify more holidays (for example, company holidays, non-US holidays etc.) via the <literal>additionalHolidays</literal> property.</para>
<programlisting role="JAVA"><![CDATA[
public class NthBusinessDay implements Serializable
14 years, 6 months
Seam SVN: r11662 - tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: laubai
Date: 2009-11-23 23:46:42 -0500 (Mon, 23 Nov 2009)
New Revision: 11662
Modified:
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jbpm.xml
Log:
Edited jbpm chapter.
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jbpm.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jbpm.xml 2009-11-24 04:28:32 UTC (rev 11661)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jbpm.xml 2009-11-24 04:46:42 UTC (rev 11662)
@@ -5,7 +5,7 @@
JBoss jBPM is a business process management engine for any Java SE or EE
environment. jBPM lets you represent a business process or user
interaction as a graph of nodes representing wait states, decisions,
- tasks, web pages, etc. The graph is defined using a simple, very readable,
+ tasks, web pages, etc. The graph is defined using a simple, very readable
XML dialect called jPDL, and may be edited and visualised graphically using
an eclipse plugin. jPDL is an extensible language, and is suitable for
a range of problems, from defining web application page flow, to traditional
@@ -40,11 +40,11 @@
</itemizedlist>
<para>
- Don't get these two things confused ! They operate at very different levels
+ These two definitions operate at very different levels
or granularity. <emphasis>Pageflow</emphasis>, <emphasis>conversation</emphasis>
and <emphasis>task</emphasis> all refer to a single
interaction with a single user. A business process spans many tasks.
- Futhermore, the two applications of jBPM are totally orthogonal. You can
+ Furthermore, the two applications of jBPM are totally orthogonal. You can
use them together or independently or not at all.
</para>
@@ -145,7 +145,7 @@
</page>]]></programlisting>
<para>
- If you find navigation rules overly verbose, you can return view ids
+ If you find navigation rules overly verbose, you can return view IDs
directly from your action listener methods:
</para>
@@ -242,7 +242,7 @@
constrained set of possible transitions to other states. The stateless
model is an <emphasis>ad hoc</emphasis> model which is suitable to
relatively unconstrained, freeform navigation where the user decides
- where he/she wants to go next, not the application.
+ where they want to go next, not the application.
</para>
<para>
@@ -391,7 +391,7 @@
<programlisting role="JAVA"><![CDATA[@Begin(pageflow="numberguess")
public void begin() { ... }]]></programlisting>
- <para>Alternatively we can start a pageflow using pages.xml:</para>
+ <para>Alternatively we can start a pageflow using <filename>pages.xml</filename>:</para>
<programlisting role="XML"><![CDATA[<page>
<begin-conversation pageflow="numberguess"/>
@@ -400,7 +400,7 @@
<para>
If we are beginning the pageflow during the <literal>RENDER_RESPONSE</literal>
phase—during a <literal>@Factory</literal> or <literal>@Create</literal>
- method, for example—we consider ourselves to be already at the page being
+ method, for example — we consider ourselves to be already at the page being
rendered, and use a <literal><start-page></literal> node as the first node
in the pageflow, as in the example above.
</para>
@@ -565,7 +565,7 @@
<section>
<title>Pageflow composition</title>
<para>
- It is possible to compose pageflows and have one pageflow pause
+ It is possible to compose pageflows and have one pageflow
pause while another pageflow executes. The <literal><process-state></literal>
node pauses the outer pageflow, and begins execution of a named
pageflow:
@@ -669,7 +669,7 @@
As jBPM processes are persistent across application restarts,
when using Seam in a production environment you won't want to
install the process definition every time the application starts.
- Therefore, in a production environment, you'll need to deploy
+ Therefore, in a production environment, you will need to deploy
the process to jBPM outside of Seam. In other words, only install
process definitions from <literal>components.xml</literal> when
developing your application.
@@ -710,7 +710,7 @@
<programlisting role="JAVA"><![CDATA[@CreateProcess(definition="todo")
public void createTodo() { ... }]]></programlisting>
- <para>Alternatively we can initiate a business process using pages.xml:</para>
+ <para>Alternatively we can initiate a business process using <filename>pages.xml</filename>:</para>
<programlisting role="XML"><![CDATA[<page>
<create-process definition="todo" />
@@ -803,7 +803,7 @@
<programlisting role="JAVA"><![CDATA[@StartTask
public String start() { ... }]]></programlisting>
- <para>Alternatively we can begin work on a task using pages.xml:</para>
+ <para>Alternatively we can begin work on a task using <filename>pages.xml</filename>:</para>
<programlisting role="XML"><![CDATA[<page>
<start-task />
@@ -824,7 +824,7 @@
<programlisting role="JAVA"><![CDATA[@EndTask(transition="completed")
public String completed() { ... }]]></programlisting>
- <para>Alternatively we can use pages.xml:</para>
+ <para>Alternatively we can use <filename>pages.xml</filename>:</para>
<programlisting role="XML"><![CDATA[<page>
<end-task transition="completed" />
14 years, 6 months
Seam SVN: r11661 - tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: laubai
Date: 2009-11-23 23:28:32 -0500 (Mon, 23 Nov 2009)
New Revision: 11661
Modified:
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Itext.xml
Log:
Edited itext chapters.
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Itext.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Itext.xml 2009-11-24 03:47:48 UTC (rev 11660)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Itext.xml 2009-11-24 04:28:32 UTC (rev 11661)
@@ -357,7 +357,7 @@
</listitem>
<listitem>
- <para><literal>style</literal> — The font styles. Any combination of :
+ <para><literal>style</literal> — The font styles. Any combination of:
<literal>NORMAL</literal>, <literal>BOLD</literal>,
<literal>ITALIC</literal>, <literal>OBLIQUE</literal>,
<literal>UNDERLINE</literal>, <literal>LINE-THROUGH</literal></para>
@@ -453,8 +453,8 @@
<listitem>
<para>
- <literal>alignment</literal>— The alignment of the image. (see
- <xref linkend="itext.alignment"/> for possible values) </para>
+ <literal>alignment</literal> — The alignment of the image. (See
+ <xref linkend="itext.alignment"/> for possible values.)</para>
</listitem>
<listitem>
@@ -628,13 +628,13 @@
<listitem>
<para>
<literal>alignment</literal> — The alignment of the header/footer
- box section. (see <xref linkend="itext.alignment"/> for alignment values)</para>
+ box section. (See <xref linkend="itext.alignment"/> for alignment values.)</para>
</listitem>
<listitem>
<para><literal>backgroundColor</literal> — The background color of the
- header/footer box. (see <xref linkend="itext.colors"/> for color values)
+ header/footer box. (See <xref linkend="itext.colors"/> for color values.)
</para>
</listitem>
@@ -646,8 +646,8 @@
header/footer box. Individual border sides can be set using
<literal>borderColorLeft</literal>, <literal>borderColorRight</literal>,
<literal>borderColorTop</literal> and
- <literal>borderColorBottom</literal>.(see <xref linkend="itext.colors"/> for
- color values) </para>
+ <literal>borderColorBottom</literal>. (See <xref linkend="itext.colors"/> for
+ color values.)</para>
</listitem>
<listitem>
<para>
@@ -729,7 +729,7 @@
<para>If the generated document follows a book/article structure, the
<literal>p:chapter</literal> and <literal>p:section</literal> tags can be used to
provide the necessary structure. Sections can only be used inside of chapters, but
- they may be nested arbitrarily deep. Most PDF viewers provide easy navigation
+ they may be nested to an arbitrary depth. Most PDF viewers provide easy navigation
between chapters and sections in a document. </para>
<para>
@@ -743,7 +743,7 @@
<listitem>
<para>
<literal>alignment</literal> — The alignment of the header/footer
- box section. (see <xref linkend="itext.alignment"/> for alignment values)</para>
+ box section. (See <xref linkend="itext.alignment"/> for alignment values.)</para>
</listitem>
@@ -810,7 +810,7 @@
<title>Lists</title>
<para>List structures can be displayed using the <literal>p:list</literal> and <literal>p:listItem</literal>
- tags. Lists may contain arbitrarily-nested sublists. List items may not be used outside of a list. he
+ tags. Lists may contain arbitrarily-nested sublists. List items may not be used outside of a list. The
following document uses the <literal>ui:repeat</literal> tag to to display a list of values retrieved
from a Seam component. </para>
@@ -921,13 +921,13 @@
<listitem>
<para>
<literal>alignment</literal> — The alignment of the header/footer
- box section. (see <xref linkend="itext.alignment"/> for alignment values)</para>
+ box section. (See <xref linkend="itext.alignment"/> for alignment values.)</para>
</listitem>
<listitem>
<para><literal>alignment</literal> — The alignment of the list item.
- (See <xref linkend="itext.alignment"/> for possible values)</para>
+ (See <xref linkend="itext.alignment"/> for possible values.)</para>
</listitem>
@@ -972,8 +972,8 @@
<title>Tables</title>
<para>Table structures can be created using the <literal>p:table</literal> and <literal>p:cell</literal>
- tags. Unlike many table structures, there is no explicit row declaration. If a table has 3 columns, then
- every 3 cells will automatically form a row. Header and footer rows can be declared, and the headers and
+ tags. Unlike many table structures, there is no explicit row declaration. If a table has three columns, then
+ every three cells will automatically form a row. Header and footer rows can be declared, and the headers and
footers will be repeated in the event a table structure spans multiple pages.</para>
@@ -1014,7 +1014,7 @@
<listitem>
<para><literal>widths</literal> — The relative widths of each column.
There should be one value for each column. For example: widths="2 1 1" would
- indicate that there are 3 columns and the first column should be twice the
+ indicate that there are three columns and the first column should be twice the
size of the second and third column.</para>
</listitem>
@@ -1031,7 +1031,7 @@
<listitem>
<para><literal>footerRows</literal> — The number of rows that are
considered to be footer rows. This value is subtracted from the
- <literal>headerRows</literal> value. If document has 2 rows which make
+ <literal>headerRows</literal> value. If document has two rows which make
up the header and one row that makes up the footer,
<literal>headerRows</literal> should be set to 3 and
<literal>footerRows</literal> should be set to 1</para>
@@ -1047,7 +1047,7 @@
<listitem>
<para><literal>horizontalAlignment</literal> — The horizontal
alignment of the table. (See <xref linkend="itext.alignment"/> for possible
- values)</para>
+ values.)</para>
</listitem>
<listitem>
@@ -1165,15 +1165,15 @@
<listitem>
<para><literal>horizontalAlignment</literal> — The horizontal
- alignment of the cell. (see <xref linkend="itext.alignment"/> for possible
- values)</para>
+ alignment of the cell. (See <xref linkend="itext.alignment"/> for possible
+ values.)</para>
</listitem>
<listitem>
<para><literal>verticalAlignment</literal> — The vertical alignment of
- the cell. (see <xref linkend="itext.alignment"/> for possible values)</para>
+ the cell. (See <xref linkend="itext.alignment"/> for possible values.)</para>
</listitem>
@@ -1353,7 +1353,7 @@
<para> The default implementation serves PDF documents from a generic URL,
<literal>/seam-doc.seam</literal>. Many browsers (and users) would prefer to see URLs that contain the
actual PDF name like <literal>/myDocument.pdf</literal>. This capability requires some configuration. To
- serve PDF files, all *.pdf resources should be mapped to the DocumentStoreServlet:</para>
+ serve PDF files, all <filename>*.pdf</filename> resources should be mapped to the DocumentStoreServlet:</para>
<programlisting role="XML"><![CDATA[<servlet>
<servlet-name>Document Store Servlet</servlet-name>
@@ -1375,7 +1375,7 @@
</components>]]></programlisting>
<para> Generated documents are stored in conversation scope and will expire when the conversation ends. At
- that point, references to the document will be invalid. To You can specify a default view to be shown
+ that point, references to the document will be invalid. You can specify a default view to be shown
when a document does not exist using the <literal>error-page</literal> property of the documentStore. </para>
<programlisting role="XML"><![CDATA[<pdf:document-store use-extensions="true" error-page="/pdfMissing.seam" />]]></programlisting>
</section>
@@ -1421,7 +1421,7 @@
<listitem>
<para>
- <literal>borderPaint</literal> — The color of the border, if visible;
+ <literal>borderPaint</literal> — The color of the border, if visible.
</para>
</listitem>
<listitem>
@@ -1448,12 +1448,12 @@
<listitem>
<para>
- <literal>domainGridlinesVisible</literal>— Controls whether or not
+ <literal>domainGridlinesVisible</literal> — Controls whether or not
gridlines for the domain axis are shown on the chart. </para>
</listitem>
<listitem>
<para>
- <literal>domainGridlinePaint</literal>— The color of the domain
+ <literal>domainGridlinePaint</literal> — The color of the domain
gridlines, if visible. </para>
</listitem>
<listitem>
@@ -1486,13 +1486,13 @@
<listitem>
<para>
- <literal>legendItemPaint</literal>— The default color of the text
+ <literal>legendItemPaint</literal> — The default color of the text
labels in the legend. </para>
</listitem>
<listitem>
<para>
- <literal>legendItemBackgoundPaint</literal>— The background color for
+ <literal>legendItemBackgoundPaint</literal> — The background color for
the legend, if different from the chart background color.</para>
</listitem>
@@ -1504,27 +1504,27 @@
<listitem>
<para>
- <literal>plotBackgroundPaint</literal>— The color of the plot
+ <literal>plotBackgroundPaint</literal> — The color of the plot
background.</para>
</listitem>
<listitem>
<para>
- <literal>plotBackgroundAlpha</literal>— The alpha (transparency) level
+ <literal>plotBackgroundAlpha</literal> — The alpha (transparency) level
of the plot background. It should be a number between 0 (completely transparent)
and 1 (completely opaque). </para>
</listitem>
<listitem>
<para>
- <literal>plotForegroundAlpha</literal>— The alpha (transparency) level
+ <literal>plotForegroundAlpha</literal> — The alpha (transparency) level
of the plot. It should be a number between 0 (completely transparent) and 1
(completely opaque). </para>
</listitem>
<listitem>
<para>
- <literal>plotOutlinePaint</literal>— The color of the range gridlines,
+ <literal>plotOutlinePaint</literal> — The color of the range gridlines,
if visible. </para>
</listitem>
<listitem>
@@ -1546,12 +1546,12 @@
<listitem>
<para>
- <literal>rangeGridlinesVisible</literal>— Controls whether or not
+ <literal>rangeGridlinesVisible</literal> — Controls whether or not
gridlines for the range axis are shown on the chart. </para>
</listitem>
<listitem>
<para>
- <literal>rangeGridlinePaint</literal>— The color of the range
+ <literal>rangeGridlinePaint</literal> — The color of the range
gridlines, if visible. </para>
</listitem>
<listitem>
@@ -1566,12 +1566,12 @@
</listitem>
<listitem>
<para>
- <literal>titlePaint</literal>— The color of the chart title text.
+ <literal>titlePaint</literal> — The color of the chart title text.
</para>
</listitem>
<listitem>
<para>
- <literal>titleBackgroundPaint</literal>— The background color around
+ <literal>titleBackgroundPaint</literal> — The background color around
the chart title.</para>
</listitem>
<listitem>
@@ -1620,7 +1620,7 @@
<listitem>
<para>
- <literal>borderPaint</literal> — The color of the border, if visible;
+ <literal>borderPaint</literal> — The color of the border, if visible.
</para>
</listitem>
<listitem>
@@ -1647,18 +1647,18 @@
<listitem>
<para>
- <literal>domainGridlinesVisible</literal>— Controls whether or not
+ <literal>domainGridlinesVisible</literal> — Controls whether or not
gridlines for the domain axis are shown on the chart. </para>
</listitem>
<listitem>
<para>
- <literal>domainGridlinePaint</literal>— The color of the domain
+ <literal>domainGridlinePaint</literal> — The color of the domain
gridlines, if visible. </para>
</listitem>
<listitem>
<para>
<literal>domainGridlineStroke</literal> — The stroke style of the
- domain gridleines, if visible. </para>
+ domain gridlines, if visible. </para>
</listitem>
<listitem>
@@ -1685,13 +1685,13 @@
<listitem>
<para>
- <literal>legendItemPaint</literal>— The default color of the text
+ <literal>legendItemPaint</literal> — The default color of the text
labels in the legend. </para>
</listitem>
<listitem>
<para>
- <literal>legendItemBackgoundPaint</literal>— The background color for
+ <literal>legendItemBackgoundPaint</literal> — The background color for
the legend, if different from the chart background color.</para>
</listitem>
@@ -1703,27 +1703,27 @@
<listitem>
<para>
- <literal>plotBackgroundPaint</literal>— The color of the plot
+ <literal>plotBackgroundPaint</literal> — The color of the plot
background.</para>
</listitem>
<listitem>
<para>
- <literal>plotBackgroundAlpha</literal>— The alpha (transparency) level
+ <literal>plotBackgroundAlpha</literal> — The alpha (transparency) level
of the plot background. It should be a number between 0 (completely transparent)
and 1 (completely opaque). </para>
</listitem>
<listitem>
<para>
- <literal>plotForegroundAlpha</literal>— The alpha (transparency) level
+ <literal>plotForegroundAlpha</literal> — The alpha (transparency) level
of the plot. It should be a number between 0 (completely transparent) and 1
(completely opaque). </para>
</listitem>
<listitem>
<para>
- <literal>plotOutlinePaint</literal>— The color of the range gridlines,
+ <literal>plotOutlinePaint</literal> — The color of the range gridlines,
if visible. </para>
</listitem>
<listitem>
@@ -1745,12 +1745,12 @@
<listitem>
<para>
- <literal>rangeGridlinesVisible</literal>— Controls whether or not
+ <literal>rangeGridlinesVisible</literal> — Controls whether or not
gridlines for the range axis are shown on the chart. </para>
</listitem>
<listitem>
<para>
- <literal>rangeGridlinePaint</literal>— The color of the range
+ <literal>rangeGridlinePaint</literal> — The color of the range
gridlines, if visible. </para>
</listitem>
<listitem>
@@ -1765,12 +1765,12 @@
</listitem>
<listitem>
<para>
- <literal>titlePaint</literal>— The color of the chart title text.
+ <literal>titlePaint</literal> — The color of the chart title text.
</para>
</listitem>
<listitem>
<para>
- <literal>titleBackgroundPaint</literal>— The background color around
+ <literal>titleBackgroundPaint</literal> — The background color around
the chart title.</para>
</listitem>
<listitem>
@@ -1814,120 +1814,120 @@
<listitem>
<para>
- <literal>title</literal>— The chart title text. </para>
+ <literal>title</literal> — The chart title text. </para>
</listitem>
<listitem>
<para>
- <literal>label</literal>— The default label text for pie sections.
+ <literal>label</literal> — The default label text for pie sections.
</para>
</listitem>
<listitem>
<para>
- <literal>legend</literal>— A boolean value indicating whether or not
+ <literal>legend</literal> — A boolean value indicating whether or not
the chart should include a legend. Default value is true </para>
</listitem>
<listitem>
<para>
- <literal>is3D</literal>—A boolean value indicating that the chart
+ <literal>is3D</literal> —A boolean value indicating that the chart
should be rendered in 3D instead of 2D. </para>
</listitem>
<listitem>
<para>
- <literal>labelLinkMargin</literal>— The link margin for labels.
+ <literal>labelLinkMargin</literal> — The link margin for labels.
</para>
</listitem>
<listitem>
<para>
- <literal>labelLinkPaint</literal>— The paint used for the label
+ <literal>labelLinkPaint</literal> — The paint used for the label
linking lines. </para>
</listitem>
<listitem>
<para>
- <literal>labelLinkStroke</literal>— he stroke used for the label
+ <literal>labelLinkStroke</literal> — he stroke used for the label
linking lines. </para>
</listitem>
<listitem>
<para>
- <literal>labelLinksVisible</literal>— A flag that controls whether or
+ <literal>labelLinksVisible</literal> — A flag that controls whether or
not the label links are drawn. </para>
</listitem>
<listitem>
<para>
- <literal>labelOutlinePaint</literal>— The paint used to draw the
+ <literal>labelOutlinePaint</literal> — The paint used to draw the
outline of the section labels. </para>
</listitem>
<listitem>
<para>
- <literal>labelOutlineStroke</literal>— The stroke used to draw the
+ <literal>labelOutlineStroke</literal> — The stroke used to draw the
outline of the section labels. </para>
</listitem>
<listitem>
<para>
- <literal>labelShadowPaint</literal>— The paint used to draw the shadow
+ <literal>labelShadowPaint</literal> — The paint used to draw the shadow
for the section labels. </para>
</listitem>
<listitem>
<para>
- <literal>labelPaint</literal>— The color used to draw the section
- labels </para>
+ <literal>labelPaint</literal> — The color used to draw the section
+ labels. </para>
</listitem>
<listitem>
<para>
- <literal>labelGap</literal>— The gap between the labels and the plot
+ <literal>labelGap</literal> — The gap between the labels and the plot
as a percentage of the plot width. </para>
</listitem>
<listitem>
<para>
- <literal>labelBackgroundPaint</literal>— The color used to draw the
+ <literal>labelBackgroundPaint</literal> — The color used to draw the
background of the section labels. If this is null, the background is not filled.
</para>
</listitem>
<listitem>
<para>
- <literal>startAngle</literal>— The starting angle of the first
+ <literal>startAngle</literal> — The starting angle of the first
section. </para>
</listitem>
<listitem>
<para>
- <literal>circular</literal>— A boolean value indicating that the chart
+ <literal>circular</literal> — A boolean value indicating that the chart
should be drawn as a circle. If false, the chart is drawn as an ellipse. The
default is true. </para>
</listitem>
<listitem>
<para>
- <literal>direction</literal>— The direction the pie section are drawn.
+ <literal>direction</literal> — The direction the pie section are drawn.
One of: <literal>clockwise</literal> or <literal>anticlockwise</literal>. The
default is <literal>clockwise</literal>. </para>
</listitem>
<listitem>
<para>
- <literal>sectionOutlinePaint</literal>— The outline paint for all
+ <literal>sectionOutlinePaint</literal> — The outline paint for all
sections. </para>
</listitem>
<listitem>
<para>
- <literal>sectionOutlineStroke</literal>— The outline stroke for all
+ <literal>sectionOutlineStroke</literal> — The outline stroke for all
sections </para>
</listitem>
<listitem>
<para>
- <literal>sectionOutlinesVisible</literal>— Indicates whether an
+ <literal>sectionOutlinesVisible</literal> — Indicates whether an
outline is drawn for each section in the plot. </para>
</listitem>
<listitem>
<para>
- <literal>baseSectionOutlinePaint</literal>— The base section outline
+ <literal>baseSectionOutlinePaint</literal> — The base section outline
paint. </para>
</listitem>
<listitem>
<para>
- <literal>baseSectionPaint</literal>— The base section paint. </para>
+ <literal>baseSectionPaint</literal> — The base section paint. </para>
</listitem>
<listitem>
<para>
- <literal>baseSectionOutlineStroke</literal>— The base section outline
+ <literal>baseSectionOutlineStroke</literal> — The base section outline
stroke. </para>
</listitem>
</itemizedlist>
@@ -1978,7 +1978,7 @@
-->
<listitem>
<para>
- <literal>seriesPaint</literal> — The color of each item in the series
+ <literal>seriesPaint</literal> — The color of each item in the series.
</para>
</listitem>
@@ -2097,7 +2097,7 @@
<para>
<emphasis>Description</emphasis>
</para>
- <para>The color component declares a color or gradient than can be referenced when drawing
+ <para>The color component declares a color or gradient that can be referenced when drawing
filled shapes. </para>
<para>
<emphasis>Attributes</emphasis>
@@ -2108,7 +2108,7 @@
<listitem>
<para>
<literal>color</literal> — The color value. For gradient colors, this
- the starting color. <xref linkend="itext.colors"/>
+ the starting color. <xref linkend="itext.colors"/>.
</para>
</listitem>
<listitem>
@@ -2207,7 +2207,7 @@
<title>Bar codes</title>
<para>Seam can use iText to generate barcodes in a wide variety of formats. These barcodes can
be embedded in a PDF document or displayed as an image on a web page. Note that
- when used with HTML images, barcodes can not currently display barcode text in the barcode.
+ when used with HTML images, barcodes cannot currently display barcode text in the barcode.
</para>
<informaltable id="itext.barcode">
@@ -2246,17 +2246,17 @@
</listitem>
<listitem>
<para>
- <literal>code</literal>— The value to be encoded by the barcode.
+ <literal>code</literal> — The value to be encoded by the barcode.
</para>
</listitem>
<listitem>
<para>
- <literal>xpos</literal>— For PDFs, the absolute y position of the
+ <literal>xpos</literal> — For PDFs, the absolute y position of the
barcode on the page. </para>
</listitem>
<listitem>
<para>
- <literal>ypos</literal>— For PDFs, the absolute y position of the
+ <literal>ypos</literal> — For PDFs, the absolute y position of the
barcode on the page. </para>
</listitem>
<listitem>
@@ -2266,7 +2266,7 @@
</listitem>
<listitem>
<para>
- <literal>barHeight</literal> — The height of the bars in the barCode
+ <literal>barHeight</literal> — The height of the bars in the barCode.
</para>
</listitem>
@@ -2358,7 +2358,7 @@
</listitem>
<listitem>
<para>
- <literal>height</literal> — ..The height of the component to be rendered. </para>
+ <literal>height</literal> — The height of the component to be rendered. </para>
</listitem>
<listitem>
<para>
14 years, 6 months
Seam SVN: r11660 - tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: laubai
Date: 2009-11-23 22:47:48 -0500 (Mon, 23 Nov 2009)
New Revision: 11660
Modified:
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Groovy.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Hsearch.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/I18n.xml
Log:
Edited groovy, hsearch, i18n chapters.
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Groovy.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Groovy.xml 2009-11-24 03:39:31 UTC (rev 11659)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Groovy.xml 2009-11-24 03:47:48 UTC (rev 11660)
@@ -5,10 +5,9 @@
<title>Groovy integration</title>
<para>One aspect of JBoss Seam is its RAD (Rapid Application Development) capability. While not synonymous with RAD,
- one interesting tool in this space is dynamic languages. Until recently, choosing a dynamic language was
- required choosing a completely different development platform (a development platform with a set of APIs and a
- runtime so great that you would no longer want to use you old legacy Java [sic] APIs anymore, which would be
- lucky because you would be forced to use those proprietary APIs anyway). Dynamic languages built on top of the
+ one interesting tool in this space is dynamic languages. Until recently, choosing a dynamic language
+ required choosing a completely different development platform with a different set of Java APIs.
+ Dynamic languages built on top of the
Java Virtual Machine, and <ulink url="http://groovy.codehaus.org">Groovy</ulink> in particular broke this
approach in silos.</para>
@@ -46,8 +45,8 @@
<section>
<title>Writing Seam applications in Groovy</title>
- <para>There is not much to say about it. Since a Groovy object is a Java object, you can virtually write any
- Seam component, or any class for what it worth, in Groovy and deploy it. You can also mix Groovy classes and
+ <para>Since a Groovy object is a Java object, you can virtually write any
+ Seam component, or any class, in Groovy and deploy it. You can also mix Groovy classes and
Java classes in the same application.</para>
<section>
@@ -94,7 +93,7 @@
}
}</programlisting>
- <para>Groovy natively support the notion of properties (getter/setter), so there is no need to
+ <para>Groovy natively supports the notion of properties (getter/setter), so there is no need to
explicitly write verbose getters and setters: in the previous example, the hotel class can be
accessed from Java as <code>hotel.getCity()</code>, the getters and setters being generated by the
Groovy compiler. This type of syntactic sugar makes the entity code very concise.</para>
@@ -143,7 +142,7 @@
<section>
<title>seam-gen</title>
- <para>Seam gen has a transparent integration with Groovy. You can write Groovy code in seam-gen backed
+ <para>Seam gen itegrates transparently with Groovy. You can write Groovy code in seam-gen backed
projects without any additional infrastructure requirement. When writing a Groovy entity, simply place
your <filename>.groovy</filename> files in <filename>src/model</filename>. Unsurprisingly, when writing
an action, simply place your <filename>.groovy</filename> files in
@@ -166,10 +165,10 @@
<title>Deploying Groovy code</title>
<para>A Groovy class <emphasis>is</emphasis> a Java class, with a bytecode representation just like a Java
- class. To deploy, a Groovy entity, a Groovy Session bean or a Groovy Seam component, a compilation step
+ class. To deploy a Groovy entity, a Groovy Session bean or a Groovy Seam component, a compilation step
is necessary. A common approach is to use the <literal>groovyc</literal> ant task. Once compiles, a
Groovy class is in no way different than a Java class and the application server will treat them
- equally. Note that this allow a seamless mix of Groovy and Java code.</para>
+ equally. Note that this allows a seamless mix of Groovy and Java code.</para>
</section>
<section>
@@ -183,7 +182,7 @@
incrementally with no need to restart the application (and obviously not the application server either).</para>
<para>Be aware that the native .groovy file deployment suffers the same limitations as the regular Seam
- hotdeployment:</para>
+ hot deployment:</para>
<itemizedlist>
<listitem>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Hsearch.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Hsearch.xml 2009-11-24 03:39:31 UTC (rev 11659)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Hsearch.xml 2009-11-24 03:47:48 UTC (rev 11660)
@@ -7,24 +7,23 @@
<section>
<title>Introduction</title>
- <para>Full text search engines like Apache Lucene™ are a very powerful
+ <para>Full text search engines like Apache Lucene are a very powerful
technology that bring full text and efficient queries to applications.
Hibernate Search, which uses Apache Lucene under the covers, indexes your
domain model with the addition of a few annotations, takes care of the
database / index synchronization and returns regular managed objects that
- are matched by full text queries. Keep in mind, thought, that there are
+ are matched by full text queries. Keep in mind, though, that there are
mismatches that arise when dealing with an object domain model over a text
index (keeping the index up to date, mismatch between the index structure
and the domain model, and querying mismatch). But the benefits of speed
and efficiency far outweigh these limitations.</para>
- <para>Hibernate Search has been designed to integrates nicely and as
+ <para>Hibernate Search has been designed to integrate as
naturally as possible with JPA and Hibernate. As a natural extension,
JBoss Seam provides an Hibernate Search integration.</para>
- <para>Please refer to the <ulink
- url="http://www.hibernate.org/hib_docs/search/reference/en/html_single/">Hibernate
- Search documentation</ulink> for information specific to the Hibernate
+ <para>Please refer to the Hibernate Search documentation provided with this release
+ of JBoss Enterprise Application Platform for information specific to the Hibernate
Search project.</para>
<note>
@@ -60,7 +59,7 @@
</persistence-unit>]]></programlisting>
<para>If you plan to target Hibernate Annotations or EntityManager 3.2.x
- (embedded into JBoss EAP AS 4.3), you also need to configure the
+ (embedded into JBoss Enterprise Application Platform 4.3), you also need to configure the
appropriate event listeners.</para>
<programlisting role="XML"><![CDATA[<persistence-unit name="sample">
@@ -115,10 +114,8 @@
<section>
<title>Usage</title>
- <para>Hibernate Search uses annotations to map entities to a Lucene index,
- check the <ulink
- url="http://www.hibernate.org/hib_docs/search/reference/en/html_single/">reference
- documentation</ulink> for more informations.</para>
+ <para>Hibernate Search uses annotations to map entities to a Lucene index. For more information,
+ see the Hibernate Reference Guide provided with this release.</para>
<para>Hibernate Search is fully integrated with the API and semantic of
JPA / Hibernate. Switching from a HQL or Criteria based query requires
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/I18n.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/I18n.xml 2009-11-24 03:39:31 UTC (rev 11659)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/I18n.xml 2009-11-24 03:47:48 UTC (rev 11660)
@@ -7,21 +7,21 @@
<para>
Seam makes it easy to build internationalized applications. First, let's
walk through all the stages needed to internationalize and localize your
- app. Then we'll take a look at the components Seam bundles.
+ application. Then we'll take a look at the component Seam bundles.
</para>
<section>
- <title>Internationalizing your app</title>
+ <title>Internationalizing your application</title>
<para>
- A JEE application consists of many components and all of them must be
+ A Java EE application consists of many components and all of them must be
configured properly for your application to be localized.
</para>
<para>
Starting at the bottom, the first step is to ensure that your database
- server and client is using the correct character encoding for your
- locale. Normally you'll want to use UTF-8. How to do this is outside
+ server and client uses the correct character encoding for your
+ locale. Normally you will want to use UTF-8. How to do this is outside
the scope of this tutorial.
</para>
@@ -104,8 +104,8 @@
To set the display character encoding, you need to use the
<literal><f:view locale="cs_CZ"/></literal> tag (here we tell
JSF to use the Czech locale). You may want to change the encoding of
- the xml document itself if you want to embed localized strings in the
- xml. To do this alter the encoding attribute in xml declaration
+ the XML document itself if you want to embed localized strings in the
+ XML. To do this alter the encoding attribute in XML declaration
<literal><?xml version="1.0" encoding="UTF-8"?></literal> as
required.
</para>
@@ -129,7 +129,7 @@
<para>Each user login session has an associated instance of
<literal>java.util.Locale</literal> (available to the application as a
component named <literal>locale</literal>). Under normal circumstances,
- you won't need to do any special configuration to set the locale. Seam
+ you will not need to do any special configuration to set the locale. Seam
just delegates to JSF to determine the active locale:</para>
<itemizedlist>
@@ -190,7 +190,7 @@
<para>JSF supports internationalization of user interface labels and
descriptive text via the use of <literal><f:loadBundle /></literal>.
You can use this approach in Seam applications. Alternatively, you can
- take advantage of the Seam <literal> messages</literal> component to
+ take advantage of the Seam <literal>messages</literal> component to
display templated labels with embedded EL expressions.</para>
<section>
@@ -202,9 +202,7 @@
internationalized labels available via this special resource bundle. By
default, the resource bundle used by Seam is named
<literal>messages</literal> and so you'll need to define your labels in
- files named <literal> messages.properties</literal>, <literal>
- messages_en.properties</literal>, <literal>
- messages_en_AU.properties</literal>, etc. These files usually belong in
+ files named <literal>messages.properties</literal>, <literal>messages_en.properties</literal>, <literal>messages_en_AU.properties</literal>, etc. These files usually belong in
the <literal>WEB-INF/classes</literal> directory.</para>
<para>So, in <literal>messages_en.properties</literal>:</para>
@@ -230,7 +228,7 @@
<para>If you want to define a message just for a particular page, you
can specify it in a resource bundle with the same name as the JSF view
- id, with the leading <literal>/</literal> and trailing file extension
+ ID, with the leading <literal>/</literal> and trailing file extension
removed. So we could put our message in <literal>
welcome/hello_en.properties</literal> if we only needed to display the
message on <literal> /welcome/hello.jsp</literal>.</para>
@@ -334,7 +332,9 @@
</theme:available-themes>
</theme:theme-selector></programlisting>
- <para>Note that the first theme listed is the default theme.</para>
+ <note>
+ <para>The first theme listed is the default theme.</para>
+ </note>
<para>Themes are defined in a properties file with the same name as the
theme. For example, the <literal>default</literal> theme is defined as a
14 years, 6 months
Seam SVN: r11659 - in modules/trunk/persistence/src/main: java/org/seamframework/persistence and 3 other directories.
by seam-commits@lists.jboss.org
Author: sboscarine
Date: 2009-11-23 22:39:31 -0500 (Mon, 23 Nov 2009)
New Revision: 11659
Added:
modules/trunk/persistence/src/main/resources/
modules/trunk/persistence/src/main/resources/META-INF/
modules/trunk/persistence/src/main/resources/META-INF/services/
modules/trunk/persistence/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
Modified:
modules/trunk/persistence/src/main/java/org/seamframework/persistence/PersistenceContextExtension.java
Log:
initial commit
Modified: modules/trunk/persistence/src/main/java/org/seamframework/persistence/PersistenceContextExtension.java
===================================================================
--- modules/trunk/persistence/src/main/java/org/seamframework/persistence/PersistenceContextExtension.java 2009-11-24 02:42:50 UTC (rev 11658)
+++ modules/trunk/persistence/src/main/java/org/seamframework/persistence/PersistenceContextExtension.java 2009-11-24 03:39:31 UTC (rev 11659)
@@ -35,11 +35,6 @@
*/
public class PersistenceContextExtension implements Extension
{
- public PersistenceContextExtension()
- {
- System.out.println("\n\n" + this.getClass() + " was constructed");
- }
-
private Bean<EntityManagerFactory> emfBean;
/**
Added: modules/trunk/persistence/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
===================================================================
--- modules/trunk/persistence/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension (rev 0)
+++ modules/trunk/persistence/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2009-11-24 03:39:31 UTC (rev 11659)
@@ -0,0 +1 @@
+org.seamframework.persistence.PersistenceContextExtension
\ No newline at end of file
14 years, 6 months
Seam SVN: r11658 - in modules/trunk/transaction/src/main/java/org: seamframework and 1 other directories.
by seam-commits@lists.jboss.org
Author: sboscarine
Date: 2009-11-23 21:42:50 -0500 (Mon, 23 Nov 2009)
New Revision: 11658
Added:
modules/trunk/transaction/src/main/java/org/seamframework/
modules/trunk/transaction/src/main/java/org/seamframework/tx/
modules/trunk/transaction/src/main/java/org/seamframework/tx/EntityTransactionInterceptor.java
modules/trunk/transaction/src/main/java/org/seamframework/tx/Transactional.java
Log:
initial commit
Added: modules/trunk/transaction/src/main/java/org/seamframework/tx/EntityTransactionInterceptor.java
===================================================================
--- modules/trunk/transaction/src/main/java/org/seamframework/tx/EntityTransactionInterceptor.java (rev 0)
+++ modules/trunk/transaction/src/main/java/org/seamframework/tx/EntityTransactionInterceptor.java 2009-11-24 02:42:50 UTC (rev 11658)
@@ -0,0 +1,35 @@
+package org.seamframework.tx;
+
+import javax.enterprise.inject.Any;
+import javax.inject.Inject;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+import javax.persistence.EntityManager;
+
+/**
+ * Declarative JPA EntityTransactions
+ *
+ * @author Gavin King
+ *
+ */
+@Transactional @Interceptor
+public class EntityTransactionInterceptor {
+
+ private @Inject @Any EntityManager em;
+
+ @AroundInvoke
+ public Object aroundInvoke(InvocationContext ic) throws Exception {
+ boolean act = !em.getTransaction().isActive();
+ if (act) em.getTransaction().begin();
+ try {
+ Object result = ic.proceed();
+ if (act) em.getTransaction().commit();
+ return result;
+ }
+ catch (Exception e) {
+ if (act) em.getTransaction().rollback();
+ throw e;
+ }
+ }
+}
\ No newline at end of file
Added: modules/trunk/transaction/src/main/java/org/seamframework/tx/Transactional.java
===================================================================
--- modules/trunk/transaction/src/main/java/org/seamframework/tx/Transactional.java (rev 0)
+++ modules/trunk/transaction/src/main/java/org/seamframework/tx/Transactional.java 2009-11-24 02:42:50 UTC (rev 11658)
@@ -0,0 +1,17 @@
+package org.seamframework.tx;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBinding;
+
+@Retention(RUNTIME)
+@Target({METHOD, TYPE})
+@Documented
+@InterceptorBinding
+public @interface Transactional {}
\ No newline at end of file
14 years, 6 months
Seam SVN: r11657 - modules/trunk/transaction.
by seam-commits@lists.jboss.org
Author: sboscarine
Date: 2009-11-23 21:25:15 -0500 (Mon, 23 Nov 2009)
New Revision: 11657
Modified:
modules/trunk/transaction/pom.xml
Log:
commented out references to unresolvable dependencies.
Modified: modules/trunk/transaction/pom.xml
===================================================================
--- modules/trunk/transaction/pom.xml 2009-11-24 02:15:55 UTC (rev 11656)
+++ modules/trunk/transaction/pom.xml 2009-11-24 02:25:15 UTC (rev 11657)
@@ -1,30 +1,30 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ d">
<parent>
<artifactId>seam-parent</artifactId>
- <groupId>org.jboss.seam</groupId>
+ <groupId>org.jboss.seam</groupId>
<version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
+ </parent>
<groupId>org.jboss.seam</groupId>
<artifactId>seam-transaction</artifactId>
<packaging>jar</packaging>
<version>3.0.0-SNAPSHOT</version>
<name>Seam Transaction</name>
-
+
<dependencies>
<dependency>
<groupId>javax.ejb</groupId>
- <artifactId>ejb-api</artifactId>
+ <artifactId>ejb-api</artifactId>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>javax.transaction</groupId>
@@ -37,6 +37,18 @@
</dependency>
<dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ </dependency>
+
+ <!-- Missing dependencies -->
+ <!--
+ <dependency>
<groupId>${seam.groupId}</groupId>
<artifactId>seam-el</artifactId>
</dependency>
@@ -51,7 +63,6 @@
<groupId>${webbeans.groupId}</groupId>
<artifactId>webbeans-logger</artifactId>
</dependency>
-
+ -->
</dependencies>
-
-</project>
+</project>
\ No newline at end of file
14 years, 6 months
Seam SVN: r11656 - in modules/trunk/persistence/src/main/java: org and 2 other directories.
by seam-commits@lists.jboss.org
Author: sboscarine
Date: 2009-11-23 21:15:55 -0500 (Mon, 23 Nov 2009)
New Revision: 11656
Added:
modules/trunk/persistence/src/main/java/org/
modules/trunk/persistence/src/main/java/org/seamframework/
modules/trunk/persistence/src/main/java/org/seamframework/persistence/
modules/trunk/persistence/src/main/java/org/seamframework/persistence/PersistenceContextExtension.java
Log:
initial commit
Added: modules/trunk/persistence/src/main/java/org/seamframework/persistence/PersistenceContextExtension.java
===================================================================
--- modules/trunk/persistence/src/main/java/org/seamframework/persistence/PersistenceContextExtension.java (rev 0)
+++ modules/trunk/persistence/src/main/java/org/seamframework/persistence/PersistenceContextExtension.java 2009-11-24 02:15:55 UTC (rev 11656)
@@ -0,0 +1,202 @@
+package org.seamframework.persistence;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Alternative;
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Default;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.ProcessProducer;
+import javax.enterprise.inject.spi.Producer;
+import javax.enterprise.util.AnnotationLiteral;
+import javax.inject.Qualifier;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+import javax.persistence.PersistenceContext;
+
+/**
+ * Support for managed persistence contexts in Java SE environment.
+ *
+ * @author Gavin King
+ *
+ */
+public class PersistenceContextExtension implements Extension
+{
+ public PersistenceContextExtension()
+ {
+ System.out.println("\n\n" + this.getClass() + " was constructed");
+ }
+
+ private Bean<EntityManagerFactory> emfBean;
+
+ /**
+ * For @PersistenceContext producer fields, make a bean for the EMF, then
+ * wrap the producer CDI creates, to get the EM from the EMF bean we made
+ * instead of trying to get it from the Java EE component environment.
+ */
+ void processProducer(@Observes ProcessProducer<?, EntityManager> pp, final BeanManager bm)
+ {
+ if (pp.getAnnotatedMember().isAnnotationPresent(PersistenceContext.class))
+ {
+ if (emfBean == null)
+ {
+ AnnotatedField<?> field = (AnnotatedField<?>) pp.getAnnotatedMember();
+ final String unitName = field.getAnnotation(PersistenceContext.class).unitName();
+ final Class<?> module = field.getJavaMember().getDeclaringClass();
+ final Set<Annotation> qualifiers = new HashSet<Annotation>();
+ for (Annotation ann : field.getAnnotations())
+ {
+ Class<? extends Annotation> annotationType = ann.annotationType();
+ // if ( bm.isQualifier(annotationType)) {
+ if (annotationType.isAnnotationPresent(Qualifier.class))
+ { // work around bug in Weld
+ qualifiers.add(ann);
+ }
+ }
+ if (qualifiers.isEmpty())
+ {
+ qualifiers.add(new AnnotationLiteral<Default>()
+ {
+
+ /** default value. Added only to suppress compiler warnings. */
+ private static final long serialVersionUID = 1L;
+ });
+ }
+ qualifiers.add(new AnnotationLiteral<Any>()
+ {
+
+ /** default value. Added only to suppress compiler warnings. */
+ private static final long serialVersionUID = 1L;
+ });
+ final boolean alternative = field.isAnnotationPresent(Alternative.class);
+ final Set<Type> types = new HashSet<Type>()
+ {
+ /** default value. Added only to suppress compiler warnings. */
+ private static final long serialVersionUID = 1L;
+
+ {
+ add(EntityManagerFactory.class);
+ add(Object.class);
+ }
+ };
+
+ // create a bean for the EMF
+ emfBean = new Bean<EntityManagerFactory>()
+ {
+ public Set<Type> getTypes()
+ {
+ return types;
+ }
+
+ public Class<? extends Annotation> getScope()
+ {
+ return ApplicationScoped.class;
+ }
+
+ public EntityManagerFactory create(CreationalContext<EntityManagerFactory> ctx)
+ {
+ return Persistence.createEntityManagerFactory(unitName);
+ }
+
+ public void destroy(EntityManagerFactory emf, CreationalContext<EntityManagerFactory> ctx)
+ {
+ emf.close();
+ ctx.release();
+ }
+
+ public Class<?> getBeanClass()
+ {
+ return module;
+ }
+
+ public Set<InjectionPoint> getInjectionPoints()
+ {
+ // return Collections.EMPTY_SET;
+ return Collections.emptySet();
+ }
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public Set<Annotation> getQualifiers()
+ {
+ return qualifiers;
+ }
+
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ // return Collections.EMPTY_SET;
+ return Collections.emptySet();
+
+ }
+
+ public boolean isAlternative()
+ {
+ return alternative;
+ }
+
+ public boolean isNullable()
+ {
+ return false;
+ }
+ };
+
+ }
+ else
+ {
+ throw new RuntimeException("Only one EMF per application is supported");
+ }
+
+ Producer<EntityManager> producer = new Producer<EntityManager>()
+ {
+
+ public Set<InjectionPoint> getInjectionPoints()
+ {
+ // return Collections.EMPTY_SET;
+ return Collections.emptySet();
+
+ }
+
+ public EntityManager produce(CreationalContext<EntityManager> ctx)
+ {
+ return getFactory(ctx).createEntityManager();
+ }
+
+ private EntityManagerFactory getFactory(CreationalContext<EntityManager> ctx)
+ {
+ return (EntityManagerFactory) bm.getReference(emfBean, EntityManagerFactory.class, ctx);
+ }
+
+ public void dispose(EntityManager em)
+ {
+ if (em.isOpen()) // work around what I suspect is a bug in Weld
+ em.close();
+ }
+ };
+ pp.setProducer(producer);
+ }
+ }
+
+ /**
+ * Register the EMF bean with the container.
+ */
+ void afterBeanDiscovery(@Observes AfterBeanDiscovery abd)
+ {
+ abd.addBean(emfBean);
+ }
+}
\ No newline at end of file
14 years, 6 months
Seam SVN: r11655 - tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: laubai
Date: 2009-11-23 21:12:51 -0500 (Mon, 23 Nov 2009)
New Revision: 11655
Modified:
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Concepts.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Configuration.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Conversations.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Events.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Groovy.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jms.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Security.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Tutorial.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Webservices.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Xml.xml
Log:
Commented out visible TODO items for CP07 build.
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Concepts.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Concepts.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Concepts.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -15,7 +15,7 @@
Let's start by describing the contexts built in to Seam.
</para>
- <sect1>
+ <section>
<title>Seam contexts</title>
<para> Seam contexts are created and destroyed by the framework. The application does not control context
demarcation via explicit Java API calls. Context are usually implicit. In some cases, however, contexts are
@@ -61,16 +61,16 @@
Let's look at each context in turn.
</para>
- <sect2>
+ <section>
<title>Stateless context</title>
<para>
Components which are truly stateless (stateless session beans, primarily) always live in the
stateless context (this is really a non-context). Stateless components are not very interesting, and are
arguably not very object-oriented. Nevertheless, they are important and often useful.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Event context</title>
<para>
The event context is the "narrowest" stateful context, and is a generalization of the notion of the
@@ -83,9 +83,9 @@
When you invoke a Seam component via RMI, or Seam Remoting, the event context is created and
destroyed just for the invocation.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Page context</title>
<para>
The page context allows you to associate state with a particular instance of a rendered page. You can
@@ -95,9 +95,9 @@
serialized to the client, so this construct is extremely robust with respect to multi-window operation
and the back button.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Conversation context</title>
<para>
The conversation context is a truly central concept in Seam. A <emphasis>conversation</emphasis> is a
@@ -145,9 +145,9 @@
<para>
Alternatively, Seam may be configured to keep conversational state in the client browser.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Session context</title>
<para>
A session context holds state associated with the user login session. While there are some cases
@@ -157,9 +157,9 @@
<para>
In a JSR-168 portal environment, the session context represents the portlet session.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Business process context</title>
<para>
The business process context holds state associated with the long running business process. This
@@ -169,18 +169,18 @@
business process is defined externally using a <emphasis>process definition language</emphasis>, so
there are no special annotations for business process demarcation.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Application context</title>
<para>
The application context is the familiar servlet context from the servlet spec. Application context is
mainly useful for holding static information such as configuration data, reference data or metamodels.
For example, Seam stores its own configuration and metamodel in the application context.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Context variables</title>
<para>
A context defines a namespace, a set of <emphasis>context variables</emphasis>. These work much the
@@ -207,9 +207,9 @@
Usually, however, we obtain components from a context via injection, and put component instances into
a context via outjection.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Context search priority</title>
<para>
Sometimes, as above, component instances are obtained from a particular known scope. Other times, all
@@ -242,9 +242,9 @@
Whenever you access a component by name from a JSF page, a priority search occurs.
</para>
- </sect2>
+ </section>
- <sect2 id="concurrency">
+ <section id="concurrency">
<title>Concurrency model</title>
<para>
Neither the servlet nor EJB specifications define any facilities for managing concurrent requests
@@ -279,11 +279,11 @@
This concurrency model means that AJAX clients can safely use volatile session and conversational
state, without the need for any special work on the part of the developer.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Seam components</title>
<para>
Seam components are POJOs (Plain Old Java Objects). In particular, they are JavaBeans or EJB 3.0
@@ -310,7 +310,7 @@
</listitem>
</itemizedlist>
- <sect2>
+ <section>
<title>Stateless session beans</title>
<para>
Stateless session bean components are not able to hold state across multiple invocations. Therefore,
@@ -334,9 +334,9 @@
or <literal>@In(create=true)</literal>. They should not be directly instantiated via JNDI lookup
or the <literal>new</literal> operator.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Stateful session beans</title>
<para>
Stateful session bean components are able to hold state not only across multiple invocations of the
@@ -364,9 +364,9 @@
or <literal>@In(create=true)</literal>. They should not be directly instantiated via JNDI lookup
or the <literal>new</literal> operator.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Entity beans</title>
<para>
Entity beans may be bound to a context variable and function as a seam component. Because entities
@@ -397,9 +397,9 @@
Seam entity bean components may be instantiated using <literal>Component.getInstance()</literal>,
<literal>@In(create=true)</literal> or directly using the <literal>new</literal> operator.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>JavaBeans</title>
<para>
Javabeans may be used just like a stateless or stateful session bean. However, they do not provide
@@ -423,9 +423,9 @@
or <literal>@In(create=true)</literal>. They should not be directly instantiated using the
<literal>new</literal> operator.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Message-driven beans</title>
<para>
Message-driven beans may function as a seam component. However, message-driven beans are called quite
@@ -441,9 +441,9 @@
Message-driven beans are never instantiated by the application. They are instantiated by the EJB
container when a message is received.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Interception</title>
<para>
In order to perform its magic (bijection, context demarcation, validation, etc), Seam must intercept
@@ -476,9 +476,9 @@
</interceptor-binding>
</assembly-descriptor>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Component names</title>
<para>
All seam components need a name. We can assign a name to a component using the
@@ -545,9 +545,9 @@
name by the <literal>components.xml</literal> file included in the Seam jar.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Defining the component scope</title>
<para>
We can override the default scope (context) of a component using the <literal>@Scope</literal>
@@ -566,9 +566,9 @@
<literal>org.jboss.seam.ScopeType</literal> defines an enumeration of possible scopes.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Components with multiple roles</title>
<para>
Some Seam component classes can fulfill more than one role in the system. For example, we often have
@@ -601,9 +601,9 @@
...
}]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Built-in components</title>
<para>
Like many good frameworks, Seam eats its own dogfood and is implemented mostly as a set of built-in
@@ -617,11 +617,11 @@
convenient static <literal>instance()</literal> methods:
</para>
<programlisting role="JAVA"><![CDATA[FacesMessages.instance().add("Welcome back, #{user.name}!");]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Bijection</title>
<para>
<emphasis>Dependency injection</emphasis> or <emphasis>inversion of control</emphasis> is by now a familiar
@@ -795,9 +795,9 @@
...
}]]></programlisting>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Lifecycle methods</title>
<para>
@@ -831,9 +831,9 @@
specifying <literal>@Startup(depends={....})</literal>.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Conditional installation</title>
<para>
@@ -949,9 +949,9 @@
use it in your application.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Logging</title>
<para>
@@ -1024,9 +1024,9 @@
classpath, Seam with use it. If it is not, Seam will use JDK logging.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>The <literal>Mutable</literal> interface and <literal>@ReadOnly</literal></title>
<para>
Many application servers feature an amazingly broken implementation of <literal>HttpSession</literal>
@@ -1128,9 +1128,9 @@
of managing an entity bean instance using a Seam component.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Factory and manager components</title>
<para>
We often need to work with objects that are not Seam components. But we still want to be able to inject
@@ -1240,6 +1240,6 @@
on every access, a consistent view is provided.
</para>
- </sect1>
+ </section>
</chapter>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -8,12 +8,12 @@
off by the following sections; you'll never need to type any of this stuff yourself, since you can just copy and
paste from the example applications! </para>
- <sect1>
+ <section>
<title>Basic Seam configuration</title>
<para> First, let's look at the basic configuration that is needed whenever we use Seam with JSF. </para>
- <sect2>
+ <section>
<title>Integrating Seam with JSF and your servlet container</title>
<para> Of course, you need a faces servlet! </para>
@@ -67,9 +67,9 @@
<param-value>true</param-value>
</context-param>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Using facelets</title>
<para> If you want follow our advice and use facelets instead of JSP, add the following lines to
@@ -86,9 +86,9 @@
<param-value>.xhtml</param-value>
</context-param>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Seam Resource Servlet</title>
<para> The Seam Resource Servlet provides resources used by Seam Remoting, captchas (see the security
@@ -104,9 +104,9 @@
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Seam servlet filters</title>
<para> Seam doesn't need any servlet filters for basic operation. However, there are several features which
@@ -158,7 +158,7 @@
<para> Adding the master filter enables the following built-in filters. </para>
- <sect3>
+ <section>
<title>Exception handling</title>
<para> This filter provides the exception mapping functionality in <literal>pages.xml</literal> (almost
all applications will need this). It also takes care of rolling back uncommitted transactions when
@@ -178,9 +178,9 @@
</components>]]></programlisting>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Conversation propagation with redirects</title>
<para> This filter allows Seam to propagate the conversation context across browser redirects. It
intercepts any browser redirects and adds a request parameter that specifies the Seam conversation
@@ -190,9 +190,9 @@
in <literal>components.xml</literal>: </para>
<programlisting role="XML"><![CDATA[<web:redirect-filter url-pattern="*.seam"/>]]></programlisting>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Multipart form submissions</title>
<para> This feature is necessary when using the Seam file upload JSF control. It detects multipart form
requests and processes them according to the multipart/form-data specification (RFC-2388). To
@@ -217,9 +217,9 @@
this value, the request will be aborted. The default setting is 0 (no size limit). </para>
</listitem>
</itemizedlist>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Character encoding</title>
<para> Sets the character encoding of submitted form data. </para>
@@ -244,9 +244,9 @@
already specify an encoding. The default setting is <literal>false</literal>. </para>
</listitem>
</itemizedlist>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>RichFaces</title>
<para>
@@ -292,9 +292,9 @@
</listitem>
</itemizedlist>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Identity Logging</title>
<para>
@@ -312,9 +312,9 @@
<web:logging-filter url-pattern="*.seam"/>
</components>]]></programlisting>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Context management for custom servlets</title>
<para> Requests sent direct to some servlet other than the JSF servlet are not processed through the JSF
lifecycle, so Seam provides a servlet filter that can be applied to any other servlet that needs
@@ -339,9 +339,9 @@
Seam exposes the conversation id as a property of the built in component
<literal>conversation</literal>. </para>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Adding custom filters</title>
<para> Seam can install your filters for you, allowing you to specify <emphasis>where</emphasis> in the
chain your filter is placed (the servlet specification doesn't provide a well defined order if you
@@ -360,10 +360,10 @@
should be further down the chain than the RichFaces filter
(<literal>@Filter(within="org.jboss.seam.web.ajax4jsfFilter")</literal>). </para>
- </sect3>
- </sect2>
+ </section>
+ </section>
- <sect2>
+ <section>
<title>Integrating Seam with your EJB container</title>
<para> We need to apply the <literal>SeamInterceptor</literal> to our Seam components. The simplest way to
@@ -414,9 +414,9 @@
<programlisting role="XML"><![CDATA[<transaction:ejb-transaction/>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Don't forget!</title>
<para> There is one final item you need to know about. You must place a <literal>seam.properties</literal>,
@@ -436,11 +436,11 @@
component explicitly in <literal>components.xml</literal>, just like some other competing frameworks do!
I think you'll like our way better. </para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1 id="alt-jpa-providers">
+ <section id="alt-jpa-providers">
<title>Using Alternate JPA Providers</title>
<para> Seam comes packaged and configured with Hibernate as the default JPA provider.
@@ -482,9 +482,9 @@
provider needs. Don't forget to package your new provider's jar files in the
application if they are needed.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Configuring Seam in Java EE 5</title>
<mediaobject>
@@ -498,7 +498,7 @@
<para> If you're running in a Java EE 5 environment, this is all the configuration required to start using Seam! </para>
- <sect2>
+ <section>
<title>Packaging</title>
<para> Once you've packaged all this stuff together into an EAR, the archive structure will look something
@@ -564,11 +564,11 @@
only about a third of the way there. If you're too overwhelmed by all this tedious configuration stuff,
feel free to skip over the rest of this section and come back to it later. </para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Configuring Seam in J2EE</title>
<para> Seam is useful even if you're not yet ready to take the plunge into EJB 3.0. In this case you would use
@@ -596,7 +596,7 @@
JavaBeans instead of EJB3, and another version that uses JPA and JavaBeans. These example applications are
ready to deploy into any J2EE application server. </para>
- <sect2>
+ <section>
<title>Boostrapping Hibernate in Seam</title>
<para> Seam will bootstrap a Hibernate <literal>SessionFactory</literal> from your
@@ -610,9 +610,9 @@
<programlisting role="XML"><![CDATA[<persistence:managed-hibernate-session name="hibernateSession"
session-factory="#{hibernateSessionFactory}"/>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Boostrapping JPA in Seam</title>
<para> Seam will bootstrap a JPA <literal>EntityManagerFactory</literal> from your
@@ -626,9 +626,9 @@
<programlisting role="XML"><![CDATA[<persistence:managed-persistence-context name="entityManager"
entity-manager-factory="#{entityManagerFactory}"/>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Packaging</title>
<para> We can package our application as a WAR, in the following structure: </para>
@@ -668,10 +668,10 @@
<para> If we want to deploy Hibernate in a non-EE environment like TestNG, we need to do a little
bit more work. </para>
- </sect2>
- </sect1>
+ </section>
+ </section>
- <sect1>
+ <section>
<title>Configuring Seam in Java SE, without JBoss Embedded</title>
<para> It is possible to use Seam completely outside of an EE environment. In this case, you need to tell Seam
@@ -685,9 +685,9 @@
<programlisting role="XML"><![CDATA[<transaction:hibernate-transaction session="#{session}"/>]]></programlisting>
<para> Of course, you'll also need to define a datasource.</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Configuring jBPM in Seam</title>
<para> Seam's jBPM integration is not installed by default, so you'll need to enable jBPM by installing a
built-in component. You'll also need to explicitly list your process and pageflow definitions. In
@@ -732,7 +732,7 @@
<para> The most important thing to notice here is that jBPM transaction control is disabled. Seam or EJB3 should
control the JTA transactions. </para>
- <sect2>
+ <section>
<title>Packaging</title>
<para> There is not yet any well-defined packaging format for jBPM configuration and process/pageflow
@@ -782,11 +782,11 @@
approveDocument.jpdl.xml
documentLifecycle.jpdl.xml]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Configuring SFSB and Session Timeouts in JBoss AS</title>
<para> It is very important that the timeout for Stateful Session Beans is set higher than the timeout for HTTP
@@ -829,9 +829,9 @@
<para> To override this value for your own application, simply include this entry in your application's own
<literal>web.xml</literal>. </para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Running Seam in a Portlet</title>
<para>
@@ -847,6 +847,6 @@
<para>Seam Integration with JBoss Portlet Bridge is marked as technology preview, so standard support is not guaranteed.</para>
</note>
- </sect1>
+ </section>
</chapter>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Conversations.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Conversations.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Conversations.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -259,10 +259,10 @@
workspace management.
</para>
- <para>
+<!-- <para>
TODO: an example to show how a nested conversation prevents bad
stuff happening when you backbutton.
- </para>
+ </para>-->
<para>
Usually, if a component exists in a parent conversation of the
@@ -1243,4 +1243,4 @@
</itemizedlist>
</section>
</section>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Events.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Events.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Events.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -104,10 +104,10 @@
Furthermore, the view id mentioned in the <literal><page></literal>
element need not correspond to a real JSP or Facelets page! So, we can
reproduce the functionality of a traditional action-oriented framework
- like Struts or WebWork using page actions. For example:
+ like Struts or WebWork using page actions.
</para>
- <programlisting><![CDATA[TODO: translate struts action into page action]]></programlisting>
+<!-- <programlisting><![CDATA[TODO: translate struts action into page action]]></programlisting>-->
<para>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Groovy.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Groovy.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Groovy.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -40,7 +40,7 @@
</listitem>
</itemizedlist>
- <para>TODO: write a quick overview of the Groovy syntax add-on</para>
+<!-- <para>TODO: write a quick overview of the Groovy syntax add-on</para>-->
</section>
<section>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jms.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jms.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Jms.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -31,7 +31,7 @@
</listitem>
</itemizedlist>
- <sect1>
+ <section>
<title>Asynchronicity</title>
<para>
@@ -69,7 +69,7 @@
same. They can just "plug and play" by adding a line to <literal>components.xml</literal>.
</para>
- <sect2>
+ <section>
<title>Asynchronous methods</title>
<para>
@@ -219,9 +219,9 @@
Asynchronous methods cannot return any other value to the caller.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Asynchronous methods with the Quartz Dispatcher</title>
<para>
@@ -336,9 +336,9 @@
<para>The <literal>@IntervalDuration</literal>, <literal>@IntervalCron</literal>, and <literal>@IntervalNthBusinessDay</literal> annotations are mutually exclusive. If they are used in the same method, a <literal>RuntimeException</literal> will be thrown.</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Asynchronous events</title>
<para>
Component-driven events may also be asynchronous. To raise an event for asynchronous
@@ -349,11 +349,11 @@
Components may observe asynchronous events in the usual way, but remember that only the
business process context is propagated to the asynchronous thread.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Messaging in Seam</title>
<para>
@@ -361,7 +361,7 @@
Seam components.
</para>
- <sect2>
+ <section>
<title>Configuration</title>
<para>
To configure Seam's infrastructure for sending JMS messages,
@@ -395,9 +395,9 @@
auto-create="true"
queue-jndi-name="queue/paymentQueue"/>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Sending messages</title>
<para>
Now, you can inject a JMS <literal>TopicPublisher</literal> and
@@ -438,24 +438,24 @@
}
}]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Receiving messages using a message-driven bean</title>
<para>
You can process messages using any EJB3 message driven bean. Message-driven
beans may even be Seam components, in which case it is possible to inject
other event and application scoped Seam components.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Receiving messages in the client</title>
<para>
Seam Remoting lets you subscribe to a JMS topic from client-side JavaScript. This is
described in <xref linkend="remoting"/>.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
</chapter>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Security.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Security.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Security.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -8,7 +8,7 @@
for securing both domain and page resources within your Seam project.
</para>
- <sect1>
+ <section>
<title>Overview</title>
<para>
@@ -30,7 +30,7 @@
</listitem>
</itemizedlist>
- <sect2>
+ <section>
<title>Which mode is right for my application?</title>
<para>
@@ -44,10 +44,10 @@
If on the other hand, your application requires security checks based on contextual state or complex business rules,
then you will require the features provided by the advanced mode.
</para>
- </sect2>
- </sect1>
+ </section>
+ </section>
- <sect1>
+ <section>
<title>Requirements</title>
<para>
@@ -79,9 +79,9 @@
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Disabling Security</title>
<para>
@@ -104,9 +104,9 @@
<para>Page restrictions</para>
</listitem>
</itemizedlist>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Authentication</title>
<para>
@@ -115,7 +115,7 @@
authentication requirements Seam offers a much more simplified method of authentication that hides the complexity of JAAS.
</para>
- <sect2>
+ <section>
<title>Configuration</title>
<para>
@@ -151,9 +151,9 @@
to authenticate the user.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Writing an authentication method</title>
<para>
@@ -205,7 +205,7 @@
authentication method returns <literal>false</literal> to indicate the authentication failed.
</para>
- <sect3>
+ <section>
<title>Identity.addRole()</title>
<para>
@@ -228,9 +228,9 @@
</imageobject>
</mediaobject>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Special Considerations</title>
<para>
@@ -257,11 +257,11 @@
userStats.setLastLoginDate(new Date());
userStats.incrementLoginCount();
}]]></programlisting>
- </sect3>
+ </section>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Writing a login form</title>
<para>
@@ -291,9 +291,9 @@
action will clear the security state of the currently authenticated user.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Simplified Configuration - Summary</title>
<para>
So to sum up, there are the three easy steps to configure authentication:
@@ -317,9 +317,9 @@
</listitem>
</itemizedlist>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Handling Security Exceptions</title>
<para>
@@ -375,9 +375,9 @@
Seam includes some special functionality for handling this problem.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Login Redirection</title>
<para>
@@ -420,9 +420,9 @@
the conversation in your <literal>authenticate()</literal> method.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>HTTP Authentication</title>
<para>
@@ -450,7 +450,7 @@
authentication realm that is presented to the user when they authenticate.
</para>
- <sect3>
+ <section>
<title>Writing a Digest Authenticator</title>
<para>
@@ -478,11 +478,11 @@
}
}
]]></programlisting>
- </sect3>
+ </section>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Advanced Authentication Features</title>
<para>
@@ -490,7 +490,7 @@
security requirements.
</para>
- <sect3>
+ <section>
<title>Using your container's JAAS configuration</title>
<para>
@@ -508,13 +508,13 @@
container your Seam application is deployed in. It merely instructs Seam Security to authenticate
itself using the configured JAAS security policy.
</para>
- </sect3>
+ </section>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Error Messages</title>
<para>
@@ -597,9 +597,9 @@
</tbody>
</tgroup>
</table>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Authorization</title>
<para>
@@ -610,7 +610,7 @@
above.
</para>
- <sect2>
+ <section>
<title>Core concepts</title>
<para>
@@ -628,9 +628,9 @@
for example <literal>customer:delete</literal>, or <literal>customer:insert</literal>.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Securing components</title>
<para>
@@ -638,7 +638,7 @@
<literal>@Restrict</literal> annotation.
</para>
- <sect3>
+ <section>
<title>The @Restrict annotation</title>
<para>
@@ -718,9 +718,9 @@
in <literal>Identity</literal>, which in this case can then determine if the user has the required
permission for modifying the specified <literal>Account</literal> object.
</para>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Inline restrictions</title>
<para>
Sometimes it might be desirable to perform a security check in code, without using the
@@ -762,10 +762,10 @@
if (!Identity.instance().hasPermission("customer", "create", null))
throw new AuthorizationException("You may not create new customers");]]></programlisting>
- </sect3>
- </sect2>
+ </section>
+ </section>
- <sect2>
+ <section>
<title>Security in the user interface</title>
<para>
@@ -826,9 +826,9 @@
</h:column>
</h:dataTable>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Securing pages</title>
<para>
Page security requires that the application is using a <literal>pages.xml</literal> file, however is
@@ -859,9 +859,9 @@
<literal>admin</literal> role.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Securing Entities</title>
<para>
@@ -990,7 +990,7 @@
your JPA provider.
</para>
- <sect3>
+ <section>
<title>Entity security with JPA</title>
<para>
@@ -1014,9 +1014,9 @@
</entity-mappings>]]></programlisting>
- </sect3>
+ </section>
- <sect3>
+ <section>
<title>Entity security with a Managed Hibernate Session</title>
<para>
@@ -1025,13 +1025,13 @@
need to do anything special to use entity security.
</para>
- </sect3>
+ </section>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Writing Security Rules</title>
<para>
@@ -1040,7 +1040,7 @@
checks are processed, and how to implement permission checks for a Seam application.
</para>
- <sect2>
+ <section>
<title>Permissions Overview</title>
<para>
@@ -1051,9 +1051,9 @@
algorithms for evaluating large numbers of complex rules involving multiple conditions.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Configuring a rules file</title>
<para>
@@ -1083,9 +1083,9 @@
<para>
Once the <literal>RuleBase</literal> component is configured, it's time to write the security rules.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Creating a security rules file</title>
<para>
For this step you need to create a file called <literal>security.drl</literal> in the
@@ -1215,7 +1215,7 @@
intended for.
</para>
- <sect3>
+ <section>
<title>Wildcard permission checks</title>
<para>
@@ -1237,13 +1237,13 @@
This rule allows users with the <literal>admin</literal> role to perform <emphasis>any</emphasis> action for
any <literal>customer</literal> permission check.
</para>
- </sect3>
+ </section>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>SSL Security</title>
<para>
@@ -1299,9 +1299,9 @@
sensitive data from pages using HTTPS to other pages using HTTP.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>CAPTCHA</title>
<para>
@@ -1311,7 +1311,7 @@
prevent automated processes from interacting with your application.
</para>
- <sect2>
+ <section>
<title>Configuring the CAPTCHA Servlet</title>
<para>
To get up and running, it is necessary to configure the Seam Resource Servlet, which will provide the Captcha
@@ -1328,9 +1328,9 @@
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>]]></programlisting>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Adding a CAPTCHA to a form</title>
<para>
@@ -1349,9 +1349,9 @@
validated against the CAPTCHA when the form is submitted.
</para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Customising the CAPTCHA algorithm</title>
<para>
@@ -1378,11 +1378,11 @@
}
}]]></programlisting>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Security Events</title>
<para>
@@ -1534,9 +1534,9 @@
</tgroup>
</table>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Run As</title>
<para>
@@ -1573,9 +1573,9 @@
<literal>RunAsOperation</literal>.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Extending the Identity component</title>
<para>
@@ -1621,6 +1621,6 @@
}
}]]></programlisting>
- </sect1>
+ </section>
</chapter>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Tutorial.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -163,12 +163,12 @@
</listitem>
<listitem>
<para>
- A Seam component must have a <emphasis>component name</emphasis> specified by the <xref linkend="name-annotation" /> <literal>@Name</literal> annotation. This name must be unique within the Seam application. When JSF asks Seam to resolve a currently undefined (null) context variable whose name matches that of a Seam component, Seam will instantiate that component, and bind the new instance to the context variable. In this case, Seam will instantiate a <literal>User</literal> the first time JSF encounters a variable named <literal>user</literal>.
+ A Seam component must have a <emphasis>component name</emphasis> specified by the <xref linkend="name-annotation" /> annotation. This name must be unique within the Seam application. When JSF asks Seam to resolve a currently undefined (null) context variable whose name matches that of a Seam component, Seam will instantiate that component, and bind the new instance to the context variable. In this case, Seam will instantiate a <literal>User</literal> the first time JSF encounters a variable named <literal>user</literal>.
</para>
</listitem>
<listitem>
<para>
- Whenever Seam instantiates a component, it binds the new instance to a context variable in the component's <emphasis>default context</emphasis>. The default context is specified using the <xref linkend="scope-annotation" /> <literal>@Scope</literal> annotation. The <literal>User</literal> bean is a session scoped component.
+ Whenever Seam instantiates a component, it binds the new instance to a context variable in the component's <emphasis>default context</emphasis>. The default context is specified using the <xref linkend="scope-annotation" /> annotation. The <literal>User</literal> bean is a session scoped component.
</para>
</listitem>
<listitem>
@@ -271,7 +271,7 @@
</listitem>
<listitem>
<para>
- The <xref linkend="in-annotation" /> <literal>@In</literal> annotation marks an attribute of the bean as injected by Seam. In this case, the attribute is injected from a context variable named <literal>user</literal> (the instance variable name).
+ The <xref linkend="in-annotation" /> annotation marks an attribute of the bean as injected by Seam. In this case, the attribute is injected from a context variable named <literal>user</literal> (the instance variable name).
</para>
</listitem>
<listitem>
@@ -1059,48 +1059,60 @@
JavaBeans (There was no reason to use session beans, since they do not access the database, or have any
other transactional behavior). Let's start with the process definition: </para>
<!-- Can't use code hightlighting with callouts -->
- <example>
- <title></title>
- <programlisting>
-<process-definition name="todo">
+ <formalpara><title>todo.jpdl.xml Example</title>
+ <para>
+ <!-- <programlistingco> <areaspec> <area id="todo-startstate" coords="3"/> <area id="todo-tasknode" coords="7"/> <area id="todo-task" coords="8"/> <area id="todo-assignment" coords="9"/> <area id="todo-endstate" coords="14"/> </areaspec> -->
+<programlisting><![CDATA[<process-definition name="todo">
+
+ <start-state name="start">
+ <transition to="todo"/>
+ </start-state>
+
+ <task-node name="todo">
+ <task name="todo" description="#{todoList.description}">
+ <assignment actor-id="#{actor.id}"/>
+ </task>
+ <transition to="done"/>
+ </task-node>
+
+ <end-state name="done"/>
-<start-state name="start">
-<transition to="todo"/>
-</start-state>
-
-<task-node name="todo">
-<task name="todo" description="#{todoList.description}">
-<assignment actor-id="#{actor.id}"/>
-</task>
-<transition to="done"/>
-</task-node>
-
-<end-state name="done"/>
-
-</process-definition></programlisting>
-
- <para> The <literal><start-state></literal> node represents the logical start
- of the process. When the process starts, it immediately transitions to the
- <literal>todo</literal> node. </para>
-
- <para> The <literal><task-node></literal> node represents a <emphasis>wait
- state</emphasis>, where business process execution pauses, waiting for one or more
- tasks to be performed. </para>
-
- <para> The <literal><task></literal> element defines a task to be performed by
- a user. Since there is only one task defined on this node, when it is complete,
- execution resumes, and we transition to the end state. The task gets its description
- from a Seam component named <literal>todoList</literal> (one of the JavaBeans). </para>
-
- <para> Tasks need to be assigned to a user or group of users when they are created. In this
- case, the task is assigned to the current user, which we get from a built-in Seam
- component named <literal>actor</literal>. Any Seam component may be used to perform task
- assignment. </para>
-
- <para> The <literal><end-state></literal> node defines the logical end of the
- business process. When execution reaches this node, the process instance is destroyed.
- </para>
- </example>
+</process-definition>]]>
+</programlisting>
+ </para>
+ </formalpara>
+ <formalpara><title>messages.jsp Explanatory Notes</title>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The <literal><![CDATA[<start-state>]]></literal> node represents the logical beginning of the process. When the process begins, it immediately transitions to the <literal>todo</literal> node.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <literal><![CDATA[<task-node>]]></literal> node represents a <emphasis>wait state</emphasis>, where business process execution pauses, waiting for one or more tasks to be performed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <literal><![CDATA[<task>]]></literal> element defines a task to be performed by a user. Since there is only one task defined on this node, when it is complete, execution resumes, and we transition to the end state. The task receives its description from the <literal>todoList</literal> JavaBean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Tasks are assigned to a user or group of users when they are created. Here, the task is assigned to the current user, retrieved from the built-in <literal>actor</literal> Seam component. (Any Seam component may be used to perform task assignment.)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <literal><![CDATA[<end-state>]]></literal> node defines the logical end of the business process. When execution reaches this node, the process instance is destroyed.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </formalpara>
+
<para> If we view this process definition using the process definition editor provided by JBossIDE, this is
@@ -1180,41 +1192,53 @@
<para> The second JavaBean is responsible for starting business process instances, and ending tasks. </para>
<!-- Can't use code hightlighting with callouts -->
- <example>
- <title></title>
- <programlisting>
-@Name("todoList")
+ <formalpara><title>TodoList.java Example</title>
+ <para>
+<programlisting><![CDATA[@Name("todoList")
public class TodoList {
-
- private String description;
-
- public String getDescription()
- {
- return description;
- }
+ private String description;
+
+ public String getDescription() {
+ return description;
+ }
- public void setDescription(String description) {
- this.description = description;
- }
-
- @CreateProcess(definition="todo")
- public void createTodo() {}
-
- @StartTask @EndTask
- public void done() {}
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @CreateProcess(definition="todo")
+ public void createTodo() {}
+
+ @StartTask @EndTask
+ public void done() {}
-}</programlisting>
-
- <para> The description property accepts user input form the JSP page, and exposes it to the
- process definition, allowing the task description to be set. </para>
-
- <para> The Seam <literal>@CreateProcess</literal> annotation creates a new jBPM process
- instance for the named process definition. </para>
-
- <para> The Seam <literal>@StartTask</literal> annotation starts work on a task. The
- <literal>@EndTask</literal> ends the task, and allows the business process execution
- to resume. </para>
- </example>
+}]]>
+</programlisting>
+ </para>
+ </formalpara>
+ <!-- </example> -->
+ <formalpara><title>TodoList.java Explanatory Notes</title>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The description property accepts user input from the JSP page, and exposes it to the process definition, allowing the task description to be set.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The Seam <literal>@CreateProcess</literal> annotation creates a new jBPM process instance for the named process definition.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The Seam <literal>@StartTask</literal> annotation starts work on a task. The <literal>@EndTask</literal> ends the task, and allows the business process execution to resume.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </formalpara>
+
<para> In a more realistic example, <literal>@StartTask</literal> and <literal>@EndTask</literal> would not
@@ -1379,10 +1403,10 @@
configuration and not very interesting. </para>
</section>
- <section>
+<!-- <section>
<title>How it works</title>
<para>TODO</para>
- </section>
+ </section>-->
</section>
@@ -1412,70 +1436,89 @@
<para> The example is implemented using one JavaBean, three JSP pages and a jPDL pageflow definition. Let's
begin with the pageflow: </para>
<!-- Can't use code hightlighting with callouts -->
- <example>
- <title></title>
- <programlisting>
-<pageflow-definition
+ <formalpara><title>pageflow.jpdl.xml Example</title>
+ <para>
+<programlisting><![CDATA[<pageflow-definition
xmlns="http://jboss.com/products/seam/pageflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/pageflow
- http://jboss.com/products/seam/pageflow-2.1.xsd"
- name="numberGuess">
+ xsi:schemaLocation=
+ "http://jboss.com/products/seam/pageflow
+ http://jboss.com/products/seam/pageflow-2.2.xsd"
+ name="numberGuess">
-<start-page name="displayGuess" view-id="/numberGuess.jspx">
- <redirect/>
- <transition name="guess" to="evaluateGuess">
- <action expression="#{numberGuess.guess}"/>
- </transition>
- <transition name="giveup" to="giveup"/>
- </start-page>
+ <start-page name="displayGuess" view-id="/numberGuess.jspx">
+ <redirect/>
+ <transition name="guess" to="evaluateGuess">
+ <action expression="#{numberGuess.guess}"/>
+ </transition>
+ <transition name="giveup" to="giveup"/>
+ <transition name="cheat" to="cheat"/>
+ </start-page>
- <decision name="evaluateGuess" expression="#{numberGuess.correctGuess}">
- <transition name="true" to="win"/>
- <transition name="false" to="evaluateRemainingGuesses"/>
- </decision>
+ <decision name="evaluateGuess" expression="#{numberGuess.correctGuess}">
+ <transition name="true" to="win"/>
+ <transition name="false" to="evaluateRemainingGuesses"/>
+ </decision>
- <decision name="evaluateRemainingGuesses" expression="#{numberGuess.lastGuess}">
- <transition name="true" to="lose"/>
- <transition name="false" to="displayGuess"/>
- </decision>
+ <decision name="evaluateRemainingGuesses"
+ expression="#{numberGuess.lastGuess}">
+ <transition name="true" to="lose"/>
+ <transition name="false" to="displayGuess"/>
+ </decision>
- <page name="giveup" view-id="/giveup.jspx">
- <redirect/>
- <transition name="yes" to="lose"/>
- <transition name="no" to="displayGuess"/>
- </page>
+ <page name="giveup" view-id="/giveup.jspx">
+ <redirect/>
+ <transition name="yes" to="lose"/>
+ <transition name="no" to="displayGuess"/>
+ </page>
- <page name="win" view-id="/win.jspx">
- <redirect/>
- <end-conversation/>
- </page>
+ <process-state name="cheat">
+ <sub-process name="cheat"/>
+ <transition to="displayGuess"/>
+ </process-state>
- <page name="lose" view-id="/lose.jspx">
- <redirect/>
- <end-conversation/>
- </page>
+ <page name="win" view-id="/win.jspx">
+ <redirect/>
+ <end-conversation/>
+ </page>
-</pageflow-definition></programlisting>
-
- <para> The <literal><page></literal> element defines a wait state where the
- system displays a particular JSF view and waits for user input. The
- <literal>view-id</literal> is the same JSF view id used in plain JSF navigation rules.
- The <literal>redirect</literal> attribute tells Seam to use post-then-redirect when
- navigating to the page. (This results in friendly browser URLs.) </para>
-
- <para> The <literal><transition></literal> element names a JSF outcome. The
- transition is triggered when a JSF action results in that outcome. Execution will then
- proceed to the next node of the pageflow graph, after invocation of any jBPM transition
- actions. </para>
-
- <para> A transition <literal><action></literal> is just like a JSF action,
- except that it occurs when a jBPM transition occurs. The transition action can invoke
- any Seam component. </para>
-
- <para> A <literal><decision></literal> node branches the pageflow, and
- determines the next node to execute by evaluating a JSF EL expression. </para>
- </example>
+ <page name="lose" view-id="/lose.jspx">
+ <redirect/>
+ <end-conversation/>
+ </page>
+
+</pageflow-definition>]]>
+</programlisting>
+ </para>
+ </formalpara>
+ <!-- </example> -->
+ <formalpara><title>pageflow.jpdl.xml Explanatory Notes.</title>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The <literal><![CDATA[<page>]]></literal> element defines a wait state, during which the system displays a particular JSF view and waits for user input. The <literal>view-id</literal> is the same JSF view ID used in plain JSF navigation rules. The <literal>redirect</literal> attribute tells Seam to use post-then-redirect when navigating to the page. (This results in browser-friendly URLs.)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <literal><![CDATA[<transition>]]></literal> element names a JSF outcome. The transition itself is triggered when a JSF action results in the named outcome. After any jBPM transition actions are invoked, execution will proceed to the next node of the pageflow graph.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A transition <literal><![CDATA[<action>]]></literal> is just like a JSF action, except that it is triggered when a jBPM transition occurs. The transition action can invoke any Seam component.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A <literal><![CDATA[<decision>]]></literal> node branches the pageflow, and determines the next node to be executed by evaluating a JSF EL expression.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </formalpara>
+
<para> Here is what the pageflow looks like in the JBoss Developer Studio pageflow editor: </para>
@@ -1608,124 +1651,115 @@
<para> As is <literal>lose.jspx</literal> (which I can't be bothered copy/pasting). Finally, the JavaBean
Seam component: </para>
<!-- Can't use code hightlighting with callouts -->
- <example>
- <title></title>
- <programlistingco>
- <areaspec>
- <area id="numberguess-create" coords="13"/>
- </areaspec>
- <programlisting>
-@Name("numberGuess")
+ <formalpara><title>NumberGuess.java Example</title>
+ <para>
+<programlisting><![CDATA[@Name("numberGuess")
@Scope(ScopeType.CONVERSATION)
public class NumberGuess implements Serializable {
- private int randomNumber;
- private Integer currentGuess;
- private int biggest;
- private int smallest;
- private int guessCount;
- private int maxGuesses;
- private boolean cheated;
-
- @Create
- public void begin()
- {
- randomNumber = new Random().nextInt(100);
- guessCount = 0;
- biggest = 100;
- smallest = 1;
- }
-
- public void setCurrentGuess(Integer guess)
- {
- this.currentGuess = guess;
- }
-
- public Integer getCurrentGuess()
- {
- return currentGuess;
- }
-
- public void guess()
- {
- if (currentGuess>randomNumber)
- {
- biggest = currentGuess - 1;
- }
- if (currentGuess<randomNumber)
- {
- smallest = currentGuess + 1;
- }
- guessCount ++;
- }
-
- public boolean isCorrectGuess()
- {
- return currentGuess==randomNumber;
- }
-
- public int getBiggest()
- {
- return biggest;
- }
-
- public int getSmallest()
- {
- return smallest;
- }
-
- public int getGuessCount()
- {
- return guessCount;
- }
-
- public boolean isLastGuess()
- {
- return guessCount==maxGuesses;
- }
+ private int randomNumber;
+ private Integer currentGuess;
+ private int biggest;
+ private int smallest;
+ private int guessCount;
+ private int maxGuesses;
+ private boolean cheated;
+
+ @Create
+ public void begin() {
+ randomNumber = new Random().nextInt(100);
+ guessCount = 0;
+ biggest = 100;
+ smallest = 1;
+ }
+
+ public void setCurrentGuess(Integer guess) {
+ this.currentGuess = guess;
+ }
+
+ public Integer getCurrentGuess() {
+ return currentGuess;
+ }
+
+ public void guess() {
+ if (currentGuess>randomNumber) {
+ biggest = currentGuess - 1;
+ }
+ if (currentGuess<randomNumber) {
+ smallest = currentGuess + 1;
+ }
+ guessCount ++;
+ }
+
+ public boolean isCorrectGuess() {
+ return currentGuess==randomNumber;
+ }
+
+ public int getBiggest() {
+ return biggest;
+ }
+
+ public int getSmallest() {
+ return smallest;
+ }
+
+ public int getGuessCount() {
+ return guessCount;
+ }
+
+ public boolean isLastGuess() {
+ return guessCount==maxGuesses;
+ }
- public int getRemainingGuesses() {
- return maxGuesses-guessCount;
- }
+ public int getRemainingGuesses() {
+ return maxGuesses-guessCount;
+ }
- public void setMaxGuesses(int maxGuesses) {
- this.maxGuesses = maxGuesses;
- }
+ public void setMaxGuesses(int maxGuesses) {
+ this.maxGuesses = maxGuesses;
+ }
- public int getMaxGuesses() {
- return maxGuesses;
- }
+ public int getMaxGuesses() {
+ return maxGuesses;
+ }
- public int getRandomNumber() {
- return randomNumber;
- }
+ public int getRandomNumber() {
+ return randomNumber;
+ }
- public void cheated()
- {
- cheated = true;
- }
-
- public boolean isCheat() {
- return cheated;
- }
-
- public List<Integer> getPossibilities()
- {
- List<Integer> result = new ArrayList<Integer>();
- for(int i=smallest; i<=biggest; i++) result.add(i);
- return result;
- }
-
-}</programlisting>
- <calloutlist>
- <callout arearefs="numberguess-create">
- <para> The first time a JSP page asks for a <literal>numberGuess</literal> component, Seam
- will create a new one for it, and the <literal>@Create</literal> method will be invoked,
- allowing the component to initialize itself. </para>
- </callout>
- </calloutlist>
- </programlistingco>
- </example>
+ public void cheated() {
+ cheated = true;
+ }
+
+ public boolean isCheat() {
+ return cheated;
+ }
+
+ public List<Integer> getPossibilities() {
+ List<Integer> result = new ArrayList<Integer>();
+ for(int i=smallest; i<=biggest; i++) result.add(i);
+ return result;
+ }
+
+}]]>
+</programlisting>
+ </para>
+ </formalpara>
+ <!-- </example> -->
+ <formalpara><title>NumberGuess.java Explanatory Notes</title>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The first time a JSP page asks for a <literal>numberGuess</literal> component, Seam creates a new component, and the <literal>@Create</literal> method will be invoked, allowing the component to initialize itself.
+ </para>
+ </listitem>
+ </orderedlist>
+ <!-- </programlistingco> -->
+ <!-- </example> -->
+ </para>
+ </formalpara>
+
@@ -1758,10 +1792,10 @@
</section>
- <section>
+<!-- <section>
<title>How it works</title>
<para>TODO</para>
- </section>
+ </section>-->
</section>
@@ -1937,208 +1971,216 @@
<para> The search functionality is implemented using a session-scope stateful session bean, similar to the
one we saw in the message list example above. </para>
- <example>
- <title></title>
- <!-- Can't use code hightlighting with callouts -->
- <programlisting>
-@Stateful
+ <formalpara><title>HotelSearchingAction.java Example</title>
+ <para>
+<!--<programlisting language="java"><xi:include href="extras/booking.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
+ </example> -->
+<programlisting><![CDATA[@Stateful
@Name("hotelSearch")
@Scope(ScopeType.SESSION)
@Restrict("#{identity.loggedIn}")
-public class HotelSearchingAction implements HotelSearching
-{
+public class HotelSearchingAction implements HotelSearching {
- @PersistenceContext
- private EntityManager em;
-
- private String searchString;
- private int pageSize = 10;
- private int page;
-
- @DataModel
- private List<Hotel> hotels;
-
- public void find()
- {
- page = 0;
- queryHotels();
- }
- public void nextPage()
- {
- page++;
- queryHotels();
- }
-
- private void queryHotels()
- {
- hotels =
- em.createQuery("select h from Hotel h where lower(h.name) like #{pattern} " +
- "or lower(h.city) like #{pattern} " +
- "or lower(h.zip) like #{pattern} " +
- "or lower(h.address) like #{pattern}")
+ @PersistenceContext
+ private EntityManager em;
+
+ private String searchString;
+ private int pageSize = 10;
+ private int page;
+
+ @DataModel
+ private List<Hotel> hotels;
+
+ public void find() {
+ page = 0;
+ queryHotels();
+ }
+ public void nextPage() {
+ page++;
+ queryHotels();
+ }
+
+ private void queryHotels() {
+ hotels = em.createQuery(
+ "select h from Hotel h where lower(h.name) like #{pattern}" +
+ "or lower(h.city) like #{pattern} " +
+ "or lower(h.zip) like #{pattern} " +
+ "or lower(h.address) like #{pattern}")
.setMaxResults(pageSize)
.setFirstResult( page * pageSize )
.getResultList();
- }
-
- public boolean isNextPageAvailable()
- {
- return hotels!=null && hotels.size()==pageSize;
- }
-
- public int getPageSize() {
- return pageSize;
- }
-
- public void setPageSize(int pageSize) {
- this.pageSize = pageSize;
- }
-
- @Factory(value="pattern", scope=ScopeType.EVENT)
- public String getSearchPattern()
- {
- return searchString==null ?
- "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%';
- }
-
- public String getSearchString()
- {
- return searchString;
- }
-
- public void setSearchString(String searchString)
- {
- this.searchString = searchString;
- }
-
- @Remove
- public void destroy() {}
-} </programlisting>
-
- <para> The EJB standard <literal>@Stateful</literal> annotation identifies this class as a
- stateful session bean. Stateful session beans are scoped to the conversation context by
- default. </para>
-
- <para> The <literal>@Restrict</literal> annotation applies a security restriction to the
- component. It restricts access to the component allowing only logged-in users. The
- security chapter explains more about security in Seam. </para>
-
- <para> The
- <literal>@DataModel</literal>
- annotation exposes a <literal>List</literal> as a JSF
- <literal>ListDataModel</literal>. This makes it easy to implement clickable lists for
- search screens. In this case, the list of hotels is exposed to the page as a
- <literal>ListDataModel</literal> in the conversation variable named
- <literal>hotels</literal>. </para>
-
- <para> The EJB standard <literal>@Remove</literal> annotation specifies that a stateful
- session bean should be removed and its state destroyed after invocation of the annotated
- method. In Seam, all stateful session beans must define a method with no parameters marked
- <literal>@Remove</literal>. This method will be
- called when Seam destroys the session context.</para>
- </example>
+ }
+
+ public boolean isNextPageAvailable() {
+ return hotels!=null && hotels.size()==pageSize;
+ }
+
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ @Factory(value="pattern", scope=ScopeType.EVENT)
+ public String getSearchPattern() {
+ return searchString==null ?
+ "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%';
+ }
+
+ public String getSearchString() {
+ return searchString;
+ }
+
+ public void setSearchString(String searchString) {
+ this.searchString = searchString;
+ }
+
+ @Remove
+ public void destroy() {}
+}]]>
+</programlisting>
+ </para>
+ </formalpara>
+ <formalpara><title>NumberGuess.java Explanatory Notes</title>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The EJB standard <literal>@Stateful</literal> annotation identifies this class as a stateful session bean. Stateful session beans are scoped to the conversation context by default.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <literal>@Restrict</literal> annotation applies a security restriction to the component. It restricts access to the component, allowing only logged-in users. The <!-- #retag: xref plz -->security chapter explains more about security in Seam.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <xref linkend="datamodel-annotation" /> annotation exposes a <literal>List</literal> as a JSF <literal>ListDataModel</literal>. This makes it easy to implement clickable lists for search screens. In this case, the list of hotels is exposed to the page as a <literal>ListDataModel</literal> in the conversation variable named <literal>hotels</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The EJB standard <literal>@Remove</literal> annotation specifies that a stateful session bean should be removed and its state destroyed after invocation of the annotated method. In Seam, all stateful session beans must define a method <literal>@Remove</literal>, with no marked parameters. This method will be called when Seam destroys the session context.
+ </para>
+ </listitem>
+ </orderedlist>
+ <!-- </programlistingco> -->
+ <!-- </example> -->
+ </para>
+ </formalpara>
+
<para> The main page of the application is a Facelets page. Let's look at the fragment which relates to
searching for hotels: </para>
- <example>
- <title></title>
- <!-- Can't use code hightlighting with callouts -->
- <programlisting>
-<div class="section">
+ <formalpara><title>main.xhtml Example</title>
+ <para>
+<programlisting><![CDATA[<div class="section">
-<span class="errors">
- <h:messages globalOnly="true"/>
-</span>
+ <span class="errors">
+ <h:messages globalOnly="true"/>
+ </span>
-<h1>Search Hotels</h1>
+ <h1>Search Hotels</h1>
-<h:form id="searchCriteria">
-<fieldset>
- <h:inputText id="searchString" value="#{hotelSearch.searchString}"
- style="width: 165px;">
- <a:support event="onkeyup" actionListener="#{hotelSearch.find}"
- reRender="searchResults" />
- </h:inputText>
-  
- <a:commandButton id="findHotels" value="Find Hotels" action="#{hotelSearch.find}"
- reRender="searchResults"/>
-  
- <a:status>
- <f:facet name="start">
- <h:graphicImage value="/img/spinner.gif"/>
- </f:facet>
- </a:status>
- <br/>
- <h:outputLabel for="pageSize">Maximum results:</h:outputLabel> 
- <h:selectOneMenu value="#{hotelSearch.pageSize}" id="pageSize">
- <f:selectItem itemLabel="5" itemValue="5"/>
- <f:selectItem itemLabel="10" itemValue="10"/>
- <f:selectItem itemLabel="20" itemValue="20"/>
- </h:selectOneMenu>
- </fieldset>
- </h:form>
+ <h:form id="searchCriteria">
+ <fieldset>
+ <h:inputText id="searchString" value="#{hotelSearch.searchString}"
+ style="width: 165px;">
+ <a:support event="onkeyup" actionListener="#{hotelSearch.find}"
+ reRender="searchResults" />
+ </h:inputText>
+  
+ <a:commandButton id="findHotels" value="Find Hotels"
+ action="#{hotelSearch.find}"
+ reRender="searchResults"/>
+  
+ <a:status>
+ <f:facet name="start">
+ <h:graphicImage value="/img/spinner.gif"/>
+ </f:facet>
+ </a:status>
+ <br/>
+ <h:outputLabel for="pageSize">Maximum results:</h:outputLabel> 
+ <h:selectOneMenu value="#{hotelSearch.pageSize}" id="pageSize">
+ <f:selectItem itemLabel="5" itemValue="5"/>
+ <f:selectItem itemLabel="10" itemValue="10"/>
+ <f:selectItem itemLabel="20" itemValue="20"/>
+ </h:selectOneMenu>
+ </fieldset>
+ </h:form>
- </div>
+</div>
- <a:outputPanel id="searchResults">
- <div class="section">
- <h:outputText value="No Hotels Found"
- rendered="#{hotels != null and hotels.rowCount==0}"/>
- <h:dataTable id="hotels" value="#{hotels}" var="hot"
- rendered="#{hotels.rowCount>0}">
- <h:column>
- <f:facet name="header">Name</f:facet>
- #{hot.name}
- </h:column>
- <h:column>
- <f:facet name="header">Address</f:facet>
- #{hot.address}
- </h:column>
- <h:column>
- <f:facet name="header">City, State</f:facet>
- #{hot.city}, #{hot.state}, #{hot.country}
- </h:column>
- <h:column>
- <f:facet name="header">Zip</f:facet>
- #{hot.zip}
- </h:column>
- <h:column>
- <f:facet name="header">Action</f:facet>
- <s:link id="viewHotel" value="View Hotel"
- action="#{hotelBooking.selectHotel(hot)}"/>
- </h:column>
- </h:dataTable>
- <s:link value="More results" action="#{hotelSearch.nextPage}"
- rendered="#{hotelSearch.nextPageAvailable}"/>
- </div>
-</a:outputPanel>
+<a:outputPanel id="searchResults">
+ <div class="section">
+ <h:outputText value="No Hotels Found"
+ rendered="#{hotels != null and hotels.rowCount==0}"/>
+ <h:dataTable id="hotels" value="#{hotels}" var="hot"
+ rendered="#{hotels.rowCount>0}">
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ #{hot.name}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Address</f:facet>
+ #{hot.address}
+ </h:column>
+ <h:column>
+ <f:facet name="header">City, State</f:facet>
+ #{hot.city}, #{hot.state}, #{hot.country}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Zip</f:facet>
+ #{hot.zip}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Action</f:facet>
+ <s:link id="viewHotel" value="View Hotel"
+ action="#{hotelBooking.selectHotel(hot)}"/>
+ </h:column>
+ </h:dataTable>
+ <s:link value="More results" action="#{hotelSearch.nextPage}"
+ rendered="#{hotelSearch.nextPageAvailable}"/>
+ </div>
+</a:outputPanel>]]>
</programlisting>
-
- <para> The RichFaces Ajax <literal><a:support></literal> tag allows a JSF action
- event listener to be called by asynchronous <literal>XMLHttpRequest</literal> when a
- JavaScript event like <literal>onkeyup</literal> occurs. Even better, the
- <literal>reRender</literal> attribute lets us render a fragment of the JSF page and
- perform a partial page update when the asynchronous response is received. </para>
-
- <para> The RichFaces Ajax <literal><a:status></literal> tag lets us display a cheesy
- annimated image while we wait for asynchronous requests to return. </para>
-
- <para> The RichFaces Ajax <literal><a:outputPanel></literal> tag defines a region of
- the page which can be re-rendered by an asynchronous request. </para>
-
- <para> The Seam <literal><s:link></literal> tag lets us attach a JSF action
- listener to an ordinary (non-JavaScript) HTML link. The advantage of this over the
- standard JSF <literal><h:commandLink></literal> is that it preserves the
- operation of "open in new window" and "open in new tab". Also notice that we use a
- method binding with a parameter: <literal>#{hotelBooking.selectHotel(hot)}</literal>.
- This is not possible in the standard Unified EL, but Seam provides an extension to the
- EL that lets you use parameters on any method binding expression. </para>
- <para> If you're wondering how navigation occurs,
- you can find all the rules in <literal>WEB-INF/pages.xml</literal>;
- this is discussed in the navigation section of this book. </para>
-
- </example>
+ </para>
+ </formalpara>
+ <formalpara><title>main.xhtml Explanatory Notes</title>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The RichFaces Ajax <literal><![CDATA[<a:support>]]></literal> tag allows a JSF action event listener to be called by asynchronous <literal>XMLHttpRequest</literal> when a JavaScript event such as <literal>onkeyup</literal> occurs. Even better, the <literal>reRender</literal> attribute lets us render a fragment of the JSF page and perform a partial page update when the asynchronous response is received.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The RichFaces Ajax <literal><![CDATA[<a:status>]]></literal> tag lets us display an animated image while we wait for asynchronous requests to return.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The RichFaces Ajax <literal><![CDATA[<a:outputPanel>]]></literal> tag defines a region of the page which can be re-rendered by an asynchronous request.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The Seam <literal><![CDATA[<s:link>]]></literal> tag lets us attach a JSF action listener to an ordinary (non-JavaScript) HTML link. The advantage of this over the standard JSF <literal><![CDATA[<h:commandLink>]]></literal> is that it preserves the "open in new window" and "open in new tab" operations. Also note that we use a method binding with a parameter: <literal>#{hotelBooking.selectHotel(hot)}</literal>. This is not possible in standard Unified EL, but Seam provides an extension to an EL that allows parameters on any method binding expression.
+ </para>
+ <para>
+ Navigation rules can be found in <literal>WEB-INF/pages.xml</literal>. These are discussed further in <xref linkend="events.pageaction.navigation" />.
+ </para>
+ </listitem>
+ </orderedlist>
+ <!-- </programlistingco> -->
+ </para>
+ </formalpara>
+
<para> This page displays the search results dynamically as we type, and lets us choose a hotel and pass it
@@ -2150,126 +2192,125 @@
achieve a natural cache of persistent data related to the conversation. The following code example is
pretty long. But if you think of it as a list of scripted actions that implement the various steps of
the conversation, it's understandable. Read the class from top to bottom, as if it were a story. </para>
- <example>
- <title></title>
- <!-- Can't use code hightlighting with callouts -->
- <programlisting>
-@Stateful
+ <formalpara><title>HotelBookingAction.java Example</title>
+ <para>
+<programlisting><![CDATA[@Stateful
@Name("hotelBooking")
@Restrict("#{identity.loggedIn}")
-public class HotelBookingAction implements HotelBooking
-{
+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
- private FacesMessages facesMessages;
-
- @In
- private Events events;
-
- @Logger
- private Log log;
-
- private boolean bookingValid;
-
- @Begin
- public void selectHotel(Hotel selectedHotel)
- {
- hotel = em.merge(selectedHotel);
- }
-
- 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() );
- }
-
- public void setBookingDetails()
- {
- Calendar calendar = Calendar.getInstance();
- calendar.add(Calendar.DAY_OF_MONTH, -1);
- if ( booking.getCheckinDate().before( calendar.getTime() ) )
- {
- facesMessages.addToControl("checkinDate", "Check in date must be a future date");
- bookingValid=false;
- }
- else if ( !booking.getCheckinDate().before( booking.getCheckoutDate() ) )
- {
- facesMessages.addToControl("checkoutDate",
- "Check out date must be later than check in date");
- bookingValid=false;
- }
- else
- {
- bookingValid=true;
- }
- }
-
- public boolean isBookingValid()
- {
- return bookingValid;
- }
-
- @End
- public void confirm()
- {
- em.persist(booking);
- facesMessages.add("Thank you, #{user.name}, your confimation number " +
- " for #{hotel.name} is #{booki g.id}");
- log.info("New booking: #{booking.id} for #{user.username}");
- events.raiseTransactionSuccessEvent("bookingConfirmed");
- }
-
- @End
- public void cancel() {}
-
- @Remove
- public void destroy() {}
+ @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
+ private FacesMessages facesMessages;
+
+ @In
+ private Events events;
+
+ @Logger
+ private Log log;
+
+ private boolean bookingValid;
+
+ @Begin
+ public void selectHotel(Hotel selectedHotel) {
+ hotel = em.merge(selectedHotel);
+ }
+
+ 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() );
+ }
+
+ public void setBookingDetails() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.add(Calendar.DAY_OF_MONTH, -1);
+ if ( booking.getCheckinDate().before( calendar.getTime() ) ) {
+ facesMessages.addToControl("checkinDate",
+ "Check in date must be a future date");
+ bookingValid=false;
+ }
+ else if (!booking.getCheckinDate().before(booking.getCheckoutDate()))
+ {
+ facesMessages.addToControl("checkoutDate",
+ "Check out date must be later than check in date");
+ bookingValid=false;
+ }
+ else
+ {
+ bookingValid=true;
+ }
+ }
+
+ public boolean isBookingValid() {
+ return bookingValid;
+ }
+
+ @End
+ public void confirm() {
+ em.persist(booking);
+ facesMessages.add("Thank you, #{user.name}, " +
+ "your confimation number " +
+ "for #{hotel.name} is #{booki g.id}");
+ log.info("New booking: #{booking.id} for #{user.username}");
+ events.raiseTransactionSuccessEvent("bookingConfirmed");
+ }
+
+ @End
+ public void cancel() {}
+
+ @Remove
+ public void destroy() {}]]>
</programlisting>
-
- <para> This bean uses an EJB3 <emphasis>extended persistence context</emphasis>, so that any
- entity instances remain managed for the whole lifecycle of the stateful session bean.
- </para>
-
- <para> The
- <literal>@Out</literal>
- annotation declares that an attribute value is <emphasis>outjected</emphasis> to
- a context variable after method invocations. In this case, the context variable named
- <literal>hotel</literal> will be set to the value of the <literal>hotel</literal>
- instance variable after every action listener invocation completes. </para>
-
- <para> The
- <literal>@Begin</literal>
- annotation specifies that the annotated method begins a <emphasis>long-running
- conversation</emphasis>, so the current conversation context will not be destroyed
- at the end of the request. Instead, it will be reassociated with every request from the
- current window, and destroyed either by timeout due to conversation inactivity or
- invocation of a matching <literal>@End</literal> method. </para>
-
- <para> The
- <literal>@End</literal>
- annotation specifies that the annotated method ends the current long-running
- conversation, so the current conversation context will be destroyed at the end of the
- request. </para>
-
- <para> This EJB remove method will be called when Seam destroys the conversation context.
- Don't forget to define this method! </para>
- </example>
+ </para>
+ </formalpara>
+ <formalpara><title>HotelBookingAction.java Explanatory Notes</title>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ This bean uses an EJB3 <emphasis>extended persistence context</emphasis>, so that entity instances remain managed for the whole lifecycle of the stateful session bean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <xref linkend="out-annotation" /> annotation declares that an attribute value is "outjected" to a context variable after method invocations. In this case, the context variable named <literal>hotel</literal> will be set to the value of the <literal>hotel</literal> instance variable after every action listener invocation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <literal>@Begin</literal> annotation specifies that the annotated method begins a <emphasis>long-running conversation</emphasis>, so the current conversation context will not be destroyed at the end of the request. Instead, it will be reassociated with every request from the current window, and destroyed either by timeout due to conversation inactivity or invocation of a matching <literal>@End</literal> method.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <xref linkend="end-annotation" /> annotation specifies that the annotated method ends the current long-running conversation, so the current conversation context will be destroyed at the end of the request.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ This EJB remove method must be defined, and will be called when Seam destroys the conversation context.
+ </para>
+ </listitem>
+ </orderedlist>
+ <!-- </programlistingco> -->
+ </para>
+ </formalpara>
+
<para>
@@ -2377,8 +2418,8 @@
</mediaobject>
</screenshot>
- <para>TODO</para>
- <para>Look in the <literal>dvdstore</literal> directory.</para>
+<!-- <para>TODO</para>
+ <para>Look in the <literal>dvdstore</literal> directory.</para>-->
</section>
<section id="hibernate">
@@ -2387,8 +2428,8 @@
<para> The Hibernate Booking demo is a straight port of the Booking demo to an alternative architecture that
uses Hibernate for persistence and JavaBeans instead of session beans. </para>
- <para>TODO</para>
- <para>Look in the <literal>hibernate</literal> directory.</para>
+ <!--<para>TODO</para>
+ <para>Look in the <literal>hibernate</literal> directory.</para>-->
</section>
<section id="blog">
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Webservices.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Webservices.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Webservices.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -7,7 +7,7 @@
services to run within a Seam environment.
</para>
- <sect1>
+ <section>
<title>Configuration and Packaging</title>
<para>
To allow Seam to intercept web service requests so that the necessary Seam contexts can be created for the request,
@@ -40,9 +40,9 @@
</endpoint-config>
</jaxws-config>]]></programlisting>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Conversational Web Services</title>
<para>
So how are conversations propagated between web service requests? Seam uses a SOAP header element present
@@ -89,7 +89,7 @@
As you can see, the response message contains the same <literal>conversationId</literal> element as the request.
</para>
- <sect2>
+ <section>
<title>A Recommended Strategy</title>
<para>
@@ -112,11 +112,11 @@
features to be used in the web service class itself.
</para>
- </sect2>
+ </section>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>An example web service</title>
<para>
@@ -196,7 +196,7 @@
and delegating the real work to a conversational Seam component.
</para>
- </sect1>
+ </section>
</chapter>
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Xml.xml
===================================================================
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Xml.xml 2009-11-24 00:33:31 UTC (rev 11654)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Xml.xml 2009-11-24 02:12:51 UTC (rev 11655)
@@ -11,7 +11,7 @@
properties file or in <literal>web.xml</literal>, and configuration via <literal>components.xml</literal>.
</para>
- <sect1>
+ <section>
<title>Configuring components via property settings</title>
<para>
Seam components may be provided with configuration properties either via servlet context parameters,
@@ -32,9 +32,9 @@
component named <literal>org.jboss.seam.core.manager</literal> with a setter method named
<literal>setConversationTimeout()</literal>.)
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Configuring components via <literal>components.xml</literal></title>
<para>
@@ -241,9 +241,9 @@
(at development time). You'll see this approach used in the Seam examples.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Fine-grained configuration files</title>
<para>
If you have a large number of components that need to be configured in XML, it makes much more sense
@@ -282,9 +282,9 @@
Alternatively, you may put configuration for all classes in the <literal>com.helloworld</literal>
package in <literal>com/helloworld/components.xml</literal>.
</para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Configurable property types</title>
<para>
Properties of string, primitive or primitive wrapper type may be configured just as you would expect:
@@ -347,9 +347,9 @@
<property name="ruleBase">#{policyPricingRules}</property>
</component>]]></programlisting>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Using XML Namespaces</title>
<para>
Throughout the examples, there have been two competing ways of declaring components: with and without
@@ -536,7 +536,7 @@
</itemizedlist>
- </sect1>
+ </section>
</chapter>
14 years, 6 months