Seam SVN: r9911 - trunk/doc/Seam_Reference_Guide/it-IT.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-01-10 15:47:47 -0500 (Sat, 10 Jan 2009)
New Revision: 9911
Modified:
trunk/doc/Seam_Reference_Guide/it-IT/Xml.po
Log:
JBSEAM-3767: Italian translation of Seam guide
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Xml.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Xml.po 2009-01-10 14:18:32 UTC (rev 9910)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Xml.po 2009-01-10 20:47:47 UTC (rev 9911)
@@ -6,7 +6,7 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-04 00:59+0000\n"
-"PO-Revision-Date: 2009-01-09 18:51+0100\n"
+"PO-Revision-Date: 2009-01-10 21:46+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -635,7 +635,7 @@
#: Xml.xml:252
#, no-c-format
msgid "Finally, you may wire together components using a value-binding expression. Note that this is quite different to injection using <literal>@In</literal>, since it happens at component instantiation time instead of invocation time. It is therefore much more similar to the dependency injection facilities offered by traditional IoC containers like JSF or Spring."
-msgstr ""
+msgstr "Infine si può unire assieme i componenti usando un'espressione value-binding. Si noti che è diverso dall'usare l'iniezione con <literal>@In</literal>, poiché avviene al momento dell'istanziamento del componente invece che al momento dell'invocazione. E' quindi molto più simile alle strutture con dependency injection offerte dai tradizionali IoC container come JSF o Spring."
#. Tag: programlisting
#: Xml.xml:260
@@ -683,7 +683,7 @@
#: Xml.xml:271
#, no-c-format
msgid "However, there is one important exception. If the type of the property to which the initial value is being assigned is either a Seam <literal>ValueExpression</literal> or <literal>MethodExpression</literal>, then the evaluation of the EL is deferred. Instead, the appropriate expression wrapper is created and assigned to the property. The message templates on the Home component from the Seam Application Framework serve as an example."
-msgstr ""
+msgstr "C'è un'importante eccezione. Se un tipo di proprietà a cui il valore iniziale assegnato è o una <literal>ValueExpression</literal> di Seam o una <literal>MethodExpression</literal>, allora la valutazione di EL è rimandata. Invece il wrapper dell'espressione appropriata viene creato e assegnato alla proprietà. I modelli di messaggi nel componente Home dell'Applicazione Framework di Seam servono da esempio."
#. Tag: programlisting
#: Xml.xml:279
@@ -701,7 +701,7 @@
#: Xml.xml:281
#, no-c-format
msgid "Inside the component, you can access the expression string by calling <literal>getExpressionString()</literal> on the <literal>ValueExpression</literal> or <literal>MethodExpression</literal>. If the property is a <literal>ValueExpression</literal>, you can resolve the value using <literal>getValue()</literal> and if the property is a <literal>MethodExpression</literal>, you can invoke the method using <literal>invoke(Object args...)</literal>. Obviously, to assign a value to a <literal>MethodExpression</literal> property, the entire initial value must be a single EL expression."
-msgstr ""
+msgstr "Dentro il componente sipuò accedere all'espressione di stringa chiamando <literal>getExpressionString()</literal> sulla <literal>ValueExpression</literal> o <literal>MethodExpression</literal>. Se la proprietà è una <literal>ValueExpression</literal>, si può risolvere il valore usando <literal>getValue()</literal> e se la proprietà è un <literal>MethodExpression</literal>, si può invocare il metodo usando <literal>invoke(Object args...)</literal>. Ovviamente per assegnare un valore alla proprietà <literal>MethodExpression</literal>, l'intero valore iniziale deve essere una singola espressione EL."
#. Tag: title
#: Xml.xml:294
@@ -713,7 +713,7 @@
#: Xml.xml:295
#, no-c-format
msgid "Throughout the examples, there have been two competing ways of declaring components: with and without the use of XML namespaces. The following shows a typical <literal>components.xml</literal> file without namespaces:"
-msgstr ""
+msgstr "Attraverso gli esempi ci sono stati due modi per dichiarare i componenti: con e senza l'uso di namespace XML. Il seguente mostra un tipico file <literal>components.xml</literal> senza namespace:"
#. Tag: programlisting
#: Xml.xml:301
@@ -785,7 +785,7 @@
#: Xml.xml:312
#, no-c-format
msgid "Even though the schema declarations are verbose, the actual XML content is lean and easy to understand. The schemas provide detailed information about each component and the attributes available, allowing XML editors to offer intelligent autocomplete. The use of namespaced elements makes generating and maintaining correct <literal>components.xml</literal> files much simpler."
-msgstr ""
+msgstr "Anche se le dichiarazioni di schema sono lunghe, il contenuto vero di XML è piatto e facile da capire. Gli schemi forniscono informazioni dettagliate su ogni componente e sugli attributi disponibili, consentendo agli editor XML di offrire un autocompletamento intelligente. L'uso di elementi con namespace semplifica molto la generazione ed il mantenimento in uno stato corretto dei file <literal>components.xml</literal>."
#. Tag: para
#: Xml.xml:319
15 years, 4 months
Seam SVN: r9910 - trunk/src/wicket/org/jboss/seam/wicket.
by seam-commits@lists.jboss.org
Author: cpopetz
Date: 2009-01-10 09:18:32 -0500 (Sat, 10 Jan 2009)
New Revision: 9910
Modified:
trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java
Log:
JBSEAM-3880
Modified: trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java 2009-01-09 19:39:49 UTC (rev 9909)
+++ trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java 2009-01-10 14:18:32 UTC (rev 9910)
@@ -424,8 +424,9 @@
}
}
- private static Object getValue(BijectedAttribute<In> in, Object bean)
+ private Object getValue(BijectedAttribute<In> in, Object bean)
{
+ Object result;
String name = in.getContextVariableName();
if ( name.startsWith("#") )
{
@@ -433,7 +434,7 @@
{
log.trace("trying to inject with EL expression: " + name);
}
- return Expressions.instance().createValueExpression(name).getValue();
+ result = Expressions.instance().createValueExpression(name).getValue();
}
else if ( in.getAnnotation().scope()==UNSPECIFIED )
{
@@ -441,7 +442,8 @@
{
log.trace("trying to inject with hierarchical context search: " + name);
}
- return getInstanceInAllNamespaces(name, in.getAnnotation().create());
+ boolean create = in.getAnnotation().create() && !org.jboss.seam.contexts.Lifecycle.isDestroying();
+ result = getInstanceInAllNamespaces(name, create);
}
else
{
@@ -460,15 +462,25 @@
);
}
-
log.trace("trying to inject from specified context: " + name);
if ( in.getAnnotation().scope().isContextActive() )
{
- return in.getAnnotation().scope().getContext().get(name);
+ result = in.getAnnotation().scope().getContext().get(name);
}
+ else
+ {
+ result = null;
+ }
}
- return null;
+ if ( result==null && in.getAnnotation().required() )
+ {
+ throw new RequiredException( "@In attribute requires non-null value: " + type + '.' + name );
+ }
+ else
+ {
+ return result;
+ }
}
private static Object getInstanceInAllNamespaces(String name, boolean create)
15 years, 4 months
Seam SVN: r9909 - trunk/src/main/org/jboss/seam/web.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-01-09 14:39:49 -0500 (Fri, 09 Jan 2009)
New Revision: 9909
Modified:
trunk/src/main/org/jboss/seam/web/RewritingResponse.java
Log:
JBSEAM-3771
Modified: trunk/src/main/org/jboss/seam/web/RewritingResponse.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/RewritingResponse.java 2009-01-09 19:05:30 UTC (rev 9908)
+++ trunk/src/main/org/jboss/seam/web/RewritingResponse.java 2009-01-09 19:39:49 UTC (rev 9909)
@@ -2,6 +2,8 @@
import java.util.Collection;
+import java.net.*;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
@@ -52,23 +54,43 @@
return encodeURL(url);
}
-
- public String encode(String originalUrl) {
- String url = originalUrl;
+
+ public String rewritePath(String path) {
String contextPath = request.getContextPath();
- if (url.startsWith(contextPath)) {
- url = url.substring(contextPath.length());
+ if (path.startsWith(contextPath)) {
+ path = path.substring(contextPath.length());
}
for (Pattern pattern: patterns) {
- Rewrite rewrite = pattern.matchOutgoing(url);
+ Rewrite rewrite = pattern.matchOutgoing(path);
if (rewrite != null) {
return request.getContextPath() + rewrite.rewrite();
}
}
- return originalUrl;
+ return path;
}
+ public boolean isLocalURL(URL url) {
+ return url.getHost().equals(request.getServerName());
+ }
+
+ public String encode(String originalUrl) {
+ if (originalUrl.startsWith("http://") || originalUrl.startsWith("https://")) {
+ try {
+ URL url = new URL(originalUrl);
+
+ if (isLocalURL(url)) {
+ URL newUrl = new URL(url, rewritePath(url.getFile()));
+ return newUrl.toExternalForm();
+ }
+ } catch (MalformedURLException e) {
+ // ignore - we simply don't care. we could log this at info/debug level.
+ }
+ }
+
+ return rewritePath(originalUrl);
+ }
+
}
15 years, 4 months
Seam SVN: r9908 - branches/enterprise/JBPAPP_4_3_FP01.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-01-09 14:05:30 -0500 (Fri, 09 Jan 2009)
New Revision: 9908
Modified:
branches/enterprise/JBPAPP_4_3_FP01/build.xml
Log:
JBPAPP-1516
Modified: branches/enterprise/JBPAPP_4_3_FP01/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/build.xml 2009-01-09 18:59:42 UTC (rev 9907)
+++ branches/enterprise/JBPAPP_4_3_FP01/build.xml 2009-01-09 19:05:30 UTC (rev 9908)
@@ -498,7 +498,7 @@
<copy file="changelog.txt" todir="${dist.dir}" />
<propertyfile file="${dist.dir}/build.properties" comment="See build/sample.build.properties for properties you might want to set">
<entry key="tomcat.home" value="/var/lib/tomcat5" />
- <entry key="jboss.home" value="/var/lib/jboss-as" />
+ <entry key="jboss.home" value="/var/lib/jbossas" />
<entry key="mavenized" value="false" />
<entry key="qualifier" value="${qualifier}" />
</propertyfile>
15 years, 4 months
Seam SVN: r9907 - branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-01-09 13:59:42 -0500 (Fri, 09 Jan 2009)
New Revision: 9907
Modified:
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl
Log:
JBPAPP-1562
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl 2009-01-09 18:54:33 UTC (rev 9906)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl 2009-01-09 18:59:42 UTC (rev 9907)
@@ -126,7 +126,7 @@
<#else>
<h:column>
<f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
- <@outputValue property=parentParentPojo.indentifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}" indent=16/>
+ <@outputValue property=parentParentPojo.identifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}" indent=16/>
</h:column>
</#if>
</#if>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl 2009-01-09 18:54:33 UTC (rev 9906)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl 2009-01-09 18:59:42 UTC (rev 9907)
@@ -97,7 +97,7 @@
<#else>
<h:column>
<f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
- <@outputValue property=parentParentPojo.indentifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}" indent=16/>
+ <@outputValue property=parentParentPojo.identifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}" indent=16/>
</h:column>
</#if>
</#if>
15 years, 4 months
Seam SVN: r9906 - branches/enterprise/JBPAPP_4_2_CP01/src/main/org/jboss/seam/intercept.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-01-09 13:54:33 -0500 (Fri, 09 Jan 2009)
New Revision: 9906
Modified:
branches/enterprise/JBPAPP_4_2_CP01/src/main/org/jboss/seam/intercept/RootInterceptor.java
Log:
JBPAPP-1044
Modified: branches/enterprise/JBPAPP_4_2_CP01/src/main/org/jboss/seam/intercept/RootInterceptor.java
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP01/src/main/org/jboss/seam/intercept/RootInterceptor.java 2009-01-09 17:51:36 UTC (rev 9905)
+++ branches/enterprise/JBPAPP_4_2_CP01/src/main/org/jboss/seam/intercept/RootInterceptor.java 2009-01-09 18:54:33 UTC (rev 9906)
@@ -92,7 +92,7 @@
protected Object invoke(InvocationContext invocation, EventType invocationType) throws Exception
{
- if ( !isSeamComponent )
+ if ( !isSeamComponent || !Contexts.isApplicationContextActive() )
{
//not a Seam component
return invocation.proceed();
15 years, 4 months
Seam SVN: r9905 - trunk/doc/Seam_Reference_Guide/it-IT.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-01-09 12:51:36 -0500 (Fri, 09 Jan 2009)
New Revision: 9905
Modified:
trunk/doc/Seam_Reference_Guide/it-IT/Xml.po
Log:
JBSEAM-3767: Italian translation of Seam guide
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Xml.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Xml.po 2009-01-09 17:51:14 UTC (rev 9904)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Xml.po 2009-01-09 17:51:36 UTC (rev 9905)
@@ -6,7 +6,7 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-04 00:59+0000\n"
-"PO-Revision-Date: 2009-01-09 12:57+0100\n"
+"PO-Revision-Date: 2009-01-09 18:51+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -429,13 +429,13 @@
#: Xml.xml:180
#, no-c-format
msgid "If you have a large number of components that need to be configured in XML, it makes much more sense to split up the information in <literal>components.xml</literal> into many small files. Seam lets you put configuration for a class named, for example, <literal>com.helloworld.Hello</literal> in a resource named <literal>com/helloworld/Hello.component.xml</literal>. (You might be familiar with this pattern, since it is the same one we use in Hibernate.) The root element of the file may be either a <literal><components></literal> or <literal><component></literal> element."
-msgstr ""
+msgstr "Qualora si abbia un grande numero di componenti che devono essere configurati in XML, è pià sensato suddividere l'informazione di <literal>components.xml</literal> in numerosi piccoli file. Seam consente di mettere la configurazione per una classe non anonima, per esempio, <literal>com.helloworld.Hello</literal> in una risorsa chiamata <literal>com/helloworld/Hello.component.xml</literal>. (Potresti essere familiare a questo pattern, poiché è lo stesso usato da Hibernate.) L'elemento radice del file può essere o un elemento <literal><components></literal> oppure <literal><component></literal>."
#. Tag: para
#: Xml.xml:189
#, no-c-format
msgid "The first option lets you define multiple components in the file:"
-msgstr ""
+msgstr "La prima opzione lascia definire nel file componenti multipli:"
#. Tag: programlisting
#: Xml.xml:193
@@ -459,7 +459,7 @@
#: Xml.xml:195
#, no-c-format
msgid "The second option only lets you define or configure one component, but is less noisy:"
-msgstr ""
+msgstr "La seconda opzione lascia definire o configurare un solo componente, ma è meno rumorosa:"
#. Tag: programlisting
#: Xml.xml:199
@@ -477,25 +477,25 @@
#: Xml.xml:201
#, no-c-format
msgid "In the second option, the class name is implied by the file in which the component definition appears."
-msgstr ""
+msgstr "Nella seconda opzione, il nome della classe è implicato nel file in cui appare la definizione del componente."
#. Tag: para
#: Xml.xml:206
#, no-c-format
msgid "Alternatively, you may put configuration for all classes in the <literal>com.helloworld</literal> package in <literal>com/helloworld/components.xml</literal>."
-msgstr ""
+msgstr "In alternativa, si può mettere una configurazione per tutte le classi nel pacchetto <literal>com.helloworld</literal> in <literal>com/helloworld/components.xml</literal>."
#. Tag: title
#: Xml.xml:213
#, no-c-format
msgid "Configurable property types"
-msgstr ""
+msgstr "Tipi di proprietà configurabili"
#. Tag: para
#: Xml.xml:214
#, no-c-format
msgid "Properties of string, primitive or primitive wrapper type may be configured just as you would expect:"
-msgstr ""
+msgstr "Le proprietà dei tipi stringa, primitivi o wrapper primitivi possono essere configurati solo come atteso:"
#. Tag: programlisting
#: Xml.xml:218
@@ -525,7 +525,7 @@
#: Xml.xml:224
#, no-c-format
msgid "Arrays, sets and lists of strings or primitives are also supported:"
-msgstr ""
+msgstr "Anche array, set e liste di stringhe o primitivi sono supportati:"
#. Tag: programlisting
#: Xml.xml:228
@@ -577,7 +577,7 @@
#: Xml.xml:234
#, no-c-format
msgid "Even maps with String-valued keys and string or primitive values are supported:"
-msgstr ""
+msgstr "Anche le mappe con chiavi associate a stringhe oppure valori stringa o primitivi sono supportati:"
#. Tag: programlisting
#: Xml.xml:238
@@ -603,13 +603,13 @@
#: Xml.xml:240
#, no-c-format
msgid "When configuring multi-valued properties, by default, Seam will preserve the order in which you place the attributes in <literal>components.xml</literal> (unless you use a <literal>SortedSet</literal>/<literal>SortedMap</literal> then Seam will use <literal>TreeMap</literal>/<literal>TreeSet</literal>). If the property has a concrete type (for example <literal>LinkedList</literal> Seam will use that type."
-msgstr ""
+msgstr "Quando si configurano le proprietò multi valore, di default Seam preserverà l'ordine in cui vengono messi gli attributi in <literal>components.xml</literal> (amenoché venga usato <literal>SortedSet</literal>/<literal>SortedMap</literal> allora Seam userà <literal>TreeMap</literal>/<literal>TreeSet</literal>). Se la proprietò ha un tipo concreto (per esempio <literal>LinkedList</literal>) Seam userà quel tipo."
#. Tag: para
#: Xml.xml:246
#, no-c-format
msgid "You can also override the type by specifying a fully qualified class name:"
-msgstr ""
+msgstr "Si può anche fare l'override del tipo specificando un nome di classe pienamente qualificato:"
#. Tag: programlisting
#: Xml.xml:250
@@ -665,7 +665,7 @@
#: Xml.xml:264
#, no-c-format
msgid "Seam also resolves an EL expression string prior to assigning the initial value to the bean property of the component. So you can inject some contextual data into your components."
-msgstr ""
+msgstr "Seam risolve anche un'espressione stringa EL prima di assegnare il valore iniziale alla proprietà del bean del componente. Quindi si possono iniettare alcuni dati di contesto nei componenti."
#. Tag: programlisting
#: Xml.xml:269
@@ -745,7 +745,7 @@
#: Xml.xml:303
#, no-c-format
msgid "As you can see, this is somewhat verbose. Even worse, the component and attribute names cannot be validated at development time."
-msgstr ""
+msgstr "Come si può vedere, è abbastanza prolisso. Ancor peggio, i nomi del componente e dell'attributo non possono essere validati a development time."
#. Tag: para
#: Xml.xml:308
@@ -817,7 +817,7 @@
#: Xml.xml:334
#, no-c-format
msgid "That is all you need to do to use the namespaced style in <literal>components.xml</literal>! Now we can write:"
-msgstr ""
+msgstr "Questo è tutto ciò che bisogna fare per utilizzare lo stile namespace in <literal>components.xml</literal>! Adesso si può scrivere:"
#. Tag: programlisting
#: Xml.xml:339
@@ -927,11 +927,12 @@
" ... \n"
"}]]>"
+# hyphenated = ?
#. Tag: para
#: Xml.xml:353
#, no-c-format
msgid "The element name is the hyphenated form of the component name. The attributes of the element are the hyphenated form of the property names."
-msgstr ""
+msgstr "Il nome dell'elemento è una forma con trattino d'unione del nome del componente. Gli attributi dell'elemento sono la forma con trattino dei nomi delle proprietà. "
#. Tag: para
#: Xml.xml:358
15 years, 4 months
Seam SVN: r9904 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-01-09 12:51:14 -0500 (Fri, 09 Jan 2009)
New Revision: 9904
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Xml.xml
Log:
Corrected error
Modified: trunk/doc/Seam_Reference_Guide/en-US/Xml.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Xml.xml 2009-01-09 14:34:27 UTC (rev 9903)
+++ trunk/doc/Seam_Reference_Guide/en-US/Xml.xml 2009-01-09 17:51:14 UTC (rev 9904)
@@ -341,7 +341,7 @@
When configuring multi-valued properties, by default, Seam will preserve the order in which you place the attributes
in <literal>components.xml</literal> (unless you use a <literal>SortedSet</literal>/<literal>SortedMap</literal>
then Seam will use <literal>TreeMap</literal>/<literal>TreeSet</literal>). If the property has a concrete type (for
- example <literal>LinkedList</literal> Seam will use that type.
+ example <literal>LinkedList</literal>) Seam will use that type.
</para>
<para>
You can also override the type by specifying a fully qualified class name:
15 years, 4 months
Seam SVN: r9903 - in trunk: examples/numberguess/view and 23 other directories.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2009-01-09 09:34:27 -0500 (Fri, 09 Jan 2009)
New Revision: 9903
Added:
trunk/src/test/ftest/examples/drools/
trunk/src/test/ftest/examples/drools/build.xml
trunk/src/test/ftest/examples/drools/jboss.xml
trunk/src/test/ftest/examples/drools/src/
trunk/src/test/ftest/examples/drools/src/org/
trunk/src/test/ftest/examples/drools/src/org/jboss/
trunk/src/test/ftest/examples/drools/src/org/jboss/seam/
trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/
trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/
trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/
trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/
trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties
trunk/src/test/ftest/examples/numberguess/
trunk/src/test/ftest/examples/numberguess/build.xml
trunk/src/test/ftest/examples/numberguess/jboss-embedded.xml
trunk/src/test/ftest/examples/numberguess/jboss.xml
trunk/src/test/ftest/examples/numberguess/src/
trunk/src/test/ftest/examples/numberguess/src/org/
trunk/src/test/ftest/examples/numberguess/src/org/jboss/
trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/
trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/
trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/
trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/
trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/
trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java
trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties
trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/
trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/
trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java
Modified:
trunk/examples/drools/view/numberGuess.jsp
trunk/examples/numberguess/view/numberGuess.jspx
trunk/src/test/ftest/build.xml
Log:
JBSEAM-3690 Added tests for drools and numberguess examples.
Modified: trunk/examples/drools/view/numberGuess.jsp
===================================================================
--- trunk/examples/drools/view/numberGuess.jsp 2009-01-09 11:58:06 UTC (rev 9902)
+++ trunk/examples/drools/view/numberGuess.jsp 2009-01-09 14:34:27 UTC (rev 9903)
@@ -7,20 +7,20 @@
<body>
<h1>Guess a number...</h1>
<f:view>
- <h:form>
+ <h:form id="NumberGuessMain">
<h:outputText value="Higher!" rendered="#{randomNumber>guess.value}" />
<h:outputText value="Lower!" rendered="#{randomNumber<guess.value}" />
<br />
- I'm thinking of a number between <h:outputText value="#{game.smallest}" /> and
- <h:outputText value="#{game.biggest}" />.
+ I'm thinking of a number between <h:outputText id="Smallest" value="#{game.smallest}" /> and
+ <h:outputText id="Biggest" value="#{game.biggest}" />.
<br />
Your guess:
- <h:inputText value="#{guess.value}" id="guess" required="true">
+ <h:inputText value="#{guess.value}" id="inputGuess" required="true">
<f:validateLongRange
maximum="#{game.biggest}"
minimum="#{game.smallest}"/>
</h:inputText>
- <h:commandButton type="submit" value="Guess" action="guess" />
+ <h:commandButton id="GuessButton" type="submit" value="Guess" action="guess" />
<br/>
<h:message for="guess" style="color: red"/>
</h:form>
Modified: trunk/examples/numberguess/view/numberGuess.jspx
===================================================================
--- trunk/examples/numberguess/view/numberGuess.jspx 2009-01-09 11:58:06 UTC (rev 9902)
+++ trunk/examples/numberguess/view/numberGuess.jspx 2009-01-09 14:34:27 UTC (rev 9903)
@@ -31,7 +31,7 @@
</div>
<div>
- I'm thinking of a number between <h:outputText id="Smalles" value="#{numberGuess.smallest}"/> and
+ I'm thinking of a number between <h:outputText id="Smallest" value="#{numberGuess.smallest}"/> and
<h:outputText id="Biggest" value="#{numberGuess.biggest}"/>. You have
<h:outputText id="RemainingGuesses" value="#{numberGuess.remainingGuesses}"/> guesses.
</div>
Modified: trunk/src/test/ftest/build.xml
===================================================================
--- trunk/src/test/ftest/build.xml 2009-01-09 11:58:06 UTC (rev 9902)
+++ trunk/src/test/ftest/build.xml 2009-01-09 14:34:27 UTC (rev 9903)
@@ -52,6 +52,7 @@
<!-- Execute tests for all examples jboss-->
<testexample name="blog" />
<testexample name="booking" />
+ <testexample name="drools" />
<testexample name="dvdstore" />
<testexample name="contactlist" />
<testexample name="groovybooking" />
@@ -59,6 +60,7 @@
<testexample name="icefaces" />
<testexample name="jpa" />
<testexample name="nestedbooking" />
+ <testexample name="numberguess" />
<testexample name="quartz" />
<testexample name="seampay" />
<testexample name="spring" />
@@ -72,6 +74,7 @@
<!-- Execute tests for all examples on jboss-embedded -->
<testexample name="blog" />
<testexample name="dvdstore" />
+ <testexample name="numberguess" />
<testexample name="seampay" />
<testexample name="booking" />
<testexample name="jpa" />
@@ -121,6 +124,7 @@
<target name="cleanall">
<cleanexample name="blog" />
<cleanexample name="booking" />
+ <cleanexample name="drools" />
<cleanexample name="dvdstore" />
<cleanexample name="contactlist" />
<cleanexample name="groovybooking" />
@@ -128,6 +132,7 @@
<cleanexample name="icefaces" />
<cleanexample name="jpa" />
<cleanexample name="nestedbooking" />
+ <cleanexample name="numberguess" />
<cleanexample name="quartz" />
<cleanexample name="seampay" />
<cleanexample name="spring" />
@@ -137,6 +142,7 @@
<target name="undeployall">
<undeployexample name="blog" />
<undeployexample name="booking" />
+ <undeployexample name="drools" />
<undeployexample name="dvdstore" />
<undeployexample name="contactlist" />
<undeployexample name="groovybooking" />
@@ -144,6 +150,7 @@
<undeployexample name="icefaces" />
<undeployexample name="jpa" />
<undeployexample name="nestedbooking" />
+ <undeployexample name="numberguess" />
<undeployexample name="quartz" />
<undeployexample name="seampay" />
<undeployexample name="spring" />
Added: trunk/src/test/ftest/examples/drools/build.xml
===================================================================
--- trunk/src/test/ftest/examples/drools/build.xml (rev 0)
+++ trunk/src/test/ftest/examples/drools/build.xml 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<project name="drools.ftest.build" basedir="." default="build">
+ <property name="example.name" value="drools"/>
+ <property name="jboss.deploy.target" value="deploy"/>
+ <property name="jboss.undeploy.target" value="undeploy"/>
+ <property name="jboss.example.ready.check.url" value="seam-drools/numberGuess.seam"/>
+
+ <import file="../build.xml" />
+</project>
Property changes on: trunk/src/test/ftest/examples/drools/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/drools/jboss.xml
===================================================================
--- trunk/src/test/ftest/examples/drools/jboss.xml (rev 0)
+++ trunk/src/test/ftest/examples/drools/jboss.xml 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,32 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Drools example" verbose="2" parallel="false">
+ <test name="drools_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/drools/test/selenium/drools.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-drools" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.common.test.numberguess.selenium.CommonNumberGuessTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: trunk/src/test/ftest/examples/drools/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties
===================================================================
--- trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties (rev 0)
+++ trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,29 @@
+ #
+ # JBoss, Home of Professional Open Source
+ # Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ # by the @authors tag. See the copyright.txt in the distribution for a
+ # full listing of individual contributors.
+ #
+ # This is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License as
+ # published by the Free Software Foundation; either version 2.1 of
+ # the License, or (at your option) any later version.
+ #
+ # This software is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ # Lesser General Public License for more details.
+ #
+ # You should have received a copy of the GNU Lesser General Public
+ # License along with this software; if not, write to the Free
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ #
+MAIN_PAGE /numberGuess.seam
+GUESS_LOCATION numberGuess.seam
+WIN_LOCATION win.seam
+LOSE_LOCATION lose.seam
+GUESS_MAX_VALUE NumberGuessMain:Biggest
+GUESS_MIN_VALUE NumberGuessMain:Smallest
+GUESS_FIELD NumberGuessMain:inputGuess
+GUESS_SUBMIT NumberGuessMain\:GuessButton
\ No newline at end of file
Property changes on: trunk/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/numberguess/build.xml
===================================================================
--- trunk/src/test/ftest/examples/numberguess/build.xml (rev 0)
+++ trunk/src/test/ftest/examples/numberguess/build.xml 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<project name="numberguess.ftest.build" basedir="." default="build">
+ <property name="example.name" value="numberguess"/>
+ <property name="jboss.deploy.target" value="deploy"/>
+ <property name="jboss.undeploy.target" value="undeploy"/>
+ <property name="jboss.example.ready.check.url" value="seam-numberguess/numberGuess.seam"/>
+ <property name="jboss-embedded.deploy.target" value="tomcat.deploy"/>
+ <property name="jboss-embedded.undeploy.target" value="tomcat.undeploy"/>
+ <property name="jboss-embedded.example.ready.check.url" value="jboss-seam-numberguess/numberGuess.seam"/>
+
+ <import file="../build.xml" />
+</project>
Property changes on: trunk/src/test/ftest/examples/numberguess/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/numberguess/jboss-embedded.xml
===================================================================
--- trunk/src/test/ftest/examples/numberguess/jboss-embedded.xml (rev 0)
+++ trunk/src/test/ftest/examples/numberguess/jboss-embedded.xml 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,32 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Numberguess example" verbose="2" parallel="false">
+ <test name="numberguess_jboss-embedded">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties" />
+ <parameter name="CONTEXT_PATH" value="/jboss-seam-numberguess" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.numberguess.test.selenium.NumberGuessTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: trunk/src/test/ftest/examples/numberguess/jboss-embedded.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/numberguess/jboss.xml
===================================================================
--- trunk/src/test/ftest/examples/numberguess/jboss.xml (rev 0)
+++ trunk/src/test/ftest/examples/numberguess/jboss.xml 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,32 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Numberguess example" verbose="2" parallel="false">
+ <test name="numberguess_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-numberguess" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.numberguess.test.selenium.NumberGuessTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: trunk/src/test/ftest/examples/numberguess/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java
===================================================================
--- trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java (rev 0)
+++ trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.example.numberguess.test.selenium;
+
+import java.text.MessageFormat;
+import static org.testng.AssertJUnit.fail;
+import static org.testng.AssertJUnit.assertTrue;
+
+import org.jboss.seam.example.common.test.numberguess.selenium.CommonNumberGuessTest;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Jozef Hartinger
+ *
+ */
+public class NumberGuessTest extends CommonNumberGuessTest
+{
+
+ @Override
+ protected void enterGuess(int guess)
+ {
+ if (browser.isElementPresent(getProperty("GUESS_FIELD")))
+ {
+ // using input text field
+ super.enterGuess(guess);
+ }
+ else
+ {
+ if (browser.isElementPresent(getProperty("GUESS_MENU")))
+ {
+ // using menu
+ browser.select(getProperty("GUESS_MENU"), String.valueOf(guess));
+ }
+ else if (browser.isElementPresent(getProperty("GUESS_RADIO")))
+ {
+ // using radio buttons
+ int min = Integer.parseInt(browser.getText(getProperty("GUESS_MIN_VALUE")));
+ int radio = guess - min;
+ browser.check(MessageFormat.format(getProperty("GUESS_RADIO_ITEM"), radio));
+ } else {
+ fail("Unable to enter guess. No input found.");
+ }
+ browser.click(getProperty("GUESS_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+ }
+
+ @Test
+ public void cheatingTest() {
+ int number;
+
+ browser.click(getProperty("CHEAT_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.click(getProperty("CHEAT_YES_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ number = Integer.parseInt(browser.getText(getProperty("CHEAT_NUMBER")));
+ browser.click(getProperty("CHEAT_DONE_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ enterGuess(number);
+ assertTrue("User should win when cheating. Random number was " + number, isOnWinPage());
+ }
+
+}
Property changes on: trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties
===================================================================
--- trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties (rev 0)
+++ trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,36 @@
+ #
+ # JBoss, Home of Professional Open Source
+ # Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ # by the @authors tag. See the copyright.txt in the distribution for a
+ # full listing of individual contributors.
+ #
+ # This is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License as
+ # published by the Free Software Foundation; either version 2.1 of
+ # the License, or (at your option) any later version.
+ #
+ # This software is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ # Lesser General Public License for more details.
+ #
+ # You should have received a copy of the GNU Lesser General Public
+ # License along with this software; if not, write to the Free
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ #
+MAIN_PAGE /numberGuess.seam
+GUESS_LOCATION numberGuess.seam
+WIN_LOCATION win.seam
+LOSE_LOCATION lose.seam
+GUESS_MAX_VALUE NumberGuessMain:Biggest
+GUESS_MIN_VALUE NumberGuessMain:Smallest
+GUESS_FIELD NumberGuessMain:inputGuess
+GUESS_MENU NumberGuessMain:selectGuessMenu
+GUESS_RADIO NumberGuessMain:selectGuessRadio
+GUESS_RADIO_ITEM NumberGuessMain:selectGuessRadio:{0}
+GUESS_SUBMIT NumberGuessMain:GuessButton
+CHEAT_BUTTON NumberGuessMain:CheatButton
+CHEAT_YES_BUTTON confirm:YesButton
+CHEAT_NUMBER cheat:RandomNumber
+CHEAT_DONE_BUTTON cheat\:DoneButton
\ No newline at end of file
Property changes on: trunk/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java
===================================================================
--- trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java (rev 0)
+++ trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java 2009-01-09 14:34:27 UTC (rev 9903)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.example.common.test.numberguess.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.*;
+
+/**
+ *
+ * @author Jozef Hartinger
+ *
+ */
+public class CommonNumberGuessTest extends SeamSeleniumTest
+{
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ @Test
+ public void smartTest()
+ {
+
+ int min;
+ int max;
+ int guess;
+ int i = 0;
+
+ while (browser.getLocation().contains(getProperty("GUESS_LOCATION")))
+ {
+ if (i > 9)
+ {
+ fail("Game should not be longer than 10 guesses");
+ }
+ min = Integer.parseInt(browser.getText(getProperty("GUESS_MIN_VALUE")));
+ max = Integer.parseInt(browser.getText(getProperty("GUESS_MAX_VALUE")));
+ guess = min + ((max - min) / 2);
+ enterGuess(guess);
+ i++;
+ }
+ assertTrue("Win page expected after playing smart.", isOnWinPage());
+ }
+
+ @Test
+ public void linearTest()
+ {
+ int guess = 0;
+
+ while (browser.getLocation().contains(getProperty("GUESS_LOCATION")))
+ {
+ enterGuess(++guess);
+ assertTrue("Guess count exceeded.", guess <= 10);
+ }
+ if (guess < 10)
+ {
+ assertTrue("Player should not lose before 10th guess.", isOnWinPage());
+ }
+ else
+ {
+ assertTrue("After 10th guess player should lose or win.", isOnLosePage() || isOnWinPage());
+ }
+
+ }
+
+ protected void enterGuess(int guess)
+ {
+ browser.type(getProperty("GUESS_FIELD"), String.valueOf(guess));
+ browser.click(getProperty("GUESS_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ protected boolean isOnWinPage()
+ {
+ return browser.getLocation().contains(getProperty("WIN_LOCATION"));
+ }
+
+ protected boolean isOnLosePage()
+ {
+ return browser.getLocation().contains(getProperty("LOSE_LOCATION"));
+ }
+
+}
Property changes on: trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months
Seam SVN: r9902 - trunk/doc/Seam_Reference_Guide/it-IT.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-01-09 06:58:06 -0500 (Fri, 09 Jan 2009)
New Revision: 9902
Modified:
trunk/doc/Seam_Reference_Guide/it-IT/Tutorial.po
trunk/doc/Seam_Reference_Guide/it-IT/Xml.po
Log:
JBSEAM-3767: Italian translation of Seam guide
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Tutorial.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Tutorial.po 2009-01-09 11:57:51 UTC (rev 9901)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Tutorial.po 2009-01-09 11:58:06 UTC (rev 9902)
@@ -6,7 +6,7 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-05 00:19+0000\n"
-"PO-Revision-Date: 2009-01-09 07:52+0100\n"
+"PO-Revision-Date: 2009-01-09 11:48+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -4575,7 +4575,7 @@
#: Tutorial.xml:1678
#, no-c-format
msgid "The DVD Store demo application shows the practical usage of jBPM for both task management and pageflow."
-msgstr "L'applicazione demo Negozio DVD mostra un utilizzo pratico dei jBPM sia per la gestione task sia per il pageflow."
+msgstr "L'applicazione demo Negozio DVD mostra un utilizzo pratico di jBPM sia per la gestione task sia per il pageflow."
#. Tag: para
#: Tutorial.xml:1680
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Xml.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Xml.po 2009-01-09 11:57:51 UTC (rev 9901)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Xml.po 2009-01-09 11:58:06 UTC (rev 9902)
@@ -6,7 +6,7 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-04 00:59+0000\n"
-"PO-Revision-Date: 2008-12-25 15:03+0100\n"
+"PO-Revision-Date: 2009-01-09 12:57+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -35,49 +35,49 @@
#: Xml.xml:19
#, no-c-format
msgid "Seam components may be provided with configuration properties either via servlet context parameters, or via a properties file named <literal>seam.properties</literal> in the root of the classpath."
-msgstr ""
+msgstr "I componenti Seam possono essere accompagnati da proprietà di configurazioni o via parametri di contesto servlet oppure tramite un file di proprietà chiamato <literal>seam.properties</literal> collocato nella radice del classpath."
#. Tag: para
#: Xml.xml:23
#, no-c-format
msgid "The configurable Seam component must expose JavaBeans-style property setter methods for the configurable attributes. If a Seam component named <literal>com.jboss.myapp.settings</literal> has a setter method named <literal>setLocale()</literal>, we can provide a property named <literal>com.jboss.myapp.settings.locale</literal> in the <literal>seam.properties</literal> file or as a servlet context parameter, and Seam will set the value of the <literal>locale</literal> attribute whenever it instantiates the component."
-msgstr ""
+msgstr "Il componente Seam configurabile deve esporre metodi setter di stile JavaBeans per gli attributi configurabili. Se un componente Seam chiamato <literal>com.jboss.myapp.settings</literal> ha un metodo setter chiamato <literal>setLocale()</literal>, si può scrivere una proprietà chiamata <literal>com.jboss.myapp.settings.locale</literal> nel file <literal>seam.properties</literal> o come parametro di contesto servlet, e Seam imposterà il valore dell'attributo <literal>locale</literal> quando istanzia il componente."
#. Tag: para
#: Xml.xml:31
#, no-c-format
msgid "The same mechanism is used to configure Seam itself. For example, to set the conversation timeout, we provide a value for <literal>org.jboss.seam.core.manager.conversationTimeout</literal> in <literal>web.xml</literal> or <literal>seam.properties</literal>. (There is a built-in Seam component named <literal>org.jboss.seam.core.manager</literal> with a setter method named <literal>setConversationTimeout()</literal>.)"
-msgstr ""
+msgstr "Lo stesso meccanismo viene usato per configurare lo stesso Seam. Per esempio, per impostare il timeout della conversazione, si fornisce un valore a <literal>org.jboss.seam.core.manager.conversationTimeout</literal> in <literal>web.xml</literal> oppure in <literal>seam.properties</literal>. (C'è un componente Seam predefinito chiamato <literal>org.jboss.seam.core.manager</literal> con metodo setter chiamato <literal>setConversationTimeout()</literal>.)"
#. Tag: title
#: Xml.xml:41
#, no-c-format
msgid "Configuring components via <literal>components.xml</literal>"
-msgstr ""
+msgstr "Configurazione dei componenti tramite <literal>components.xml</literal>"
#. Tag: para
#: Xml.xml:43
#, no-c-format
msgid "The <literal>components.xml</literal> file is a bit more powerful than property settings. It lets you:"
-msgstr ""
+msgstr "Il file <literal>components.xml</literal> è un poco più potente delle impostazioni di proprietà. Esso consente di:"
#. Tag: para
#: Xml.xml:50
#, no-c-format
msgid "Configure components that have been installed automatically—including both built-in components, and application components that have been annotated with the <literal>@Name</literal> annotation and picked up by Seam's deployment scanner."
-msgstr ""
+msgstr "Configurare i componenti installati automaticamente—inclusi entrambi i componenti predefiniti ed i componenti di applicazione che sono stati annotati con l'annotazione <literal>@Name</literal> e rilevati dallo scanner di deploy di Seam."
#. Tag: para
#: Xml.xml:55
#, no-c-format
msgid "Install classes with no <literal>@Name</literal> annotation as Seam components—this is most useful for certain kinds of infrastructural components which can be installed multiple times different names (for example Seam-managed persistence contexts)."
-msgstr ""
+msgstr "Installare le classi senza annotazione <literal>@Name</literal> come componenti Seam—questo è ancora pià utile per alcuni tipi di componenti infrastrutturali che possono essere installati diverse volte con diversi nomi (per esempio i contesti di persistenza gestiti da Seam)."
#. Tag: para
#: Xml.xml:60
#, no-c-format
msgid "Install components that <emphasis>do</emphasis> have a <literal>@Name</literal> annotation but are not installed by default because of an <literal>@Install</literal> annotation that indicates the component should not be installed."
-msgstr ""
+msgstr "Installare componenti che <emphasis>hanno</emphasis> un'annotazione <literal>@Name</literal>, ma non vengono installati di default poiché una annotazione <literal>@Install</literal> indica che non devono essere installati."
#. Tag: para
#: Xml.xml:65
@@ -89,37 +89,37 @@
#: Xml.xml:69
#, no-c-format
msgid "A <literal>components.xml</literal> file may appear in one of three different places:"
-msgstr ""
+msgstr "Un file <literal>components.xml</literal> può apparire in una delle tre seguenti posizioni:"
#. Tag: para
#: Xml.xml:75
#, no-c-format
msgid "The <literal>WEB-INF</literal> directory of a <literal>war</literal>."
-msgstr ""
+msgstr "Nella directory <literal>WEB-INF</literal> di un file <literal>war</literal>."
#. Tag: para
#: Xml.xml:78
#, no-c-format
msgid "The <literal>META-INF</literal> directory of a <literal>jar</literal>."
-msgstr ""
+msgstr "Nella directory <literal>META-INF</literal> di un file <literal>jar</literal>."
#. Tag: para
#: Xml.xml:81
#, no-c-format
msgid "Any directory of a <literal>jar</literal> that contains classes with an <literal>@Name</literal> annotation."
-msgstr ""
+msgstr "In una qualsiasi directory di un file <literal>jar</literal> che contenga classi con annotazione <literal>@Name</literal>."
#. Tag: para
#: Xml.xml:88
#, no-c-format
msgid "Usually, Seam components are installed when the deployment scanner discovers a class with a <literal>@Name</literal> annotation sitting in an archive with a <literal>seam.properties</literal> file or a <literal>META-INF/components.xml</literal> file. (Unless the component has an <literal>@Install</literal> annotation indicating it should not be installed by default.) The <literal>components.xml</literal> file lets us handle special cases where we need to override the annotations."
-msgstr ""
+msgstr "Solitamente i componenti Seam vengono installati quando lo scanner di deploy scopre una classe con una annotazione <literal>@Name</literal> collocata in un archivio con un file <literal>seam.properties</literal> o un file <literal>META-INF/components.xml</literal>. (Amenoché il componente abbia una annotazione <literal>@Install</literal> che indichi che non debba essere installato di default). Il file <literal>components.xml</literal> consente di gestire i casi speciali in cui occorra fare override delle annotazioni."
#. Tag: para
#: Xml.xml:97
#, no-c-format
msgid "For example, the following <literal>components.xml</literal> file installs jBPM:"
-msgstr ""
+msgstr "Per esempio, il seguente file <literal>components.xml</literal> installa jBPM:"
#. Tag: programlisting
#: Xml.xml:101
@@ -141,7 +141,7 @@
#: Xml.xml:103
#, no-c-format
msgid "This example does the same thing:"
-msgstr ""
+msgstr "Questo esempio fa la stessa cosa:"
#. Tag: programlisting
#: Xml.xml:107
@@ -159,7 +159,7 @@
#: Xml.xml:109
#, no-c-format
msgid "This one installs and configures two different Seam-managed persistence contexts:"
-msgstr ""
+msgstr "Questo installa e configura due differenti contesti di persistenza gestiti da Seam:"
#. Tag: programlisting
#: Xml.xml:113
@@ -191,7 +191,7 @@
#: Xml.xml:115
#, no-c-format
msgid "As does this one:"
-msgstr ""
+msgstr "Ed anche questo fa lo stesso:"
#. Tag: programlisting
#: Xml.xml:119
@@ -225,7 +225,7 @@
#: Xml.xml:121
#, no-c-format
msgid "This example creates a session-scoped Seam-managed persistence context (this is not recommended in practice):"
-msgstr ""
+msgstr "Questo esempio crea un contesto di persistenza gestito da Seam con scope di sessione (questa non è una pratica raccomandata):"
#. Tag: programlisting
#: Xml.xml:126
@@ -277,7 +277,7 @@
#: Xml.xml:130
#, no-c-format
msgid "It is common to use the <literal>auto-create</literal> option for infrastructural objects like persistence contexts, which saves you from having to explicitly specify <literal>create=true</literal> when you use the <literal>@In</literal> annotation."
-msgstr ""
+msgstr "E' comune utilizzare l'opzione <literal>auto-create</literal> per gli oggetti infrastrutturali quali i contesti di persistenza, che risparmia dal dovere specificare esplicitamente <literal>create=true</literal> quando si usa l'annotazione <literal>@In</literal>."
#. Tag: programlisting
#: Xml.xml:137
@@ -329,7 +329,7 @@
#: Xml.xml:141
#, no-c-format
msgid "The <literal><factory></literal> declaration lets you specify a value or method binding expression that will be evaluated to initialize the value of a context variable when it is first referenced."
-msgstr ""
+msgstr "La dichiarazione <literal><factory></literal> consente di specificare un valore o un'espressione di method binding che verrà valutata per inizializzare il valore di una variabile di contesto quando viene referenziata la prima volta."
#. Tag: programlisting
#: Xml.xml:147
@@ -351,7 +351,7 @@
#: Xml.xml:149
#, no-c-format
msgid "You can create an \"alias\" (a second name) for a Seam component like so:"
-msgstr ""
+msgstr "Si può creare un \"alias\" (un secondo nome) per un componente Seam in questo modo:"
#. Tag: programlisting
#: Xml.xml:153
@@ -373,7 +373,7 @@
#: Xml.xml:155
#, no-c-format
msgid "You can even create an \"alias\" for a commonly used expression:"
-msgstr ""
+msgstr "Si può anche creare un \"alias\" per un'espressione comunemente usata:"
#. Tag: programlisting
#: Xml.xml:159
@@ -395,7 +395,7 @@
#: Xml.xml:161
#, no-c-format
msgid "It is especially common to see the use of <literal>auto-create=\"true\"</literal> with the <literal><factory></literal> declaration:"
-msgstr ""
+msgstr "E' comune vedere usato <literal>auto-create=\"true\"</literal> con la dichiarazione <literal><factory></literal>:"
#. Tag: programlisting
#: Xml.xml:166
@@ -417,13 +417,13 @@
#: Xml.xml:168
#, no-c-format
msgid "Sometimes we want to reuse the same <literal>components.xml</literal> file with minor changes during both deployment and testing. Seam lets you place wildcards of the form <literal>@wildcard@</literal> in the <literal>components.xml</literal> file which can be replaced either by your Ant build script (at deployment time) or by providing a file named <literal>components.properties</literal> in the classpath (at development time). You'll see this approach used in the Seam examples."
-msgstr ""
+msgstr "A volte si vuole riutilizzare lo stesso file <literal>components.xml</literal> con piccoli cambiamenti durante il deploy ed il testing. Seam consente di mettere dei wildcard della forma <literal>@wildcard@</literal> nel file <literal>components.xml</literal> che può essere rimpiazzato o dallo script Ant (a deployment time) o fornendo un file chiamato <literal>components.properties</literal> nel classpath (a development time). Si vedrà usato quest'ultimo approccio negli esempi di Seam."
#. Tag: title
#: Xml.xml:179
#, no-c-format
msgid "Fine-grained configuration files"
-msgstr ""
+msgstr "File di configurazione a grana fine"
#. Tag: para
#: Xml.xml:180
@@ -751,7 +751,7 @@
#: Xml.xml:308
#, no-c-format
msgid "The namespaced version looks like this:"
-msgstr ""
+msgstr "La versione con namespace appare come:"
#. Tag: programlisting
#: Xml.xml:310
15 years, 4 months