Re: Share data in TabbedPanel
Lets say you have a property in your page that point to the dataobject you are creating and manipulating on first tab. The model of the tabs that should see this dataobject as well can be reference as: tp.setDefaultModel(new PropertyModel(this,mySharedObject)); Being mySharedObject the property on you page (this) that have the object reference that you want to shared across tabs. On Sun, May 1, 2011 at 5:06 AM, meduolis[via Apache Wicket] ml-node+3487440-18642877-65...@n4.nabble.com wrote: Maybe you can show a small example how to do this? You mean like this? TabbedPanel tp = new TabbedPanel(); tp.setDefaultModel(new ModelSharedDTO()); -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487440.html To start a new topic under Apache Wicket, email ml-node+1842946-398011874-65...@n4.nabble.com To unsubscribe from Apache Wicket, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=. -- JC -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487759.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Share data in TabbedPanel
I think that your example would finish with ClassCastExeption in TabbedPanel.java:382 line return (Integer)getDefaultModelObject(); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487936.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Share data in TabbedPanel
I didn't checked the API before posting the example was using the kind of the same code you provide earlier, just to give u a quick start :) But the idea is to pass a model to the underlying panel on each tab, that points to the same object reference. On Sun, May 1, 2011 at 12:52 PM, meduolis[via Apache Wicket] ml-node+3487936-2075405694-65...@n4.nabble.com wrote: I think that your example would finish with ClassCastExeption in TabbedPanel.java:382 line return (Integer)getDefaultModelObject(); -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487936.html To start a new topic under Apache Wicket, email ml-node+1842946-398011874-65...@n4.nabble.com To unsubscribe from Apache Wicket, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=. -- JC -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487998.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Share data in TabbedPanel
Thanks for help, I solved my problem by extending original TabbedPanel with some additional properties.-- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3488031.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org