Hi Isomorphic,
I have a use case where I currently mark some ListGrid entries as non-editable by using a light grey color:
Now I wanted to add some data Hilites, but it seems that Hilite and @Overriding getCellCSSText() do not work together. Is that correct?
IMO this would be perfectly fine as I assume you use getCellCSSText() as hookpoint for the Hilite-system.
Of course I could do everything in getCellCSSText(), but I assume you created the more declarative Hilite-system to avoid this, so I'm asking here.
Generally speaking it should be possible to use these boolean methods with just Hilites and no getCellCSSText(), but as they use more than just record-data, I don't know how to do it.
Can you suggest a way?
Would it be possible to have a Criteria constructor taking only a method name with a 1-ListGridRecord-argument signature and pass the record to this method during HiLite-Criteria evaluation?
I don't know if GWT allows this (the method could be seen as dead code and be removed). Is there an other way I'm not seeing right now?
Thank you & Best regards,
Blama
I have a use case where I currently mark some ListGrid entries as non-editable by using a light grey color:
Code:
@Override protected String getCellCSSText(ListGridRecord record, int rowNum, int colNum) { String color = null; // Set gray when not group row and read-only if (!MyList.this.isGroupNode(record) && !getReadWrite(record)) color = "color:#888;"; // Output result return (color == null) ? super.getCellCSSText(record, rowNum, colNum) : color; }
IMO this would be perfectly fine as I assume you use getCellCSSText() as hookpoint for the Hilite-system.
Of course I could do everything in getCellCSSText(), but I assume you created the more declarative Hilite-system to avoid this, so I'm asking here.
Generally speaking it should be possible to use these boolean methods with just Hilites and no getCellCSSText(), but as they use more than just record-data, I don't know how to do it.
Can you suggest a way?
Would it be possible to have a Criteria constructor taking only a method name with a 1-ListGridRecord-argument signature and pass the record to this method during HiLite-Criteria evaluation?
I don't know if GWT allows this (the method could be seen as dead code and be removed). Is there an other way I'm not seeing right now?
Thank you & Best regards,
Blama
Comment