Re: How to create custom tag

2006-07-17 Thread Li
Sorry, the last part should be: On 7/17/06, Li <[EMAIL PROTECTED]> wrote: Hi, CSS sure can do, and how you let your system know whether is error or info, or whatever is up to how you code inside your system. Let'me give you a simple example in sample.css .error { color:red; font

Re: How to create custom tag

2006-07-17 Thread Li
Hi, CSS sure can do, and how you let your system know whether is error or info, or whatever is up to how you code inside your system. Let'me give you a simple example in sample.css .error { color:red; font: 10px; } .success { color:blue; font:10px; } -- Your have

Re: How to create custom tag

2006-07-17 Thread vijay venkataraman
Font Tag is deprecated see http://www.w3.org/TR/html401/present/graphics.html#edef-FONT If you are on JSP 2.0 it is very easy to write a Tag yourself. Just override doTag() method of SimpleTagSupport class. See: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/SimpleTagSupport.ht

Re: How to create custom tag

2006-07-17 Thread Bart Busschots
Anything you can do with a font tag you can do with CSS. In this day and age no one should be using font tags anymore! Bart. Pankaj Gupta wrote: I dont think CSS can work in this case as the CSS would be static. I want to display color of the font based on the value of severity of message i.e

Re: How to create custom tag

2006-07-17 Thread David Delbecq
Use expression language available in jsp 2.0: class="${theBean.messageLevel="Error"?"ErrorClass":theBean.messageLevel="Warning"?"WarningClass":"InfoClass"}"> . Pankaj Gupta wrote: I dont think CSS can work in this case as the CSS would be static. I want to display color of the font based o

Re: How to create custom tag

2006-07-17 Thread Pankaj Gupta
I dont think CSS can work in this case as the CSS would be static. I want to display color of the font based on the value of severity of message i.e. if the message is critical it should be displayed in red, info in blue, etc. i.e. It would depend on the value of a form bean property. Li wrot

Re: How to create custom tag

2006-07-17 Thread Li
why not use CSS? On 7/17/06, Pankaj Gupta <[EMAIL PROTECTED]> wrote: Hi All, I want to create a custom tag which wraps the plain html font tag in such a way that it fetches the color of the font to be displayed on a pre-configured severity level. Can anyone pl suggest how can I do that. regar

How to create custom tag

2006-07-17 Thread Pankaj Gupta
Hi All, I want to create a custom tag which wraps the plain html font tag in such a way that it fetches the color of the font to be displayed on a pre-configured severity level. Can anyone pl suggest how can I do that. regards, Pankaj -