You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Raghuveer <ra...@infotechsw.com> on 2006/01/10 06:21:16 UTC

RE: formatting messages in different colours from Message Resources

Dear AGary and Alexandre
I changed my Message KEY " msg.insert.failed" as below

> msg.insert.failed = <font color=blue >Insert failed.</font>


In my JSP PAGE message is displayed with FONT tags.
HTML tags are not being executed with message .
<font color=blue >Insert failed.</font>

so from above when HTML font tag could not be executed ,how come CSS style
would work.

Could Any one help me to resolve this issue.



-----Original Message-----
From: Alexandre Poitras [mailto:alexandre.poitras@gmail.com]
Sent: Monday, January 09, 2006 7:35 PM
To: Struts Users Mailing List
Subject: Re: formatting messages in different colours


Or to be XHTML-compatible, use css styles :)

On 1/9/06, Gary Feidt <Ga...@childrensmn.org> wrote:
>
> Why not just throw a <font color="blue">Insert failed.</font> and <font
> color="red">Insert success.</font> in you Message Resouces file.
>
> Gary
>
> >>> raghuveerv@infotechsw.com 1/9/2006 4:37 AM >>>
>
> Can Any one provide me information regarding display of Messages from
> Application Resources in different colours and FONTS.
>
> Example:
>
> I need to display messages based on Sucess or failure of Database
> Operations.
>
> I need to display messages in JSP Page as follows
>
> 1)      Successful database operations in RED color
> 2)      Failure database operations in BLUE color
>
>
>
>
> --------------------------------------------------------------------------
--
> --------------------------------------
> Message Resources
>
> messages.header=<table  valign="middle" align="center">
> messages.footer=</table>
> msg.insert.failed = Insert failed.
> msg.insert.success = Insert success.
>
>
> --------------------------------------------------------------------------
--
> --------------------------------------
> Message .jsp
>
>
> <html:messages id="msg" message="true"  header="messages.header"
> footer="messages.footer">
> <tr><td  class="gitemTitle" valign="middle" align="center" >
> <hr><li><bean:write name="msg"/></li><hr>
> </td>
> </tr>
> </html:messages>
>
> --------------------------------------------------------------------------
--
> --------------------------------------
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> __________________________________
>
> Confidentiality Statement:
> This email/fax, including attachments, may include confidential and/or
> proprietary information and may be used only by the person or entity to
> which it is addressed. If the reader of this email/fax is not the intended
> recipient or his or her agent, the reader is hereby notified that any
> dissemination, distribution or copying of this email/fax is prohibited. If
> you have received this email/fax in error, please notify the sender by
> replying to this message and deleting this email or destroying this
> facsimile immediately.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
Alexandre Poitras
Québec, Canada


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


Re: formatting messages in different colours from Message Resources

Posted by Laurie Harper <la...@holoweb.net>.
Raghuveer wrote:
> Dear AGary and Alexandre
> I changed my Message KEY " msg.insert.failed" as below
> 
>> msg.insert.failed = <font color=blue >Insert failed.</font>
> 
> 
> In my JSP PAGE message is displayed with FONT tags.
> HTML tags are not being executed with message .
> <font color=blue >Insert failed.</font>
> 
> so from above when HTML font tag could not be executed ,how come CSS style
> would work.
> 
> Could Any one help me to resolve this issue.

Make sure you include escape="false" in your bean:message tag if you 
want to in-line markup like that.

L.

> 
> -----Original Message-----
> From: Alexandre Poitras [mailto:alexandre.poitras@gmail.com]
> Sent: Monday, January 09, 2006 7:35 PM
> To: Struts Users Mailing List
> Subject: Re: formatting messages in different colours
> 
> 
> Or to be XHTML-compatible, use css styles :)
> 
> On 1/9/06, Gary Feidt <Ga...@childrensmn.org> wrote:
>> Why not just throw a <font color="blue">Insert failed.</font> and <font
>> color="red">Insert success.</font> in you Message Resouces file.
>>
>> Gary
>>
>>>>> raghuveerv@infotechsw.com 1/9/2006 4:37 AM >>>
>> Can Any one provide me information regarding display of Messages from
>> Application Resources in different colours and FONTS.
>>
>> Example:
>>
>> I need to display messages based on Sucess or failure of Database
>> Operations.
>>
>> I need to display messages in JSP Page as follows
>>
>> 1)      Successful database operations in RED color
>> 2)      Failure database operations in BLUE color
>>
>>
>>
>>
>> --------------------------------------------------------------------------
> --
>> --------------------------------------
>> Message Resources
>>
>> messages.header=<table  valign="middle" align="center">
>> messages.footer=</table>
>> msg.insert.failed = Insert failed.
>> msg.insert.success = Insert success.
>>
>>
>> --------------------------------------------------------------------------
> --
>> --------------------------------------
>> Message .jsp
>>
>>
>> <html:messages id="msg" message="true"  header="messages.header"
>> footer="messages.footer">
>> <tr><td  class="gitemTitle" valign="middle" align="center" >
>> <hr><li><bean:write name="msg"/></li><hr>
>> </td>
>> </tr>
>> </html:messages>
>>
>> --------------------------------------------------------------------------
> --
>> --------------------------------------
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> __________________________________
>>
>> Confidentiality Statement:
>> This email/fax, including attachments, may include confidential and/or
>> proprietary information and may be used only by the person or entity to
>> which it is addressed. If the reader of this email/fax is not the intended
>> recipient or his or her agent, the reader is hereby notified that any
>> dissemination, distribution or copying of this email/fax is prohibited. If
>> you have received this email/fax in error, please notify the sender by
>> replying to this message and deleting this email or destroying this
>> facsimile immediately.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> --
> Alexandre Poitras
> Québec, Canada



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