Since last week, I've made two nice improvements to my dynamic view customizer:
- I added some support for twistie images when the referenced DB is on the same server. The code assumes that the referenced images are image wells with at least two entries, but I can't imagine why that wouldn't be the case in practice.
- I vastly improved my handling of color columns. Previously, I had been resorting to hacky methods like hidden
<div>s styled to take up the whole cell, but those were terrible and easy to break. Now, though, I'm doing it right: the code adds a value binding for the column's
style attribute to create the CSS for each cell, which is ideal.
- Empty categories now are translated to "(Not Categorized)", as in the client.
Now that my code is presentable (albeit oddly structured and uncommented), I figured I may as well toss it up on GitHub:
To note if you want to use this in your own project: it references the "mcl.JSFUtil" object, which started as the mindoo object of the same name and has since turned into my bin for common functions. The methods used here are
getSession(), which just gets the value of the JSF "session" variable, and the
specialTextDecode() functions from my string utils. Additionally, it references "com.raidomatic.xml.*", which are quick wrapper classes I made to ease basic XML access, and which are also available on GitHub: