Hi, On 2011/03/10 17:37 PM, Yinghai Zhao wrote: > If I understand correctly the search table patter does the following things: > 1. when the search button is clicked, the form is saved to session. > 2. A new page is created and load the saved form from session and populate > the table. > 3. when a page link is clicked, form is restored again from session(saved in > step 1), and render the > next page.
Yes, your understanding is correct. The form state is restored when you call restoreState during onInit. > I removed my form save method from link control listner, but still have same > problem. > I think my problem is that the form saves fine when click the form post > button, but seems cleared on > page link clicked(in step three). If you restore the form state in onInit, then somewhere else something is clearing the state or the state wasn't saved properly. I suggest you use your debugger on the point where you restore the form state to see if state was restored. Note, only the field values are saved, not the fields themselves. So you need to create the Form and add the Fields before restoring the state. regards Bob
