Hi Thorsten, This sounds like a good use-case for an event.
You can have the form broadcast an event to the page, and let any component that needs to redraw based on the data handle that event. This provides a nice decoupling between the form result and 0…n other components in your page that need the data. The components handling the event then also don’t need to know where the event originated. For more info, see the wicket guide; the info is under chapter 17.2, scroll down to “Wicket events infrastructure”. https://ci.apache.org/projects/wicket/guide/6.x/guide/advanced.html#advanced_2 And a bonus tip: you can use the wicketstuff-annotationeventdispatcher jar to make your life even easier. Just include it in your project (it will automatically register itself in wicket), and then you can annotate any public component method in your page with @OnEvent, for example: @OnEvent public void onFormDataSubmittedEvent(FormDateSubmittedEvent event) { … impl } It’s actually a great way to handle data-passing in pages. Met vriendelijke groet, Kind regards, Bas Gooren Op 10 mei 2016 bij 08:54:14, Thorsten Schöning ([email protected]) schreef: Hi all, I have one and the same form on different pages used to provide some input data which is afterwards used by the form's onSubmit handler to request some complex data structure from a 3rd party service. This result needs to be forwarded to the caller/owner of the form, mainly pages, so those can provide the data to different views focussing on different aspects of the data. Most of those views are panels using different DataViews to provide data in HTML tables in the end. The important thing is that the form shouldn't render the results itself, only return some raw data structure, and the panels shouldn't need to know about the form as well. What is the best way to send those resulting data around? From my understanding it's not the default model of the form with all the convert input stuff, those input comes from the user, but it may be that of the page containing form and panels, so both could access the page and its default model. Else I could simply create a model instance and forward it using the CTORs of the form and panels, without (misusing?) the page's default model. Does it even matter at all? Thanks! Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning E-Mail: [email protected] AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...........05151- 9468- 55 Fax...............05151- 9468- 88 Mobil..............0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
