You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "German Morales (JIRA)" <ji...@apache.org> on 2008/09/11 18:32:18 UTC

[jira] Created: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

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
            Priority: Minor


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.


[jira] Reopened: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

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

German Morales reopened WICKET-1826:
------------------------------------


>This shouldn't happen if you have form in your modal window.
I have a form in my modal window, please check the source code.
Additionally, i'm attaching soon an extended quickstart project that shows how a value entered in the modal window is displayed later in the page (to show that the modal window form is working).

>If that's the case only the form inside modal window should be processed.
Well, that's not what seems to be happening, and that's the reason i posted this issue in the first place.

>Also in 1.3 if you have modal window with panel with form, you should always place the modal window inside another form.
This phrase is not so clear to me.

Anyway, i've extended the demo project to include different versions:
-a modal window inside the page main form
-another modal window, inside a nested form (inside the page root form)
-another modal window, inside an additional form (outside the page root form)

Also, i'm providing 2 checkboxes this time:
-one inside the page main form
-an additional inside a nested form (inside the page root form)

In all cases, after closing any of the modal windows, the checkboxes values are lost.


Perhaps you can clarify more what's wrong in the demo project?

Thanks in advance,

German


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


[jira] Commented: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

Posted by "Vladimir Kovalyuk (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912732#action_12912732 ] 

Peter Ertl commented on WICKET-1826:
------------------------------------

Is this issue existant in 1.4 or 1.5? 1.3 is not maintained anymore.

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


[jira] Assigned: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

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

Igor Vaynberg reassigned WICKET-1826:
-------------------------------------

    Assignee: Matej Knopp

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


[jira] Updated: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

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

German Morales updated WICKET-1826:
-----------------------------------

    Attachment: modalwindowform.jar

> 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
>            Priority: Minor
>         Attachments: 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.


[jira] Commented: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

Posted by "Padmaja Kota (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855307#action_12855307 ] 

Padmaja Kota commented on WICKET-1826:
--------------------------------------

I can still the same issue occuring with Wicket 1.3.5 .

My modal window is like :

<panel>
<form>
  remaining form components..
</form>
</panel>

However each time i submit the form the parent form which contains this modal window is also submitted and the inputs on the parent form are set to null causing error in my use case.


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


[jira] Updated: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

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

German Morales updated WICKET-1826:
-----------------------------------

    Attachment: modalwindowform.jar

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


[jira] Commented: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

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

Martin Makundi commented on WICKET-1826:
----------------------------------------

Maybe fix it with (I haven't tried the code, though; I would preferably alternatively properly attach the modal window into the effective dom location):

Form.getRootForm() {
		Form<?> form;
    
		Form<?> parent = this;
		do
		{
			form = parent;
			parent = form.findParent(Form.class);
		}
		while (parent != null);


                  ///////// ModalWindow will have its own root form
                if ((findParent(ModalWindow.class) != null) && (form.findParent(ModalWindow.class) == null)) {
                      return this;
                }

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


[jira] Commented: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

Posted by "Vladimir Kovalyuk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703625#action_12703625 ] 

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

The problem is observed with Wicket 1.4-rc2. "make sure that the modal window is placed in another form" - it is true for wicket component tree.
What particular version do you suggest to check the attachment against? 

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


[jira] Commented: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703622#action_12703622 ] 

Matej Knopp commented on WICKET-1826:
-------------------------------------

If you have form in modal window make sure that the modal window is placed in another form. Also you need to use latest wicket version for it to work properly.

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


[jira] Resolved: (WICKET-1826) Forms + ModalWindow + AjaxSubmitLink + FormComponent#isInputNullable

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

Matej Knopp resolved WICKET-1826.
---------------------------------

    Resolution: Invalid

This shouldn't happen if you have form in your modal window. If that's the case only the form inside modal window should be processed. Also in 1.3 if you have modal window with panel with form, you should always place the modal window inside another form. 
If this problem still persists (in current 1.3 branch) please reopen the issue 

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