If you've downloaded the andromda-bin*.zip, go to the samples and type 'maven' and it will build all the samples (you need to build all samples from that directory first because it will install all maven artifacts into your local repository). After that you can go to the animal-quiz directory and type 'maven' and it will build that alone.
Chad --- "Bak Attila (SDA)" <[EMAIL PROTECTED]> wrote: > Can I just type maven in the animal-quiz dir? > And it will work :-) > > attila > > -----Eredeti üzenet----- > Feladó: Chad Brandon [mailto:[EMAIL PROTECTED] > Küldve: 2004. augusztus 17. 14:43 > Címzett: Bak Attila (SDA); > [EMAIL PROTECTED] > Tárgy: Re: [Andromda-user] RE: Andromda-user digest, > Vol 1 #551 - 2 msgs > > The animal quiz, is a good sample to learn from. > > Chad > > --- "Bak Attila (SDA)" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > Is there a "good" sample application in the 3.0 > > version? > > Something I can quickly learn from :-) > > > > Many thanks > > attila > > > > -----Eredeti üzenet----- > > Feladó: > [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] > > > > Küldve: 2004. augusztus 3. 22:36 > > Címzett: [EMAIL PROTECTED] > > Tárgy: Andromda-user digest, Vol 1 #551 - 2 msgs > > > > Send Andromda-user mailing list submissions to > > [EMAIL PROTECTED] > > > > To subscribe or unsubscribe via the World Wide > Web, > > visit > > > > > https://lists.sourceforge.net/lists/listinfo/andromda-user > > or, via email, send a message with subject or body > > 'help' to > > [EMAIL PROTECTED] > > > > You can reach the person managing the list at > > [EMAIL PROTECTED] > > > > When replying, please edit your Subject line so it > > is more specific > > than "Re: Contents of Andromda-user digest..." > > > > > > Today's Topics: > > > > 1. Re: BPM4Struts & Date Parameters (Walter > > =?ISO-8859-1?Q?Mour=E3o?=) > > 2. RE: BPM4Struts & Date Parameters (Wouter > > Zoons) > > > > --__--__-- > > > > Message: 1 > > Date: Tue, 03 Aug 2004 17:32:15 -0300 > > Subject: Re: [Andromda-user] BPM4Struts & Date > > Parameters > > To: <[EMAIL PROTECTED]> > > Cc: "'Carlos Cuenca'" <[EMAIL PROTECTED]>, > > <[EMAIL PROTECTED]>, > > "'andromda-user'" > > <[EMAIL PROTECTED]> > > From: "Walter =?ISO-8859-1?Q?Mour=E3o?=" > > <[EMAIL PROTECTED]> > > > > I customized the form templates to handle dates. > > > > Template code: > > ... > > #elseif($field.type.fullyQualifiedName == > > "java.util.Date") > > > > public void > ${field.setterName}(java.lang.String > > $fieldName) > > { > > try{ > > #if($field.type.name.endsWith("date")) > > this.$fieldName = $fieldName==null || > > ${fieldName}.trim().equals("")?null:new > > > java.text.SimpleDateFormat("dd/MM/yyyy").parse($fieldName); > > #elseif($field.type.name.endsWith("time")) > > this.$fieldName = $fieldName==null || > > ${fieldName}.trim().equals("")?null:new > > > java.text.SimpleDateFormat("hh:mm").parse($fieldName); > > #else > > this.$fieldName = $fieldName==null || > > ${fieldName}.trim().equals("")?null:new > > java.text.SimpleDateFormat("dd/MM/yyyy > > hh:mm").parse($fieldName); > > #end > > } > > catch(java.text.ParseException e){ > > throw new RuntimeException(e); > > } > > } > > > > public java.lang.String ${field.getterName}() > > { > > #if($field.type.name.endsWith("date")) > > return this.$fieldName==null?null:new > > > java.text.SimpleDateFormat("dd/MM/yyyy").format(this.$fieldName); > > #elseif($field.type.name.endsWith("time")) > > return this.$fieldName==null?null:new > > > java.text.SimpleDateFormat("hh:mm").format(this.$fieldName); > > #else > > return this.$fieldName==null?null:new > > java.text.SimpleDateFormat("dd/MM/yyyy > > hh:mm").format(this.$fieldName); > > #end > > } > > > > public void > > ${field.setterName}AsDate(java.util.Date > $fieldName) > > { > > this.$fieldName = $fieldName; > > } > > > > public $fieldType ${field.getterName}AsDate() > > { > > return this.$fieldName; > > } > > ... > > > > generated code: > > ... > > public void setTxtPeridoDe(java.lang.String > > txtPeridoDe) > > { > > try{ > > this.txtPeridoDe = txtPeridoDe==null || > > txtPeridoDe.trim().equals("")?null:new > > > java.text.SimpleDateFormat("dd/MM/yyyy").parse(txtPeridoDe); > > } > > catch(java.text.ParseException e){ > > throw new RuntimeException(e); > > } > > } > > > > public java.lang.String getTxtPeridoDe() > > { > > return this.txtPeridoDe==null?null:new > > > java.text.SimpleDateFormat("dd/MM/yyyy").format(this.txtPeridoDe); > > } > > > > public void > setTxtPeridoDeAsDate(java.util.Date > > txtPeridoDe) > > { > > this.txtPeridoDe = txtPeridoDe; > > } > > > > public java.util.Date getTxtPeridoDeAsDate() > > { > > return this.txtPeridoDe; > > } > > > > ... > > > > I hope it helps... > > > > Walter > > > > <[EMAIL PROTECTED]> grava: > > >Hmm.. I'm on it right now.. it's probably a type > > mismatch, I'm not sure > > >if Struts can handle Dates (I assume it did > before > > because I used it > > >with AndroMDA 2) > > > > > >-- Wouter > > > > > >> -----Original Message----- > > >> From: Carlos Cuenca > > [mailto:[EMAIL PROTECTED] > > >> Sent: Tuesday, August 03, 2004 10:04 PM > > >> To: [EMAIL PROTECTED]; > andromda-user > > >> Subject: Re: [Andromda-user] BPM4Struts & Date > > Parameters > > >> > > >> ...Hi again... > > >> > > >> I had been doing some test with the Date and > > Float parameters and I > > >had > > >> found the following: > > >> -there was not any problem with the boolean nor > > float conversions. > > >> -My error started when I tried to set the type > of > > parameter like float > > >> ,since that datatype is not loaded on the > > default.xmi. I think that > > >it > > >> should be included. (Currently there is only a > > Float) > > >> -On the other hand and with dates, I am still > > using the lines: (I have > > >> to build everything for testing..) > > >> if > (java.util.Date.class.getName().equals(type)) > > return "new > > >> java.util.Date()"; > > >> if (java.sql.Date.class.getName().equals(type)) > > return "new > > >> java.sql.Date()"; > > >> > > >> and I get the model compiling, but when I > deploy > > it I get a error: > > >> > > >> 21:44:12,555 ERROR [Engine] > > StandardWrapperValve[action]: > > >> Servlet.service() for servlet action threw > > exception > > >> javax.servlet.ServletException: > > BeanUtils.populate > > >> at > > >> > > > org.apache.struts.util.RequestUtils.populate(RequestUtils.java:490) > > >> at > > >> > > > >org.apache.struts.action.RequestProcessor.processPopulate(RequestProcess > > >or > > >> .java:798) > > >> at > > >> > > > >org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: > > >20 > > >> 5) > > >> at > > >> > > > >org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158) > > >> at > > >> > > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) > > >> at > > > >javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > > >> at > > > >javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > >> 21:44:12,555 ERROR [Engine] ----- Root Cause > > ----- > > >> java.lang.IllegalArgumentException: argument > type > > mismatch > > >> at > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > Method) > > >> at > > >> > > > >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav > > >a: > > >> 39) > > >> at > > >> > > > >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor > > >Im > > >> pl.java:25) > > >> at > > java.lang.reflect.Method.invoke(Method.java:324) > > >> at > > >> > > > >org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUti > > >ls > > >> .java:1789) > > >> at > > >> > > > >org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUti > > >ls > > >> .java:1684) > > >> at > > >> > > > >org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.jav > > >a: > > >> 1713) > > >> at > > >> > > > >org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019) > > >> at > > >> > > > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) > > >> > > >> I had been looking at the struts documentation, > > and i dont know if it > > >is > > >> something related with validation... > > >> > > >> any ideas? > > >> > > >> Thanks > > >> Carlos > > >> > > >> Wouter Zoons wrote: > > >> > > >> > I'm testing this now .. I'll commit it if it > > works > > >> > > > >> > thanks for the feedback! > > >> > -- Wouter > > >> > > > >> > Carlos Cuenca wrote: > > >> > > > >> >> ...either with float, I had rewrite the > > function to this one... > > >and > > >> >> it works! ... > > >> >> > > >> >> public String handleGetResetValue() > > >> >> { > > >> >> final String name = getName(); > > >> >> final String type = > > getType().getFullyQualifiedName(); > > >> >> if > > (String.class.getName().equals(type)) return "\"" > + > > >> >> name + "-test" + "\""; > > >> >> if > > (Boolean.class.getName().equals(type)) return "new > > >> >> java.lang.Boolean(\"false\")"; > > >> >> if > > (java.util.Date.class.getName().equals(type)) > return > > "new > > >> >> java.util.Date()"; > > >> >> if > > (java.sql.Date.class.getName().equals(type)) > return > > "new > > >> >> java.sql.Date()"; > > >> >> if > > (java.lang.Float.class.getName().equals(type)) > > return > > >"new > > >> >> java.lang.Float(0.0)"; > > >> >> > > >> >> //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" + "\""; > > >> >> } > > >> >> > > >> >> > > >> >> Martin West wrote: > > >> >> > > >> >>> Just looked at your original problem > > >> >>> > > >> >>> the super.setActivo is not defined to take > a > > boolean. May Chad to > > >> >>> respond to this. > > >> >>> > > >> >>> On Mon, 2004-08-02 at 13:05, Carlos Cuenca > > wrote: > > >> >>> > > >> >>> > > >> >>>> 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\Altaproducto02GuardaActio > > >nF > > >> orm.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: > > >22 > > >> 8: > > >> >>>>> 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: > > >22 > > >> 8: > > >> >>>>>> 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 > > > > > > > > > > > --------------------------------------------------------------------------- > > Walter Itamar Mourăo - Diretor de Tecnologia e > > Projetos - Arcadian S/A > > www.arcadian.com.br > > > > > > > > --__--__-- > > > > Message: 2 > > Reply-To: <[EMAIL PROTECTED]> > > From: "Wouter Zoons" <[EMAIL PROTECTED]> > > To: "=?iso-8859-1?Q?'Walter_Mour=E3o'?=" > > <[EMAIL PROTECTED]> > > Cc: "'Carlos Cuenca'" <[EMAIL PROTECTED]>, > > <[EMAIL PROTECTED]>, > > "'andromda-user'" > > <[EMAIL PROTECTED]> > > Subject: RE: [Andromda-user] BPM4Struts & Date > > Parameters > > Date: Tue, 3 Aug 2004 22:35:20 +0200 > > > > I like your implementation, I will enhance it by > > taking the 'format' > > tagged value into account or using a default value > > otherwise > > (dd/MM/yyyy) > > > > Thanks dude > > -- Wouter > > > > > -----Original Message----- > > > From: Walter Mour=E3o > > [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 03, 2004 10:32 PM > > > To: [EMAIL PROTECTED] > > > Cc: 'Carlos Cuenca'; > > [EMAIL PROTECTED]; 'andromda-user' > > > Subject: Re: [Andromda-user] BPM4Struts & Date > > Parameters > > >=20 > > > I customized the form templates to handle dates. > > >=20 > > > Template code: > > > ... > > > #elseif($field.type.fullyQualifiedName =3D=3D > > "java.util.Date") > > >=20 > > > public void > > ${field.setterName}(java.lang.String $fieldName) > > > { > > > try{ > > > #if($field.type.name.endsWith("date")) > > > this.$fieldName =3D > $fieldName=3D=3Dnull > > || > > > ${fieldName}.trim().equals("")?null:new > > > > > > java.text.SimpleDateFormat("dd/MM/yyyy").parse($fieldName); > > > #elseif($field.type.name.endsWith("time")) > > > this.$fieldName =3D > $fieldName=3D=3Dnull > > || > > > ${fieldName}.trim().equals("")?null:new > > > > > > java.text.SimpleDateFormat("hh:mm").parse($fieldName); > > > #else > > > this.$fieldName =3D > $fieldName=3D=3Dnull > > || > > > ${fieldName}.trim().equals("")?null:new > > > java.text.SimpleDateFormat("dd/MM/yyyy > > hh:mm").parse($fieldName); > > > #end > > > } > > > catch(java.text.ParseException e){ > > > throw new RuntimeException(e); > > > } > > > } > > >=20 > > > public java.lang.String > ${field.getterName}() > > > { > > > #if($field.type.name.endsWith("date")) > > > return this.$fieldName=3D=3Dnull?null:new > > > > > > java.text.SimpleDateFormat("dd/MM/yyyy").format(this.$fieldName); > > > #elseif($field.type.name.endsWith("time")) > > > return this.$fieldName=3D=3Dnull?null:new > > > > > > java.text.SimpleDateFormat("hh:mm").format(this.$fieldName); > > > #else > > > return this.$fieldName=3D=3Dnull?null:new > > > java.text.SimpleDateFormat("dd/MM/yyyy > > hh:mm").format(this.$fieldName); > > > #end > > > } > > >=20 > > > public void > > ${field.setterName}AsDate(java.util.Date > $fieldName) > > > { > > > this.$fieldName =3D $fieldName; > > > } > > >=20 > > > public $fieldType > ${field.getterName}AsDate() > > > { > > > return this.$fieldName; > > > } > > > ... > > >=20 > > > generated code: > > > ... > > > public void setTxtPeridoDe(java.lang.String > > txtPeridoDe) > > > { > > > try{ > > > this.txtPeridoDe =3D > > txtPeridoDe=3D=3Dnull || > > > txtPeridoDe.trim().equals("")?null:new > > > > > > java.text.SimpleDateFormat("dd/MM/yyyy").parse(txtPeridoDe); > > > } > > > catch(java.text.ParseException e){ > > > throw new RuntimeException(e); > > > } > > > } > > >=20 > > > public java.lang.String getTxtPeridoDe() > > > { > > > return this.txtPeridoDe=3D=3Dnull?null:new > > > > > > java.text.SimpleDateFormat("dd/MM/yyyy").format(this.txtPeridoDe); > > > } > > >=20 > > > public void > > setTxtPeridoDeAsDate(java.util.Date txtPeridoDe) > > > { > > > this.txtPeridoDe =3D txtPeridoDe; > > > } > > >=20 > > > public java.util.Date getTxtPeridoDeAsDate() > > > { > > > return this.txtPeridoDe; > > > } > > >=20 > > > ... > > >=20 > > > I hope it helps... > > >=20 > > > Walter > > >=20 > > > <[EMAIL PROTECTED]> grava: > > > >Hmm.. I'm on it right now.. it's probably a > type > > mismatch, I'm not > > sure > > > >if Struts can handle Dates (I assume it did > > before because I used it > > > >with AndroMDA 2) > > > > > > > >-- Wouter > > > > > > > >> -----Original Message----- > > > >> From: Carlos Cuenca > > [mailto:[EMAIL PROTECTED] > > > >> Sent: Tuesday, August 03, 2004 10:04 PM > > > >> To: [EMAIL PROTECTED]; > > andromda-user > > > >> Subject: Re: [Andromda-user] BPM4Struts & > Date > > Parameters > > > >> > > > >> ...Hi again... > > > >> > > > >> I had been doing some test with the Date and > > Float parameters and I > > > >had > > > >> found the following: > > > >> -there was not any problem with the boolean > nor > > float conversions. > > > >> -My error started when I tried to set the > type > > of parameter like > > float > > > >> ,since that datatype is not loaded on the > > default.xmi. I think > > that > > > >it > > > >> should be included. (Currently there is only > a > > Float) > > > >> -On the other hand and with dates, I am still > > using the lines: (I > > have > > > >> to build everything for testing..) > > > >> if > > (java.util.Date.class.getName().equals(type)) > return > > "new > > > >> java.util.Date()"; > > > >> if > (java.sql.Date.class.getName().equals(type)) > > return "new > > > >> java.sql.Date()"; > > > >> > > > >> and I get the model compiling, but when I > > deploy it I get a error: > > > >> > > > >> 21:44:12,555 ERROR [Engine] > > StandardWrapperValve[action]: > > > >> Servlet.service() for servlet action threw > > exception > > > >> javax.servlet.ServletException: > > BeanUtils.populate > > > >> at > > > >> > > > org.apache.struts.util.RequestUtils.populate(RequestUtils.java:490) > > > >> at > > > >> > > > > > > >org.apache.struts.action.RequestProcessor.processPopulate(RequestProces > > s > > > >or > > > >> .java:798) > > > >> at > > > >> > > > > > > >org.apache.struts.action.RequestProcessor.process(RequestProcessor.java > > : > > > >20 > > > >> 5) > > > >> at > > > >> > > > > > > >org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158) > > > >> at > > > >> > > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) > > > >> at > > > > > > >javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > > > >> at > > > > > > >javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > > >> 21:44:12,555 ERROR [Engine] ----- Root Cause > > ----- > > > >> java.lang.IllegalArgumentException: argument > > type mismatch > > > >> at > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > Method) > > > >> at > > > >> > > > > > > >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja > > v > > > >a: > > > >> 39) > > > >> at > > > >> > > > > > > >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso > > r > > > >Im > > > >> pl.java:25) > > > >> at > > java.lang.reflect.Method.invoke(Method.java:324) > > > >> at > > > >> > > > > > > >org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUt > > i > > > >ls > > > >> .java:1789) > > > >> at > > > >> > > > > > > >org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUt > > i > > > >ls > > > >> .java:1684) > > > >> at > > > >> > > > > > > >org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.ja > > v > > > >a: > > > >> 1713) > > > >> at > > > >> > > > > > > >org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019) > > > >> at > > > >> > > > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) > > > >> > > > >> I had been looking at the struts > documentation, > > and i dont know if > > it > > > >is > > > >> something related with validation... > > > >> > > > >> any ideas? > > > >> > > > >> Thanks > > > >> Carlos > > > >> > > > >> Wouter Zoons wrote: > > > >> > > > >> > I'm testing this now .. I'll commit it if > it > > works > > > >> > > > > >> > thanks for the feedback! > > > >> > -- Wouter > > > >> > > > > >> > Carlos Cuenca wrote: > > > >> > > > > >> >> ...either with float, I had rewrite the > > function to this one... > > > >and > > > >> >> it works! ... > > > >> >> > > > >> >> public String handleGetResetValue() > > > >> >> { > > > >> >> final String name =3D getName(); > > > >> >> final String type =3D > > getType().getFullyQualifiedName(); > > > >> >> if > > (String.class.getName().equals(type)) return > > "\"" + > > > >> >> name + "-test" + "\""; > > > >> >> if > > (Boolean.class.getName().equals(type)) return "new > > > >> >> java.lang.Boolean(\"false\")"; > > > >> >> if > > (java.util.Date.class.getName().equals(type)) > return > > "new > > > >> >> java.util.Date()"; > > > >> >> if > > (java.sql.Date.class.getName().equals(type)) > return > > "new > > > >> >> java.sql.Date()"; > > > >> >> if > > (java.lang.Float.class.getName().equals(type)) > > return > > > >"new > > > >> >> java.lang.Float(0.0)"; > > > >> >> > > > >> >> //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 =3D > > constructArray(); > > > >> >> if (getType().isArrayType()) return > > array; > > > >> >> if (getType().isCollectionType()) > > return > > > >> >> "java.util.Arrays.asList(" + array + ")"; > > > >> >> > > > >> >> return "\"" + name + "-test" + > "\""; > > > >> >> } > > > >> >> > > > >> >> > > > >> >> Martin West wrote: > > > >> >> > > > >> >>> Just looked at your original problem > > > >> >>> > > > >> >>> the super.setActivo is not defined to > take > > a boolean. May Chad > > to > > > >> >>> respond to this. > > > >> >>> > > > >> >>> On Mon, 2004-08-02 at 13:05, Carlos > Cuenca > > wrote: > > > >> >>> > > > >> >>> > > > >> >>>> 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\Altaproducto02GuardaActi > > o > > > >nF > > > >> orm.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 > > : > > > >22 > > > >> 8: > > > >> >>>>> 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 =3D getName(); > > > >> >>>>> final String type =3D = > > 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 =3D > > 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 =3D 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 > > : > > > >22 > > > >> 8: > > > >> >>>>>> 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 =3D getName(); > > > >> >>>>>> final String type =3D = > > 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 =3D > > 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 > > >=20 > > >=20 > > >=20 > > >=20 > > > > > > ------------------------------------------------------------------------ > > -- > > > - > > > Walter Itamar Mour=E3o - Diretor de Tecnologia e > > Projetos - Arcadian = > > S/A > > > www.arcadian.com.br > > > > > > > > > > --__--__-- > > > > _______________________________________________ > > Andromda-user mailing list > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/andromda-user > > > > > > End of Andromda-user Digest > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by Shop4tech.com-Lowest > > price on Blank Media > > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic > DVD+R > > for only $33 > > Save 50% off Retail on Ink & Toner - Free Shipping > > and Free Gift. > > > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > > _______________________________________________ > > Andromda-user mailing list > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/andromda-user > > > > ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user