velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pham Anh Tuan" <anht...@ichi-corp.jp>
Subject Re: [HELP] The differences between ActionMessagesTool and MessagesTool?
Date Mon, 25 Jul 2005 08:20:23 GMT
so,
when we create 1 ActionMessage object and populate it from Struts to 
Velocity, and using ActionMessagesTool to catch that message.

like above, we use ErrorsTool to catch ActionError object which is populated 
from Struts.

is it right, Manish?

Pham
----- Original Message ----- 
From: "Manish" <prolist@gmx.net>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Monday, July 25, 2005 3:20 PM
Subject: Re: [HELP] The differences between ActionMessagesTool and 
MessagesTool?


> 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" <anhtuan@ichi-corp.jp>
> To: "Velocity Users List" <velocity-user@jakarta.apache.org>; 
> "Bayarsaikhan
> VOLODYA" <bayarsaikhan@gmail.com>
> 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" <bayarsaikhan@gmail.com>
>> To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>> 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 <anhtuan@ichi-corp.jp>
>> > Date: Jul 25, 2005 10:47 AM
>> > Subject: Re: [HELP] The differences between ActionMessagesTool and
>> > MessagesTool?
>> > To: Velocity Users List <velocity-user@jakarta.apache.org>,
>> > Bayarsaikhan VOLODYA <bayarsaikhan@gmail.com>
>> >
>> >
>> > as you said, we must send our messages with GLOBAL_MESSAGE ?
>> >
>> > if so, "I'm clear" :D
>> >
>> > thanks Bayarsaikhan
>> > ----- Original Message -----
>> > From: "Bayarsaikhan VOLODYA" <bayarsaikhan@gmail.com>
>> > To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>> > 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 <anhtuan@ichi-corp.jp>
>> >> Date: Jul 25, 2005 10:29 AM
>> >> Subject: Re: [HELP] The differences between ActionMessagesTool and
>> >> MessagesTool?
>> >> To: Velocity Users List <velocity-user@jakarta.apache.org>,
>> >> Bayarsaikhan VOLODYA <bayarsaikhan@gmail.com>
>> >>
>> >>
>> >> 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" <bayarsaikhan@gmail.com>
>> >> To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>> >> 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 <anhtuan@ichi-corp.jp> 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: velocity-user-unsubscribe@jakarta.apache.org
>> >>> For additional commands, e-mail: 
>> >>> velocity-user-help@jakarta.apache.org
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Bayarsaikhan VOLODYA
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>> >> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>> >>
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > Bayarsaikhan VOLODYA
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>> >
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message