[ 
https://issues.apache.org/jira/browse/WICKET-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703580#action_12703580
 ] 

Vladimir Kovalyuk commented on WICKET-1826:
-------------------------------------------

Thanks Martin for the suggestion. The following workaround works:

Replace your form in ModalWindow with

public class ModalWindowForm<T> extends Form<T> {
        public ModalWindowForm(String id) {
                super(id);
        }

        @Override
        public Form<?> getRootForm() {
                Form<?> form = super.getRootForm();

                if ((findParent(ModalWindow.class) != null) && 
(form.findParent(ModalWindow.class) == null))
                        return this;
                else
                        return form;
        }
}

What is not working is placing modal window form into another page form, even a 
root form.


> Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable
> --------------------------------------------------------------------
>
>                 Key: WICKET-1826
>                 URL: https://issues.apache.org/jira/browse/WICKET-1826
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-extensions
>    Affects Versions: 1.3.3
>            Reporter: German Morales
>            Assignee: Matej Knopp
>            Priority: Minor
>         Attachments: modalwindowform.jar, modalwindowform.jar
>
>
> Submiting a form which is inside a ModalWindow, wicket javascript sends only 
> the information for the modal window's form, but not for the root form of the 
> page (because ModalWindow hangs its own div at body level).
> On Wicket server side, the form processing is done for the root form, which 
> calls inputChanged for all the components in the page, but the javascript 
> side didn't send the information for them, and then some of them go wrong.
> That happens to FormComponents which have isInputNullable in true.
> More description and proposed solutions in the (to be) attached quickstart 
> project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to