Benoit, there is a LOT of code here, so it's difficult to determine what the
problem is. You should probably try taking just your header cell renderer
and modifying it so that it can be used as an ordinary widget, and ensure
that it works as desired.

Martin, this appears that it may be some kind appearance inheritance issue
in the header. Maybe you want to take a look -- especially since you're
already working on table at the moment?

Derrell


On Thu, Sep 23, 2010 at 10:12, benco <[email protected]> wrote:

>
> Hi Derrell,
>
> Sorry for the lack of infos. I thought it was clear enough.
>
> I just updated a bit the example.
>
> First of all, you can see that the textfield hasn't the correct decorator.
>
> Then, if you uncomment the line with the comment "uncomment", you can see
> it
> will apply to all filters and I don't know why.
>
> This strange behaviour is also different if the selectbox and the textfield
> are interchanged.
>
>
> Maybe I'm wrong in my code ... but I don't know what to do exactly.
>
>
> http://demo.qooxdoo.org/devel/playground/#%7B%22code%22%3A%20%22qx.Class.define%28%2522myHeaderCell%2522%252C%250A%257B%250A%2520%2520extend%2520%253A%2520qx.ui.table.headerrenderer.HeaderCell%252C%250A%250A%2520%2520construct%2520%253A%2520function%28%29%250A%2520%2520%257B%250A%2520%2520%2520%2520this.base%28arguments%29%253B%250A%250A%2520%2520%2520%2520var%2520layout%2520%253D%2520new%2520qx.ui.layout.Grid%28%29%253B%250A%2520%2520%2520%2520layout.setRowFlex%280%252C%25201%29%253B%250A%2520%2520%2520%2520layout.setColumnFlex%280%252C%25201%29%253B%250A%2520%2520%2520%2520layout.setRowFlex%281%252C%25201%29%253B%250A%2520%2520%2520%2520layout.setColumnFlex%281%252C%25201%29%253B%250A%2520%2520%2520%2520layout.setColumnFlex%282%252C%25201%29%253B%250A%2520%2520%250A%2520%2520%2520%2520this.setLayout%28layout%29%253B%250A%2520%2520%257D%252C%250A%250A%2520%2520properties%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520%252F**%2520header%2520cell%2520filter%2520widget%2520*%252F%250A%2520%2520%2520%2520filter%2520%253A%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520check%2520%253A%2520%2522Object%2522%252C%250A%2520%2520%2520%2520%2520%2520init%2520%253A%2520null%252C%250A%2520%2520%2520%2520%2520%2520nullable%2520%253A%2520true%252C%250A%2520%2520%2520%2520%2520%2520apply%2520%253A%2520%2522_applyFilter%2522%250A%2520%2520%2520%2520%257D%250A%2520%2520%257D%252C%250A%250A%2520%2520members%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520%252F%252F%2520property%2520apply%250A%2520%2520%2520%2520_applyFilter%2520%253A%2520function%28value%252C%2520old%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520if%2520%28value%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%252F*var%2520target%2520%253D%2520this.getChildControl%28%2522filter%2522%29%250A%2520%2520%2520%2520%2520%2520this._excludeChildControl%28%2522filter%2522%29%253B%250A%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520target.dispose%28%29%253B*%252F%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520this.getChildControl%28%2522filter%2522%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520else%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520this._excludeChildControl%28%2522filter%2522%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520%257D%252C%250A%2520%2520%250A%2520%2520%2520%2520%252F%252F%2520overridden%250A%2520%2520%2520%2520_createChildControlImpl%2520%253A%2520function%28id%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520var%2520control%253B%250A%250A%2520%2520%2520%2520switch%28id%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520case%2520%2522filter%2522%253A%250A%2520%2520%2520%2520%2520%2520%2520%2520control%2520%253D%2520this.getFilter%28%29%253B%250A%250A%2520%2520%2520%2520%2520%2520%2520%2520if%2520%28control!%253Dnull%29%250A%2520%2520%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520control.set%28%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520allowShrinkX%253A%2520true%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%257D%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520this._add%28control%252C%2520%257Brow%253A%25200%252C%2520column%253A%25200%252C%2520colSpan%253A2%257D%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520%2520%2520%2520%2520else%2520this._add%28new%2520qx.ui.basic.Label%28%27%27%29%252C%2520%257Brow%253A%25200%252C%2520column%253A%25200%257D%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520break%253B%250A%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520case%2520%2522label%2522%253A%250A%2520%2520%2520%2520%2520%2520%2520%2520control%2520%253D%2520new%2520qx.ui.basic.Label%28this.getLabel%28%29%29.set%28%250A%2520%2520%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520anonymous%253A%2520true%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520allowShrinkX%253A%2520true%250A%2520%2520%2520%2520%2520%2520%2520%2520%257D%29%253B%250A%250A%2520%2520%2520%2520%2520%2520%2520%2520this._add%28control%252C%2520%257Brow%253A%25201%252C%2520column%253A%25201%257D%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520break%253B%250A%250A%2520%2520%2520%2520%2520%2520case%2520%2522sort-icon%2522%253A%250A%2520%2520%2520%2520%2520%2520%2520%2520control%2520%253D%2520new%2520qx.ui.basic.Image%28this.getSortIcon%28%29%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520control.setAnonymous%28true%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520this._add%28control%252C%2520%257Brow%253A%25201%252C%2520column%253A%25202%257D%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520break%253B%250A%250A%2520%2520%2520%2520%2520%2520case%2520%2522icon%2522%253A%250A%2520%2520%2520%2520%2520%2520%2520%2520control%2520%253D%2520new%2520qx.ui.basic.Image%28this.getIcon%28%29%29.set%28%250A%2520%2520%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520anonymous%253A%2520true%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520allowShrinkX%253A%2520true%250A%2520%2520%2520%2520%2520%2520%2520%2520%257D%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520this._add%28control%252C%2520%257Brow%253A%25201%252C%2520column%253A%25200%257D%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520break%253B%250A%2520%2520%2520%2520%257D%250A%250A%2520%2520%2520%2520return%2520control%2520%257C%257C%2520this.base%28arguments%252C%2520id%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%257D%250A%257D%29%253B%250A%250Aqx.Class.define%28%2522myHeaderRenderer%2522%252C%250A%257B%250A%2520%2520extend%2520%253A%2520qx.ui.table.headerrenderer.Default%252C%250A%250A%2520%2520construct%2520%253A%2520function%28%29%250A%2520%2520%257B%250A%2520%2520this.base%28arguments%29%253B%250A%2520%2520%257D%252C%250A%2520%2520%250A%2520%2520statics%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520STATE_SORTED%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253A%2520%2522sorted%2522%252C%250A%2520%2520STATE_SORTED_ASCENDING%2520%253A%2520%2522sortedAscending%2522%250A%2520%2520%257D%252C%250A%2520%2520%250A%2520%2520members%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520%252F%252F%2520overridden%250A%2520%2520%2520%2520createHeaderCell%2520%253A%2520function%28cellInfo%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520var%2520widget%2520%253D%2520new%2520myHeaderCell%28%29%253B%250A%2520%2520%2520%2520widget.setMinHeight%2860%29%253B%250A%2520%2520%2520%2520this.updateHeaderCell%28cellInfo%252C%2520widget%29%253B%250A%250A%2520%2520%2520%2520return%2520widget%253B%250A%2520%2520%2520%2520%257D%252C%250A%250A%250A%2520%2520%2520%2520%252F%252F%2520overridden%250A%2520%2520%2520%2520updateHeaderCell%2520%253A%2520function%28cellInfo%252C%2520cellWidget%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520var%2520DefaultHeaderCellRenderer%2520%253D%2520myHeaderCell%253B%250A%250A%2520%2520%2520%2520%252F%252F%2520check%2520for%2520localization%2520%255BBUG%2520%25232699%255D%250A%2520%2520%2520%2520if%2520%28cellInfo.name%2520%2526%2526%2520cellInfo.name.translate%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520cellWidget.setLabel%28cellInfo.name.translate%28%29%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520else%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520cellWidget.setLabel%28cellInfo.name%29%253B%250A%2520%2520%2520%2520%257D%250A%250A%2520%2520%2520%2520%252F%252F%2520Set%2520image%2520tooltip%2520if%2520given%250A%2520%2520%2520%2520var%2520widgetToolTip%2520%253D%2520cellWidget.getToolTip%28%29%253B%250A%2520%2520%2520%2520if%2520%28this.getToolTip%28%29%2520!%253D%2520null%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520if%2520%28widgetToolTip%2520%253D%253D%2520null%29%250A%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%252F%252F%2520We%2520have%2520no%2520tooltip%2520yet%2520-%253E%2520Create%2520one%250A%2520%2520%2520%2520%2520%2520%2520%2520widgetToolTip%2520%253D%2520new%2520qx.ui.tooltip.ToolTip%28this.getToolTip%28%29%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520cellWidget.setToolTip%28widgetToolTip%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%252F%252F%2520Link%2520disposer%2520to%2520cellwidget%2520to%2520prevent%2520memory%2520leak%250A%2520%2520%2520%2520%2520%2520%2520%2520qx.util.DisposeUtil.disposeTriggeredBy%28widgetToolTip%252C%2520cellWidget%29%253B%250A%2520%2520%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520%2520%2520else%250A%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%252F%252F%2520Update%2520tooltip%2520text%250A%2520%2520%2520%2520%2520%2520%2520%2520widgetToolTip.setLabel%28this.getToolTip%28%29%29%253B%250A%2520%2520%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520%257D%250A%250A%2520%2520%2520%2520cellInfo.sorted%2520%253F%250A%2520%2520%2520%2520cellWidget.addState%28DefaultHeaderCellRenderer.STATE_SORTED%29%2520%253A%250A%2520%2520%2520%2520cellWidget.removeState%28DefaultHeaderCellRenderer.STATE_SORTED%29%253B%250A%250A%2520%2520%2520%2520cellInfo.sortedAscending%2520%253F%250A%2520%2520%2520%2520cellWidget.addState%28DefaultHeaderCellRenderer.STATE_SORTED_ASCENDING%29%2520%253A%250A%2520%2520%2520%2520cellWidget.removeState%28DefaultHeaderCellRenderer.STATE_SORTED_ASCENDING%29%253B%250A%2520%2520%2520%2520%250A%2520%2520%2520%2520var%2520tcm_columns%2520%253D%2520cellInfo.table.getTableColumnModel%28%29.getUserData%28%27config%27%29%253B%250A%2520%2520%2520%2520if%2520%28typeof%28tcm_columns%255BcellInfo.col%255D.filter%29%253D%253D%27string%27%29%250A%2520%2520%2520%2520%257B%2520%2520%250A%2520%2520%2520%2520%2520%2520var%2520f%253B%2520var%2520clazz%253B%250A%2520%2520%2520%2520%2520%2520clazz%2520%253D%2520qx.Class.getByName%28tcm_columns%255BcellInfo.col%255D.filter%29%253B%250A%2520%2520%2520%2520%2520%2520f%2520%253D%2520new%2520clazz%28%29%253B%250A%2520%2520%2520%2520%2520%2520cellWidget.setFilter%28f%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520else%250A%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520if%2520%28typeof%28tcm_columns%255BcellInfo.col%255D.filter%29%253D%253D%27function%27%29%2520cellWidget.setFilter%28tcm_columns%255BcellInfo.col%255D.filter%28%29%29%253B%250A%2520%2520%2520%2520%2520%2520else%2520if%2520%28typeof%28tcm_columns%255BcellInfo.col%255D.filter%29!%253D%27undefined%27%29%2520cellWidget.setFilter%28tcm_columns%255BcellInfo.col%255D.filter%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%2520%257D%250A%2520%2520%257D%250A%257D%29%253B%250A%250Avar%2520model%2520%253D%2520new%2520qx.ui.table.model.Simple%28%29%253B%250Amodel.setColumns%28%255B%27col%25201%27%252C%2520%27col%25202%27%255D%29%253B%250Amodel.setData%28%255B%255B1%252C2%255D%252C%255B2%252C3%255D%252C%255B3%252C4%255D%255D%29%253B%250A%250Avar%2520table%2520%253D%2520new%2520qx.ui.table.Table%28model%29%253B%250A%250Avar%2520tcm%2520%253D%2520table.getTableColumnModel%28%29%253B%250A%250Avar%2520config%2520%253D%2520%255B%257Bfilter%253Afunction%28%29%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520var%2520sbox%2520%253D%2520new%2520qx.ui.form.SelectBox%28%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520sbox.add%28new%2520qx.ui.form.ListItem%28%27elem%25201%27%252C%27%27%252C%27elem1%27%29%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520sbox.add%28new%2520qx.ui.form.ListItem%28%27elem%25202%27%252C%27%27%252C%27elem2%27%29%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520sbox.add%28new%2520qx.ui.form.ListItem%28%27elem%25203%27%252C%27%27%252C%27elem3%27%29%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520return%2520sbox%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%257D%257D%252C%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%257Bfilter%253Afunction%28%29%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520var%2520tf%2520%253D%2520new%2520qx.ui.form.TextField%28%29%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%252F%252F%2520tf.set%28%257Bappearance%253A%27table-editor-textfield%27%257D%29%253B%2520%252F**%2520uncomment%2520here%2520**%252F%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520return%2520tf%253B%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%257D%255D%253B%250A%250Atcm.setUserData%28%27config%27%252Cconfig%29%253B%250A%250Atcm.setHeaderCellRenderer%280%252C%2520new%2520myHeaderRenderer%28%29%29%253B%250Atcm.setHeaderCellRenderer%281%252C%2520new%2520myHeaderRenderer%28%29%29%253B%250A%250Athis.getRoot%28%29.add%28table%252C%257Bedge%253A40%257D%29%253B%250A%250A%250A%22%7D
>
> Best regards,
>
> BenoƮt
> --
> View this message in context:
> http://qooxdoo.678.n2.nabble.com/problem-with-a-custom-headerCellRenderer-s-appearance-tp5558486p5563209.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to