KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > outputs > MyConditionalOutput


1 package outputs;
2
3 import dinamica.*;
4
5 /**
6  * Custom output module that replaces some text in the current
7  * template to change behavior of the form in addnew mode
8  * @author mcordova
9  *
10  */

11 public class MyConditionalOutput extends GenericOutput
12 {
13
14     public void print(TemplateEngine te, GenericTransaction data) throws Throwable JavaDoc
15     {
16
17         te.replace("readonly", ""); //enable textbox
18
te.replace("/update", "/insert"); //form action
19
te.replace("Edit Record", "Add New Record"); //form title
20

21         //reuse superclass code
22
super.print(te, data);
23         
24     }
25
26 }
27
Popular Tags