Weird behavior of GWTP app when hitting "Go Back" and "Go Forward" button of Web Browser? -


I am using GWTP and I found this problem.

I have this code in CustPresenter:

  Private list & lt; String & gt; Data List = New List & lt; String & gt; (); @Ovcorride Public on Bind () {myTextBox.setText ("Test"); DataList.add ("test"); }  

OK, now when the page opens for the first time, the page shows that the string in the textbox is "text" and; On the page that has the "test" value in the data list, I press the "Go Back" and "Forward Forward" button in the web browser (like Chrome or IE). When click on "Go Back", this will show the previous page due to this. This customer will show the page when clicking "Go ahead" & amp; I still see the string "text" in the text box of the customer page, but there is no "test" value in the data list?

What's going on?

Is this a bug for GWTP or do I do anything wrong?

Note: I am using GWT 2.50 version of last year

The onBind () method is only called once, when you instantiate the presenter. So, you want to remove it as TextBox and data list .

Then when you click on the back and move on again see what you are seeing by onBind () by first call Was populated. Pressing forward does not go back to onBind () , so you're reinitializing ArrayList again and then not populating it because < Code> onBind () has already been called.

Try it:

  @Override Public Reflex () {Private list & lt; String & gt; Data List = New Arrestist & lt; String & gt; (); MyTextBox.setText ("Test"); DataList.add ("test"); }  

or just change onBind () to onReset () or onreveal () As

Any other knowledgeable person can correct me here though.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -