Author: ivaynberg Date: Sun Mar 23 09:55:35 2008 New Revision: 640219 URL: http://svn.apache.org/viewvc?rev=640219&view=rev Log: WICKET-1441
Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java?rev=640219&r1=640218&r2=640219&view=diff ============================================================================== --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Sun Mar 23 09:55:35 2008 @@ -35,48 +35,54 @@ /** * TabbedPanel component represets a panel with tabs that are used to switch between different * content panels inside the TabbedPanel panel. + * * <p> + * <b>Note:</b> When the currently selected tab is replaced by changing the underlying list of + * tabs, the change is not picked up unless a call is made to [EMAIL PROTECTED] #setSelectedTab(int)}. + * <p> + * * Example: - * + * * <pre> - * + * * List tabs=new ArrayList(); - * + * * tabs.add(new AbstractTab(new Model("first tab")) { - * + * * public Panel getPanel(String panelId) * { * return new TabPanel1(panelId); * } - * + * * }); - * + * * tabs.add(new AbstractTab(new Model("second tab")) { - * + * * public Panel getPanel(String panelId) * { * return new TabPanel2(panelId); * } - * + * * }); - * + * * add(new TabbedPanel("tabs", tabs)); - * - * + * + * * <span wicket:id="tabs" class="tabpanel">[tabbed panel will be here]</span> - * + * + * * </pre> - * + * * </p> - * + * * <p> * For a complete example see the component references in wicket-examples project * </p> - * + * * @see org.apache.wicket.extensions.markup.html.tabs.ITab - * + * * @author Igor Vaynberg (ivaynberg at apache dot org) - * + * */ public class TabbedPanel extends Panel { @@ -92,7 +98,7 @@ /** * Constructor - * + * * @param id * component id * @param tabs @@ -158,7 +164,7 @@ /** * Generates a loop item used to represent a specific tab's <code>li</code> element. - * + * * @param tabIndex * @return new loop item */ @@ -224,7 +230,7 @@ /** * Factory method for tab titles. Returned component can be anything that can attach to span * tags such as a fragment, panel, or a label - * + * * @param titleId * id of title component * @param titleModel @@ -241,23 +247,23 @@ /** * Factory method for links used to switch between tabs. - * + * * The created component is attached to the following markup. Label component with id: title * will be added for you by the tabbed panel. - * + * * <pre> * <a href="#" wicket:id="link"><span wicket:id="title">[[tab title]]</span></a> * </pre> - * + * * Example implementation: - * + * * <pre> * protected WebMarkupContainer newLink(String linkId, final int index) * { * return new Link(linkId) * { * private static final long serialVersionUID = 1L; - * + * * public void onClick() * { * setSelectedTab(index); @@ -265,7 +271,7 @@ * }; * } * </pre> - * + * * @param linkId * component id with which the link should be created * @param index @@ -288,10 +294,10 @@ /** * sets the selected tab - * + * * @param index * index of the tab to select - * + * */ public void setSelectedTab(int index) {