Search code examples
extjspanelcleaned-data

Automatically cleaned up panel extjs after sending data


I want to solve a problem with extjs 4. I have a panel with several fields (textfield, textarea, etc.). After sending the data in the database with the "end", I wish all fields were cleaned up automatically and all the events (including events triggered by any empty fields, etc.).

I tried with doLayout () but does not work.

How can I fix, thanks.


Solution

  • I assume that you have a form panel that you want reset. Although there is a reset method on the form I don't think that's what you meant by cleaned up. But if that's what you want then there is your answer.

    Moving on assuming that you want your form to reflect changes from the server, there is not a straight forward way of doing it. The least cumborsome would be to destroy the current form, create a new instance, use loadRecord to set the fields and voila you have an updated form with the server side changes. Kinda of a pain, huh?