2

管理の特定のページを動的に構成する JSF 2/CDI webapp があります。Bean を使用して、含めるページを決定します。

<ui:include src="#{myBean.myDynamicPath}"/>

それを機能させるために、それを使用しているページを javax.faces.FULL_STATE_SAVING_VIEW_IDS コンテキスト パラメータに追加しました。JSF ライブラリを 2.1.7 から 2.1.9 に更新するまで、すべてが機能していました (そして最新のものと同じ問題があります)。

ページで何らかのアクションを実行しようとすると、長い例外が発生します。

Oct 18, 2012 6:14:10 PM com.sun.faces.util.Util checkIdUniqueness
SEVERE: JSF1007: Duplicate component ID tabs:imagesListForm:imagesListDG:j_idt55 found in view.
Oct 18, 2012 6:14:10 PM com.sun.faces.util.Util checkIdUniqueness
SEVERE: +id: j_id1
    type: javax.faces.component.UIViewRoot@4478de9f
        +id: javax_faces_location_HEAD

        ... (all the view tree here) ...

Oct 18, 2012 6:14:10 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SEVERE: Error Rendering View[/admin/objects/edit.xhtml]
java.lang.IllegalStateException: Component ID tabs:imagesListForm:imagesListDG:j_idt55 has already been found in the view.
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:842)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.util.Util.checkIdUniqueness(Util.java:826)
    at com.sun.faces.application.view.FaceletFullStateManagementStrategy.saveView(FaceletFullStateManagementStrategy.java:686)
    at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:89)
    at javax.faces.application.StateManager.getViewState(StateManager.java:553)
    at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewContextImpl.java:417)
    at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:300)
    at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
    at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:409)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
    at com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:163)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at uk.co.novaware.core.cdi.scope.ConversationFilter.doFilter(ConversationFilter.java:36)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
    at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at uk.co.novaware.core.cdi.scope.ConversationFilter.doFilter(ConversationFilter.java:36)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)

ui:include の動作方法は変更されましたか? 誰かがそれを再び機能させるという考えを持っていますか? JSF ライブラリを更新する必要があります。

4

1 に答える 1

0

簡単な修正: すべての要素の ID 値を指定してみてください。また、ID が一意であることを確認してください。

結果の html で生成された ID を確認して、問題の原因となっているタグを特定できます。

于 2013-02-19T07:41:18.180 に答える