Methods Summary |
---|
public int | doEndTag()
try
{
pageContext.getOut().write(
"<table width='100%' height='24' border='0' cellspacing='0' cellpadding='0'>");
pageContext.getOut().write("<tr valign='bottom'>");
for (int i = 0; i < tabs.size(); i++)
{
Tab tab = (Tab) tabs.get(i);
String name = tab.getName();
pageContext.getOut().write("<td width='8' align='left' class='tabSpacer'>");
pageContext.getOut().write("<p><img src='images/spacer.gif' width='8' height='24'></p>");
pageContext.getOut().write("</td>");
pageContext.getOut().write("<td align='left' nowrap class=");
if (isSelected(tab))
{
pageContext.getOut().write("'tab'>");
}
else
{
pageContext.getOut().write("'tabOff'>");
}
pageContext.getOut().write("<p>");
if (tab.getHref() != null)
{
pageContext.getOut().write("<a href='" + tab.getHref() + "'>");
}
pageContext.getOut().write(name);
if (tab.getHref() != null)
{
pageContext.getOut().write("</a>");
}
pageContext.getOut().write("</p></td>");
}
//last spacer takes up rest of the space
pageContext.getOut().write("<td width='100%' align='left' class='tabSpacer'><p> </p></td>");
pageContext.getOut().write("</tr>");
pageContext.getOut().write("</table>");
}
catch (IOException e)
{
throw new JspTagException(e.toString());
}
return EVAL_PAGE;
|
public int | doStartTag()
tabs.clear();
return EVAL_BODY_INCLUDE;
|
public java.lang.String | getSelectedTabName()
return selectedTabName;
|
private boolean | isSelected(Tab tab)
boolean selected = false;
if (tab.isSelected())
{
selected = true;
}
//navigation parent setting overrides if set
if (selectedTabName != null && !selectedTabName.equals(""))
{
selected = tab.getName().equals(selectedTabName);
}
return selected;
|
public void | setSelectedTabName(java.lang.String string)
selectedTabName = string;
|
public final void | setTabs(Tab tab)
tabs.add(tab);
|