RE: ActionError not supporting bundle
Hi, Honestly I haven't try a solution yet .. just a lack of time. I had a chat with a guy on the list his workaround was to put all bundle in the main bundle at boot time (means he was keeping all his bundle files but was merging them dynamically). For me it seems pretty clear that ActionError should support specifying bundle since it's when you specify a key that you know where this key is coming from. I'll try to dig a solution on my own during next week and let know my solution as well. Just one question left .. is this limitation just because someone forgot about it ... or because havin ActionError supporting bundle is much more complicated than what I think right now ? Anyway thanks for your help ... /David > I am also in the same boat, buddy. > > I am trying wuite a few things. Will let you know about the progress. > Struts Config do take multiple message resources. You can use them also in > diff Action files. > > But with validations, i am not so sure. > No doubt, it is huge limitaiton if Struts won't be able to support > multiple > message resources for validators. > > regards > navjot singh > > - Original Message - > From: "David Gagnon" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, March 19, 2003 9:04 PM > Subject: ActionError not supporting bundle > > > | Hi all, > | > | I look into the RC1 code to find that ActionError > | doesn't allow to specify the bundle to search for a > | given error message. > | > | I my application I have multiple modules and > | multiple message ressource files. How can I specify > | error messages coming from different bundles? > | > | The Errors Tag doesn't support to specify a bundle > | too. > | > | I initially got this problem in validator. I put my > | generic error messages in the base message resource > | file and the column name in a specific module. > | > | So I guess you are already aware of the problem ... it > | seem to be a big limitation if I want to use multiple > | resource files :-/ > | > | I just want to know if this is planned to be fixed in > | Struts 1.1? > | > | If not I suppose the only work around is to use only > | one property file ... for the whole application ... > | but that gone be a huge file ... is that a problem. > | > | Do you have any solution I haven't think of ? > | > | Thanks for your help ! > | Best Regards > | /David > | > | > | > | > | > > > - > 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: ActionError not supporting bundle
hi david, I am also in the same boat, buddy. I am trying wuite a few things. Will let you know about the progress. Struts Config do take multiple message resources. You can use them also in diff Action files. But with validations, i am not so sure. No doubt, it is huge limitaiton if Struts won't be able to support multiple message resources for validators. regards navjot singh - Original Message - From: "David Gagnon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 19, 2003 9:04 PM Subject: ActionError not supporting bundle | Hi all, | | I look into the RC1 code to find that ActionError | doesn't allow to specify the bundle to search for a | given error message. | | I my application I have multiple modules and | multiple message ressource files. How can I specify | error messages coming from different bundles? | | The Errors Tag doesn't support to specify a bundle | too. | | I initially got this problem in validator. I put my | generic error messages in the base message resource | file and the column name in a specific module. | | So I guess you are already aware of the problem ... it | seem to be a big limitation if I want to use multiple | resource files :-/ | | I just want to know if this is planned to be fixed in | Struts 1.1? | | If not I suppose the only work around is to use only | one property file ... for the whole application ... | but that gone be a huge file ... is that a problem. | | Do you have any solution I haven't think of ? | | Thanks for your help ! | Best Regards | /David | | | | | - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionError not supporting bundle
Hi Thanks for your reply btw :-) > > I look into the RC1 code to find that ActionError > > doesn't allow to specify the bundle to search for a > > given error message. > > > > I my application I have multiple modules and > > multiple message ressource files. How can I specify > > error messages coming from different bundles? > > The module selection is handled for you. ActionError is a simple bean > used to carry a message or error (key and args) to the view. > You would specify the bundle you want as an attribute of the errors tag > or messages tag. I know the JSP errors tag allows to specify the bundle ... the problem is that the errors to display may come from different bundles. Per example, in the validate Method of an ActionForm you may have: if (f1 == null) errors.add("f1", new ActionError( "bundle1.f1.notEmpty")); if (f2 == null) errors.add("f2", new ActionError( "bundle2.f2.notEmpty")); where bundle1.f1.notEmpty comes from "bundle1" and bundle2.f2.notEmpty comes from "bundle2". This case will occur if you have a base bundle where you put your general messages and a module specific bundle where you put stuff specific to your module. And in the JSP you can only specify one bundle... so you got a problem. In validator it's the same problem: You have basic messages used by the different validators and most of those messages take an argument which is the name of the field that is validated. So my basic messages are in the main bundle and the field names are in the module specific bundle. The result is that I can't have the field name appear on the screen. Hope it's more clear .. if not tell me :-) Thanks again /David > > > > > The Errors Tag doesn't support to specify a bundle > > too. > > Are you sure about that? > http://jakarta.apache.org/struts/userGuide/struts-html.html#errors > > > > I initially got this problem in validator. I put my > > generic error messages in the base message resource > > file and the column name in a specific module. > > Sorry, I can't help you with the Validator, that's not my specialty. > > -- > James Mitchell > Software Developer/Struts Evangelist > http://www.open-tools.org > > > > > - > 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: ActionError not supporting bundle
On Wed, 2003-03-19 at 10:34, David Gagnon wrote: > Hi all, > > I look into the RC1 code to find that ActionError > doesn't allow to specify the bundle to search for a > given error message. > > I my application I have multiple modules and > multiple message ressource files. How can I specify > error messages coming from different bundles? The module selection is handled for you. ActionError is a simple bean used to carry a message or error (key and args) to the view. You would specify the bundle you want as an attribute of the errors tag or messages tag. > The Errors Tag doesn't support to specify a bundle > too. Are you sure about that? http://jakarta.apache.org/struts/userGuide/struts-html.html#errors > I initially got this problem in validator. I put my > generic error messages in the base message resource > file and the column name in a specific module. Sorry, I can't help you with the Validator, that's not my specialty. -- James Mitchell Software Developer/Struts Evangelist http://www.open-tools.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionError not supporting bundle
Hi all, I look into the RC1 code to find that ActionError doesn't allow to specify the bundle to search for a given error message. I my application I have multiple modules and multiple message ressource files. How can I specify error messages coming from different bundles? The Errors Tag doesn't support to specify a bundle too. I initially got this problem in validator. I put my generic error messages in the base message resource file and the column name in a specific module. So I guess you are already aware of the problem ... it seem to be a big limitation if I want to use multiple resource files :-/ I just want to know if this is planned to be fixed in Struts 1.1? If not I suppose the only work around is to use only one property file ... for the whole application ... but that gone be a huge file ... is that a problem. Do you have any solution I haven't think of ? Thanks for your help ! Best Regards /David