문제

I've been trying to programmatically insert composite components into an UIPanel. For this I tried to use BalusC's includeCompositeComponent method.

Only I have a NullPointerException on the first application.createComponent. It points to :

com.sun.faces.application.view.FaceletViewHandlingStrategy.getComponentMetadata(FaceletViewHandlingStrategy.java:237) [jsf-impl-2.1.25.jar:2.1.25]

Apparently there's no FaceletFactory in my FacesContext. I've looked in Debug mode into facesContext.getAttributes() and seen none.

Did I miss something ?

I use :

  • JBoss 7.1
  • jsf-impl-2.1.25
  • RichFaces-4.3.4
도움이 되었습니까?

해결책

My problem was the phase in which I was trying to insert my components. It was on postInvokeAction.

By doing it in postAddToView, I don't have the problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top