One -- These two are not contradictory answers!!!! Two -- I was answering your question about "we must send our messages with GLOBAL_MESSAGE ?", which is not true, you can have any name for that message. I am saying you can use any message type, not necessarily GLOBAL_MESSAGE.
Errors indeed go to errors an messages to messages. That's as clear as it gets, the class name difference itself suggests that. What you put as message (user added) and what you put as error (duplicate user) is sth that you have to decide while using struts, accordingly you'll have to retrieve that in your velocity template. HTH, - Manish ----- Original Message ----- From: "Pham Anh Tuan" <[EMAIL PROTECTED]> To: "Velocity Users List" <[email protected]>; "Bayarsaikhan VOLODYA" <[EMAIL PROTECTED]> Sent: Monday, July 25, 2005 1:31 PM Subject: Re: [HELP] The differences between ActionMessagesTool and MessagesTool? > one answers: > that is true. if you add > ActionError, it goes to ErrorsTool > ActionMessage,it goes to ActionMessageTool > > another one answers: > NO!!! > You can send "any" message with ActionMessagesTool , but as someone pointed > out, the difference lies in "from where" the message is picked up. > > who is right ? > ----- Original Message ----- > From: "Bayarsaikhan VOLODYA" <[EMAIL PROTECTED]> > To: "Velocity Users List" <[email protected]> > Sent: Monday, July 25, 2005 2:52 PM > Subject: Fwd: [HELP] The differences between ActionMessagesTool and > MessagesTool? > > > > that is true. if you add > > ActionError, it goes to ErrorsTool > > ActionMessage,it goes to ActionMessageTool > > > > > > ---------- Forwarded message ---------- > > From: Pham Anh Tuan <[EMAIL PROTECTED]> > > Date: Jul 25, 2005 10:47 AM > > Subject: Re: [HELP] The differences between ActionMessagesTool and > > MessagesTool? > > To: Velocity Users List <[email protected]>, > > Bayarsaikhan VOLODYA <[EMAIL PROTECTED]> > > > > > > as you said, we must send our messages with GLOBAL_MESSAGE ? > > > > if so, "I'm clear" :D > > > > thanks Bayarsaikhan > > ----- Original Message ----- > > From: "Bayarsaikhan VOLODYA" <[EMAIL PROTECTED]> > > To: "Velocity Users List" <[email protected]> > > Sent: Monday, July 25, 2005 2:38 PM > > Subject: Fwd: [HELP] The differences between ActionMessagesTool and > > MessagesTool? > > > > > >> it is not only used for form validation but also used for all kind of > >> messages u wish to send from struts actions. to send message to > >> velocity from struts, we use this code; > >> > >> *** > >> ActionMessages msgs = new ActionMessages(); > >> msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("user.added")); > >> saveMessages(request,msgs); > >> *** > >> > >> clear? > >> > >> ---------- Forwarded message ---------- > >> From: Pham Anh Tuan <[EMAIL PROTECTED]> > >> Date: Jul 25, 2005 10:29 AM > >> Subject: Re: [HELP] The differences between ActionMessagesTool and > >> MessagesTool? > >> To: Velocity Users List <[email protected]>, > >> Bayarsaikhan VOLODYA <[EMAIL PROTECTED]> > >> > >> > >> Thanks Bayarsaikhan, > >> > >> but as you said, ActionMessagesTool is used rarely, because it's only for > >> form validation error? > >> > >> plz give me more cases so we can use ActionMessagesTool Bayarsaikhan... > >> :( > >> ----- Original Message ----- > >> From: "Bayarsaikhan VOLODYA" <[EMAIL PROTECTED]> > >> To: "Velocity Users List" <[email protected]> > >> Sent: Monday, July 25, 2005 2:01 PM > >> Subject: Re: [HELP] The differences between ActionMessagesTool and > >> MessagesTool? > >> > >> > >>>- ActionMessagesTool is used to retrieve messages from struts. for > >>> example, form validation error messages coming from struts validation. > >>> - MessagesTool is used to retrieve locale messages from > >>> Applicationresource.properties file. > >>> > >>> > >>> On 7/25/05, Pham Anh Tuan <[EMAIL PROTECTED]> wrote: > >>>> hi all, > >>>> > >>>> would you plz show me the differences between ActionMessagesTool and > >>>> MessagesTool. > >>>> > >>>> I don't know exactly what they are :( > >>>> > >>>> thanks for reading! > >>>> > >>>> Pham > >>>> > >>> > >>> > >>> -- > >>> Bayarsaikhan VOLODYA > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >> > >> > >> > >> > >> -- > >> Bayarsaikhan VOLODYA > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > > > > > -- > > Bayarsaikhan VOLODYA > > > > --------------------------------------------------------------------- > > 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]
