I guess you should add the form to modal panel or set domElementAttachement to form or parent.
Yes your guess is correct. I enclosed <a4j:form..> tag inside <<rich:modalPanel..>
I did the same way as the example illustrated. But in the example, there is no concept of validations.
Is there any problem with the way of my enclosing the tags?
by default Form should be defined inside modal panel and modal should not lie in other forms in this case.Or domElementAttachement should be changed so form could be used outside. read more in reference.
But in the example, there is no concept of validations.
Demo example contains validation, and button to which I pointed you - not closes panel if for example number filed was filled with letters.
I have just seen the example by giving letters in price input box. The modal window is not being closed. I will go through the source code and implement the same way.