Stop Wicket from repainting the whole page after each ajax call - wicket

On my wicket page I have a tree and a dynamic element that is mainly created via javascript and takes some time to paint.
My problem is that whenever I expand a tree node Wicket repaints the whole page, therefore reloading the javascript and repainting everything again. As expanding a tree node has no influence on the javascript there is no need to repaint the dynamic content, still the user has to wait several seconds until everything is rendered again.
Is there any way to stop wicket from reloading everything and just exchanging the new content? And how can I implement this within a tree?
I found the following link: http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/ but I am not sure if and how I can apply this to trees.
Update:
The problem solved itself together while I worked on another ajax problem I hadn't recognized earlier. Therefore I guess it was a side effect that is gone now. Still thanks.

A node's junction component calls AbstractTree#expand(T), which calls #updateBranch(T, AjaxRequestTarget): for NestedTree this will result in a repaint of the branch only, for TableTree this will repaint the whole table.
This should not result in a refresh of the whole page.
Put breakpoints in AjaxRequestHandler#add(Component,String) and Component#setResponsePage(Class) and see who is updating the whole page.

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?

Clear back navigation stack (Android)

If I call my app using a separate activity (not the normal initial route but, for instance, by overriding getInitialRoute() in a secondary FlutterActivity), or maybe even if I have no UI at all but a plugin I call into provides a platform UI of any kind, upon returning to my code, when I want to dismiss the functionality, the root route of my Flutter app is visible for a short moment. As an example, let's consider a printing scenario:
my app receives a share intent
I catch the intent with my Android code, send it to the Dart side
I act upon the intent, which involves displaying the Android printing UI
the user finishes printing or dismisses the UI
control returns to my code
before my Flutter app goes away, its initial route displays temporarily
Item 6 happens even if I call SystemNavigator.pop() in my item 5. The app exits all right, the funcionality is OK, but the momentarily visible root page is a visual nuisance.
So, what I would practically need is a way to clear the back stack when I reach item 5 to make sure I don't return to the root, not even for a moment.
I found something in the meantime that, at least for now, seems to work. It involves several steps:
make sure you use an extra route for this activity -- this ensures that it won't be the root page but this one the navigation returns to temporarily,
make sure the route shows an invisible page, practically an empty Container() -- this ensures the page will not show anything,
start this activity with a transparent background mode (including a transparent launch theme and referencing it in the manifest) -- this ensures the page will not even re-color the background temporarily,
use SystemNavigator.pop([animated: false]) when your code returns from the foreign UI -- this ensures that the extra page will disappear in the end. Animated actually does nothing, as the doc describes (which is unfortunate, actually, it would be nice to be able to suppress it).
These all combined make sure that, although the extra page is technically present for a short period of time, it isn't actually visible and distracting to the user.
I'm still very much open to suggestions that provide a real solution rather than a hacky workaround, if possible. :-)

VIA the GWT places API how do you change the URL/PLACE/Place-Token without reloading the page?

We have a giant table of orders in a GWT page. As users click on an order the bottom half of the page loads the details for that order.
When OnSelect of an entry in the table I could fire a place change event and change the place token from #OrdersPlace: to #OrdersPlace:123 where 123 is the order number. The problem is that would require the entire table to reload as well.
Is there a way to just change the URL from #OrdersPlace: to #OrdersPlace:123 so on a browser refresh I can get back to where I was by reading the Place Token without starting from scratch by reloading the entire activity?
If you are using Gin you can make the view a singleton and just have it hold onto the existing data. Think of it similar to removing the table from the DOM and then just re-adding it.
There are equivalent ways of doing the same thing without using Gin too.

How did Facebook implement the chat sidebar?

I'm trying to understand how Facebook implements the chat sidebar. It seems to stay there even as I change pages. For example, if I select some text inside the sidebar, then click to go to another Facebook page, the text remains selected. It's as if it was a separate frame, but when I look at the code, it's not.
All requests are made trough AJAX calls. Only "content" container is replaced when needed.
You don't actually "go" to another page. Just the "content" div gets updated.
There is a container DOM element called "fb_content", its content is replaced through straight-forward AJAX or more technically XMLHttpRequest. (Although when for example you enter an app, the entire page is refreshed.) To update the address bar they use the JavaScript History API.
In addition to what Zeno and lericson said (fb_content gets updated via ajax), the address bar also gets updated while maintaining the history (if you press back/forward).

Freeze Dom Manipulation

Is there a way to make firebug (or any other browser, or using any other tool) stop any dom manipulation from happening? Sometimes layout debugging a screen filled with on hover events is impossible, as the elements may disappear, and you can't see their compound layout.
I freeze DOM Manipulation in FF with Firebug clicking right button on Node and set "Stop when add/change child"
Actually this is quite easy to do for pages that are not constantly and autonomously being altered (even comet applications can be relatively stable for a few seconds): just save the page using firefox. It will save the current state of it all, ignoring all javascript and events. More than that, the styles will be easily viewable.
i wish there was a better way to do this, i wonder if it would be possible to do with a bookmarklet, im surprised theres no button in firebug or chrome to just freeze the dom, or is there one, that i dont know about?