Re: Why does a ModalWindow create a form Tag to be rendered in?

2013-02-15 Thread Sven Meier

Can anyone Tell me the reason for using a form at this location?


This is done to allow the following nesting:

body
--form Form [1]
div ModalWindow [2]
--div Form [3]
input FormComponent [4]

Note that in Wicket nested Forms [3] are rendered as divs.
When ModalWindow [2] pulls its content [3] out of the dom tree and puts 
it into a top-level div, the nested input fields [4] have to be 
wrapped in a synthetic form:


body
--form Form [1]
div ModalWindow [2]
--div
form * generated by modal.js *
--div Form [3]
input FormComponent [4]

There have been proposals already on how to improve this, see 
WICKET-1826 and WICKET-3404 for inspirations.
Hopefully this is something we can address in Wicket 7 (i.e. this won't 
be possible without API breaks).


Regards
Sven


On 02/15/2013 11:51 AM, mwwbf wrote:

Hi Everyone,
I'm using ModalWindows and AjaxEditableLabels and everything was working
fine for me.
But a stupid tester decided to use the return key(insted of just clicking
the next item) after he entered something in a AjaxEditableLable within a
ModalWindow.

This caused the Form created in
https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Line 1181
to submit.
After I Changed the form Tag in lline 1181 and the /form in line 1243 of
modal.js everything worked fine again.

Can anyone Tell me the reason for using a form at this location?

Thanks and greetings
michael



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Why-does-a-ModalWindow-create-a-form-Tag-to-be-rendered-in-tp4656394.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Why does a ModalWindow create a form Tag to be rendered in?

2013-02-15 Thread mwwbf
The proposted patch in WICKET-3404 should really be in 7.
Thanks for explaining!


Sven Meier wrote
Can anyone Tell me the reason for using a 
 form
  at this location?
 
 This is done to allow the following nesting:
 body
 --
 form
  Form [1]
 
 div
  ModalWindow [2]
 --
 div
  Form [3]
 
 input
  FormComponent [4]
 
 Note that in Wicket nested Forms [3] are rendered as 
 div
 s.
 When ModalWindow [2] pulls its content [3] out of the dom tree and puts 
 it into a top-level 
 div
 , the nested input fields [4] have to be 
 wrapped in a synthetic 
 form
 :
 body
 --
 form
  Form [1]
 
 div
  ModalWindow [2]
 --
 div
 
 form
  * generated by modal.js *
 --
 div
  Form [3]
 
 input
  FormComponent [4]
 
 There have been proposals already on how to improve this, see 
 WICKET-1826 and WICKET-3404 for inspirations.
 Hopefully this is something we can address in Wicket 7 (i.e. this won't 
 be possible without API breaks).
 
 Regards
 Sven
 
 
 On 02/15/2013 11:51 AM, mwwbf wrote:
 Hi Everyone,
 I'm using ModalWindows and AjaxEditableLabels and everything was working
 fine for me.
 But a stupid tester decided to use the return key(insted of just clicking
 the next item) after he entered something in a AjaxEditableLable within a
 ModalWindow.

 This caused the Form created in
 https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
 Line 1181
 to submit.
 After I Changed the 
 form
  Tag in lline 1181 and the 
 /form
  in line 1243 of
 modal.js everything worked fine again.

 Can anyone Tell me the reason for using a 
 form
  at this location?

 Thanks and greetings
 michael



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Why-does-a-ModalWindow-create-a-form-Tag-to-be-rendered-in-tp4656394.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache


 
 
 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Why-does-a-ModalWindow-create-a-form-Tag-to-be-rendered-in-tp4656394p4656412.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org