RE: Using a key as var-value in validator
> -Original Message- > From: Niall Pemberton [mailto:[EMAIL PROTECTED] > Sent: Saturday, December 04, 2004 2:30 AM > To: Struts Users Mailing List > Subject: Re: Using a key as var-value in validator > Validator. I've create a bugzilla ticket for this so it doesn't get > forgotten. Thanks for creating the BugZila ticket. For my question, it seems as of now global constant is the only way out as of now. Thanks and regards, Kinjal Sonpal "In the real world, the right thing never happens in the right place at the right time. It is the task of journalists and historians to rectify this error." --Mark Twain > > > Would be a good idea IMO to add key/bundle to the > element in Commons > > http://issues.apache.org/bugzilla/show_bug.cgi?id=32522 > > > If its something your interested in, patches are always welcome :-) > > > Niall > > - Original Message - > From: "Ram Venkataswamy" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, December 03, 2004 6:09 PM > Subject: RE: Using a key as var-value in validator > > > Well, I think for now using Global Constant is the only > option. Unless > somebody else have a answer for this. > > > > -Original Message----- > From: Kinjal Sonpal [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 01, 2004 10:20 PM > To: Struts Users Mailing List > Subject: RE: Using a key as var-value in validator > > Ram, > > Thanks for replying back. > > > If you have defined resource bundle in struts config & are able to > > access key from jsp then no additional step/configuration > > is required to > > access them in validation file. The arg/msg lookup resource bundle > > defined for the application and then pick up value > > Yeah, this is fine. But I also need to access the key in defining > tag of the tag. Right now I have to do a > workaround by using a global constant. I want to avoid > multiple points > of updation. > > Thanks and regards, > Kinjal Sonpal > > "In the real world, the right thing never happens in the right place > at the right time. It is the task of journalists and historians to > rectify this error." > Mark Twain > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using a key as var-value in validator
Actually I hate patches - but thats the party line! Changing the code's usually easy and straight forward - its the testing that ends up taking most of the time and is a pain, with a patch you just get to do the testing part :-( Now answering questions thats good - I don't have to test them :-) Niall - Original Message - From: "David G. Friedman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, December 03, 2004 10:37 PM Subject: RE: Using a key as var-value in validator > > If its something your interested in, patches are > > always welcome :-) > > Patches? Patches? You think I have time for patches? Just because I pick > up some of the tougher questions and try to find a solution for them to > satisfy my own curiosity doesn't mean I want to TRULY know how the Struts or > Commons Validator internals work on a low level. :) > > We'll see what I get around to Just don't ask me to make another > taglib. My last one for the Validator wasn't requested by even one > listmember. > *Add a melodramatic sigh here for effect* > > Regards, > David > > -Original Message- > From: Niall Pemberton [mailto:[EMAIL PROTECTED] > Sent: Friday, December 03, 2004 4:00 PM > To: Struts Users Mailing List > Subject: Re: Using a key as var-value in validator > > > Would be a good idea IMO to add key/bundle to the element in Commons > Validator. I've create a bugzilla ticket for this so it doesn't get > forgotten. > > http://issues.apache.org/bugzilla/show_bug.cgi?id=32522 > > If its something your interested in, patches are always welcome :-) > > Niall > > - Original Message ----- > From: "Ram Venkataswamy" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, December 03, 2004 6:09 PM > Subject: RE: Using a key as var-value in validator > > > Well, I think for now using Global Constant is the only option. Unless > somebody else have a answer for this. > > > > -Original Message- > From: Kinjal Sonpal [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 01, 2004 10:20 PM > To: Struts Users Mailing List > Subject: RE: Using a key as var-value in validator > > Ram, > > Thanks for replying back. > > > If you have defined resource bundle in struts config & are able to > > access key from jsp then no additional step/configuration > > is required to > > access them in validation file. The arg/msg lookup resource bundle > > defined for the application and then pick up value > > Yeah, this is fine. But I also need to access the key in defining > tag of the tag. Right now I have to do a > workaround by using a global constant. I want to avoid multiple points > of updation. > > Thanks and regards, > Kinjal Sonpal > > "In the real world, the right thing never happens in the right place > at the right time. It is the task of journalists and historians to > rectify this error." > Mark Twain > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using a key as var-value in validator
> If its something your interested in, patches are > always welcome :-) Patches? Patches? You think I have time for patches? Just because I pick up some of the tougher questions and try to find a solution for them to satisfy my own curiosity doesn't mean I want to TRULY know how the Struts or Commons Validator internals work on a low level. :) We'll see what I get around to Just don't ask me to make another taglib. My last one for the Validator wasn't requested by even one listmember. *Add a melodramatic sigh here for effect* Regards, David -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 4:00 PM To: Struts Users Mailing List Subject: Re: Using a key as var-value in validator Would be a good idea IMO to add key/bundle to the element in Commons Validator. I've create a bugzilla ticket for this so it doesn't get forgotten. http://issues.apache.org/bugzilla/show_bug.cgi?id=32522 If its something your interested in, patches are always welcome :-) Niall - Original Message - From: "Ram Venkataswamy" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, December 03, 2004 6:09 PM Subject: RE: Using a key as var-value in validator Well, I think for now using Global Constant is the only option. Unless somebody else have a answer for this. -Original Message- From: Kinjal Sonpal [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 10:20 PM To: Struts Users Mailing List Subject: RE: Using a key as var-value in validator Ram, Thanks for replying back. > If you have defined resource bundle in struts config & are able to > access key from jsp then no additional step/configuration > is required to > access them in validation file. The arg/msg lookup resource bundle > defined for the application and then pick up value Yeah, this is fine. But I also need to access the key in defining tag of the tag. Right now I have to do a workaround by using a global constant. I want to avoid multiple points of updation. Thanks and regards, Kinjal Sonpal "In the real world, the right thing never happens in the right place at the right time. It is the task of journalists and historians to rectify this error." Mark Twain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using a key as var-value in validator
Would be a good idea IMO to add key/bundle to the element in Commons Validator. I've create a bugzilla ticket for this so it doesn't get forgotten. http://issues.apache.org/bugzilla/show_bug.cgi?id=32522 If its something your interested in, patches are always welcome :-) Niall - Original Message - From: "Ram Venkataswamy" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, December 03, 2004 6:09 PM Subject: RE: Using a key as var-value in validator Well, I think for now using Global Constant is the only option. Unless somebody else have a answer for this. -Original Message- From: Kinjal Sonpal [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 10:20 PM To: Struts Users Mailing List Subject: RE: Using a key as var-value in validator Ram, Thanks for replying back. > If you have defined resource bundle in struts config & are able to > access key from jsp then no additional step/configuration > is required to > access them in validation file. The arg/msg lookup resource bundle > defined for the application and then pick up value Yeah, this is fine. But I also need to access the key in defining tag of the tag. Right now I have to do a workaround by using a global constant. I want to avoid multiple points of updation. Thanks and regards, Kinjal Sonpal "In the real world, the right thing never happens in the right place at the right time. It is the task of journalists and historians to rectify this error." Mark Twain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using a key as var-value in validator
Well, I think for now using Global Constant is the only option. Unless somebody else have a answer for this. -Original Message- From: Kinjal Sonpal [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 10:20 PM To: Struts Users Mailing List Subject: RE: Using a key as var-value in validator Ram, Thanks for replying back. > If you have defined resource bundle in struts config & are able to > access key from jsp then no additional step/configuration > is required to > access them in validation file. The arg/msg lookup resource bundle > defined for the application and then pick up value Yeah, this is fine. But I also need to access the key in defining tag of the tag. Right now I have to do a workaround by using a global constant. I want to avoid multiple points of updation. Thanks and regards, Kinjal Sonpal "In the real world, the right thing never happens in the right place at the right time. It is the task of journalists and historians to rectify this error." Mark Twain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using a key as var-value in validator
Ram, Thanks for replying back. > If you have defined resource bundle in struts config & are able to > access key from jsp then no additional step/configuration > is required to > access them in validation file. The arg/msg lookup resource bundle > defined for the application and then pick up value Yeah, this is fine. But I also need to access the key in defining tag of the tag. Right now I have to do a workaround by using a global constant. I want to avoid multiple points of updation. Thanks and regards, Kinjal Sonpal "In the real world, the right thing never happens in the right place at the right time. It is the task of journalists and historians to rectify this error." Mark Twain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using a key as var-value in validator
Hi, If you have defined resource bundle in struts config & are able to access key from jsp then no additional step/configuration is required to access them in validation file. The arg/msg lookup resource bundle defined for the application and then pick up value FYI: There is glitch though the resource key's specified in the "msg" tag as well as the validator's "msg" attribute are found regardless of their bundle. The field arg tag however does not behave the same way, even when the bundle attribute is specified (it seems that the bundle attribute is ignored). -Original Message- From: Kinjal Sonpal [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 3:07 AM To: Struts User List Subject: Using a key as var-value in validator Dear all, I'm using Struts 1.2.4 with Validator 1.1.3 for my application. I need to access the Date Format stirng across the application at many places. Instead of hard-coding format string everywhere I would like to use a key from the Resource Bundle for the purpose. I can access the key from all of my Java, Jsp code, but how do I access it the validation.xml file? Please share your views on this. Thanks and regards, Kinjal Sonpal "In the real world, the right thing never happens in the right place at the right time. It is the task of journalists and historians to rectify this error." Mark Twain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using a key as var-value in validator
Dear all, I'm using Struts 1.2.4 with Validator 1.1.3 for my application. I need to access the Date Format stirng across the application at many places. Instead of hard-coding format string everywhere I would like to use a key from the Resource Bundle for the purpose. I can access the key from all of my Java, Jsp code, but how do I access it the validation.xml file? Please share your views on this. Thanks and regards, Kinjal Sonpal "In the real world, the right thing never happens in the right place at the right time. It is the task of journalists and historians to rectify this error." Mark Twain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]