I want to use a viewPanel with several TabularViews in a lens. My toy
exhibit at http://members.tele2.nl/m.d.nauta/experimenteel/KootExhibit.html
does show what I want. (At the moment the lenses still contain a
collection of tables and the viewPanel, but once I am convinced the
viewPanel will work, the tables will be removed.) The viewPanel is
created in the onshow handler.
So far no problem. Trouble arises when one tries to change the view,
or sort on a column of the displayed TabularView. The reason is that
the handler defined in SimileAjax.WindowManager.registerEvent calls
_popToLayer on a mouseclick. But the layer that is poped to is the
getHighestLayer before the lens-bubble is displayed because this is
run from the onshow handler of the lens. So the bubble disappears on a
mouseclick, even if that click is within the bubble and ment to only
sort a colum or change the displayed view.
The solution that I use in my toy exhibit is to change
SimileAjax.WindowManager.registerEvent by removing the setting of the
layer to the highestLayer if layer is null and to add to handler2 an
if-clause that sets the layer to the parent layer of the element that
is clicked. Is this the right solution for this problem or is there
another solution?
Michiel
SimileAjax.WindowManager.registerEvent = function(elmt, eventName,
handler, laye
r) {
/*
if (layer == null) {
layer = SimileAjax.WindowManager.getHighestLayer();
}
*/
var handler2 = function(elmt, evt, target) {
if (layer == null) {
layer = SimileAjax.WindowManager.getParentLayer(elmt);
}
if (SimileAjax.WindowManager._canProcessEventAtLayer(layer)) {
SimileAjax.WindowManager._popToLayer(layer.index);
try {
handler(elmt, evt, target);
} catch (e) {
SimileAjax.Debug.exception(e);
}
}
SimileAjax.DOM.cancelEvent(evt);
return false;
}
SimileAjax.DOM.registerEvent(elmt, eventName, handler2);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---