Bug0019

Description
Tree view dissapears when you annotate stuff

When you click annotate on an inode then fill it in the click submit then close the window you lose the tree view in the GUI.

No backtrace
Logged
2007-03-29
Logged By

AlanLeigh

Assigned to
Status
Closed

Get back to the BugIndex


I think this might be because the query has random stuff left in it when we do a refresh.

S: Not really. The reason this bug occurs is because pyflag has a slightly different concept of windowing than the javascript model. When most people think of a window, they think of the entire window as belonging to it.

This is not the case with js because every iframe is its own window. The Tree widget is made up of 3 iframes and the table widget is in one of them. PF uses a complex window.parent system to try to get around this stupid js limitation (otherwise you cant do a referesh to parent from within an iframe). PyFlag goes into much length to ensure that each frame carries the name of the containing window so it can be treated as an element of that window.

The pyflag GUI can open links and hint them at which window they should open in. Currently supported are "parent", "self" and "popup"

Parent - closes the current window and opens the URL in the window which opened us - this is only suitable for popups. Popup - opens a new window and draws the target in that. Pane - keeps the current pane.

Whats happening here is that the popup wants to refresh to its parent (pyflag parent window) which is actually the full window (the tree is contained within it). So the GUI is actually doing the right thing here. Put things in another light - there are some cases when you do actually want to refresh directly to the full window (like when the popup wants to load a whole different report).

I closed this bug for now by adding another option called parent_pane to the pane targets. This allows both behaviours now (i.e. refresh just to the calling pane or the whole window). Unfortunately this is not perfect because it highly depends on which pane actually opened the window. For example say you make a tree widget. The tree widget has a big iframe which loads two little iframes. If you put the toolbar on the big iframe then any refreshes to parent_pane will go into that pane not the small iframes.

This is a problem with the js model i think.