I'm developing a JSF component library and I'm writing my components in the same way it's taught in the Java EE 7 Tutorial.
@FacesComponent("DemoMap")
public class MapComponent extends UICommand {
enum PropertyKeys {
alt, coords, shape, targetImage;
}
public String getAlt() {
return (String) getStateHelper().eval(PropertyKeys.alt, null);
}
public void setAlt(String alt) {
getStateHelper().put(PropertyKeys.alt, alt);
}
}
I want to know if there's any way to generate the custom component taglib (or at least the attributes part) automatically.
I feel it's a little annoying having to declare the attributes in the component class and then again in the taglib file.