Re: Conversion error message

2025-03-12 Thread Prasanth Pasala
exposes any conversion errors for a given field. It doesn't override anything. If you want to define a different message, using .properties file is the solution. https://struts.apache.org/core-developers/type-conversion.html#type-conversion-error-handling Regards Łukasz

Re: Conversion error message

2025-03-11 Thread Lukasz Lenart
pon., 10 mar 2025 o 18:10 Prasanth napisał(a): > com.opensymphony.xwork2.validator.annotations.ConversionErrorFieldValidator > Are we supposed to use this annotation for a method to override the > default validator? > This annotation only exposes any conversion errors for a giv

Re: Conversion error message

2025-03-10 Thread Lukasz Lenart
śr., 5 mar 2025 o 16:21 Prasanth napisał(a): > They are, see below. > > Ok, that should do the trick Should I not be using > com.opensymphony.xwork2.validator.annotations.ConversionErrorFieldValidator > to set the message. This is not the class in > com.opensymphony.xwork2.validator.validators w

Re: Conversion error message

2025-03-05 Thread Prasanth
ckage"/folder as the Java class, see this example https://github.com/apache/struts-examples/blob/main/type-conversion/src/main/java/org/apache/struts/example/NumberAction.java https://github.com/apache/struts-examples/blob/main/type-conversion/src/main/resources/org/apache/stru

Re: Conversion error message

2025-03-04 Thread Lukasz Lenart
st be in the same "package"/folder as the Java class, see this example https://github.com/apache/struts-examples/blob/main/type-conversion/src/main/java/org/apache/struts/example/NumberAction.java https://github.com/apache/struts-examples/blob/main/type-conversion/src/main/resources/org

Re: Conversion error message

2025-03-04 Thread Prasanth
, Prasanth On 3/4/25 9:44 AM, Lukasz Lenart wrote: pon., 3 mar 2025 o 23:32 Prasanth  napisał(a): Hi, I have a custom message for conversion error as below. But the webpage is showing this and the default struts message. How do I suppress the struts default message? I am using Struts 6.7.0

Re: Conversion error message

2025-03-04 Thread Prasanth Pasala
2025 o 23:32 Prasanth napisał(a): Hi, I have a custom message for conversion error as below. But the webpage is showing this and the default struts message. How do I suppress the struts default message? I am using Struts 6.7.0 @ConversionErrorFieldValidator(fieldName = "retiremen

Re: Conversion error message

2025-03-04 Thread Lukasz Lenart
pon., 3 mar 2025 o 23:32 Prasanth napisał(a): > > Hi, > > I have a custom message for conversion error as below. But the webpage is > showing this and the default struts message. How do I suppress the struts > default message? I am using Struts 6.7.0 > > @Conve

Conversion error message

2025-03-03 Thread Prasanth
Hi, I have a custom message for conversion error as below. But the webpage is showing this and the default struts message. How do I suppress the struts default message? I am using Struts 6.7.0     @ConversionErrorFieldValidator(fieldName = "retirementDate",  message = "Inval

Re: How to apply an Action conversion annotation for individual object field?

2022-03-05 Thread Burton Rhodes
do I specify just the individual "emailQueueStates" parameter > > instead of the entire SearchCriteriaEmailQueue class? > > Without polluting the model it won't work, I would suggest using > struts-conversion.properties for such kind of conversion > > &

Re: How to apply an Action conversion annotation for individual object field?

2022-03-04 Thread Lukasz Lenart
chCriteriaEmailQueue searchCriteria;* > > */// code omitted* > *}* > > > How do I specify just the individual "emailQueueStates" parameter > instead of the entire SearchCriteriaEmailQueue class? Without polluting the model it won't work, I would suggest using str

How to apply an Action conversion annotation for individual object field?

2022-02-28 Thread Burton Rhodes
I am attempting to convert my [action]-conversion.properties files to annotations and I having difficulty figuring out how to migrate this entry: *"searchCriteria.emailQueueStates=com.afs.web.common.struts.converter.MyStringToCollectionConverter"* into an @annotation for the action class below..

Re: Fwd: Type conversion collection with interface type elements

2018-04-06 Thread Yasser Zamani
t;. > > Once more, thank you. You're welcome :) glad to hear this. However, I think it's better that Struts honor .properties file (where element class has been defined strictly by user) before the generic parametrics [1]. Could you please register an issue at [2] with title "conve

Re: Fwd: Type conversion collection with interface type elements

2018-04-05 Thread Nuno Oliveira
er Zamani wrote: > [copy with removed links to avoid detection as spam] > > > Forwarded Message ---- > Subject: Re: Type conversion collection with interface type elements > Date: Thu, 5 Apr 2018 13:02:01 + > From: Yasser Zamani > Reply-To: Struts Users Mai

Fwd: Type conversion collection with interface type elements

2018-04-05 Thread Yasser Zamani
[copy with removed links to avoid detection as spam] Forwarded Message Subject: Re: Type conversion collection with interface type elements Date: Thu, 5 Apr 2018 13:02:01 + From: Yasser Zamani Reply-To: Struts Users Mailing List To: user@struts.apache.org On 4/4/2018

Re: Type conversion collection with interface type elements

2018-04-05 Thread Yasser Zamani
On 4/4/2018 7:20 PM, Nuno Oliveira wrote: > Hi, > > I am having problems populating an action variable Set by request using > struts type conversion if the Set has the element type defined as an > interface. > I have a UserAction-conversion.properties file with the followi

Type conversion collection with interface type elements

2018-04-04 Thread Nuno Oliveira
Hi, I am having problems populating an action variable Set by request using struts type conversion if the Set has the element type defined as an interface. I have a UserAction-conversion.properties file with the following configuration using the class implementation: KeyProperty_roles=id

RE: Conversion Error Interceptor prevent errors for empty values

2018-02-15 Thread Paul Zepernick
. Zepernick Sr. Programmer Analyst HealthSmart Benefit Solutions -Original Message- From: Yasser Zamani [mailto:yasser.zam...@live.com] On Behalf Of Yasser Zamani Sent: Wednesday, February 14, 2018 11:41 AM To: user@struts.apache.org Subject: Re: Conversion Error Interceptor prevent errors

Re: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Yasser Zamani
On 2/14/2018 5:13 PM, Paul Zepernick wrote: > Yes, I have it happening on 2.5.14.1. I have a select box pointing at a > Integer like this: auditForm.incorrectAuditReason.id I am using the rest > plugin which is including it in the stack. I have attached the source from > Maven. Where is th

RE: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Paul Zepernick
Trying the attachment again as a txt Paul R. Zepernick Sr. Programmer Analyst HealthSmart Benefit Solutions -Original Message- From: Paul Zepernick [mailto:paul.zepern...@healthsmart.com] Sent: Wednesday, February 14, 2018 8:44 AM To: user@struts.apache.org Subject: RE: Conversion Error

RE: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Paul Zepernick
Solutions -Original Message- From: Yasser Zamani [mailto:yasser.zam...@live.com] On Behalf Of Yasser Zamani Sent: Wednesday, February 14, 2018 4:25 AM To: user@struts.apache.org Subject: Re: Conversion Error Interceptor prevent errors for empty values On 2/13/2018 8:06 PM, Paul

Re: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Yasser Zamani
> I am trying to prevent the field error from happening in this case. It > looks like it should not be happening according to the docs: > https://struts.apache.org/core-developers/conversion-error-interceptor.html , > or am I not understanding what it is saying here: > >

Conversion Error Interceptor prevent errors for empty values

2018-02-13 Thread Paul Zepernick
://struts.apache.org/core-developers/conversion-error-interceptor.html , or am I not understanding what it is saying here: "This interceptor extends ConversionErrorInterceptor but only adds conversion errors from the ActionContext to the field errors of the action if the field value is not

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-04 Thread sreekanth
thanks Yasser for all you help and code. I would like to conclude this as a struts2 upgrade change, as BigDecimal field value was setting as BigDecimal.ZERO when field value passed as empty in struts2.5.10.x or < whereas 2.5.13 will set such empty BigDecimal field as null value (that is the correc

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-04 Thread Lukasz Lenart
pty String to BigDecimal means you want to have "null" - there is no default value as for primitives (0 for int, false for boolean, etc). I would rather add a required validator upfront instead of changing the conversion logic. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-04 Thread Yasser Zamani
instead (see also [2]): ```java @override protected Object convertToBigDecimal(context,value) { String strValue = String.valueOf(value); if(null==value || strValue.isNullOrEmpty()) strValue="0"; return super.convertToBigDecimal(context,strValue); } ``` Hope these help! Ya

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-04 Thread sreekanth
thanks Yasser, let me setup a sample too. I already went through fixes introduced at WW-4581 as well and ran a test against it and found that's not the reason for this behavior rather something related to form field binding. Here i'm adding your finding which i too believe the root cause for this

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/4/2017 9:19 AM, sreekanth wrote: > thanks Yasser, that info was great, so do you think so the way struts2 binds > BigDecimal changed between these two versions ? I found the difference at [1]. That is in order to fix WW-4581 [2]. [1] https://gitbox.apache.org/repos/asf?p=struts.git;a=com

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread sreekanth
thanks Yasser, that info was great, so do you think so the way struts2 binds BigDecimal changed between these two versions ? and also if possible kindly share your sample project in github so that i can fork it and check myself faster. -- Sent from: http://struts.1045723.n5.nabble.com/Struts-Use

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/4/2017 8:07 AM, sreekanth wrote: > thanks Yasser, may i know with which version of struts you have tested it > 2.5.10.1 or 2.5.13 ? > 2.5.13. But now I also tested 2.5.10.1 and get following warn when try to set empty string value to a BigDecimal: Unexpected Exception caught setting 'my

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread sreekanth
thanks Yasser, may i know with which version of struts you have tested it 2.5.10.1 or 2.5.13 ? -- Sent from: http://struts.1045723.n5.nabble.com/Struts-User-f3426046.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/3/2017 10:33 PM, sreekanth wrote: > Thanks Yasser, if my previous doubts get cleared then probably i can assume > there is behavioral change in binding empty value. If thats not the case > then will try to replicate as you have mentioned. > In my yesterday test application, empty string v

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread sreekanth
Thanks Yasser, if my previous doubts get cleared then probably i can assume there is behavioral change in binding empty value. If thats not the case then will try to replicate as you have mentioned. -- Sent from: http://struts.1045723.n5.nabble.com/Struts-User-f3426046.html ---

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread sreekanth
Hi Lukasz, what bothering me is, we haven't changed this particular jsp since an year or more and its working fine till 2.5.10.x. I have the following doubt, if it can be answered then i can assume whats going wrong in my code. What was the behaviour of struts 2.5.10.1 while convert

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/3/2017 9:56 PM, sreekanth wrote: > The value not getting set at all, its coming as null. By the time i will also > see if i can provide some log as you mentioned. > I tested similar action with a list of A where A has two BigDecimals; posted values (myList[x].y] getting set here however

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Lukasz Lenart
2017-10-03 20:03 GMT+02:00 sreekanth : > Thanks Lukasz, can you please point me some wiki page or what change i have > to do to make my existing code working ? Hm... as far I recall there is no special settings, just use format according to user locale, eg.: US locale 1.000,12, DE locale 1 000,12

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread sreekanth
The value not getting set at all, its coming as null. By the time i will also see if i can provide some log as you mentioned. -- Sent from: http://struts.1045723.n5.nabble.com/Struts-User-f3426046.html - To unsubscribe, e-mail:

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/3/2017 8:26 PM, sreekanth wrote: > Hi, > We have a List object which is getting set at JSP (element added > dynamically in front end), while saving this form the object's value for > BigDecimal fields are getting null. > > eg: > > Class A { > String strVal; > BigDecimal drAmt; > BigD

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread sreekanth
Thanks Lukasz, can you please point me some wiki page or what change i have to do to make my existing code working ? -- Sent from: http://struts.1045723.n5.nabble.com/Struts-User-f3426046.html - To unsubscribe, e-mail: user-uns

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Lukasz Lenart
2017-10-03 18:56 GMT+02:00 sreekanth : > Hi, > We have a List object which is getting set at JSP (element added > dynamically in front end), while saving this form the object's value for > BigDecimal fields are getting null. > > eg: > > Class A { > String strVal; > BigDecimal drAmt; > BigDecima

Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread sreekanth
Hi, We have a List object which is getting set at JSP (element added dynamically in front end), while saving this form the object's value for BigDecimal fields are getting null. eg: Class A { String strVal; BigDecimal drAmt; BigDecimal crAmt; } in jsp while we submit the form *strVal*

Re: Can you use type conversion with JSONInterceptor?

2016-12-02 Thread Lukasz Lenart
Super cool, thanks :) 2016-12-02 11:40 GMT+01:00 Miguel Almeida : > Thank you Lukasz! > > I will check if/how we can inject the converter there. If we manage to > get it working in a way that helps the ticket resolution I'll also post > the information there. > > > > On Sex, 2016-12-02 at 09:50 +0

Re: Can you use type conversion with JSONInterceptor?

2016-12-02 Thread Miguel Almeida
Thank you Lukasz! I will check if/how we can inject the converter there. If we manage to get it working in a way that helps the ticket resolution I'll also post the information there. On Sex, 2016-12-02 at 09:50 +0100, Lukasz Lenart wrote: > Hi, > > JSON plugin uses its own conversation mecha

Re: Can you use type conversion with JSONInterceptor?

2016-12-02 Thread Lukasz Lenart
Hi, JSON plugin uses its own conversation mechanism, check JSONPopulator but I think it should be possible to inject XWorkConverter and use it to convert objects - this requires implementing your own JSONPopulator. There is a task to do it so it should happen in Struts 2.5 ;-) https://issues.apac

Can you use type conversion with JSONInterceptor?

2016-12-01 Thread Miguel Almeida
Imagine SearchAction{ private List evaluatedRecords; } Record is an interface so to get auto-wiring to work you'd usually set-up a SearchAction-conversion.properties: KeyProperty_evaluatedRecords=id Element_evaluatedRecords=com.bibliovigilance.model.RecordImpl CreateIfNull_evaluatedRecords=true

Re: Set timezone in jsonwriter for date conversion

2015-11-05 Thread Lukasz Lenart
Yeah, right now it's hard. I think the best option is to write your own JSON result with all the custom stuff you need - JSONWriter & JSONUtil. I'm going to refactor JSON plugin to be more extensible but it won't happen till Struts 2.5. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl

Re: Set timezone in jsonwriter for date conversion

2015-11-04 Thread JOSE L MARTINEZ-AVIAL
Hello, Let me clarify the issue I have. I would like to be able to customize the way the JSON plugin formats the date when converting an objecto to json. Specifically, when I'm returning a JSONResult to a client. In order to do that I need to modify the DateFormatter used by JSONWriter so I can

Set timezone in jsonwriter for date conversion

2015-11-03 Thread JOSE L MARTINEZ-AVIAL
Hello, I'm using Struts 2.3.16.3. I use the json plugin to return information to the client (browser and ios App). The problem I have is that the dates/times are local to my server, and since I have the option to know the client's timezone, I would like to return the date to the client converted

Re: More website doc problems: Type Conversion and Conversion Annotation

2015-08-31 Thread Lukasz Lenart
;> > In order to determine the best way to prompt for and store a >> > javax.mail.internet.InternetAddress, I began researching these pages, >> which >> > are broken to various degrees: >> > >> > https://cwiki.apache.org/confluence/display/WW/Ty

Re: More website doc problems: Type Conversion and Conversion Annotation

2015-08-31 Thread JOSE L MARTINEZ-AVIAL
ddress, I began researching these pages, > which > > are broken to various degrees: > > > > https://cwiki.apache.org/confluence/display/WW/Type+Conversion > > https://cwiki.apache.org/confluence/display/WW/Conversion+Annotation > > > > Both show "Error formatt

Re: More website doc problems: Type Conversion and Conversion Annotation

2015-08-19 Thread Lukasz Lenart
2015-08-19 18:55 GMT+02:00 rgm : > In order to determine the best way to prompt for and store a > javax.mail.internet.InternetAddress, I began researching these pages, which > are broken to various degrees: > > https://cwiki.apache.org/confluence/display/WW/Type+Con

More website doc problems: Type Conversion and Conversion Annotation

2015-08-19 Thread rgm
In order to determine the best way to prompt for and store a javax.mail.internet.InternetAddress, I began researching these pages, which are broken to various degrees: https://cwiki.apache.org/confluence/display/WW/Type+Conversion https://cwiki.apache.org/confluence/display/WW/Conversion

Re: Format Conversion

2015-05-15 Thread Lukasz Lenart
2015-05-15 10:13 GMT+02:00 Dhandapani, Rajeswaran : > Hi All, > > I have the below code to display the cost in currency format and the iterator > iterates over hash map. All the values are displayed inside property tag > except the formatted "value.cost". Could you please help me to fix the > di

Format Conversion

2015-05-15 Thread Dhandapani, Rajeswaran
Hi All, I have the below code to display the cost in currency format and the iterator iterates over hash map. All the values are displayed inside property tag except the formatted "value.cost". Could you please help me to fix the display. Thank you. Rajeswaran D *

Re: Antwort: Re: Problems with type conversion and special characters

2013-10-15 Thread Alessio Matteo
efore printing this email Il 15/10/2013 10:40, Christoph Nenning ha scritto: Thank you so much, I solved the special characters problems by setting the struts i18n constant to ISO-8859-1! About the conversion error, I know it was a dev mode warn

Antwort: Re: Problems with type conversion and special characters

2013-10-15 Thread Christoph Nenning
> > Thank you so much, I solved the special characters problems by setting > the struts i18n constant to ISO-8859-1! > About the conversion error, I know it was a dev mode warning, but when > the exception was thrown every dynamic content in my page disappeard... > Anyway I s

Re: Problems with type conversion and special characters

2013-10-14 Thread Alessio Matteo
Thank you so much, I solved the special characters problems by setting the struts i18n constant to ISO-8859-1! About the conversion error, I know it was a dev mode warning, but when the exception was thrown every dynamic content in my page disappeard... Anyway I solved the issue by declaring

Re: Type conversion on a Map

2012-09-24 Thread Lukasz Lenart
2012/9/21 Miguel Almeida : > Sure! > > Here's a maven project with a failing test case. > > There's actually a map being built, but it's a , and the key > reads "OGNL no conversion possible". Got it working, but I think the main problem is with key value

RE: Type conversion on a Map

2012-09-21 Thread Miguel Almeida
On Fri, 2012-09-21 at 09:04 -0400, Martin Gainty wrote: > a stupid question but i have to ask If you mean "where is the initialisation of simpleMap e.g. simpleMap=new java.util.HashMap();" - it's not there. I don't think you need to, Struts initializes it. (see below) > > public class TypeConve

RE: Type conversion on a Map

2012-09-21 Thread Martin Gainty
ets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Subject: Re: Type conversion on a Map From: mig...@almeida.at To: user@struts.apache.org Date: Fri, 21 Sep 2012 10:31:24 +0100 Sure! Here's a maven project with a failing test case.

Re: Type conversion on a Map

2012-09-20 Thread Lukasz Lenart
Hi, Could you share the unit test as well ? The whole code would be the best :-) Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands

Type conversion on a Map

2012-09-20 Thread Miguel Almeida
Dear all, Considering: 1) the action property Map complexMap; 2) CodeProperty has an int id property How would you configure type conversion and refer to it on the JSP to populate it? I am currently trying the following -conversion configuration: KeyProperty_complexMap=id Element_complexMap

Type Conversion annotation

2012-07-04 Thread Shrinivas Parashar
; } } I would like to specify the @TypeConversion annotation for Name property in the model like below @Conversion public class Person { Bike bike; @TypeConversion(key = "bike.name", converter = "org.apache.struts.helloworld.model.MyConverter")

Re: conversion error repopulation not working

2012-05-31 Thread Łukasz Lenart
I'll add this code as an additional example, but I'm wondering is it a good way to base on fieldErrors as they can be also populated by validators. Maybe adding ConversionAware interface with specific method to populate conversionErrors would be better ? Then I could extend ActionSupport with getF

Re: conversion error repopulation not working

2012-05-31 Thread J. Garcia
This works nicely. Thanks! Cheers, J. On Thu, May 31, 2012 at 3:07 PM, Łukasz Lenart wrote: > Can be reduced to this: > > public String getFormatted(String key, String fieldName, List args) { > if (getFieldErrors().isEmpty()) { > return getText(key, args); > } else { >

Re: conversion error repopulation not working

2012-05-31 Thread Łukasz Lenart
Can be reduced to this: public String getFormatted(String key, String fieldName, List args) { if (getFieldErrors().isEmpty()) { return getText(key, args); } else { return ActionContext.getContext().getValueStack().findString(defaultValue); } } and it wor

Re: conversion error repopulation not working

2012-05-31 Thread Łukasz Lenart
2012/5/31 J. Garcia : > The short-circuiting option sounds good. There could even be a specially > dedicated getText() (or alternative method name) for this scenario, which > should be rather frequent in l10n apps. Not the best solution, but works: and in ExampleAction (or any other base action

Re: conversion error repopulation not working

2012-05-31 Thread Łukasz Lenart
Right now I don't see any bright solution, I think there should be a short-circuit when conversion error occurs to skip evaluating getText() expression and just return what was specified as a key / name property. Regards -- Łukasz mobile +48 606 323 122 http://www.lenart.org.pl/ Warsza

Re: conversion error repopulation not working

2012-05-31 Thread Łukasz Lenart
2012/5/31 J. Garcia : > Ok. Sorry. > Fixed the example to match the real situation. Prepare() will only execute > now if the request is a get method. Ok, looks like a problem is with getText() in jsp but I think there is no other way ... you can use String instead and check for errors in getter/se

Re: conversion error repopulation not working

2012-05-30 Thread Łukasz Lenart
integer. > - modify the integer like this: AAA > - submit. An error msg informing of conversion error is shown. However, the > value AAA is not maintained. Instead, the current bean value is shown. But you use Preparable each time, and prepare overrides what was sent by user. I'm not su

Re: conversion error repopulation not working

2012-05-29 Thread Łukasz Lenart
2012/5/29 J. Garcia : > Integer. Strange, should work. Could you post an example code ? Regards -- Łukasz mobile +48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ - To unsubscri

Re: conversion error repopulation not working

2012-05-29 Thread J. Garcia
Integer. On Mon, May 28, 2012 at 10:04 AM, Łukasz Lenart < lukasz.len...@googlemail.com> wrote: > Is it int either Integer ? > > > Regards > -- > Łukasz > mobile +48 606 323 122 http://www.lenart.org.pl/ > Warszawa JUG conference - Confitura http://confitura.pl/ >

Re: conversion error repopulation not working

2012-05-28 Thread Łukasz Lenart
Is it int either Integer ? Regards -- Łukasz mobile +48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

Re: conversion error repopulation not working

2012-05-25 Thread J. Garcia
obtain is from an input field with conversion error. In such a case, it would obtain the value from the user input. If no error, the value would be from the bean. Does it make sense? Cheers, J. On Thu, May 24, 2012 at 8:10 AM, Łukasz Lenart wrote: > Could you add some code example ? > >

Re: conversion error repopulation not working

2012-05-23 Thread Łukasz Lenart
Could you add some code example ? Regards -- Łukasz mobile +48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For addi

conversion error repopulation not working

2012-05-23 Thread J. Garcia
Hi, In order to implement a good user experience, I am trying to put into practice the conversion validator, as documented here: http://struts.apache.org/2.3.3/docs/conversion-validator.html The ideal would be: a form with one integer field. If the user enters a non valid integer, the value

Re: Struts 2 -Big Decimal auto conversion issue

2012-05-07 Thread George Eapen
Thanx Dave On Sun, May 6, 2012 at 4:56 PM, Dave Newton wrote: > Because it uses the default BigDecimal parsing. > > Options include: > > * Using an interceptor to strip leading/trailing spaces from form elements > before type conversion > * Using a custom type converter th

Re: Struts 2 -Big Decimal auto conversion issue

2012-05-06 Thread Dave Newton
Because it uses the default BigDecimal parsing. Options include: * Using an interceptor to strip leading/trailing spaces from form elements before type conversion * Using a custom type converter that does basically the same thing * Etc. Dave On Sun, May 6, 2012 at 9:53 AM, George Eapen wrote

Struts 2 -Big Decimal auto conversion issue

2012-05-06 Thread George Eapen
Dear All, Big Decimal auto conversion fails when an empty string is received.Excerpt of the stack given below. /-- Encapsulated exception \ java.lang.NoSuchMethodException: com.path.ConvTest.setId([Ljava.lang.String;) at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1206

RE: BigDecimal type conversion

2011-12-19 Thread Biesbrock, Kevin
3:25 PM To: Struts Users Mailing List Subject: Re: BigDecimal type conversion Either a type convertor, or an interceptor that trims everything. d. On Dec 19, 2011 3:23 PM, "Biesbrock, Kevin" wrote: > Our application is rolling with Struts 2.2.1. > > One action class implements Mo

Re: BigDecimal type conversion

2011-12-19 Thread Dave Newton
Either a type convertor, or an interceptor that trims everything. d. On Dec 19, 2011 3:23 PM, "Biesbrock, Kevin" wrote: > Our application is rolling with Struts 2.2.1. > > One action class implements ModelDriven and in the model we have a > Map; where we rolled a custom type > converter for Bus

BigDecimal type conversion

2011-12-19 Thread Biesbrock, Kevin
Our application is rolling with Struts 2.2.1. One action class implements ModelDriven and in the model we have a Map; where we rolled a custom type converter for BusinessObjectA and BusinessObjectB has a BigDecimal. This model has been in production for well over 4 months with no issue; that is

Re: struts2 string to map conversion

2011-12-13 Thread mohan rao
Parameters will returns String[] but not string check out that might be causing the problem. -- View this message in context: http://struts.1045723.n5.nabble.com/struts2-string-to-map-conversion-tp5052114p5060791.html Sent from the Struts - User mailing list archive at Nabble.com

Re: struts2 string to map conversion

2011-12-12 Thread Li Ying
;aKey", "aValue") Unfortunately, the Java generic system don't know the element data type of your Map, so, the data type for [aKey] and [aValue] may be a problem. I suggest you just declare the map as Map, and do the conversion by yourself. All I talked above are not tested, just suggest

Re: struts2 string to map conversion

2011-12-06 Thread Wes Wannemacher
Have you read through this - http://struts.apache.org/2.x/docs/ognl-basics.html The type conversion is generally called automagically. -W On Tue, Dec 6, 2011 at 8:46 AM, cwalet wrote: > any body knows how to use Struts2 TypeConversion(in xwork libs) to > convert a parameter strin

struts2 string to map conversion

2011-12-06 Thread cwalet
any body knows how to use Struts2 TypeConversion(in xwork libs) to convert a parameter string to a hashmap object? I tried this: @TypeConversion(key = "phone", rule = ConversionRule.MAP, converter = "java.lang.String") public void setHmss(HashMap hmso) { this.hmso = hmso; } but no

Re: [S2] Displaying user entered values after failed type conversion while using getText()?

2011-11-17 Thread Li Ying
value] field, and another is , which will send data to the [original input text] field. User can only see the , and input data in it. you can create some JS code, to copy the content to the element, before the form be posted. When the type conversion fails, and the input page displayed again, the

[S2] Displaying user entered values after failed type conversion while using getText()?

2011-11-16 Thread Burton Rhodes
I am having an issue with displaying the original value entered on a form after failed type conversion.  This "bug" is caused by my use of getText() in the form value fields. I'm curious how one solves this issue for making sure the field is formatted correctly upon display, but a

Re: slow request/response may be because of validation/conversion

2011-10-10 Thread Li Ying
I think conversion and validation should not be turned off. The [conversion] convert http parameters (which is String) to the real data type so your action can accept. The [validation] check the parameters if they a valid. And also, normally, conversion and validation should not take too much

Re: slow request/response may be because of validation/conversion

2011-10-10 Thread Carl Ballantyne
It sounds to me like you do not have your logging configured to filter out the stuff from com.opensymphony.xwork2.conversion. It also might depend on what server you are using. I recall having trouble with GlassFish and struts2 in regards to this logging in the past. At the moment I am using

Re: slow request/response may be because of validation/conversion

2011-10-10 Thread Łukasz Lenart
/ 2011/10/10 Amir Wasim : > Hi, > > > > > > I am using struts2 for a project. It works flawlessly but for some resons > its slow on actions. Below is the Debug log and I have noticed that there > are many messages which are related to conversion and validation. Can > so

Re: slow request/response may be because of validation/conversion

2011-10-10 Thread Maurizio Cucchiara
struts2 for a project. It works flawlessly but for some resons > its slow on actions. Below is the Debug log and I have noticed that there > are many messages which are related to conversion and validation. Can > someone tell me how I am able to stop them so that I is a little bit fast.

slow request/response may be because of validation/conversion

2011-10-10 Thread Amir Wasim
Hi, I am using struts2 for a project. It works flawlessly but for some resons its slow on actions. Below is the Debug log and I have noticed that there are many messages which are related to conversion and validation. Can someone tell me how I am able to stop them so that I is a little bit

Re: Type conversion of List - how does one do it?

2011-05-18 Thread Miguel
On Tue, 2011-05-17 at 14:42 -0700, Jeffrey Black wrote: > Hey there Miguel. > > Have a look here: > > http://struts.apache.org/2.0.14/docs/type-conversion.html#TypeConversion-GenericsandErasure Thanks Jb. In my case a possible solution is to remove the generic reference to the list (ie, ch

Re: Type conversion of List - how does one do it?

2011-05-17 Thread Jeffrey Black
Hey there Miguel.   Have a look here:   http://struts.apache.org/2.0.14/docs/type-conversion.html#TypeConversion-GenericsandErasure   Best,   jb From: Miguel To: user@struts.apache.org Sent: Tuesday, May 17, 2011 5:19 AM Subject: Type conversion of List - how does one do it? I've a

Type conversion of List - how does one do it?

2011-05-17 Thread Miguel
I've always struggled with type conversion of lists and I'd appreciate a more experienced brain to help me out. Consider the following multiple select box: As per the documentation, "name your element people.name and the framework will understand that it should create a new Pe

Re: Conversion problem

2011-04-18 Thread Christian Grobmeier
; DEBUG field-level type converter for property [deadlineTime] = none found >> > DEBUG Property: project.deadlineTime >> > DEBUG Class: ProjectsAction >> > DEBUG global-level type converter for property [deadlineTime] = noe found >> > DEBUG falling back to def

Re: Conversion problem

2011-04-18 Thread Chris Pratt
t; > DEBUG field-level type converter for property [deadlineTime] = none found > > DEBUG Property: project.deadlineTime > > DEBUG Class: ProjectsAction > > DEBUG global-level type converter for property [deadlineTime] = noe found > > DEBUG falling back to default

Re: Conversion problem

2011-04-18 Thread Christian Grobmeier
gt; DEBUG falling back to default type converter XWorkBasicConverter > > my time textfield throws an error, it cannot be handled by the default > converter. > > Now my assumption is i have done something wrong with the conversion > properties. > > My entity is named "Proj

Re: Conversion problem

2011-04-18 Thread Christian Grobmeier
g with the conversion properties. My entity is named "Project". The props is named: Project-conversion.properties Its located in the same package as "Project". I have tried it with my Action "ProjectsAction" too. The file is ProjectsAction-conversion.properties Same loc

  1   2   3   4   5   6   >