1 Reply Latest reply on Aug 11, 2009 5:01 AM by Ilya Shaikovsky

    rich:modalPanel  pre-filled form values

    Yury Taran Newbie

      I've got simple rich:modalPanel with form on it and two buttons: Ok and Cancel.
      There are 3 inputs on form, all required.

      modalPanel is called using a4j:commandLink with oncomplete="#{rich:component('newTransactionPanel')}.show()" action="#{transactionManager.newTransaction}".

      If I call modalPanel and fill in 2 fields, application says "Fill in third field" and then I press Cancel button (which just closes modalPanel). And when I press commandLink to make new transaction, the newTransactionPanel is showing and I see my 2 inputs pre-filled with my old values! But transactionManager.newTransaction makes currTransaction = new Transaction();!

      Looks like JSF at validation phase somehow marks my transaction form as "not passed validation" and that's why I'm getting my 2 inputs pre-filled...
      What should I do to clear them?

      The same problem if I use modalPanel for editing some data.

      Thanks a lot!