1 13 package com.tonbeller.wcf.toolbar; 14 15 import javax.servlet.jsp.JspException ; 16 17 import com.tonbeller.tbutils.res.Resources; 18 import com.tonbeller.wcf.component.Component; 19 import com.tonbeller.wcf.component.ComponentTag; 20 import com.tonbeller.wcf.controller.RequestContext; 21 22 25 public class ToolBarTag extends ComponentTag { 26 String bundle; 27 boolean globalButtonIds = false; 28 29 public void release() { 30 globalButtonIds = false; 31 bundle = null; 32 super.release(); 33 } 34 35 public ToolBar getToolBar() { 36 return (ToolBar) super.getComponent(); 37 } 38 39 public Component createComponent(RequestContext context) throws JspException { 40 ToolBar tb = new ToolBar(getId(), null); 41 tb.setGlobalButtonIds(globalButtonIds); 42 if (bundle != null) { 43 Resources resb = context.getResources(bundle); 44 tb.setBundle(resb); 45 } 46 return tb; 47 } 48 49 50 53 public String getBundle() { 54 return bundle; 55 } 56 57 60 public void setBundle(String string) { 61 bundle = string; 62 } 63 64 public void setGlobalButtonIds(boolean globalButtonIds) { 65 this.globalButtonIds = globalButtonIds; 66 } 67 } 68 | Popular Tags |