I JSF-Komponente mich entschieden, aber ich bin immer :(Nullpointer Das Problem Code lautet:getAttributes() erhalten ("attribute") in UIComponent Konstruktor null zurück
@FacesComponent(value="mycomponent0")
public class MyComponent extends HtmlPanelGroup{
MyComponent(){
String a0=this.getAttributes().get("attr0");
}
}
der taglib.xml des Tags der attr0 enthält Attribut und die Tags Nutzung ist:
<abc:mycomponent attr0="helloworld"></abc:mycomponent>
So ist meine Frage, was das Problem verursacht und wie man damit umgeht
Dank
?
Lesen BalusC Antwort hier, zur Erklärung: https://stackoverflow.com/questions/30404268/cannot-get-custom-component -Attribut aus Backing-Bean – Pazura