Provide a possibility to send Objects to nested components within Form Submit
-----------------------------------------------------------------------------
Key: WICKET-3247
URL: https://issues.apache.org/jira/browse/WICKET-3247
Project: Wicket
Issue Type: Improvement
Components: wicket
Affects Versions: 1.5-M3
Reporter: Martin Dilger
I deeply miss the possibility to send Objects to nested Components from
FormSubmit.
Image this Scenario;
On a Page, you submit a Form and you get some Result from a Backend-System, for
example a List of AddressCorrections (List<AddresData>).
Your Page uses a couple of Panels, like a PersonDataPanel that uses an
AdressPanel internally.
I want the Possibility to send the Adresscorrections to the AdressPanel that
handles them (Painting the AdressFields, activating a DropDownChoice for
AdressChoice or something like that).
Currently you need to provide access to the Components withing the Nested
Panels (like getAdressDropDown).
I suggest something like an Interface, that interested Components can implement:
IFormSubmitCallback {
onFormSubmit(Object value);
}
In the Page, within onSubmit, you should be able to send an IVisitor, that
looks for this Interface, calls onFormSubmit and provides interested components
with the corresponding value.
..
onSubmit(){
Object result = backend.getSomeResult();
visitComponents(new FormSubmitVisitor(result));
}
I'm highly interested in your opinion on this and would love to try to provide
a patch, but first of all, please correct me if this is nonsense, thank you!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.