Using back button doesn't clear old content - gwt

I'm using gwtp and I have some troubles with the browsers back button.
My DefaultPlace is a login page (root content). If the the login is correct, it directs you to a welcome page (MainPagePresenter) with a menu bar. This menu bar is always visible when going through its items. Clicking on an item reveals specific content (setInSlot) . When you use the back button it changes the token name to the token used before but you still see the old content.
My question is: How do I get back to the content which was shown before?

You shoud use the GWTP presenter lifecycle. When you use back button, the previous presenter is revealed. You should override onReveal() and onHide() to clean or save the presenter and view state.
If you want clean a presenter when the place changed, you should override onHide() and in the body you can clean the view before the place change.

Related

The route.first page (MyHomePage) is updating even without a callback, function or notification listener

I can't really share code for this as it's for my entire ~large~ application, but is it normal for a flutter application's lower navigation stack to be updated when the current page is?
For example, in this page I have a standard form with a few TextFormFields:
Whenever I click on one to start typing the page sets state as expected, but by adding print("Update"); inside the build function of the bottom page of the navigation stack, I can see that page is being updated too. It happens on all pages I put on top of the first route page. I've also been experiencing that the home page gets slower as the app has been open for longer, could this be a cause for that problem too?

How to add back and refresh button to PWA title bar

I'm writing a PWA app. What I want is back and refresh button on title bar. But I got nothing.
The display property in the manifest file must be either "fullscreen" or "standalone". In both cases, the back and refresh buttons won't be shown.
Set the display property as "minimal-ui" or "browser", the back and refresh button will be shown.
Note: Clear cache/Uninstall the PWA for changes to take place

Ionic either doesn't show back button or page doesn't load at all

I am trying to create a new page from an existing page with a back button. I have recreated the issue here in a plunkr. In the trip analytics option When I click the first card i.e. Enter Home address. I want the todayDetail .html page to come up with a back button. I have already tried two approaches
First approach The ng-click approach. In which I give $state.go(statename) to give that page. But then I wouldn't get a back button as the navigation stack is changed.
Second approach - If I keep the navigation stack i.e. keep the state name as initial.trips.today.todayDetail. The page doesn't load at all.
What is the issue? How should I go about it?

Refreshing the webview in iPhone app

In the home page of my iphone application i am calling a web page, users can do some actions(comment,like etc) from other tabs of my app-After that,when the come back to home page the web page must be refreshed(eg:- comment/like count must be incresed)
If user do the refreshing of home page(scroll up from top) the page is getting refreshed,but the client wanted to refresh it automatically
So i have loaded the web page in viewDidAppear method,
Now problem is-whenever user come back to home page it gets refreshed and showing from the top(if user go to detail from some link at bottom and come back,webpage shows the top)
how to prevent this,or is there any better idea for automatic refreshing ?
Perhaps a better way would be to use javascript to download the updates in the background, then update your content appropriately. UIWebView has a method –stringByEvaluatingJavaScriptFromString: which can be used to run javascript code. You could supply the method call to perform the refresh in your -viewDidLoad method.
Another option could be to download the HTML in the background, and compare it too what is displayed, if different, swap. That way content is only refreshed when needed. Although that still gives you the problem of content moving to the top.

how reset all contents of page without reloading page in GWT

I have tabpanel in my application. i just want to refresh all the contents of the tab whenever i navigate through different tabs. Currently i am using Window.Location.Reload for the same. But is there any other way out for the same?
Add a TabListener to the TabPanel using the method addTabListener(TabListener listener). You will be notified when a tab is selected. You can put your logic of refresh in that method.