KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > improve > struts > taglib > layout > field > AmountFieldTag


1 package fr.improve.struts.taglib.layout.field;
2
3 import javax.servlet.jsp.JspException JavaDoc;
4
5 import fr.improve.struts.taglib.layout.util.LayoutUtils;
6 import fr.improve.struts.taglib.layout.util.TagUtils;
7 /**
8  * TextFieldTag modified to display an anmount symbol after the value and format it with the "amount" formatter.
9  *
10  * @author: Jean-NoŽl Ribette
11  */

12 public class AmountFieldTag extends TextFieldTag {
13     AmountFieldTag() {
14         format = "amount";
15     }
16 protected void doAfterValue() throws JspException JavaDoc {
17     TagUtils.write(pageContext," ");
18     TagUtils.write(pageContext,LayoutUtils.getLabel(pageContext, "layout.amount", null));
19 }
20     public void release() {
21         super.release();
22         format = "amount";
23     }
24 }
25
Popular Tags