Seam SVN: r9043 - branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 13:08:27 -0400 (Sat, 20 Sep 2008)
New Revision: 9043
Modified:
branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration/BeanA.java
branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration/EntityPassivationTest.java
Log:
add Serializable interface to conversation-scoped components
Modified: branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration/BeanA.java
===================================================================
--- branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration/BeanA.java 2008-09-20 08:08:48 UTC (rev 9042)
+++ branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration/BeanA.java 2008-09-20 17:08:27 UTC (rev 9043)
@@ -1,5 +1,6 @@
package org.jboss.seam.test.integration;
+import java.io.Serializable;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Create;
@@ -11,7 +12,7 @@
@Name("beanA")
@Scope(ScopeType.CONVERSATION)
@AutoCreate
-public class BeanA {
+public class BeanA implements Serializable {
private String myValue;
@@ -34,4 +35,4 @@
Events.instance().raiseEvent("BeanA.valueModified");
}
-}
\ No newline at end of file
+}
Modified: branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration/EntityPassivationTest.java
===================================================================
--- branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration/EntityPassivationTest.java 2008-09-20 08:08:48 UTC (rev 9042)
+++ branches/community/Seam_2_0/src/test/integration/src/org/jboss/seam/test/integration/EntityPassivationTest.java 2008-09-20 17:08:27 UTC (rev 9043)
@@ -1,5 +1,6 @@
package org.jboss.seam.test.integration;
+import java.io.Serializable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -95,7 +96,7 @@
@Name("entitytest.someComponent")
@Scope(ScopeType.CONVERSATION)
@AutoCreate
- public static class SomeComponent {
+ public static class SomeComponent implements Serializable {
@In EntityManager entityManager;
16 years, 2 months
Seam SVN: r9042 - branches/community/Seam_2_0/seam-gen/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 04:08:48 -0400 (Sat, 20 Sep 2008)
New Revision: 9042
Modified:
branches/community/Seam_2_0/seam-gen/resources/WEB-INF/pages.xml
Log:
JBSEAM-2947
add severities to messages and customize some of the strings
Modified: branches/community/Seam_2_0/seam-gen/resources/WEB-INF/pages.xml
===================================================================
--- branches/community/Seam_2_0/seam-gen/resources/WEB-INF/pages.xml 2008-09-20 08:07:46 UTC (rev 9041)
+++ branches/community/Seam_2_0/seam-gen/resources/WEB-INF/pages.xml 2008-09-20 08:08:48 UTC (rev 9042)
@@ -12,20 +12,26 @@
<redirect view-id="/home.xhtml"/>
</rule>
</navigation>
- </page>
+ </page>
<exception class="org.jboss.seam.framework.EntityNotFoundException">
<redirect view-id="/error.xhtml">
- <message severity="warn">Not found</message>
+ <message severity="warn">Record not found</message>
</redirect>
</exception>
<exception class="javax.persistence.EntityNotFoundException">
<redirect view-id="/error.xhtml">
- <message severity="warn">Not found</message>
+ <message severity="warn">Record not found</message>
</redirect>
</exception>
+ <exception class="javax.persistence.EntityExistsException">
+ <redirect view-id="/error.xhtml">
+ <message severity="warn">Duplicate record</message>
+ </redirect>
+ </exception>
+
<exception class="javax.persistence.OptimisticLockException">
<end-conversation/>
<redirect view-id="/error.xhtml">
@@ -35,13 +41,13 @@
<exception class="org.jboss.seam.security.AuthorizationException">
<redirect view-id="/error.xhtml">
- <message severity="error">You don't have permission to do this</message>
+ <message severity="error">You don't have permission to access this resource</message>
</redirect>
</exception>
<exception class="org.jboss.seam.security.NotLoggedInException">
<redirect view-id="/login.xhtml">
- <message severity="warn">Please log in first</message>
+ <message severity="warn">#{messages['org.jboss.seam.NotLoggedIn']}</message>
</redirect>
</exception>
16 years, 2 months
Seam SVN: r9041 - trunk/seam-gen/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 04:07:46 -0400 (Sat, 20 Sep 2008)
New Revision: 9041
Modified:
trunk/seam-gen/resources/WEB-INF/pages.xml
Log:
JBSEAM-2947
add severities to messages and customize some of the strings
Modified: trunk/seam-gen/resources/WEB-INF/pages.xml
===================================================================
--- trunk/seam-gen/resources/WEB-INF/pages.xml 2008-09-20 07:50:55 UTC (rev 9040)
+++ trunk/seam-gen/resources/WEB-INF/pages.xml 2008-09-20 08:07:46 UTC (rev 9041)
@@ -12,42 +12,48 @@
<redirect view-id="/home.xhtml"/>
</rule>
</navigation>
- </page>
+ </page>
<exception class="org.jboss.seam.framework.EntityNotFoundException">
<redirect view-id="/error.xhtml">
- <message>Not found</message>
+ <message severity="warn">Record not found</message>
</redirect>
</exception>
<exception class="javax.persistence.EntityNotFoundException">
<redirect view-id="/error.xhtml">
- <message>Not found</message>
+ <message severity="warn">Record not found</message>
</redirect>
</exception>
+ <exception class="javax.persistence.EntityExistsException">
+ <redirect view-id="/error.xhtml">
+ <message severity="warn">Duplicate record</message>
+ </redirect>
+ </exception>
+
<exception class="javax.persistence.OptimisticLockException">
<end-conversation/>
<redirect view-id="/error.xhtml">
- <message>Another user changed the same data, please try again</message>
+ <message severity="warn">Another user changed the same data, please try again</message>
</redirect>
</exception>
<exception class="org.jboss.seam.security.AuthorizationException">
<redirect view-id="/error.xhtml">
- <message>You don't have permission to do this</message>
+ <message severity="error">You don't have permission to access this resource</message>
</redirect>
</exception>
<exception class="org.jboss.seam.security.NotLoggedInException">
<redirect view-id="/login.xhtml">
- <message>Please log in first</message>
+ <message severity="warn">#{messages['org.jboss.seam.NotLoggedIn']}</message>
</redirect>
</exception>
<exception class="javax.faces.application.ViewExpiredException">
<redirect view-id="/error.xhtml">
- <message>Your session has timed out, please try again</message>
+ <message severity="warn">Your session has timed out, please try again</message>
</redirect>
</exception>
@@ -57,7 +63,7 @@
<exception>
<redirect view-id="/error.xhtml">
- <message>Unexpected error, please try again</message>
+ <message severity="error">Unexpected error, please try again</message>
</redirect>
</exception>
16 years, 2 months
Seam SVN: r9040 - trunk/seam-gen/src.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 03:50:55 -0400 (Sat, 20 Sep 2008)
New Revision: 9040
Modified:
trunk/seam-gen/src/EntityList.java
trunk/seam-gen/src/EntityList.java.ftl
Log:
JBSEAM-2907
Modified: trunk/seam-gen/src/EntityList.java
===================================================================
--- trunk/seam-gen/src/EntityList.java 2008-09-20 07:50:45 UTC (rev 9039)
+++ trunk/seam-gen/src/EntityList.java 2008-09-20 07:50:55 UTC (rev 9040)
@@ -2,9 +2,10 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
+import @modelPackage@.@entityName@;
@Name("@listName@")
-public class @entityName@List extends EntityQuery
+public class @entityName@List extends EntityQuery<@entityName@>
{
@Override
public String getEjbql()
Modified: trunk/seam-gen/src/EntityList.java.ftl
===================================================================
--- trunk/seam-gen/src/EntityList.java.ftl 2008-09-20 07:50:45 UTC (rev 9039)
+++ trunk/seam-gen/src/EntityList.java.ftl 2008-09-20 07:50:55 UTC (rev 9040)
@@ -13,7 +13,7 @@
import java.util.Arrays;
@Name("${listName}")
-public class ${entityName}List extends EntityQuery
+public class ${entityName}List extends EntityQuery<${entityName}>
{
private static final String[] RESTRICTIONS = {
16 years, 2 months
Seam SVN: r9039 - branches/community/Seam_2_0/seam-gen/src.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 03:50:45 -0400 (Sat, 20 Sep 2008)
New Revision: 9039
Modified:
branches/community/Seam_2_0/seam-gen/src/EntityList.java
branches/community/Seam_2_0/seam-gen/src/EntityList.java.ftl
Log:
JBSEAM-2907
Modified: branches/community/Seam_2_0/seam-gen/src/EntityList.java
===================================================================
--- branches/community/Seam_2_0/seam-gen/src/EntityList.java 2008-09-20 07:27:17 UTC (rev 9038)
+++ branches/community/Seam_2_0/seam-gen/src/EntityList.java 2008-09-20 07:50:45 UTC (rev 9039)
@@ -2,9 +2,10 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
+import @modelPackage@.@entityName@;
@Name("@listName@")
-public class @entityName@List extends EntityQuery
+public class @entityName@List extends EntityQuery<@entityName@>
{
@Override
public String getEjbql()
Modified: branches/community/Seam_2_0/seam-gen/src/EntityList.java.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/src/EntityList.java.ftl 2008-09-20 07:27:17 UTC (rev 9038)
+++ branches/community/Seam_2_0/seam-gen/src/EntityList.java.ftl 2008-09-20 07:50:45 UTC (rev 9039)
@@ -13,7 +13,7 @@
import java.util.Arrays;
@Name("${listName}")
-public class ${entityName}List extends EntityQuery
+public class ${entityName}List extends EntityQuery<${entityName}>
{
private static final String[] RESTRICTIONS = {
16 years, 2 months
Seam SVN: r9038 - in trunk/seam-gen: resources and 1 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 03:27:17 -0400 (Sat, 20 Sep 2008)
New Revision: 9038
Added:
trunk/seam-gen/resources/messages_it.properties
Modified:
trunk/seam-gen/icefaces/resources/WEB-INF/faces-config.xml
trunk/seam-gen/resources/WEB-INF/faces-config.xml
Log:
add italian messages
Modified: trunk/seam-gen/icefaces/resources/WEB-INF/faces-config.xml
===================================================================
--- trunk/seam-gen/icefaces/resources/WEB-INF/faces-config.xml 2008-09-20 07:26:14 UTC (rev 9037)
+++ trunk/seam-gen/icefaces/resources/WEB-INF/faces-config.xml 2008-09-20 07:27:17 UTC (rev 9038)
@@ -13,6 +13,7 @@
<supported-locale>de</supported-locale>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
+ <supported-locale>it</supported-locale>
<supported-locale>tr</supported-locale>
</locale-config>
<view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
Modified: trunk/seam-gen/resources/WEB-INF/faces-config.xml
===================================================================
--- trunk/seam-gen/resources/WEB-INF/faces-config.xml 2008-09-20 07:26:14 UTC (rev 9037)
+++ trunk/seam-gen/resources/WEB-INF/faces-config.xml 2008-09-20 07:27:17 UTC (rev 9038)
@@ -11,6 +11,7 @@
<supported-locale>de</supported-locale>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
+ <supported-locale>it</supported-locale>
<supported-locale>tr</supported-locale>
</locale-config>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
Added: trunk/seam-gen/resources/messages_it.properties
===================================================================
--- trunk/seam-gen/resources/messages_it.properties (rev 0)
+++ trunk/seam-gen/resources/messages_it.properties 2008-09-20 07:27:17 UTC (rev 9038)
@@ -0,0 +1,90 @@
+up=\u2191
+down=\u2193
+left=\u2039
+right=\u203A
+
+validator.assertFalse=validazione fallita
+validator.assertTrue=validazione corretta
+validator.future=deve essere una data futura
+validator.length=la lunghezza deve essere tra {min} e {max}
+validator.max=deve essere minore o uguale a {value}
+validator.min=deve essere maggiore o uguale a {value}
+validator.notNull=non pu\u00F2 essere nullo
+validator.past=deve essere una data passata
+validator.pattern=deve corrispondere a "{regex}"
+validator.range=deve essere tra {min} e {max}
+validator.size=la grandezza deve essere tra {min} e {max}
+validator.email=deve essere un indirizzo di posta elettronica
+
+org.jboss.seam.loginFailed=Autenticazione fallita
+org.jboss.seam.loginSuccessful=Benvenuto/a, #0
+
+org.jboss.seam.TransactionFailed=Transazione fallita
+org.jboss.seam.NoConversation=La conversazione \u00E8 terminata, scaduta oppure \u00E8 stata processata un'altra richiesta
+org.jboss.seam.IllegalNavigation=Navigazione illegale
+org.jboss.seam.ProcessEnded=Il processo \#0 \u00E8 gi\u00E0\u00A0 terminato
+org.jboss.seam.ProcessNotFound=Il processo \#0 non \u00E8 stato trovato
+org.jboss.seam.TaskEnded=Il task \#0 \u00E8 gi\u00E0 terminato
+org.jboss.seam.TaskNotFound=Il task \#0 non \u00E8 stato trovato
+org.jboss.seam.NotLoggedIn=Per favore, eseguire la login
+
+javax.faces.component.UIInput.CONVERSION=il valore non pu\u00F2 essere convertito
+javax.faces.component.UIInput.REQUIRED=\u00C8 richiesto un valore
+javax.faces.component.UIInput.UPDATE=Si \u00E8 verificato un errore nell'elaborazione delle informazioni inviate
+javax.faces.component.UISelectOne.INVALID=il valore non \u00E8 valido
+javax.faces.component.UISelectMany.INVALID=il valore non \u00E8 valido
+
+javax.faces.converter.BigDecimalConverter.DECIMAL=il valore deve essere un numero
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail=il valore deve essere un numero decimale con zero o pi\u00F9 cifre, opzionalmente seguito da un punto e una frazione, es. {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER=deve essere un intero
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=il valore deve essere un numero intero con zero o pi\u00F9 cifre
+javax.faces.converter.BooleanConverter.BOOLEAN=deve essere vero o falso
+javax.faces.converter.BooleanConverter.BOOLEAN_detail=il valore deve essere vero o falso (qualsiasi valore diverso da vero \u00E8 considerato falso)
+javax.faces.converter.ByteConverter.BYTE=il valore deve essere un numero compreso tra 0 e 255
+javax.faces.converter.ByteConverter.BYTE_detail=il valore deve essere un numero compreso tra 0 e 255
+javax.faces.converter.CharacterConverter.CHARACTER=deve essere un carattere
+javax.faces.converter.CharacterConverter.CHARACTER_detail=il valore deve essere un carattere ASCII valido
+javax.faces.converter.DateTimeConverter.DATE=deve essere una data
+javax.faces.converter.DateTimeConverter.DATE_detail=il valore deve essere una data, es. {1}
+javax.faces.converter.DateTimeConverter.TIME=deve essere un orario
+javax.faces.converter.DateTimeConverter.TIME_detail=il valore deve essere un orario, es. {1}
+javax.faces.converter.DateTimeConverter.DATETIME=deve essere una data ed un orario
+javax.faces.converter.DateTimeConverter.DATETIME_detail=il valore deve essere una data e un orario, es. {1}
+javax.faces.converter.DateTimeConverter.PATTERN_TYPE=per convetire il valore devono essere specificati un pattern o un attributo tipo
+javax.faces.converter.DoubleConverter.DOUBLE=deve essere un numero
+javax.faces.converter.DoubleConverter.DOUBLE_detail=il valore deve essere un numero compreso tra 4.9E-324 e 1.7976931348623157E308
+javax.faces.converter.EnumConverter.ENUM=il valore deve essere convertibile in una enum
+javax.faces.converter.EnumConverter.ENUM_detail=il valore deve essere convertibile in una enum o da enum che contiene la costante {1}
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS=il valore deve essere convertibile in una enum o da enum, ma non \u00E8 stata fornita nessuna classe enum
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=il valore deve essere convertibile in una enum o da enum, ma non \u00E8 stata fornita nessuna classe enum
+javax.faces.converter.FloatConverter.FLOAT=deve essere un numero
+javax.faces.converter.FloatConverter.FLOAT_detail=il valore deve essere un numero compreso tra 1.4E-45 e 3.4028235E38
+javax.faces.converter.IntegerConverter.INTEGER=deve essere un numero intero
+javax.faces.converter.IntegerConverter.INTEGER_detail=il valore deve essere un numero intero compreso tra -2147483648 e 2147483647
+javax.faces.converter.LongConverter.LONG=deve essere un numero intero
+javax.faces.converter.LongConverter.LONG_detail=il valore deve essere un numero intero compreso tra -9223372036854775808 e 9223372036854775807
+javax.faces.converter.NumberConverter.CURRENCY=il valore deve essere una valuta
+javax.faces.converter.NumberConverter.CURRENCY_detail=il valore deve essere una valuta, es. {1}
+javax.faces.converter.NumberConverter.PERCENT=il valore deve essere una percentuale
+javax.faces.converter.NumberConverter.PERCENT_detail=il valore deve essere una percentuale, es. {1}
+javax.faces.converter.NumberConverter.NUMBER=deve essere un numero
+javax.faces.converter.NumberConverter.NUMBER_detail=deve essere un numero
+javax.faces.converter.NumberConverter.PATTERN=deve essere un numero
+javax.faces.converter.NumberConverter.PATTERN_detail=deve essere un numero
+javax.faces.converter.ShortConverter.SHORT=deve essere un numero intero
+javax.faces.converter.ShortConverter.SHORT_detail=il valore deve essere un numero intero compreso -32768 e 32767
+
+javax.faces.validator.DoubleRangeValidator.MAXIMUM=il valore deve essere minore o uguale a {0}
+javax.faces.validator.DoubleRangeValidator.MINIMUM=il valore deve essere maggiore o uguale a {0} {0}
+javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1}
+javax.faces.validator.DoubleRangeValidator.TYPE=il valore non \u00E8 del tipo corretto
+javax.faces.validator.LengthValidator.MAXIMUM=il valore deve essere inferiore o uguale {0} caratteri
+javax.faces.validator.LengthValidator.MINIMUM=il valore deve essere superiore o uguale {0} caratteri
+javax.faces.validator.LongRangeValidator.MAXIMUM=il valore deve essere minore o uguale a {0}
+javax.faces.validator.LongRangeValidator.MINIMUM=il valore deve essere superiore o uguale a {0}
+javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1}
+javax.faces.validator.LongRangeValidator.TYPE=il valore non \u00E8 del tipo corretto
+
+javax.faces.validator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1}
+javax.faces.converter.STRING=il valore non pu\u00F2 essere convertito a stringa
+
16 years, 2 months
Seam SVN: r9037 - in branches/community/Seam_2_0/seam-gen: resources and 1 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 03:26:14 -0400 (Sat, 20 Sep 2008)
New Revision: 9037
Added:
branches/community/Seam_2_0/seam-gen/resources/messages_it.properties
Modified:
branches/community/Seam_2_0/seam-gen/icefaces/resources/WEB-INF/faces-config.xml
branches/community/Seam_2_0/seam-gen/resources/WEB-INF/faces-config.xml
Log:
add italian messages
Modified: branches/community/Seam_2_0/seam-gen/icefaces/resources/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_0/seam-gen/icefaces/resources/WEB-INF/faces-config.xml 2008-09-20 07:08:12 UTC (rev 9036)
+++ branches/community/Seam_2_0/seam-gen/icefaces/resources/WEB-INF/faces-config.xml 2008-09-20 07:26:14 UTC (rev 9037)
@@ -13,6 +13,7 @@
<supported-locale>de</supported-locale>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
+ <supported-locale>it</supported-locale>
<supported-locale>tr</supported-locale>
</locale-config>
<view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
Modified: branches/community/Seam_2_0/seam-gen/resources/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_0/seam-gen/resources/WEB-INF/faces-config.xml 2008-09-20 07:08:12 UTC (rev 9036)
+++ branches/community/Seam_2_0/seam-gen/resources/WEB-INF/faces-config.xml 2008-09-20 07:26:14 UTC (rev 9037)
@@ -11,6 +11,7 @@
<supported-locale>de</supported-locale>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
+ <supported-locale>it</supported-locale>
<supported-locale>tr</supported-locale>
</locale-config>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
Added: branches/community/Seam_2_0/seam-gen/resources/messages_it.properties
===================================================================
--- branches/community/Seam_2_0/seam-gen/resources/messages_it.properties (rev 0)
+++ branches/community/Seam_2_0/seam-gen/resources/messages_it.properties 2008-09-20 07:26:14 UTC (rev 9037)
@@ -0,0 +1,90 @@
+up=\u2191
+down=\u2193
+left=\u2039
+right=\u203A
+
+validator.assertFalse=validazione fallita
+validator.assertTrue=validazione corretta
+validator.future=deve essere una data futura
+validator.length=la lunghezza deve essere tra {min} e {max}
+validator.max=deve essere minore o uguale a {value}
+validator.min=deve essere maggiore o uguale a {value}
+validator.notNull=non pu\u00F2 essere nullo
+validator.past=deve essere una data passata
+validator.pattern=deve corrispondere a "{regex}"
+validator.range=deve essere tra {min} e {max}
+validator.size=la grandezza deve essere tra {min} e {max}
+validator.email=deve essere un indirizzo di posta elettronica
+
+org.jboss.seam.loginFailed=Autenticazione fallita
+org.jboss.seam.loginSuccessful=Benvenuto/a, #0
+
+org.jboss.seam.TransactionFailed=Transazione fallita
+org.jboss.seam.NoConversation=La conversazione \u00E8 terminata, scaduta oppure \u00E8 stata processata un'altra richiesta
+org.jboss.seam.IllegalNavigation=Navigazione illegale
+org.jboss.seam.ProcessEnded=Il processo \#0 \u00E8 gi\u00E0\u00A0 terminato
+org.jboss.seam.ProcessNotFound=Il processo \#0 non \u00E8 stato trovato
+org.jboss.seam.TaskEnded=Il task \#0 \u00E8 gi\u00E0 terminato
+org.jboss.seam.TaskNotFound=Il task \#0 non \u00E8 stato trovato
+org.jboss.seam.NotLoggedIn=Per favore, eseguire la login
+
+javax.faces.component.UIInput.CONVERSION=il valore non pu\u00F2 essere convertito
+javax.faces.component.UIInput.REQUIRED=\u00C8 richiesto un valore
+javax.faces.component.UIInput.UPDATE=Si \u00E8 verificato un errore nell'elaborazione delle informazioni inviate
+javax.faces.component.UISelectOne.INVALID=il valore non \u00E8 valido
+javax.faces.component.UISelectMany.INVALID=il valore non \u00E8 valido
+
+javax.faces.converter.BigDecimalConverter.DECIMAL=il valore deve essere un numero
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail=il valore deve essere un numero decimale con zero o pi\u00F9 cifre, opzionalmente seguito da un punto e una frazione, es. {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER=deve essere un intero
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=il valore deve essere un numero intero con zero o pi\u00F9 cifre
+javax.faces.converter.BooleanConverter.BOOLEAN=deve essere vero o falso
+javax.faces.converter.BooleanConverter.BOOLEAN_detail=il valore deve essere vero o falso (qualsiasi valore diverso da vero \u00E8 considerato falso)
+javax.faces.converter.ByteConverter.BYTE=il valore deve essere un numero compreso tra 0 e 255
+javax.faces.converter.ByteConverter.BYTE_detail=il valore deve essere un numero compreso tra 0 e 255
+javax.faces.converter.CharacterConverter.CHARACTER=deve essere un carattere
+javax.faces.converter.CharacterConverter.CHARACTER_detail=il valore deve essere un carattere ASCII valido
+javax.faces.converter.DateTimeConverter.DATE=deve essere una data
+javax.faces.converter.DateTimeConverter.DATE_detail=il valore deve essere una data, es. {1}
+javax.faces.converter.DateTimeConverter.TIME=deve essere un orario
+javax.faces.converter.DateTimeConverter.TIME_detail=il valore deve essere un orario, es. {1}
+javax.faces.converter.DateTimeConverter.DATETIME=deve essere una data ed un orario
+javax.faces.converter.DateTimeConverter.DATETIME_detail=il valore deve essere una data e un orario, es. {1}
+javax.faces.converter.DateTimeConverter.PATTERN_TYPE=per convetire il valore devono essere specificati un pattern o un attributo tipo
+javax.faces.converter.DoubleConverter.DOUBLE=deve essere un numero
+javax.faces.converter.DoubleConverter.DOUBLE_detail=il valore deve essere un numero compreso tra 4.9E-324 e 1.7976931348623157E308
+javax.faces.converter.EnumConverter.ENUM=il valore deve essere convertibile in una enum
+javax.faces.converter.EnumConverter.ENUM_detail=il valore deve essere convertibile in una enum o da enum che contiene la costante {1}
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS=il valore deve essere convertibile in una enum o da enum, ma non \u00E8 stata fornita nessuna classe enum
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=il valore deve essere convertibile in una enum o da enum, ma non \u00E8 stata fornita nessuna classe enum
+javax.faces.converter.FloatConverter.FLOAT=deve essere un numero
+javax.faces.converter.FloatConverter.FLOAT_detail=il valore deve essere un numero compreso tra 1.4E-45 e 3.4028235E38
+javax.faces.converter.IntegerConverter.INTEGER=deve essere un numero intero
+javax.faces.converter.IntegerConverter.INTEGER_detail=il valore deve essere un numero intero compreso tra -2147483648 e 2147483647
+javax.faces.converter.LongConverter.LONG=deve essere un numero intero
+javax.faces.converter.LongConverter.LONG_detail=il valore deve essere un numero intero compreso tra -9223372036854775808 e 9223372036854775807
+javax.faces.converter.NumberConverter.CURRENCY=il valore deve essere una valuta
+javax.faces.converter.NumberConverter.CURRENCY_detail=il valore deve essere una valuta, es. {1}
+javax.faces.converter.NumberConverter.PERCENT=il valore deve essere una percentuale
+javax.faces.converter.NumberConverter.PERCENT_detail=il valore deve essere una percentuale, es. {1}
+javax.faces.converter.NumberConverter.NUMBER=deve essere un numero
+javax.faces.converter.NumberConverter.NUMBER_detail=deve essere un numero
+javax.faces.converter.NumberConverter.PATTERN=deve essere un numero
+javax.faces.converter.NumberConverter.PATTERN_detail=deve essere un numero
+javax.faces.converter.ShortConverter.SHORT=deve essere un numero intero
+javax.faces.converter.ShortConverter.SHORT_detail=il valore deve essere un numero intero compreso -32768 e 32767
+
+javax.faces.validator.DoubleRangeValidator.MAXIMUM=il valore deve essere minore o uguale a {0}
+javax.faces.validator.DoubleRangeValidator.MINIMUM=il valore deve essere maggiore o uguale a {0} {0}
+javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1}
+javax.faces.validator.DoubleRangeValidator.TYPE=il valore non \u00E8 del tipo corretto
+javax.faces.validator.LengthValidator.MAXIMUM=il valore deve essere inferiore o uguale {0} caratteri
+javax.faces.validator.LengthValidator.MINIMUM=il valore deve essere superiore o uguale {0} caratteri
+javax.faces.validator.LongRangeValidator.MAXIMUM=il valore deve essere minore o uguale a {0}
+javax.faces.validator.LongRangeValidator.MINIMUM=il valore deve essere superiore o uguale a {0}
+javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1}
+javax.faces.validator.LongRangeValidator.TYPE=il valore non \u00E8 del tipo corretto
+
+javax.faces.validator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1}
+javax.faces.converter.STRING=il valore non pu\u00F2 essere convertito a stringa
+
16 years, 2 months
Seam SVN: r9036 - branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 03:08:12 -0400 (Sat, 20 Sep 2008)
New Revision: 9036
Added:
branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit/MockContainerTest.java
Modified:
branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java
Log:
create more tests for JBSEAM-2566
Modified: branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java
===================================================================
--- branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java 2008-09-20 06:59:56 UTC (rev 9035)
+++ branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java 2008-09-20 07:08:12 UTC (rev 9036)
@@ -3,46 +3,62 @@
import java.text.DateFormat;
import java.util.Date;
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.core.Expressions;
import org.jboss.seam.core.Interpolator;
+import org.jboss.seam.core.Locale;
import org.testng.Assert;
import org.testng.annotations.Test;
-
-public class InterpolatorTest
+public class InterpolatorTest extends MockContainerTest
{
+ private static final String CHOICE_EXPR = "There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}.";
- static final String CHOICE_EXPR = "There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}.";
+ @Override
+ protected Class[] getComponentsToInstall()
+ {
+ return new Class[] { Interpolator.class, Locale.class, Expressions.class };
+ }
+
@Test
public void testInterpolation()
{
Interpolator interpolator = Interpolator.instance();
- Assert.assertEquals("3 5 7", interpolator.interpolate("#0 #1 #2", 3, 5, 7));
- Assert.assertEquals("3 5 7", interpolator.interpolate("{0} {1} {2}", 3, 5, 7));
+ Assert.assertEquals(interpolator.interpolate("#0 #1 #2", 3, 5, 7), "3 5 7");
+ Assert.assertEquals(interpolator.interpolate("{0} {1} {2}", 3, 5, 7), "3 5 7");
// this tests that the result of an expression evaluation is not evaluated again
- Assert.assertEquals("{0}", interpolator.interpolate("{1}", "bad", "{0}"));
+ Assert.assertEquals(interpolator.interpolate("{1}", "bad", "{0}"), "{0}");
// this tests that embedded {} expressions are parsed correctly.
- Assert.assertEquals("There are no files.", interpolator.interpolate(CHOICE_EXPR, 0));
- Assert.assertEquals("There is one file.", interpolator.interpolate(CHOICE_EXPR, 1));
- Assert.assertEquals("There are 2 files.", interpolator.interpolate(CHOICE_EXPR, 2));
+ Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 0), "There are no files.");
+ Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 1), "There is one file.");
+ Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 2), "There are 2 files.");
// test sequences of multiple #
- Assert.assertEquals("2", interpolator.interpolate("#0",2));
- Assert.assertEquals("#2", interpolator.interpolate("##0",2));
- Assert.assertEquals("##2", interpolator.interpolate("###0",2));
+ Assert.assertEquals(interpolator.interpolate("#0",2), "2");
+ Assert.assertEquals(interpolator.interpolate("##0",2), "#2");
+ Assert.assertEquals(interpolator.interpolate("###0",2), "##2");
+ // test a value expression in the mix
+ Contexts.getEventContext().set("contextVariable", "value");
+ Assert.assertEquals(interpolator.interpolate("#{contextVariable}"), "value");
+ Assert.assertEquals(interpolator.interpolate("#0 #{contextVariable} #1", "a", "z"), "a value z");
+ Assert.assertEquals(interpolator.interpolate("#0 ##{contextVariable} #1", "a", "z"), "a #value z");
+
Date date = new Date(0);
- Assert.assertEquals(DateFormat.getDateInstance(DateFormat.SHORT).format(date), interpolator.interpolate("{0,date,short}", date));
+ Assert.assertEquals(interpolator.interpolate("{0,date,short}", date), DateFormat.getDateInstance(DateFormat.SHORT).format(date));
// test that a messageformat error doesn't blow up
- Assert.assertEquals("{nosuchmessage}", interpolator.interpolate("{nosuchmessage}"));
+ Assert.assertEquals(interpolator.interpolate("{nosuchmessage}"), "{nosuchmessage}");
- try {
+ try
+ {
interpolator.interpolate("hello #{", (Object) null);
- } catch (Throwable t) {
+ } catch (Throwable t)
+ {
Assert.fail("interpolator raised an exception");
}
}
Added: branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit/MockContainerTest.java
===================================================================
--- branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit/MockContainerTest.java (rev 0)
+++ branches/community/Seam_2_0/src/test/unit/org/jboss/seam/test/unit/MockContainerTest.java 2008-09-20 07:08:12 UTC (rev 9036)
@@ -0,0 +1,54 @@
+package org.jboss.seam.test.unit;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.Seam;
+import org.jboss.seam.contexts.ApplicationContext;
+import org.jboss.seam.contexts.Context;
+import org.jboss.seam.contexts.Lifecycle;
+import org.jboss.seam.contexts.ServletLifecycle;
+import org.jboss.seam.core.Init;
+import org.jboss.seam.core.Manager;
+import org.jboss.seam.mock.MockExternalContext;
+import org.jboss.seam.mock.MockServletContext;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+
+/**
+ * A simple base test class that registers components according to class so that
+ * they can be looked up successfully using ComponentClass.instance(), as
+ * required by much of Seam's internal API.
+ */
+public abstract class MockContainerTest
+{
+ @BeforeMethod
+ protected void setUp()
+ {
+ MockServletContext servletContext = new MockServletContext();
+ ServletLifecycle.beginApplication(servletContext);
+ MockExternalContext externalContext = new MockExternalContext(servletContext);
+ Context appContext = new ApplicationContext(externalContext.getApplicationMap());
+ installComponent(appContext, Manager.class);
+ for (Class c : getComponentsToInstall())
+ {
+ installComponent(appContext, c);
+ }
+ appContext.set(Seam.getComponentName(Init.class), new Init());
+ Lifecycle.beginCall();
+ }
+
+ protected Class[] getComponentsToInstall()
+ {
+ return new Class[] {};
+ }
+
+ @AfterMethod
+ protected void tearDown()
+ {
+ Lifecycle.endCall();
+ }
+
+ protected void installComponent(Context appContext, Class clazz)
+ {
+ appContext.set(Seam.getComponentName(clazz) + ".component", new Component(clazz));
+ }
+}
16 years, 2 months
Seam SVN: r9035 - trunk/src/test/unit/org/jboss/seam/test/unit.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 02:59:56 -0400 (Sat, 20 Sep 2008)
New Revision: 9035
Added:
trunk/src/test/unit/org/jboss/seam/test/unit/MockContainerTest.java
Log:
create more tests for JBSEAM-2566
Added: trunk/src/test/unit/org/jboss/seam/test/unit/MockContainerTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/MockContainerTest.java (rev 0)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/MockContainerTest.java 2008-09-20 06:59:56 UTC (rev 9035)
@@ -0,0 +1,54 @@
+package org.jboss.seam.test.unit;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.Seam;
+import org.jboss.seam.contexts.ApplicationContext;
+import org.jboss.seam.contexts.Context;
+import org.jboss.seam.contexts.Lifecycle;
+import org.jboss.seam.contexts.ServletLifecycle;
+import org.jboss.seam.core.Init;
+import org.jboss.seam.core.Manager;
+import org.jboss.seam.mock.MockExternalContext;
+import org.jboss.seam.mock.MockServletContext;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+
+/**
+ * A simple base test class that registers components according to class so that
+ * they can be looked up successfully using ComponentClass.instance(), as
+ * required by much of Seam's internal API.
+ */
+public abstract class MockContainerTest
+{
+ @BeforeMethod
+ protected void setUp()
+ {
+ MockServletContext servletContext = new MockServletContext();
+ ServletLifecycle.beginApplication(servletContext);
+ MockExternalContext externalContext = new MockExternalContext(servletContext);
+ Context appContext = new ApplicationContext(externalContext.getApplicationMap());
+ installComponent(appContext, Manager.class);
+ for (Class c : getComponentsToInstall())
+ {
+ installComponent(appContext, c);
+ }
+ appContext.set(Seam.getComponentName(Init.class), new Init());
+ Lifecycle.beginCall();
+ }
+
+ protected Class[] getComponentsToInstall()
+ {
+ return new Class[] {};
+ }
+
+ @AfterMethod
+ protected void tearDown()
+ {
+ Lifecycle.endCall();
+ }
+
+ protected void installComponent(Context appContext, Class clazz)
+ {
+ appContext.set(Seam.getComponentName(clazz) + ".component", new Component(clazz));
+ }
+}
16 years, 2 months
Seam SVN: r9034 - trunk/src/test/unit/org/jboss/seam/test/unit.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-20 02:59:42 -0400 (Sat, 20 Sep 2008)
New Revision: 9034
Modified:
trunk/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java
Log:
create more tests for JBSEAM-2566
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java 2008-09-20 05:01:29 UTC (rev 9033)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java 2008-09-20 06:59:42 UTC (rev 9034)
@@ -3,46 +3,62 @@
import java.text.DateFormat;
import java.util.Date;
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.core.Expressions;
import org.jboss.seam.core.Interpolator;
+import org.jboss.seam.core.Locale;
import org.testng.Assert;
import org.testng.annotations.Test;
-
-public class InterpolatorTest
+public class InterpolatorTest extends MockContainerTest
{
+ private static final String CHOICE_EXPR = "There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}.";
- static final String CHOICE_EXPR = "There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}.";
+ @Override
+ protected Class[] getComponentsToInstall()
+ {
+ return new Class[] { Interpolator.class, Locale.class, Expressions.class };
+ }
+
@Test
public void testInterpolation()
{
Interpolator interpolator = Interpolator.instance();
- Assert.assertEquals("3 5 7", interpolator.interpolate("#0 #1 #2", 3, 5, 7));
- Assert.assertEquals("3 5 7", interpolator.interpolate("{0} {1} {2}", 3, 5, 7));
+ Assert.assertEquals(interpolator.interpolate("#0 #1 #2", 3, 5, 7), "3 5 7");
+ Assert.assertEquals(interpolator.interpolate("{0} {1} {2}", 3, 5, 7), "3 5 7");
// this tests that the result of an expression evaluation is not evaluated again
- Assert.assertEquals("{0}", interpolator.interpolate("{1}", "bad", "{0}"));
+ Assert.assertEquals(interpolator.interpolate("{1}", "bad", "{0}"), "{0}");
// this tests that embedded {} expressions are parsed correctly.
- Assert.assertEquals("There are no files.", interpolator.interpolate(CHOICE_EXPR, 0));
- Assert.assertEquals("There is one file.", interpolator.interpolate(CHOICE_EXPR, 1));
- Assert.assertEquals("There are 2 files.", interpolator.interpolate(CHOICE_EXPR, 2));
+ Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 0), "There are no files.");
+ Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 1), "There is one file.");
+ Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 2), "There are 2 files.");
// test sequences of multiple #
- Assert.assertEquals("2", interpolator.interpolate("#0",2));
- Assert.assertEquals("#2", interpolator.interpolate("##0",2));
- Assert.assertEquals("##2", interpolator.interpolate("###0",2));
+ Assert.assertEquals(interpolator.interpolate("#0",2), "2");
+ Assert.assertEquals(interpolator.interpolate("##0",2), "#2");
+ Assert.assertEquals(interpolator.interpolate("###0",2), "##2");
+ // test a value expression in the mix
+ Contexts.getEventContext().set("contextVariable", "value");
+ Assert.assertEquals(interpolator.interpolate("#{contextVariable}"), "value");
+ Assert.assertEquals(interpolator.interpolate("#0 #{contextVariable} #1", "a", "z"), "a value z");
+ Assert.assertEquals(interpolator.interpolate("#0 ##{contextVariable} #1", "a", "z"), "a #value z");
+
Date date = new Date(0);
- Assert.assertEquals(DateFormat.getDateInstance(DateFormat.SHORT).format(date), interpolator.interpolate("{0,date,short}", date));
+ Assert.assertEquals(interpolator.interpolate("{0,date,short}", date), DateFormat.getDateInstance(DateFormat.SHORT).format(date));
// test that a messageformat error doesn't blow up
- Assert.assertEquals("{nosuchmessage}", interpolator.interpolate("{nosuchmessage}"));
+ Assert.assertEquals(interpolator.interpolate("{nosuchmessage}"), "{nosuchmessage}");
- try {
+ try
+ {
interpolator.interpolate("hello #{", (Object) null);
- } catch (Throwable t) {
+ } catch (Throwable t)
+ {
Assert.fail("interpolator raised an exception");
}
}
16 years, 2 months