1 package dinamica.security; 2 3 import dinamica.*; 4 5 13 public class MenuOutput extends GenericOutput 14 { 15 16 19 public void print(TemplateEngine te, GenericTransaction data) 20 throws Throwable 21 { 22 23 super.print(te, data); 25 26 Recordset menu = data.getRecordset("menu"); 28 29 String section = getResource("section.txt"); 31 32 StringBuffer buf = new StringBuffer (); 34 35 while (menu.next()) 36 { 37 38 GetMenu m = (GetMenu)data; 40 Recordset items = m.getMenuItems(menu); 41 42 TemplateEngine t = new TemplateEngine(getContext(),getRequest(), section); 44 t.replace(menu,""); 45 t.replace(items,"","rows"); 46 47 buf.append(t.toString()); 49 50 } 51 52 te.replace("${menu}", buf.toString()); 54 55 } 56 57 } 58 | Popular Tags |