Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/11/2010, 17:19
Avatar de Xerelo
Xerelo
 
Fecha de Ingreso: mayo-2009
Mensajes: 2.175
Antigüedad: 15 años
Puntos: 306
Respuesta: Problema campo int J2ee

Eso está mejor

No hay problema, tienes dos opciones bastante sencillas, cambiar tus int por Integer, o añadir un valor por defecto a esos campos (en los textfield o como params de la action).

http://struts.apache.org/2.0.14/docs...opertyHandling

Cita:
Some properties cannot be set to null. Primitives like boolean and int cannot be null. If your action needs to or will accept null or blank values, use the object equivalents Boolean and Integer. Similarly, a blank string "" cannot be set on a primitive. At the time of writing, a blank string also cannot be set on a BigDecimal or BigInteger. Use server-side validation to prevent invalid values from being set on your properties (or handle the conversion errors appropriately).
__________________
Cada vez que solucionas los problemas de alguien que no se esfuerza, piensa en que el día de mañana puede llegar a ser tu compañero de trabajo, o peor, tu jefe.