The strangest thing about being a developer, to me, is that every time I think I have perfected my technique for something, I revisit it after some time away and find a better way of doing things. So this is my 4th iteration of how to pass and accept parameters through Expression Language. Allow me to introduce... the Mapper. (Quick side note: my old GetMap was based on the Map interface. Mapper is based on DataObject just because it is smaller. Mapper could just as easily implement Map if you prefer. Just as a quick reminder, the goal is to accept a parameter through Expression Language, like so: styleClass="#{MyViewBean.buttonStyle['MyButton']}" public class Mapper implements DataObject, Serializable { public static interface Function { Object map(Object in); } private final Function func; //This will be an anonymous implementation public Mapper(Function func) { this.func = func; } public Object getValue(Object key){ return func.map(key); // Call the an
I ran into an issue with FontAwesome a few months back, where a NoCache header was being injected at the server and FA was broken for any partial refresh. I convinced the admin to reverse that setting and all was well until last week... We had some users who were not getting any icons to appear. Ever. We tracked it down to a new Windows 10 setting for IE11 which disallows untrusted fonts. Since we do not set security protocols for our users, and there is no chance of ever convincing those admins to change this policy that they explicitly turned on, I had to find a new solution. I did some searching and it turned out to not be too difficult. First, here is the original implementation. The theme: <control> <name>Icon.Search</name> <property mode="override"> <name>tagName</name> <value>i</value> </property> <property mode="concat"> <name>styleClass</name> <value>fa fa-search&