2 Replies Latest reply on Feb 14, 2011 4:24 PM by esford

    data update for modelpanel

    nujiah001

      hello everyone

         there is button ,it open a modelpanel and show some info, the modelpanel have two button ,they are ok and cancel,the modelpanel show many info ,some fileds have validator,(for example there is a filed of maxQuantity,it is only integer,when i input other type data,there is a message) when there is messages ,i close the modelpanel with cancel button, and i select another data to show in the modelpanel,but the modelpanel`s data is next data , now select any data to show ,the modelpanel is not changed,

      who can help me, simple says ,when the page have a error messages ,some data can not changed,

        • 1. data update for modelpanel
          ilya40umov

          Do you have a form inside your modalPanel? I meant that if you have only one form on the page you are probably getting validation error anyway(even if modalPanle is hidden). Add rich:messages somewhere on the page(but not in modalPanel) and see if there are any error messages when you select data in the seconf time.

          • 2. data update for modelpanel
            esford

            A lot depends on how you "display" the modalPanel.  I've had the best results when I conditionally render the modalPanel (using the rendered attribute) and wrap the modalPanel inside an <a4j:outputPanel that is always rendered.  I also usually set my modalPanels to showWhenRendered="true".  Code whatever action you call that would potentially display the modalPanel to set the appropriate rendered condition and reRender the outer panel.