1 package com.opensymphony.webwork.components; 2 3 import com.opensymphony.xwork.util.OgnlValueStack; 4 5 import javax.servlet.http.HttpServletRequest ; 6 import javax.servlet.http.HttpServletResponse ; 7 import java.util.ArrayList ; 8 import java.util.List ; 9 10 15 public class TabbedPanel extends ClosingUIBean { 16 public static final String TEMPLATE = "tabbedpanel"; 17 public static final String TEMPLATE_CLOSE = "tabbedpanel-close"; 18 final private static String COMPONENT_NAME = TabbedPanel.class.getName(); 19 20 protected List tabs = new ArrayList (); 21 22 public TabbedPanel(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) { 23 super(stack, request, response); 24 } 25 26 public void addTab(Panel pane) { 27 tabs.add(pane); 28 } 29 30 public List getTabs() { 31 return tabs; 32 } 33 34 public String getTopicName() { 35 return "topic_tab_" + id + "_selected"; 36 } 37 38 protected void evaluateExtraParams() { 39 super.evaluateExtraParams(); 40 41 addParameter("topicName", "topic_tab_" + id + "_selected"); 42 addParameter("tabs", tabs); 43 44 } 45 46 public String getDefaultOpenTemplate() { 47 return TEMPLATE; 48 } 49 50 protected String getDefaultTemplate() { 51 return TEMPLATE_CLOSE; 52 } 53 54 public String getComponentName() { 55 return COMPONENT_NAME; 56 } 57 } 58 | Popular Tags |