Hi all,

I'm quite new to qooxdoo and I'd like to create a table that contains filters 
in the header cells (where you can narrow the results, something very similar 
to qx.ui.table.model.Filtered, for each column. E.g. when you have a column 
with dates, you have a filter in the header column that let's you define 
from-until, and when you have a String, it let's you define a REGEX, and when 
the column contains an enumeration of values, a dropdown menu shows all 
possibilities). 

This works great, I can provide my own custom header cell renderer and this 
renderer returns my own widgets which are then displayed in the header cells.

But I need to change the behavior of click events: Normally, when the user 
clicks on the header of a table the user either wants to:
1) sort the table 
2) rearrange the order of the columns in the table

But with my custom widget, it could be that the user wants to do something else 
in the header (e.g. enter some filter criteria). It's quite easy to find out 
what the user intents, I just have to implement a member function 
isInFilterArea(pageX, pageY) in my custom widget, and then I know whether the 
user clicked in the background of the header cell (ordinary behavior) or in any 
of the filter cell (special behavior).

I can do this by subclassing the qx.ui.table.pane.Scroller class, and by 
overwriting the _onMouseupHeader method. That works great. The problem is that 
when I overwrite the _onMouseupHeader, I need to access private members of the 
Scroller (e.g. "__ignoreClick"), but there is no setter or getter for this 
member in the Scroller implementation. It seems to work just fine, even when I 
use "generate.py build", but I think it's not the best way to change a private 
member of a superclass in a subclass.

One workaround is that I copy&paste the whole source code of 
qx.ui.table.pane.Scroller and create my own version (MyScroller) and do the 
change in there. I don't like this workaround because it prevents me to update 
to a future version of qooxdoo.

Another workaround would be when there would be a getter-/setter method for the 
private member "__ignoreClick". That would work, but the solution would only be 
a special solution to my current problem and would not resolve it in a generic 
way.

Any other ideas?
Any feedback is greatly appreciated.
Thanks
Michael


-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to