thank you Martin,

also, when I assign the dataType Boolean I get the same error, but when I assign the datatype boolean to a parameter, I get the following error:

E:\Pruebas\web\target\src\server\web\productos\Altaproducto02GuardaActionForm.java:36: setActivo(java.lang.Boolean) in server.web.p
roductos.AltaProductoGeneralForm cannot be applied to (boolean)
super.setActivo(activo);


and It also happens with the Float

I suggest to change the lines to something like this:
if ("float".equals(type)) || (Float.class.getName().equals(type)) return "(float)" + name.hashCode() / hashCode();


is this correct??

thank you!

Carlos Cuenca wrote:

Hi,

I am testing the BPM4Struts cartridge and I have some parameters on a <<FrontEndEvent>> of type Date, I get and error during compiling:

E:\pruebasAndroMDA\web\src\java\server\web\productos\CAltaProducto.java:228: setFSolicitud(java.util.Date) in server.web.productos.AltaProd
uctoGeneralForm cannot be applied to (java.lang.String)
form.setFSolicitud("fSolicitud-test");


I had been looking the AndroMDA BPM4Struts code, and I had found in the StrutsParameterLogicImpl.java a method to fill with values the fields:
public String handleGetResetValue()
{
final String name = getName();
final String type = getType().getFullyQualifiedName();
if (String.class.getName().equals(type)) return "\"" + name + "-test" + "\"";


if ("boolean".equals(type)) return "false";
if ("float".equals(type)) return "(float)" + name.hashCode() / hashCode();
if ("double".equals(type)) return "(double)" + name.hashCode() / hashCode();
if ("short".equals(type)) return "(short)" + name.hashCode();
if ("long".equals(type)) return "(long)" + name.hashCode();
if ("byte".equals(type)) return "(byte)" + name.hashCode();
if ("char".equals(type)) return "(char)" + name.hashCode();
if ("int".equals(type)) return "(int)" + name.hashCode();


final String array = constructArray();
if (getType().isArrayType()) return array;
if (getType().isCollectionType()) return "java.util.Arrays.asList(" + array + ")";


       return "\"" + name + "-test" + "\"";
   }
I think it also should be included a line for Dates:
       if (String.class.getName().equals(type)) return "new Date()";

it this correct?

thank you!

Carlos








Martin West wrote:

I think it should be

if (java.util.Date.class.getName().equals(type)) return "new
java.util.Date()";

A more general solution might be

   Class c = Class.forName( type );
   return c.newInstance();

surrounded with a suitable try/catch block, and the type must have a
default constructor.

On Mon, 2004-08-02 at 12:53, Carlos Cuenca wrote:


Hi,

I am testing the BPM4Struts cartridge and I have some parameters on a <<FrontEndEvent>> of type Date, I get and error during compiling:

E:\pruebasAndroMDA\web\src\java\server\web\productos\CAltaProducto.java:228: setFSolicitud(java.util.Date) in server.web.productos.AltaProd
uctoGeneralForm cannot be applied to (java.lang.String)
form.setFSolicitud("fSolicitud-test");


I had been looking the AndroMDA BPM4Struts code, and I had found in the StrutsParameterLogicImpl.java a method to fill with values the fields:
public String handleGetResetValue()
{
final String name = getName();
final String type = getType().getFullyQualifiedName();
if (String.class.getName().equals(type)) return "\"" + name + "-test" + "\"";


if ("boolean".equals(type)) return "false";
if ("float".equals(type)) return "(float)" + name.hashCode() / hashCode();
if ("double".equals(type)) return "(double)" + name.hashCode() / hashCode();
if ("short".equals(type)) return "(short)" + name.hashCode();
if ("long".equals(type)) return "(long)" + name.hashCode();
if ("byte".equals(type)) return "(byte)" + name.hashCode();
if ("char".equals(type)) return "(char)" + name.hashCode();
if ("int".equals(type)) return "(int)" + name.hashCode();


final String array = constructArray();
if (getType().isArrayType()) return array;
if (getType().isCollectionType()) return "java.util.Arrays.asList(" + array + ")";


       return "\"" + name + "-test" + "\"";
   }
I think it also should be included a line for Dates:
       if (String.class.getName().equals(type)) return "new Date()";

it this correct?

thank you!

Carlos






-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user





------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to