Friday, June 1, 2012

Wicket Modal Window Form Issue

Wicket has a strange problem with forms that requires a work-around. It says in the Javadoc of ModalWindow:

"If you want to use form in modal window component make sure that you put the modal window itself in another form (nesting forms is legal in Wicket)"

If this is not done, when using Firefox, form submissions may not be successful.

It appears that this issue exists due to backward compatibility constraints with IE6.

In order to work around this, it is required to put the modal window in another form, like this:

<form wicket:id="modalWindowForm">
<div wicket:id="modalWindow"></div>
</form>

References:
  1. wicket.apache.org/apidocs/1.4/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html
  2. issues.apache.org/jira/browse/WICKET-3146
  3. issues.apache.org/jira/browse/WICKET-3404
  4. www.techienuggets.com/Comments
  5. apache-wicket.1842946.n4.nabble.com/Form-tag-does-not-get-rendered-on-a-Panel-placed-in-a-TabbedPanel-within-a-ModalWindow-td1887897.html
  6. issues.apache.org/jira/browse/WICKET-2214
  7. web.archiveorange.com/archive/v/yH01cYmiI4SdLFnAfqjy

No comments:

Post a Comment