From seam-commits at lists.jboss.org Tue Nov 24 02:37:05 2009
Content-Type: multipart/mixed; boundary="===============0132278894731746878=="
MIME-Version: 1.0
From: seam-commits at lists.jboss.org
To: seam-commits at lists.jboss.org
Subject: [seam-commits] Seam SVN: r11670 -
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US.
Date: Tue, 24 Nov 2009 02:37:05 -0500
Message-ID: <200911240737.nAO7b5mM026239@svn01.web.mwc.hst.phx2.redhat.com>
--===============0132278894731746878==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: laubai
Date: 2009-11-24 02:37:05 -0500 (Tue, 24 Nov 2009)
New Revision: 11670
Modified:
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Testing.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Text.xml
tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Validation.x=
ml
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:
Edited testing, text, tools, validation, webservices and xml chapters.
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Testi=
ng.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Testing.xml=
2009-11-24 07:35:44 UTC (rev 11669)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Testing.xml=
2009-11-24 07:37:05 UTC (rev 11670)
@@ -3,7 +3,7 @@
Most Seam applications will need at least two kinds of automated test=
s:
unit tests, which test a particular Seam compone=
nt
- in isolation, and scripted integration tests whi=
ch
+ in isolation, and scripted integration tests whi=
ch
exercise all Java layers of the application (that is, everything exce=
pt the
view pages).
@@ -15,7 +15,7 @@
Unit testing Seam components
All Seam components are POJOs. This is a great place to start if you
- want easy unit testing. And since Seam emphasises the use of bijecti=
on =
+ want easy unit testing. And since Seam emphasises the use of bijectio=
n =
for inter-component interactions and access to contextual obje=
cts, it's =
very easy to test a Seam component outside of its normal runti=
me =
environment.
@@ -76,11 +76,11 @@
]]>
=
- You'll notice we aren't testing retrieving data from or persis=
ting
- data to the database; nor are we testing any functionality =
- provided by Seam. We are just testing the logic of our POJOs. =
Seam
- components don't usually depend directly upon container infras=
tructure,
- so most unit testing as as easy as that!
+ In this case, we aren't testing retrieving data from the datab=
ase, or
+ pushing data to it; nor are we testing any functionality provided
+ by Seam. We are just testing the logic of our POJOs. Seam comp=
onents
+ don't usually depend directly upon container infrastructure,
+ so most unit testing is a simple process.
=
However, if you want to test the entire application, read on.
@@ -93,18 +93,16 @@
=
Integration testing is slightly more difficult. In this case, =
we can't eliminate
- the container infrastructure; indeed, that is part of what is =
being tested! At
- the same time, we don't want to be forced to deploy our applic=
ation to an
- application server to run the automated tests. We need to be a=
ble to reproduce
- just enough of the container infrastructure inside our testing=
environment to be =
- able to exercise the whole application, without hurting perfor=
mance too much.
+ the container infrastructure, as it is also being tested. At t=
he same time, we don't
+ want to be forced to deploy our application to an application =
server to run the
+ automated tests. We need to be able to reproduce just enough o=
f the container
+ infrastructure inside our testing environment to be able to ex=
ercise the whole
+ application, without hurting performance too much.
=
- The approach taken by Seam is to let you write tests that exer=
cise your
- components while running inside a pruned down container enviro=
nment (Seam,
- together with the JBoss Embedded container; n.b. JBoss Embedde=
d requires
- JDK 1.5 and does not work with JDK 1.6).
+ Seam allows you to test your components while running inside a=
pruned down container environment. This environment, incorporating Seam =
and the JBoss Embedded Container, requires JDK 1.5, and does not work with
+ JDK 1.6. =
=
=
=
- Integration testing Seam application user interactions
+ Integration testing Seam application User Interactions
=
- An even harder problem is emulating user interactions. A third=
problem is where =
- to put our assertions. Some test frameworks let us test the wh=
ole application
- by reproducing user interactions with the web browser. These f=
rameworks have
- their place, but they are not appropriate for use at developme=
nt time.
+ Emulating user interactions is a difficult, as is correctly pl=
acing our assertions. =
+ Some test frameworks let us test the whole application by repr=
oducing user
+ interactions with the web browser. These frameworks have their=
place, but are not
+ appropriate for use at development time.
=
SeamTest lets you write scripted<=
/emphasis> tests,
in a simulated JSF environment. The role of a scripted test is=
to reproduce =
- the interaction between the view and the Seam components. In o=
ther words, you =
- get to pretend you are the JSF implementation!
+ the interaction between the view and the Seam components.
=
@@ -283,7 +280,7 @@
}]]>
=
- Notice that we've extended SeamTest, which =
provides a =
+ We have extended SeamTest, which provides a =
Seam environment for our components, and written our test scri=
pt as an =
anonymous class that extends SeamTest.FacesRequest, =
which provides an emulated JSF request lifecycle. (There is al=
so a
@@ -296,7 +293,7 @@
You'll find plenty of integration tests for the Seam example a=
pplications
which demonstrate more complex cases. There are instructions f=
or running
- these tests using Ant, or using the TestNG plugin for eclipse:
+ these tests using Ant, or using the TestNG plugin for Eclipse:
=
@@ -436,17 +433,17 @@
dependencies from lib/ (e.g. =
jboss-system.jar) on the classpath, these
will cause Embedded JBoss to not boot. So, just add the =
- dependencies (e.g. Drools, jBPM)you need as you go.
+ dependencies (e.g. Drools, jBPM) you need as you go.
=
You also need to include the bootstrap/ =
- directory on the classpath; bootstrap/ co=
ntains
+ directory on the classpath. Bootstrap/ co=
ntains
the configuration for Embedded JBoss.
=
- And, of course you need to put your built project and tests =
onto
+ You also need to put your built project and tests onto
the classpath. Don't forget to put all the correct configura=
tion
files for JPA and Seam onto the classpath as well.Seam asks =
Embedded JBoss to deploy any resource (jar or directory)
@@ -458,7 +455,7 @@
=
By default, a generated project will use the =
- java:/DefaultDS (a built in HSQL datasour=
ce in
+ java:/DefaultDS (a built-in HSQL datasour=
ce in
Embedded JBoss) for testing. If you want to use another data=
source
place the foo-ds.xml into =
bootstrap/deploy directory.
@@ -471,7 +468,7 @@
=
Seam provides TestNG support out of the box, but you can als=
o use
- another test framework, such as JUnit, if you want.
+ another test framework, such as JUnit, if you prefer.
=
@@ -532,7 +529,7 @@
You need to provide a dataset for DBUnit. IMPORTANT NOTE: DBU=
nit supports two
formats for dataset files, flat and XML. Seam's DBUnitSeamTes=
t assumes the flat =
- format is used, so please ensure that your dataset is in this =
format also.
+ format is used, so please ensure that your dataset is in this =
format:
=
@@ -550,7 +547,7 @@
]]>
=
- and tell Seam about it by overriding prepareDBUnitOpe=
rations():
+ Then override the prepareDBUnitOperations()=
to announce the changes to Seam:
=
=
-
\ No newline at end of file
+
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Text.=
xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Text.xml 20=
09-11-24 07:35:44 UTC (rev 11669)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Text.xml 20=
09-11-24 07:37:05 UTC (rev 11670)
@@ -43,7 +43,7 @@
This is the second paragraph.]]>
=
- (Note that a simple newline is ignored, you need an additional=
blank line to wrap text into a new paragraph.)
+ A simple newline will be ignored, and you need an additional bl=
ank line to wrap text into a new paragraph.
This is the HTML that results:
=
@@ -220,10 +220,6 @@
Last name: | King |
]]>
=
-
- But you can do much more if you want!
-
- =
=
-
\ No newline at end of file
+
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Valid=
ation.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Validation.=
xml 2009-11-24 07:35:44 UTC (rev 11669)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Validation.=
xml 2009-11-24 07:37:05 UTC (rev 11670)
@@ -105,7 +105,7 @@
Note: specifying @NotNull
on the model does not eliminate the requirem=
ent
- for required=3D"true" to appear on the control!
+ for required=3D"true" to appear on the control.
This is due to a limitation of the JSF validation architecture.
=
@@ -144,8 +144,7 @@
=
This tag simply adds an <s:validate>
- to every input in the form. For a large form, it can save a lot
- of typing!
+ to every input in the form.
=
@@ -248,7 +247,7 @@
It's better style to define explicit ids for
important controls on the page, especially if you want to do
- automated testing for the UI, using some toolkit like
+ automated testing for the UI, using a toolkit like
Selenium. If you don't provide explicit ids, JSF will generate
them, but the generated values will change if you change
anything on the page.
@@ -277,10 +276,9 @@
]]>
=
- And what if you want to specify a different message to be =
- displayed when validation fails? You can use the Seam message
- bundle (and all it's goodies like el expressions inside the message,
- and per-view message bundles) with the Hibernate Validator:
+ You can use the Seam message bundle (and all it's goodies like el expres=
sions inside the message,
+ and per-view message bundles) with the Hibernate Validator to specify a =
different
+ message to be displayed when validation fails:
=
=
-
\ No newline at end of file
+
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Webse=
rvices.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Webservices=
.xml 2009-11-24 07:35:44 UTC (rev 11669)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Webservices=
.xml 2009-11-24 07:37:05 UTC (rev 11670)
@@ -45,9 +45,7 @@
Conversational Web Services
- So how are conversations propagated between web service requests? S=
eam uses a SOAP header element present
- in both the SOAP request and response messages to carry the conversa=
tion ID from the consumer to the service,
- and back again. Here's an example of a web service request that con=
tains a conversation ID:
+ Seam uses a SOAP header element present in both the SOAP request and=
response messages to carry the conversation ID from the consumer to the se=
rvice, and back again. Below is an example of a web service request that co=
ntains a conversation ID:
=
An important thing to note is that the conversationId header element must be qualified
with a namespace of http://www.jboss.org/seam/webservice, otherwise Seam will not be
- able to read the conversation ID from the request. Here's an example=
of a response to the above request message:
+ able to read the conversation ID from the request. Below is an examp=
le of a response to the above request message:
=
Modified: tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Xml.x=
ml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Xml.xml 200=
9-11-24 07:35:44 UTC (rev 11669)
+++ tags/JBPAPP_4_3_CP07_FP_CR1a/doc/Seam_Reference_Guide/en-US/Xml.xml 200=
9-11-24 07:37:05 UTC (rev 11670)
@@ -1,12 +1,13 @@
=
- Configuring Seam components
+ Configuring Seam Components
=
=
The philosophy of minimizing XML-based configuration is extrem=
ely strong in Seam. Nevertheless,
there are various reasons why we might want to configure a Sea=
m component using XML: to isolate
deployment-specific information from the Java code, to enable =
the creation of re-usable frameworks,
to configure Seam's built-in functionality, etc.
+
Seam provides two basic approaches to configuring components: =
configuration via property settings in a
properties file or in web.xml, and configur=
ation via components.xml. =
@@ -38,8 +39,8 @@
Configuring components via components.xml
=
=
- The components.xml file is a bit more p=
owerful than property settings. It lets
- you: =
+ The components.xml file is a bit more p=
owerful than property settings. It allows
+ you to: =
=
@@ -92,8 +93,11 @@
=
- For example, the following components.xml file installs jBPM: =
+ For example, the following three examples install jBPM: =
+
+ Example One:
+
=
]]>
=
- This example does the same thing:
+ Example Two:
=
@@ -125,7 +129,7 @@
]]>
=
- As does this one:
+ Example Three:
=
@@ -203,7 +207,7 @@
]]>
=
=
- You can create an "alias" (a second name) for a Seam compo=
nent like so: =
+ You can create an alias for a Seam component like so: =
=
@@ -213,7 +217,7 @@
]]>
=
=
- You can even create an "alias" for a commonly used express=
ion: =
+ You can even create an alias for a commonly used expressio=
n: =
=
@@ -334,7 +338,7 @@
=
=
Finally, you may wire together components using a value-bi=
nding expression. Note that this is quite
- different to injection using @In, since=
it happens at component instantiation time
+ different to injection using @In, since=
it happens at component creation time
instead of invocation time. It is therefore much more simi=
lar to the dependency injection facilities
offered by traditional IoC containers like JSF or Spring. =
@@ -396,9 +400,8 @@
=
=
Now, this works great for the built-in Seam components, bu=
t what about user components? There are two options. =
- First, Seam supports mixing the two models, allowing the u=
se of the generic <component> =
- declarations for user components, along with namespaced de=
clarations for built-in components. But even better,
- Seam allows you to quickly declare namespaces for your own=
components.
+ Firstly, Seam supports mixing the two models, allowing the=
use of the generic <component> =
+ declarations for user components, along with namespaced de=
clarations for built-in components. Secondly, Seam allows you to quickly de=
clare namespaces for your own components.
=
--===============0132278894731746878==--