Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-30 Thread Dave Newton
On Fri, Sep 30, 2011 at 11:21 AM, Carl Ballantyne wrote: > I had a User-conversion.properties file in the same package as the > User.java > file. However when the project was being built with maven it was not > copying > over the .properties files from the src/main/java folder. I opted to put it >

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-30 Thread Carl Ballantyne
over the properties files to the target folder and the converters would be run. I thought the M2e WTP Plugin would only use my pom.xml settings. On Thu, Sep 22, 2011 at 2:02 PM, Carl Ballantyne wrote: > Okay same problem back again. It seems to happen after I have done a clean > with

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-22 Thread Carl Ballantyne
Okay same problem back again. It seems to happen after I have done a clean with Maven. The custom converters are not being run. *scratches head* I have done a maven install without running the tests to make sure all classes have been compiled. On Thu, Sep 22, 2011 at 9:56 AM, Carl Ballantyne

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-22 Thread Carl Ballantyne
It seems to have fixed itself overnight without me changing anything. I can in this morning and now the converters are being run for the unit tests. Hm as long as it is passing all good. On Wed, Sep 21, 2011 at 7:25 PM, Maurizio Cucchiara wrote: > Does Maven Snapshot section [1] answer y

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Maurizio Cucchiara
> option. > > I also noticed I am using spring beans as the converters. Not sure if this > makes a difference. So for example in the conversion properties file I have > something like roles=rolesConverter. And rolesConverter is a spring bean. > > I will try some more tomorrow a

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Miguel Almeida
On Wed, 2011-09-21 at 17:55 +0200, Carl Ballantyne wrote: > How can I try the nightly build if using Maven? I do not see it listed as an > option. Would be nice if Struts released SNAPSHOT versions into maven. Does it? > > Be aware that you can write your test as follow: > > > > public void t

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Carl Ballantyne
I am using 2.2.3. How can I try the nightly build if using Maven? I do not see it listed as an option. I also noticed I am using spring beans as the converters. Not sure if this makes a difference. So for example in the conversion properties file I have something like roles=rolesConverter. And

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Maurizio Cucchiara
wrote: > Hi All, > > I have an action that I am trying to unit test. However it seems the > converters I have set for the User object that is being create by the action > are not being applied at all when running the unit test. The converters are > run when running the application.

Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Carl Ballantyne
Hi All, I have an action that I am trying to unit test. However it seems the converters I have set for the User object that is being create by the action are not being applied at all when running the unit test. The converters are run when running the application. For example I have a test class

Using both custom converters and declarative validation with struts 2

2009-02-17 Thread Raul Arabaolaza Barquin
Hi, I´m currently evaluating Struts 2 and i have some problems when mixing custom converters and declarative validation. I´ve a Person class like this: public class Person { private String nombre; private Person padre; public String getNombre

Re: Possible to unit test actions through type converters?

2008-03-30 Thread Jeromy Evans
t tests that do this in Struts or XWork though. It'll be horrible to setup but once complete you'll be able to reuse it. Karr, David wrote: This might be a violation of pure "unit test" guidelines, but is it practical to test an action such that the type converters for pr

Possible to unit test actions through type converters?

2008-03-29 Thread Karr, David
This might be a violation of pure "unit test" guidelines, but is it practical to test an action such that the type converters for properties are automatically executed, just like they would normally? It's nice that actions are plain POJOs, but I wonder if it's practical to te

Annotations for additional properties for type converters?

2008-03-29 Thread Karr, David
I don't necessarily need this, but is it possible to add annotations to "TypeConversion" to configure properties of the type converter? It's nice to be able to define type converters in annotations, but you could achieve some more reuse of type converters if they were more c

Re: Type converters: convertToString not called

2008-01-31 Thread ravi_eze
ich have the option to call the converter or >> not. In the case of rendering content, the option chosen by the >> designers is not to call the converter and call toString() instead. >> Check out this bug report https://issues.apache.org/struts/browse/WW-2047 >> for more detail

Re: Type converters: convertToString not called

2008-01-31 Thread ravi_eze
t; report https://issues.apache.org/struts/browse/WW-2047 for more details. > > I asked a question about this: > (http://www.nabble.com/Struts-framework-design-question%3A-Type-Converters-and-Tags-to15019888.html) > > > ...and it seems like a community generated patch is probably the

Re: Type converters: convertToString not called

2008-01-31 Thread ravi_eze
t; report https://issues.apache.org/struts/browse/WW-2047 for more details. > > I asked a question about this: > (http://www.nabble.com/Struts-framework-design-question%3A-Type-Converters-and-Tags-to15019888.html) > > > ...and it seems like a community generated patch is probably the

Re: Type converters: please help!!! :(

2008-01-31 Thread ravi_eze
any help? had any one encountered a similar situation. i am pasting thelink straight to the problem so that u need not navigate throught the discussion threads to locate it. http://www.nabble.com/Type-converters%3A-convertToString-not-called-to15034925.html any help would be great. regards

Re: Type converters: please help!!! :(

2008-01-28 Thread ravi_eze
} > > > > > mgainty wrote: >> >> Hi Ravi- >> >> Could you display your code for your StrutsTypeConverter class please >> >> M- >> - Original Message - >> From: "ravi_eze" <[EMAIL PROTECTED]> >> To: >&

Re: Type converters: convertToString not called

2008-01-28 Thread jimski
ework-design-question%3A-Type-Converters-and-Tags-to15019888.html) ...and it seems like a community generated patch is probably the only way forward at this point. I started looking into it, but my day job has been way too busy to give me any time to actually code a patch. There's also a ques

Re: Type converters: please help!!! :(

2008-01-28 Thread Dave Newton
--- ravi_eze <[EMAIL PROTECTED]> wrote: > public class newLongConverter extends StrutsTypeConverter { > public Object convertFromString(Map context, String[] values, Class > toClass) { > if (null == values || values.length == 0 || values[0]==null || > values[0].trim().length()==

Re: Type converters: please help!!! :(

2008-01-27 Thread ravi_eze
gt; > M- > - Original Message - > From: "ravi_eze" <[EMAIL PROTECTED]> > To: > Sent: Friday, January 25, 2008 12:58 AM > Subject: RE: Type converters: please help!!! :( > > >> >> Thank you Jeff for the reply. >> >> d

Re: Type converters: please help!!! :(

2008-01-25 Thread Martin Gainty
Hi Ravi- Could you display your code for your StrutsTypeConverter class please M- - Original Message - From: "ravi_eze" <[EMAIL PROTECTED]> To: Sent: Friday, January 25, 2008 12:58 AM Subject: RE: Type converters: please help!!! :( > > Thank you Jeff for the rep

RE: Type converters: please help!!! :(

2008-01-24 Thread ravi_eze
day, January 24, 2008 11:45 PM > To: user@struts.apache.org > Subject: Type converters: please help!!! :( > > > hi, > > i badly need the solution to this problem. i had posted this issue on > xwork > forums, struts fourms previously also, but hardluck: no reply :( >

RE: Type converters: please help!!! :(

2008-01-24 Thread Jeff Hill (RR)
you indicate that it's working. So why the long face? ;-) -Original Message- From: ravi_eze [mailto:[EMAIL PROTECTED] Sent: Thursday, January 24, 2008 11:45 PM To: user@struts.apache.org Subject: Type converters: please help!!! :( hi, i badly need the solution to this problem. i h

Type converters: please help!!! :(

2008-01-24 Thread ravi_eze
hy this is > happening this way? or am i missing any thing? please help. > > cheers, > ravi > -- View this message in context: http://www.nabble.com/Type-converters%3A-convertToString-not-called-tp15034925p15080943.html Sent from the Struts - User mailing list archive at Nabble

Type converters: convertToString not called

2008-01-22 Thread ravi_eze
://www.nabble.com/Type-converters%3A-convertToString-not-called-tp15034925p15034925.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Struts framework design question: Type Converters and Tags

2008-01-22 Thread Ted Husted
at kind of > problem one of the major benefits of moving to s2? The type converters are > there explicitly to provide flexibility to the framework so that the > framework designer's assumptions don't end up hamstringing the applications > being written on top of the framework.

Struts framework design question: Type Converters and Tags

2008-01-22 Thread jimski
blem one of the major benefits of moving to s2? The type converters are there explicitly to provide flexibility to the framework so that the framework designer's assumptions don't end up hamstringing the applications being written on top of the framework. Just how difficult would it be f

Re: guice and custom converters

2007-08-16 Thread Oleg Mikheev
Oleg Mikheev wrote: Anyone fought a problem with guice plugin not working with custom converters? I'm working it around by using per field converters instead of global ones, but it's no good. Oleg - To unsubscri

guice and custom converters

2007-08-16 Thread Oleg Mikheev
Hi! Anyone fought a problem with guice plugin not working with custom converters? Thanks, Oleg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Struts 2 - File upload & converters.

2007-04-05 Thread karthik muthukumaraswamy
. You can find the parts related to the fileupload below. It seems I am missing some kind of "converters" that would identify that the property upload in my form is of type "file". Thanks for your help. -Karthik. struts.xml file --- /tiles_jsp/dash_

RE: Issue with registering/lookup of converters in ConvertUtils

2007-02-01 Thread uni
Hi, > I am not able to see the ConvertUtilsBean in the commons-beanutils-1-0.jar > that I am using. Has this class been added in later versions of Struts? It's part of beanutils since version 1.7: http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/ConvertUtilsBean.html >

RE: Issue with registering/lookup of converters in ConvertUtils

2007-02-01 Thread Nitin Paul Dsilva
Hi Thorsten, I am not able to see the ConvertUtilsBean in the commons-beanutils-1-0.jar that I am using. Has this class been added in later versions of Struts? Also, is ConvertUtilsBean a singleton class or can I have multiple instances of it? Or if not, can I register multiple converters for

RE: Issue with registering/lookup of converters in ConvertUtils

2007-02-01 Thread uni
specific converters. If you try it out, please tell us if it works ;) Cheers, Thorsten Zitat von Nitin Paul Dsilva <[EMAIL PROTECTED]>: > We too tried with the registering/deregistering of locale specific > converters. Apart from the bad performance, this will also result in > interfere

RE: Issue with registering/lookup of converters in ConvertUtils

2007-01-31 Thread Nitin Paul Dsilva
We too tried with the registering/deregistering of locale specific converters. Apart from the bad performance, this will also result in interference if the time of lookup that one session performs happens just after the registering of the other session's converters. We are looking at the o

RE: Issue with registering/lookup of converters in ConvertUtils

2007-01-31 Thread Thorsten Schäfer
mmons guys for a solution!? One possible workaround is to register locale specific converters always before they are used - however, this is quite ugly and should have a bad performance. Maybe you take a look into the implementation and find another workaround. Cheers, Thorsten > -Original

RE: Issue with registering/lookup of converters in ConvertUtils

2007-01-31 Thread Nitin Paul Dsilva
help if we move onto a higher version of Struts? Regards, Nitin -Original Message- From: Thorsten Schäfer [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 31, 2007 10:00 PM To: 'Struts Users Mailing List' Subject: RE: Issue with registering/lookup of converters in ConvertUtils

RE: Issue with registering/lookup of converters in ConvertUtils

2007-01-31 Thread Thorsten Schäfer
Hi, > Is there a problem with the registering/lookup of multiple converters in > ConvertUtils on a single server instance? I think this is not possible. The converters are stored in a static hashmap, so all classes sharing a single classloader have to use the same converters. I consider

Issue with registering/lookup of converters in ConvertUtils

2007-01-31 Thread Nitin Paul Dsilva
Hi, Is there a problem with the registering/lookup of multiple converters in ConvertUtils on a single server instance? The issue I am facing is the interference of the converters registered by 2 users having different number formats on a single server instance. The number converter that is

RE: custom date converters

2005-09-03 Thread Rivka Shisman
Hubert, Laurie & Joe - thanks a lot for the info! Rivka -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Thursday, September 01, 2005 11:41 PM To: Struts Users Mailing List Subject: Re: custom date converters (with slow music playing in background) On 9/

Re: custom date converters

2005-09-01 Thread Hubert Rabago
(with slow music playing in background) On 9/1/05, Joe Germuska <[EMAIL PROTECTED]> wrote: > At 4:32 PM -0400 9/1/05, Laurie Harper wrote: > >You can register an instance of Converter that knows what > >format string to use each time you call copyProperties(). > > However, if you have one bean

Re: custom date converters

2005-09-01 Thread Laurie Harper
application? As much as I know - copyProperties() is a static method of BeanUtils so I'm don't really know where (if at all) BeanUtils is instanciated. Thanks Rivka You can register specific converters per call to copyProperties() to get the one you need in a particular situation. Here&#

Re: custom date converters

2005-09-01 Thread Joe Germuska
the converter applies thru my all application? As much as I know - copyProperties() is a static method of BeanUtils so I'm don't really know where (if at all) BeanUtils is instanciated. Thanks Rivka You can register specific converters per call to copyProperties() to get the one you

RE: custom date converters

2005-09-01 Thread Rivka Shisman
Users Mailing List Subject: Re: custom date converters At 3:27 PM +0200 9/1/05, Rivka Shisman wrote: >Hi friends > > > >I'm not sure I understand the use of custom converters: > > > >If for example I have 2 VO's and each has a Timestamp property. But - >each o

Re: custom date converters

2005-09-01 Thread Joe Germuska
At 3:27 PM +0200 9/1/05, Rivka Shisman wrote: Hi friends I'm not sure I understand the use of custom converters: If for example I have 2 VO's and each has a Timestamp property. But - each one takes a different date format from the user. Do I need a different StringToTimestamp con

custom date converters

2005-09-01 Thread Rivka Shisman
Hi friends I'm not sure I understand the use of custom converters: If for example I have 2 VO's and each has a Timestamp property. But - each one takes a different date format from the user. Do I need a different StringToTimestamp converter for each one? If yes

Re: Struts converters

2004-12-21 Thread Joe Germuska
uts to commons-beanutils. I'm not sure what original design decisions went into not using PropertyEditors in beanutils, but I do find Converters much simpler to implement than PropertyEditors! It's probably a fair request to ask that BeanUtils honor PropertyEditors where they are defi

Re: Struts converters

2004-12-20 Thread Craig McClanahan
On Tue, 21 Dec 2004 10:15:26 +0530, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > A new chapter from a Struts book has been posted to TSS. It seems > that the solution for automatic conversion and formatting is already there > in the form of java bean PropertyEditors. > The Proper

Struts converters

2004-12-20 Thread mohan.radhakrishnan
Hi, A new chapter from a Struts book has been posted to TSS. It seems that the solution for automatic conversion and formatting is already there in the form of java bean PropertyEditors. Why isn't Struts ( Shale ? ) proposing the use of PropertyEditors ( like Spring )? Is it too much chan

Re: converters

2004-09-22 Thread Craig McClanahan
Struts does use BeanUtils, but it doesn't have any concept of converters like JSF. This is why Struts wants you to use string properties in form beans, and it's also why JSF doesn't need the form bean concept. Craig On Tue, 21 Sep 2004 15:53:03 -0400, Jesse Vitrone <[EMAIL

RE: converters

2004-09-21 Thread Robert Taylor
OTECTED] > Subject: converters > > > Hi all - >JSF has the concept of a converter, does struts have anything like that? > > Thanks, > Jesse > > - > To unsubscribe, e-mail: [EMAIL P

converters

2004-09-21 Thread Jesse Vitrone
Hi all - JSF has the concept of a converter, does struts have anything like that? Thanks, Jesse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]