Similar setup on top of that ... I lost myself in models a bit. A WebPage contains two Panels. Both panels share the same model: Model<String> idModel Now, whenever a new value in a DDC on the 1st panel is selected the idModel value is updated. The change on the selected value can be seen via a label on the 2nd panel.
That all works fine. But I'd like to extend the 2md panel. Now, depending on the value in idModel the 2nd panel content should change. The idModel acts as an index for another object (from a db or a list, etc.) and all labels on the 2nd panel should get updated depending on the object that relates to the selected idModel value. So, how to react on changes on the model value within the 2nd panel? Overriding onModelChanged didn't help; it never triggered. Or do I start already wrong? Should the idModel rather be replaced with a LDM referring to the selected object? I guess I'd need to create my own ChoiceRenderer which returns the different objects? But than, wouldn't be necessary to first create all objects so that the items can be shown in the DDC? That would be counter-productive in my case because the creation of one object can take up to 10sec. I'm quite lost at the moment. Thanks! Walter On Fri 15 Jun 2012 23:13:04 EST, Martin Grigorov wrote: > Hi, > > You can do that either by sharing a common model or by using Wicket > 1.5 events, see http://www.wicket-library.com/wicket-examples/events/ > > On Fri, Jun 15, 2012 at 4:02 PM, RalfButler <[email protected]> wrote: >> Hi there, >> >> is it possible to influence the content of one panel by the state of another >> one? >> So, there are two panels from which the first panel contains a combobox and >> the second displays a listview. Depending on which value is selected within >> the combobox different items are shown in the listview. It is doable if >> combobox and listview share the same component. >> But what if they are on different panels? >> How to inform/refresh the 2nd panel? >> >> If it is doable, I'd appreciate to see a little example. >> >> Thanks a lot, >> Ralph >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Variable-dependant-dynamic-panel-tp4650015.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] >> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
