Invocation of type conversion manually

2010-12-09 Thread Jose Luis Martinez Avial
Hello all, I'm using Struts 2..1.8.1 for an application. To integrate the security in the application we have developed an interceptor that intercepts every request and checks a list of rules(implemented as classes) to know if the user is allowed to execute the action. The validation should be

RE: Iterator: field errors.

2010-12-09 Thread Satheesh Kannan A B
Hi, Generic I have given a pojo class List and am doing validation as a separate method in my action as given below. List boList = new ArrayList< PojoClassBO >(); Public String save(){ If(isValid()) { Continue }else{ Return "input"; } Return "success

E-Commerce website using struts

2010-12-09 Thread ashish chawre
Hi, Is any body having any idea about the source/example of any ecommerce website implementation using struts? I am looking to implement a checkout using struts and I need to implement shopping cart as well. Any help will be greatly appreciated. Thanks! -- Ashish

Bad Struts Day

2010-12-09 Thread Greg Akins
Not sure what is best here. I need to create an URL with a value from my default resource bundle in the URL For example returns logo.gif I need to do something like that will return my relative url with the value of IMAGE appended. So if I'm at /App/11/index.jsp my img src will be /App/11/log

Re: any option parameter for populating parameters to my bean?

2010-12-09 Thread maven apache
2010/12/9 Dave Newton > Strange, I believe this question was asked by someone else with no name-- > try > searching the archives. > How? Using the nabble? I can not access Nabble.com :( > > Dave > > On Thu, Dec 9, 2010 at 4:37 AM, maven apache > wrote: > > > My action: > > > > public class

Re: any option parameter for populating parameters to my bean?

2010-12-09 Thread maven apache
2010/12/10 Li Ying > Can you show us the entire Exception stack? > > I guess, this may be a type conversion error. > > According to this struts2 documents: > > http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-BuiltinTypeConversionSupport > > "XWork will automatically handle t

Re: execAndWait Interceptor

2010-12-09 Thread Dale Newfield
On Dec 9, 2010, at 11:11 AM, stanl...@gmail.com wrote: > Does anyone actually use this interceptor? Extensively. Any system that contains large amounts of data can have valid reasons for needing this, and not just for reporting. -Dale

Re: Cancel in a form re: bypass Validation

2010-12-09 Thread Li Ying
I think Michal was right. If you don't want execute validation for some Action Method, the annotation "@SkipValidation" is a good solution. And, in your case, I noticed that, your server side action is doing nothing when the [cancel] button clicked. I suggest you can put a html Link for your [can

Re: Iterator: field errors.

2010-12-09 Thread Li Ying
What is the data type of objectList? How did you execute the validation, and how did you add the field error? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.o

Re: any option parameter for populating parameters to my bean?

2010-12-09 Thread Li Ying
Can you show us the entire Exception stack? I guess, this may be a type conversion error. According to this struts2 documents: http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-BuiltinTypeConversionSupport "XWork will automatically handle the most common type conversion for y

Re: Cancel in a form re: bypass Validation

2010-12-09 Thread Greg Akins
On Thu, Dec 9, 2010 at 3:26 PM, Michal Ciasnocha wrote: > Hi Greg, > > I use in my code @SkipValidation annotation for method which I don't want to > validate. For me it is easier than use interceptors. > > @SkipValidation > public String cancel() { >    return SUCCESS; > } > > The second part - r

Re: Cancel in a form re: bypass Validation

2010-12-09 Thread Michal Ciasnocha
Hi Greg, I use in my code @SkipValidation annotation for method which I don't want to validate. For me it is easier than use interceptors. @SkipValidation public String cancel() { return SUCCESS; } The second part - redirect - I hope is correct. Regards, Michal. Greg Akins wrote on 9.1

Cancel in a form re: bypass Validation

2010-12-09 Thread Greg Akins
I need to have a "Cancel" button on a form that skips the validation (Struts 2.2.1). This seems harder than it should be and maybe I'm missing something. I've read a few posts about this and ended using the validation interceptorref to get this to work. I've had problems getting the interceptorr

Iterator: field errors.

2010-12-09 Thread Satheesh Kannan A B
Hi, I have a requirement like, am iterating a list of values and populating in a text box. It may be more than 5 rows. I need to validate whether it's an integer and want to display error message below the field. For a normal field with a unique I have done it well. But I don't know how to do f

Re: @VisitorFieldValidator message formatting question.

2010-12-09 Thread Maurizio Cucchiara
At first glance everything would seems correctly configured (except for that unnecessary RequiredFieldValidator). Did you try it in a more recent version (like 2.2.1)? 2010/12/9 RogerV : > > > Maurizio Cucchiara wrote: >> >> Sorry, >> I meant annotated *classes* >> > > Sure, BaseAction - all othe

Re: execAndWait Interceptor

2010-12-09 Thread Dave Newton
On Thu, Dec 9, 2010 at 11:27 AM, wrote: > I thought about that Dave, but isn't reporting an exception to the rule? > So what if it is? Long-running requests still exist (or may, depending on architecture). > Also, should a web framework try to play the role of a reporting solution? > As the fr

Re: execAndWait Interceptor

2010-12-09 Thread stanlick
I thought about that Dave, but isn't reporting an exception to the rule? Also, should a web framework try to play the role of a reporting solution? I'm trying to get a handle on roles and responsibilities more than anything else. Very few web developers like the Swiss Army Knife approach on accoun

Token* interceptors

2010-12-09 Thread stanlick
This is being posted separate from my other post for search clarity. The same team that is questioning server vs. client, is asking how these interceptors are better than simply inhibiting input by the client for the duration of the submit. Are these interceptors falling off in popularity? Like p

Re: execAndWait Interceptor

2010-12-09 Thread Dave Newton
But some requests just take that long, reporting in particular. I'm not sure what that has to do with execAndWait in particular, though... I'd rather do something Ajaxy myself, but that's kind of a separate issue. Dave On Thu, Dec 9, 2010 at 11:11 AM, wrote: > Does anyone actually use this inte

execAndWait Interceptor

2010-12-09 Thread stanlick
Does anyone actually use this interceptor? I have a team asking me about it's use in production and how this solution would compare to a jQuery solution. I played around with it lst night and am skeptical about it. For one thing, the documentation says "The ExecuteAndWaitInterceptor is great fo

Re: @VisitorFieldValidator message formatting question.

2010-12-09 Thread RogerV
Maurizio Cucchiara wrote: > > Sorry, > I meant annotated *classes* > Sure, BaseAction - all other actions extend this; @ParentPackage(value = "admin") @Result(name="start",location="add-new-user-flow.jsp") public class AddNewUserFlow extends ActionSupport implements SessionAware, Preparable,

Re: @VisitorFieldValidator message formatting question.

2010-12-09 Thread Maurizio Cucchiara
Sorry, I meant annotated *classes* 2010/12/9 Maurizio Cucchiara : > My guess is that there is something wrong in your configuration. > Could you post your annotated class? > > 2010/12/9 RogerV : >> >> >> >> Maurizio Cucchiara wrote: >>> >>> Ok, >>> try this >>> >>> @VisitorFieldValidator(fieldName

Re: @VisitorFieldValidator message formatting question.

2010-12-09 Thread Maurizio Cucchiara
My guess is that there is something wrong in your configuration. Could you post your annotated class? 2010/12/9 RogerV : > > > > Maurizio Cucchiara wrote: >> >> Ok, >> try this >> >> @VisitorFieldValidator(fieldName = "YOUR FIELD NAME", appendPrefix = >> true, message = "YOUR MESSAGE") >> >> Strut

RE: RE: RE: RE: Result Type Stream Corrupted

2010-12-09 Thread CRANFORD, CHRIS
Both are the same machine, running Tomcat 7.0.4 on Windows 7. > -Original Message- > From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] > Sent: Wednesday, December 08, 2010 6:15 PM > To: Struts Users Mailing List > Subject: Re: RE: RE: RE: Result Type Stream Corrupted > > Ther

RE: RE: RE: Result Type Stream Corrupted

2010-12-09 Thread CRANFORD, CHRIS
No, both the client saved file and the one created on the server side in the temp directory both match in size. > -Original Message- > From: Li Ying [mailto:liying.cn.2...@gmail.com] > Sent: Wednesday, December 08, 2010 6:07 PM > To: Struts Users Mailing List > Subject: Re: RE: RE: Result

RE: Result Type Stream Corrupted

2010-12-09 Thread CRANFORD, CHRIS
ByteArrayInputStream. My service writes to a ByteArrayOutputStream which gets converted to a ByteArrayInputStream so that it can be handed off to the stream result type handler. > -Original Message- > From: Martin Gainty [mailto:mgai...@hotmail.com] > Sent: Wednesday, December 08, 2010

Re: @VisitorFieldValidator message formatting question.

2010-12-09 Thread RogerV
Maurizio Cucchiara wrote: > > Ok, > try this > > @VisitorFieldValidator(fieldName = "YOUR FIELD NAME", appendPrefix = > true, message = "YOUR MESSAGE") > > Struts should use Field Name like a prefix for every invalid element > inside the annotated object. > This doesn't work as I would expe

Re: @CustomValidator - quick question

2010-12-09 Thread Dave Newton
Why not just try it? Or check the documentation? There's a note that addresses this specific issue: http://struts.apache.org/2.x/docs/validation.html#Validation-RegisteringValidators Dave On Thu, Dec 9, 2010 at

@CustomValidator - quick question

2010-12-09 Thread RogerV
When defining my own CustomValidator, when I come to register my new validator in validators.xml located on the classpath will I loose the "built-in" validators or must I copy a default validators.xml from somewhere and amend that? REgards -- View this message in context: http://old.nabble.com/

Re: any option parameter for populating parameters to my bean?

2010-12-09 Thread Dave Newton
Strange, I believe this question was asked by someone else with no name--try searching the archives. Dave On Thu, Dec 9, 2010 at 4:37 AM, maven apache wrote: > My action: > > public class MyAction{ > private MyBean bean; > //getter setter. > } > > public class MyBean{ > private Date star

any option parameter for populating parameters to my bean?

2010-12-09 Thread maven apache
My action: public class MyAction{ private MyBean bean; //getter setter. } public class MyBean{ private Date start; //setter getter } If the value of start is '2010-12-12 12:00:00',the parmameter start can be populated to my bean correctly,however if the format is '2010/12/12 12