Sunday, April 15, 2007

History and Bookmark in GWT

I did a search on history and bookmark management in GWT today. Because our data is getting from the database, when the back button or the forward button is clicked, a call to the database is needed. The same thing happens to the Bookmark.

Thus, I think a good way to do it is to refactor the onClick method. A new method should be created. This method does the RPC call and has the parameters that the stored procedure needs. The onClick method will call this method. Also each token for the History class should contains the parameters that the stored procedure needs so then a RPC call can be made when the onHistoryChange is fired.

Above are the ideas that I have now to solve the History problem. I don't know if the browser can cached pages so then when Back or Forward button is clicked, the cached pages are displayed and no database calls needed.

No comments: