Seam SVN: r9881 - branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/web.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-01-07 08:32:21 -0500 (Wed, 07 Jan 2009)
New Revision: 9881
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/web/MultipartRequest.java
Log:
JBPAPP-1553
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/web/MultipartRequest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/web/MultipartRequest.java 2009-01-07 12:51:40 UTC (rev 9880)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/web/MultipartRequest.java 2009-01-07 13:32:21 UTC (rev 9881)
@@ -306,8 +306,11 @@
int pos = 0;
Param p = null;
+
+ // This is a fail-safe to prevent infinite loops from occurring in some environments
+ int loopCounter = 20;
- while (read != -1)
+ while (read > 0 && loopCounter > 0)
{
for (int i = 0; i < read; i++)
{
@@ -419,6 +422,13 @@
int bytesNotRead = read - pos;
System.arraycopy(buffer, pos, buffer, 0, bytesNotRead);
read = input.read(buffer, bytesNotRead, buffer.length - bytesNotRead);
+
+ // Decrement loopCounter if no data was readable
+ if (read == 0)
+ {
+ loopCounter--;
+ }
+
read += bytesNotRead;
}
else
15 years, 3 months
Seam SVN: r9880 - trunk/doc/Seam_Reference_Guide/it-IT.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-01-07 07:51:40 -0500 (Wed, 07 Jan 2009)
New Revision: 9880
Modified:
trunk/doc/Seam_Reference_Guide/it-IT/Tutorial.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-07 09:50:45 UTC (rev 9879)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Tutorial.po 2009-01-07 12:51:40 UTC (rev 9880)
@@ -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-06 14:00+0100\n"
+"PO-Revision-Date: 2009-01-07 13:51+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -2355,19 +2355,19 @@
#: Tutorial.xml:905
#, no-c-format
msgid "When <literal>todo.jsp</literal> is redisplayed, <literal>taskInstanceList</literal> now finds the task that was just created. The task is shown in an <literal>h:dataTable</literal>. The internal state of the task is displayed in each column: <literal>#{task.description}</literal>, <literal>#{task.priority}</literal>, <literal>#{task.dueDate}</literal>, etc... These fields can all be edited and saved back to the database."
-msgstr ""
+msgstr "Quando <literal>todo.jsp</literal> viene rivisualizzata, <literal>taskInstanceList</literal> trova il task appena creato. Il task viene mostrato in un <literal>h:dataTable</literal>. Lo stato interno del task è mostrato in ciascuna colonna: <literal>#{task.description}</literal>, <literal>#{task.priority}</literal>, <literal>#{task.dueDate}</literal>, ecc... Questi campi possono essere tutti editati e salvati nel database."
#. Tag: para
#: Tutorial.xml:915
#, no-c-format
msgid "Each todo item also has \"Done\" button, which calls <literal>#{todoList.done}</literal>. The <literal>todoList</literal> component knows which task the button is for because each s:button specificies <literal>taskInstance=\"#{task}\"</literal>, referring to the task for that particular line of of the table. The <literal>@StartTast</literal> and <literal>@EndTask</literal> annotations cause seam to make the task active and immediately complete the task. The original process then transitions into the <literal>done</literal> state, according to the process definition, where it ends. The state of the task and process are both updated in the database."
-msgstr ""
+msgstr "Ogni elemento todo ha anche un pulsante \"Done\", che chiama <literal>#{todoList.done}</literal>. Il componente <literal>todoList</literal> sa a quale task si riferisce il pulsante, poiché ogni s:button specifica <literal>taskInstance=\"#{task}\"</literal>, che si riferisce al task per quella particolare linea della tabella. Le annotazioni <literal>@StartTast</literal> e <literal>@EndTask</literal> obbligano seam a rendere attivo il task e a completarlo. Il processo originale quindi transita verso lo stato <literal>done</literal>, secondo la definizione del processo, dove poi termina. Lo stato del task e del processo sono entrambi aggiornati nel database."
#. Tag: para
#: Tutorial.xml:926
#, no-c-format
msgid "When <literal>todo.jsp</literal> is displayed again, the now-completed task is no longer displayed in the <literal>taskInstanceList</literal>, since that component only display active tasks for the user."
-msgstr ""
+msgstr "Quando <literal>todo.jsp</literal> viene di nuovo visualizzata, il task adesso completato non viene più mostrato in <literal>taskInstanceList</literal>, poiché questo componente mostra solo i task attivi per l'utente."
#. Tag: title
#: Tutorial.xml:934
@@ -2379,19 +2379,19 @@
#: Tutorial.xml:936
#, no-c-format
msgid "For Seam applications with relatively freeform (ad hoc) navigation, JSF/Seam navigation rules are a perfectly good way to define the page flow. For applications with a more constrained style of navigation, especially for user interfaces which are more stateful, navigation rules make it difficult to really understand the flow of the system. To understand the flow, you need to piece it together from the view pages, the actions and the navigation rules."
-msgstr ""
+msgstr "Per le applicazioni Seam con una navigazione relativamente libera, le regole di navigazione JSF/Seam sono un modo perfetto per definire il flusso di pagine. Per applicazioni con uno stile di navigazione pià vincolato, specialmente per interfacce utente più stateful, le regole di navigazione rendono difficile capire il flusso del sistema. Per capire il flusso occorre mettere assieme le pagine, le azioni e le regole di navigazione."
#. Tag: para
#: Tutorial.xml:942
#, no-c-format
msgid "Seam allows you to use a jPDL process definition to define pageflow. The simple number guessing example shows how this is done."
-msgstr ""
+msgstr "Seam consente di usare la definizione di processo con jPDL per definire il flusso di pagine. L'esempio indovina-numero mostra come fare."
#. Tag: para
#: Tutorial.xml:956
#, no-c-format
msgid "The example is implemented using one JavaBean, three JSP pages and a jPDL pageflow definition. Let's begin with the pageflow:"
-msgstr ""
+msgstr "Quest'esempio è implementato usando un JavaBean, tre pagine JSP ed una definizione di pageflow jPDL. Iniziamo con il pageflow:"
#. Tag: title
#: Tutorial.xml:960
@@ -2527,7 +2527,7 @@
#: Tutorial.xml:971
#, no-c-format
msgid "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.)"
-msgstr ""
+msgstr "L'elemento <literal><page></literal> definisce uno stato di attesa dove il sistema mostra una particolare vista JSF ed attende input da parte dell'utente. <literal>view-id</literal> è lo stesso id view usato nelle regole di navigazione nel pure JSF. L'attributo <literal>redirect</literal> dice a Seam di usare il post-then-redirect quando si passa ad un'altra pagina. (Questo capita con gli URL dei browser.)"
#. Tag: para
#: Tutorial.xml:978
@@ -2721,7 +2721,7 @@
#: Tutorial.xml:1018
#, no-c-format
msgid "Notice how the command button names the <literal>guess</literal> transition instead of calling an action directly."
-msgstr ""
+msgstr "Si noti come il pulsante di comando chiama la transizione <literal>guess</literal> invece di chiamare direttamente un'azione."
#. Tag: para
#: Tutorial.xml:1021
15 years, 3 months
Seam SVN: r9879 - in trunk: src/test/ftest and 10 other directories.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2009-01-07 04:50:45 -0500 (Wed, 07 Jan 2009)
New Revision: 9879
Added:
trunk/src/test/ftest/examples/blog/
trunk/src/test/ftest/examples/blog/build.xml
trunk/src/test/ftest/examples/blog/jboss-embedded.xml
trunk/src/test/ftest/examples/blog/jboss.xml
trunk/src/test/ftest/examples/blog/src/
trunk/src/test/ftest/examples/blog/src/org/
trunk/src/test/ftest/examples/blog/src/org/jboss/
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java
trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties
Modified:
trunk/examples/blog/view/404.xhtml
trunk/examples/blog/view/entry.xhtml
trunk/examples/blog/view/index.xhtml
trunk/examples/blog/view/login.xhtml
trunk/examples/blog/view/menu.xhtml
trunk/examples/blog/view/nav.xhtml
trunk/examples/blog/view/search.xhtml
trunk/src/test/ftest/build.xml
Log:
JBSEAM-3690 Added tests for blog example
Modified: trunk/examples/blog/view/404.xhtml
===================================================================
--- trunk/examples/blog/view/404.xhtml 2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/404.xhtml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -7,7 +7,7 @@
template="#{theme.template}">
<ui:define name="content">
- <h3>Page not found</h3>
+ <h3 id="404">Page not found</h3>
</ui:define>
</ui:composition>
Modified: trunk/examples/blog/view/entry.xhtml
===================================================================
--- trunk/examples/blog/view/entry.xhtml 2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/entry.xhtml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -10,8 +10,8 @@
<ui:define name="content">
<s:cache key="entry-#{blogEntry.id}" region="pageFragments">
<div class="blogEntry">
- <h3>#{blogEntry.title}</h3>
- <div>
+ <h3 id="title">#{blogEntry.title}</h3>
+ <div id="body">
<s:formattedText value="#{blogEntry.body}"/>
</div>
<p>
Modified: trunk/examples/blog/view/index.xhtml
===================================================================
--- trunk/examples/blog/view/index.xhtml 2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/index.xhtml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -9,15 +9,15 @@
<ui:define name="content">
<s:cache key="index" region="pageFragments">
- <h:dataTable value="#{blog.recentBlogEntries}" var="blogEntry" rows="3">
+ <h:dataTable id="entryTable" value="#{blog.recentBlogEntries}" var="blogEntry" rows="3">
<h:column>
<div class="blogEntry">
- <h3>#{blogEntry.title}</h3>
+ <h3><h:outputText id="title" value="#{blogEntry.title}" /></h3>
<div>
- <s:formattedText value="#{blogEntry.excerpt==null ? blogEntry.body : blogEntry.excerpt}"/>
+ <s:formattedText id="excerpt" value="#{blogEntry.excerpt==null ? blogEntry.body : blogEntry.excerpt}"/>
</div>
<p>
- <s:link view="/entry.xhtml" rendered="#{blogEntry.excerpt!=null}" propagation="none"
+ <s:link id="link" view="/entry.xhtml" rendered="#{blogEntry.excerpt!=null}" propagation="none"
value="Read more...">
<f:param name="blogEntryId" value="#{blogEntry.id}"/>
</s:link>
Modified: trunk/examples/blog/view/login.xhtml
===================================================================
--- trunk/examples/blog/view/login.xhtml 2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/login.xhtml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -8,7 +8,7 @@
<ui:define name="content">
<div class="blogEntry">
- <h:form>
+ <h:form id="login">
<div>
<h:outputLabel for="password">Password:</h:outputLabel>
</div>
@@ -17,7 +17,7 @@
value="#{identity.password}"
size="15"
maxlength="15"/>
- <h:commandButton value="Login"/>
+ <h:commandButton id="login" value="Login"/>
<span class="errors"><h:message for="password"/></span>
<span class="errors"><h:messages globalOnly="true"/></span>
</div>
Modified: trunk/examples/blog/view/menu.xhtml
===================================================================
--- trunk/examples/blog/view/menu.xhtml 2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/menu.xhtml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -1,12 +1,12 @@
-<h:form xmlns="http://www.w3.org/1999/xhtml"
+<h:form id="searchForm" xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<span class="menuItem">
- <h:inputText value="#{searchService.searchPattern}"/>
- <h:commandButton value="Search" action="/search.xhtml"/>
+ <h:inputText id="field" value="#{searchService.searchPattern}"/>
+ <h:commandButton id="submit" value="Search" action="/search.xhtml"/>
<s:conversationPropagation type="none"/>
</span>
Modified: trunk/examples/blog/view/nav.xhtml
===================================================================
--- trunk/examples/blog/view/nav.xhtml 2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/nav.xhtml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -4,11 +4,11 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
- <s:link view="/search.xhtml" value="[All posts]" propagation="none">
+ <s:link id="allPosts" view="/search.xhtml" value="[All posts]" propagation="none">
<f:param name="searchPattern" value=""/>
</s:link>
- <s:link view="/index.xhtml" value="[Recent posts]" propagation="none" />
- <s:link view="/post.xhtml" value="[Write new post]" propagation="none" />
- <s:link view="/index.xml" value="[Atom feed]" propagation="none" />
+ <s:link id="recentPosts" view="/index.xhtml" value="[Recent posts]" propagation="none" />
+ <s:link id="newPost" view="/post.xhtml" value="[Write new post]" propagation="none" />
+ <s:link id="atomFeed" view="/index.xml" value="[Atom feed]" propagation="none" />
</span>
Modified: trunk/examples/blog/view/search.xhtml
===================================================================
--- trunk/examples/blog/view/search.xhtml 2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/search.xhtml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -8,10 +8,10 @@
template="#{theme.template}">
<ui:define name="content">
- <h:dataTable value="#{searchResults}" var="blogEntry">
+ <h:dataTable id="searchResultTable" value="#{searchResults}" var="blogEntry">
<h:column>
<div>
- <s:link view="/entry.xhtml" propagation="none" value="#{blogEntry.title}">
+ <s:link id="link" view="/entry.xhtml" propagation="none" value="#{blogEntry.title}">
<f:param name="blogEntryId" value="#{blogEntry.id}"/>
</s:link>
posted on
Modified: trunk/src/test/ftest/build.xml
===================================================================
--- trunk/src/test/ftest/build.xml 2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/src/test/ftest/build.xml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -50,6 +50,7 @@
<property name="container" value="jboss" />
<antcall target="start.selenium.server"/>
<!-- Execute tests for all examples jboss-->
+ <testexample name="blog" />
<testexample name="booking" />
<testexample name="dvdstore" />
<testexample name="contactlist" />
@@ -69,6 +70,7 @@
<property name="container" value="jboss-embedded" />
<antcall target="start.selenium.server"/>
<!-- Execute tests for all examples on jboss-embedded -->
+ <testexample name="blog" />
<testexample name="dvdstore" />
<testexample name="seampay" />
<testexample name="booking" />
@@ -117,6 +119,7 @@
</target>
<target name="cleanall">
+ <cleanexample name="blog" />
<cleanexample name="booking" />
<cleanexample name="dvdstore" />
<cleanexample name="contactlist" />
@@ -132,6 +135,7 @@
</target>
<target name="undeployall">
+ <undeployexample name="blog" />
<undeployexample name="booking" />
<undeployexample name="dvdstore" />
<undeployexample name="contactlist" />
Added: trunk/src/test/ftest/examples/blog/build.xml
===================================================================
--- trunk/src/test/ftest/examples/blog/build.xml (rev 0)
+++ trunk/src/test/ftest/examples/blog/build.xml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -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="blog.ftest.build" basedir="." default="build">
+ <property name="example.name" value="blog"/>
+ <property name="jboss.deploy.target" value="deploy"/>
+ <property name="jboss.undeploy.target" value="undeploy"/>
+ <property name="jboss.example.ready.check.url" value="seam-blog/"/>
+ <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-blog/"/>
+
+ <import file="../build.xml" />
+</project>
Property changes on: trunk/src/test/ftest/examples/blog/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/blog/jboss-embedded.xml
===================================================================
--- trunk/src/test/ftest/examples/blog/jboss-embedded.xml (rev 0)
+++ trunk/src/test/ftest/examples/blog/jboss-embedded.xml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -0,0 +1,34 @@
+<!--
+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="Blog example" verbose="2" parallel="false">
+ <test name="blog_jboss-embedded">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/blog/test/selenium/blog.properties" />
+ <parameter name="CONTEXT_PATH" value="/jboss-seam-blog" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.blog.test.selenium.NewEntryTest" />
+ <class
+ name="org.jboss.seam.example.blog.test.selenium.SearchTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: trunk/src/test/ftest/examples/blog/jboss-embedded.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/blog/jboss.xml
===================================================================
--- trunk/src/test/ftest/examples/blog/jboss.xml (rev 0)
+++ trunk/src/test/ftest/examples/blog/jboss.xml 2009-01-07 09:50:45 UTC (rev 9879)
@@ -0,0 +1,34 @@
+<!--
+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="Blog example" verbose="2" parallel="false">
+ <test name="blog_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/blog/test/selenium/blog.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-blog" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.blog.test.selenium.NewEntryTest" />
+ <class
+ name="org.jboss.seam.example.blog.test.selenium.SearchTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: trunk/src/test/ftest/examples/blog/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java
===================================================================
--- trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java (rev 0)
+++ trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java 2009-01-07 09:50:45 UTC (rev 9879)
@@ -0,0 +1,49 @@
+/*
+ * 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.blog.test.selenium;
+
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+
+/**
+ *
+ * @author Jozef Hartinger
+ */
+public class NewEntryTest extends SeleniumBlogTest
+{
+
+ @Test(groups="entryTest")
+ public void simpleEntryTest() {
+
+ String id = "simpleBlogEntry";
+ String title = "Simple blog entry";
+ String excerpt = "This is an excerpt";
+ String body = "This is a simple blog entry posted for testing purposes.";
+
+ enterNewEntry(id, title, excerpt, body);
+ browser.open(CONTEXT_PATH + "/entry/" + id);
+ assertFalse("Entry not found.", browser.isElementPresent(getProperty("ENTRY_404")));
+ assertEquals("Unexpected entry title found.", title, browser.getText(getProperty("ENTRY_TITLE")));
+ assertEquals("Unexpected entry body found.", body, browser.getText(getProperty("ENTRY_BODY")));
+ }
+}
Property changes on: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java
===================================================================
--- trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java (rev 0)
+++ trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java 2009-01-07 09:50:45 UTC (rev 9879)
@@ -0,0 +1,52 @@
+/*
+ * 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.blog.test.selenium;
+
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * Test class for search functionality.
+ * @author Jozef Hartinger
+ */
+public class SearchTest extends SeleniumBlogTest
+{
+
+ @Test(dependsOnGroups="entryTest")
+ public void simpleEntrySearchTest() {
+
+ String id = "searchTestEntry";
+ String title = "Search Test Entry";
+ String excerpt = "";
+ String searchString = "9e107d9d372bb6826bd81d3542a419d6";
+ String body = "This is a simple blog entry used for testing search functionality. " + searchString;
+
+ enterNewEntry(id, title, excerpt, body);
+
+ browser.type(getProperty("SEARCH_FIELD"), searchString);
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Unexpected search result.", 1, browser.getXpathCount(getProperty("SEARCH_RESULT_COUNT")));
+
+ }
+
+}
Property changes on: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java
===================================================================
--- trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java (rev 0)
+++ trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java 2009-01-07 09:50:45 UTC (rev 9879)
@@ -0,0 +1,73 @@
+/*
+ * 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.blog.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+
+/**
+ * This class holds basic methods for interacting with blog example.
+ * @author Jozef Hartinger
+ */
+public class SeleniumBlogTest extends SeamSeleniumTest
+{
+
+ protected String password = "tokyo";
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH);
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ protected void enterNewEntry(String id, String title, String excerpt, String body)
+ {
+ browser.click(getProperty("NEW_POST"));
+ browser.waitForPageToLoad(TIMEOUT);
+ if (browser.getLocation().contains(getProperty("LOGIN_URL")))
+ {
+ login();
+ }
+ fillNewEntryForm(id, title, excerpt, body);
+ }
+
+ protected void fillNewEntryForm(String id, String title, String excerpt, String body)
+ {
+ browser.type(getProperty("NEW_ENTRY_ID"), id);
+ browser.type(getProperty("NEW_ENTRY_TITLE"), title);
+ browser.type(getProperty("NEW_ENTRY_EXCERPT"), excerpt);
+ browser.type(getProperty("NEW_ENTRY_BODY"), body);
+ browser.click(getProperty("NEW_ENTRY_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ protected void login()
+ {
+ browser.type(getProperty("LOGIN_PASSWORD"), password);
+ browser.click(getProperty("LOGIN_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+}
Property changes on: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties
===================================================================
--- trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties (rev 0)
+++ trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties 2009-01-07 09:50:45 UTC (rev 9879)
@@ -0,0 +1,15 @@
+NEW_POST id=newPost
+LOGIN_PASSWORD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGIN_URL login
+NEW_ENTRY_ID id=newBlogEntry:id:idInput
+NEW_ENTRY_TITLE id=newBlogEntry:title:titleInput
+NEW_ENTRY_EXCERPT id=newBlogEntry:excerpt:excerptInput
+NEW_ENTRY_BODY id=newBlogEntry:body:bodyInput
+NEW_ENTRY_SUBMIT id=newBlogEntry:post
+ENTRY_404 id=404
+ENTRY_TITLE id=title
+ENTRY_BODY id=body
+SEARCH_FIELD id=searchForm:field
+SEARCH_SUBMIT id=searchForm:submit
+SEARCH_RESULT_COUNT //table[@id="searchResultTable"]/tbody/tr
Property changes on: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
Seam SVN: r9878 - trunk/src/remoting/org/jboss/seam/remoting.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-06 18:57:08 -0500 (Tue, 06 Jan 2009)
New Revision: 9878
Modified:
trunk/src/remoting/org/jboss/seam/remoting/remote.js
Log:
fixed incorrect variable names
Modified: trunk/src/remoting/org/jboss/seam/remoting/remote.js
===================================================================
--- trunk/src/remoting/org/jboss/seam/remoting/remote.js 2009-01-06 22:42:14 UTC (rev 9877)
+++ trunk/src/remoting/org/jboss/seam/remoting/remote.js 2009-01-06 23:57:08 UTC (rev 9878)
@@ -656,7 +656,7 @@
if (inScope) Seam.Remoting.hideLoadingMessage();
window.setTimeout(function() {
- req.onreadystatechange = function() {};
+ asyncReq.onreadystatechange = function() {};
}, 0);
if (asyncReq.status == 200)
@@ -692,7 +692,7 @@
}
}
else
- alert("There was an error processing your request. Error code: " + req.status);
+ alert("There was an error processing your request. Error code: " + asyncReq.status);
}
}
15 years, 3 months
Seam SVN: r9877 - trunk/src/main/org/jboss/seam/exception.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-06 17:42:14 -0500 (Tue, 06 Jan 2009)
New Revision: 9877
Modified:
trunk/src/main/org/jboss/seam/exception/Exceptions.java
Log:
Added deprecation comment
Modified: trunk/src/main/org/jboss/seam/exception/Exceptions.java
===================================================================
--- trunk/src/main/org/jboss/seam/exception/Exceptions.java 2009-01-06 22:41:34 UTC (rev 9876)
+++ trunk/src/main/org/jboss/seam/exception/Exceptions.java 2009-01-06 22:42:14 UTC (rev 9877)
@@ -168,6 +168,7 @@
logLevel = exception.attributeValue("log-level") != null ?
LogLevel.valueOf(exception.attributeValue("log-level").toLowerCase()) : null;
+ // The logLevel attribute is deprecated! Use log-level instead
if (logLevel == null && exception.attributeValue("logLevel") != null)
{
logLevel = LogLevel.valueOf(exception.attributeValue("logLevel").toLowerCase());
15 years, 3 months
Seam SVN: r9876 - trunk/src/main/org/jboss/seam/exception.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-06 17:41:34 -0500 (Tue, 06 Jan 2009)
New Revision: 9876
Modified:
trunk/src/main/org/jboss/seam/exception/Exceptions.java
Log:
JBIDE-3487
Modified: trunk/src/main/org/jboss/seam/exception/Exceptions.java
===================================================================
--- trunk/src/main/org/jboss/seam/exception/Exceptions.java 2009-01-06 22:33:33 UTC (rev 9875)
+++ trunk/src/main/org/jboss/seam/exception/Exceptions.java 2009-01-06 22:41:34 UTC (rev 9876)
@@ -167,6 +167,11 @@
{
logLevel = exception.attributeValue("log-level") != null ?
LogLevel.valueOf(exception.attributeValue("log-level").toLowerCase()) : null;
+
+ if (logLevel == null && exception.attributeValue("logLevel") != null)
+ {
+ logLevel = LogLevel.valueOf(exception.attributeValue("logLevel").toLowerCase());
+ }
}
catch (IllegalArgumentException ex)
{
15 years, 3 months
Seam SVN: r9875 - trunk/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-06 17:33:33 -0500 (Tue, 06 Jan 2009)
New Revision: 9875
Modified:
trunk/src/main/org/jboss/seam/pages-2.1.xsd
Log:
JBIDE-3487
Modified: trunk/src/main/org/jboss/seam/pages-2.1.xsd
===================================================================
--- trunk/src/main/org/jboss/seam/pages-2.1.xsd 2009-01-06 19:02:16 UTC (rev 9874)
+++ trunk/src/main/org/jboss/seam/pages-2.1.xsd 2009-01-06 22:33:33 UTC (rev 9875)
@@ -57,6 +57,9 @@
<xs:attribute name="class" type="xs:token"/>
<xs:attribute name="log" type="pages:tf-boolean"/>
<xs:attribute name="log-level" type="pages:loglevel-values"/>
+
+ <!-- The logLevel attribute is deprecated and will be removed in the next major version! Please use log-level instead -->
+ <xs:attribute name="logLevel" type="pages:logLevel-values"/>
</xs:attributeGroup>
<xs:element name="conversation">
15 years, 3 months
Seam SVN: r9874 - trunk/src/ioc/org/jboss/seam/ioc/microcontainer.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-01-06 14:02:16 -0500 (Tue, 06 Jan 2009)
New Revision: 9874
Modified:
trunk/src/ioc/org/jboss/seam/ioc/microcontainer/ControllerNotificationComponent.java
Log:
JBSEAM-3795
Modified: trunk/src/ioc/org/jboss/seam/ioc/microcontainer/ControllerNotificationComponent.java
===================================================================
--- trunk/src/ioc/org/jboss/seam/ioc/microcontainer/ControllerNotificationComponent.java 2009-01-06 18:56:52 UTC (rev 9873)
+++ trunk/src/ioc/org/jboss/seam/ioc/microcontainer/ControllerNotificationComponent.java 2009-01-06 19:02:16 UTC (rev 9874)
@@ -60,7 +60,7 @@
}
catch (Throwable t)
{
- throw new IllegalArgumentException("Exception installing ControllerNotificationComponent: " + t);
+ throw new IllegalArgumentException("Exception installing ControllerNotificationComponent: " + t, t);
}
}
15 years, 3 months
Seam SVN: r9873 - trunk/src/ioc/org/jboss/seam/ioc/spring.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-01-06 13:56:52 -0500 (Tue, 06 Jan 2009)
New Revision: 9873
Modified:
trunk/src/ioc/org/jboss/seam/ioc/spring/SeamNamespaceHandler.java
Log:
JBSEAM-3796
Modified: trunk/src/ioc/org/jboss/seam/ioc/spring/SeamNamespaceHandler.java
===================================================================
--- trunk/src/ioc/org/jboss/seam/ioc/spring/SeamNamespaceHandler.java 2009-01-06 18:26:29 UTC (rev 9872)
+++ trunk/src/ioc/org/jboss/seam/ioc/spring/SeamNamespaceHandler.java 2009-01-06 18:56:52 UTC (rev 9873)
@@ -133,7 +133,7 @@
{
throw new IllegalStateException("Unable to load class '"
+ SEAM_COMPONENT_POST_PROCESSOR
- + "' make sure you have the jboss-seam-spring.jar in your classpath.");
+ + "' make sure you have the jboss-seam-spring.jar in your classpath.", e);
}
RootBeanDefinition beanDefinition = new RootBeanDefinition(cls);
beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
15 years, 3 months
Seam SVN: r9872 - trunk/src/pdf/org/jboss/seam/pdf/ui.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-01-06 13:26:29 -0500 (Tue, 06 Jan 2009)
New Revision: 9872
Modified:
trunk/src/pdf/org/jboss/seam/pdf/ui/UIChart.java
Log:
JBSEAM-2791
Modified: trunk/src/pdf/org/jboss/seam/pdf/ui/UIChart.java
===================================================================
--- trunk/src/pdf/org/jboss/seam/pdf/ui/UIChart.java 2009-01-06 18:18:20 UTC (rev 9871)
+++ trunk/src/pdf/org/jboss/seam/pdf/ui/UIChart.java 2009-01-06 18:26:29 UTC (rev 9872)
@@ -27,6 +27,7 @@
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfTemplate;
import com.lowagie.text.pdf.PdfWriter;
+import com.lowagie.text.pdf.AsianFontMapper;
public abstract class UIChart extends ITextComponent
{
@@ -274,28 +275,34 @@
try
{
UIDocument doc = (UIDocument) findITextParent(getParent(), UIDocument.class);
- if (doc != null)
- {
+ if (doc != null) {
PdfWriter writer = (PdfWriter) doc.getWriter();
PdfContentByte cb = writer.getDirectContent();
PdfTemplate tp = cb.createTemplate(getWidth(), getHeight());
- Graphics2D g2 = tp.createGraphics(getWidth(), getHeight(), new DefaultFontMapper());
+
+
+ UIFont font = (UIFont) findITextParent(this, UIFont.class);
+
+ DefaultFontMapper fontMapper;
+ if (font == null) {
+ fontMapper = new DefaultFontMapper();
+ } else {
+ fontMapper = new AsianFontMapper(font.getName(), font.getEncoding());
+ }
+
+ Graphics2D g2 = tp.createGraphics(getWidth(), getHeight(), fontMapper);
chart.draw(g2, new Rectangle2D.Double(0, 0, getWidth(), getHeight()));
g2.dispose();
image = new ImgTemplate(tp);
- }
- else
- {
+ } else {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
ChartUtilities.writeChartAsJPEG(stream, chart, getWidth(), getHeight());
imageData = stream.toByteArray();
stream.close();
}
- }
- catch (Exception e)
- {
+ } catch (Exception e) {
throw new RuntimeException(e);
}
}
15 years, 3 months