2013-10-10 17 views
0

我一直在嘗試以編程方式將複合組件插入到UIPanel中。爲此,我嘗試使用BalusC的includeCompositeComponent methodcreateComponent上的NullpointerException - no FaceletFactory

只有第一個application.createComponent有一個NullPointerException。它指向:

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

顯然在我的FacesContext中沒有FaceletFactory。我在調試模式下查找了facesContext.getAttributes()並沒有看到任何東西。

我錯過了什麼嗎?

我用:

  • 的JBoss 7.1
  • JSF-IMPL-2.1.25
  • RichFaces的-4.3.4

回答

1

我的問題是該階段中,我試圖插入我的組件。它在postInvokeAction

通過這樣做在postAddToView,我沒有問題。

+0

其實,'postAddToView'是唯一正確的事件。 – BalusC

+0

好吧,我沒有NullPointerException了。但我還有其他問題。我會看看'postAddToView'是否可以糾正它們。謝謝。 – gillup

+0

答案已更正。再次感謝。 – gillup