You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Dilger (JIRA)" <ji...@apache.org> on 2010/12/09 19:52:01 UTC

[jira] Created: (WICKET-3247) Provide a possibility to send Objects to nested components within Form Submit

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.


[jira] Commented: (WICKET-3247) Provide a possibility to send Objects to nested components within Form Submit

Posted by "Martin Dilger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969945#action_12969945 ] 

Martin Dilger commented on WICKET-3247:
---------------------------------------

Oh my god, I did not realize this feature, thank you so much for your hint!

> 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.


[jira] Resolved: (WICKET-3247) Provide a possibility to send Objects to nested components within Form Submit

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3247.
-------------------------------------

    Resolution: Not A Problem

This is already possible. See WICKET-1312.
Component has #send() method that can broadcast events with payload.

> 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.