3 Replies Latest reply on Jun 4, 2009 9:08 AM by ilya_shaikovsky

    Toggle Validation on modalPanel only when panel is visible

      Hi!

      I have different modalPanels on one of my site. There is a panel for creating an Entity that uses a special form validation. However, I cannot submit my form anymore because the validation of the modalPanel is triggered everytime I want to submit the form.

      Example:

      I have a page on which I can edit a single user. As well as the master data there is a table with contact data (phone numbers, email addresses, etc) the user has.

      I created a modalPanel that opens after a button has been pressed. On this modal panel a new contact possibility can be created. The type and value of this contact type is required. Submitting and redisplaying the table with the added entry is done with a4j.

      By default - of course - the modalPanel isn't visible. But when I try to edit some of the contact's values nothing is saved because the validtion on the modalPanel fails.

      Is there any way to toggle the validation only on the 'Create' button (that is a a4j:commandButton of the modalPanel?

      Thank you in advance!