Hi everyone! Maybe someone know what I am doing wrong. I follow this https://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.html <https://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.html>
and this: http://www.roseindia.net/tutorials/wicket/tab-wicket.shtml <http://www.roseindia.net/tutorials/wicket/tab-wicket.shtml> and I try to add Tabs wicket but I can't (Home page worked well before adding this 'Tabs Wicket' ) ". I have this error: Unexpected RuntimeException Last cause: Cannot modify component hierarchy after render phase has started (page version cant change then anymore) Home.html: <html> <head>...</head> <body> HOME Page <div wicket:id="tabs"> [tabbed panel will be here] </div> </body> </html> Home.java: public class Home extends WebPage{ public Home() { NavomaticBorder navomaticBorder = new NavomaticBorder("navomaticBorder"); List tabs = new ArrayList(); tabs.add(new AbstractTab(new Model<String>("firstTab")) { @Override public Panel getPanel(String panelId) { return new TabPanel1(panelId); } }); tabs.add(new AbstractTab(new Model<String>("secondTab")) { @Override public Panel getPanel(String panelId) { return new TabPanel2(panelId); } }); // navomaticBorder.add( new AjaxTabbedPanel("tabs", tabs) ); navomaticBorder.add( new TabbedPanel("tabs", tabs) ); add(navomaticBorder); } } //############################################################# TabPanel1.html: <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <wicket:panel> This is tab - panel 1 </wicket:panel> </body> </html> TabPanel1.java: public class TabPanel1 extends Panel{ public TabPanel1(String id) { super(id); } } //############################################################# TabPanel2.html: <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <wicket:panel> This is tab - panel 2 </wicket:panel> </body> </html> TabPanel2.java: public class TabPanel2 extends Panel{ public TabPanel2(String id) { super(id); } } //############################################################# What am I doing wrong? Thank You for any advice. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-tabs-does-not-work-properly-tp4677657.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
