0

在一个jsf页面中,我从这样的烘焙豆中获取数据

<p:dataList value="#{userArtifacts}" var="art" itemType="artifact" type="inset">

我有一个 java.lang.StackOverflowError,

我的支持 bean 看起来像这样,我希望有一个生产者来缓存数据,然后可能会覆盖它......

我只想在 ViewAccessScope 期间维护列表

顺便说一句,如果将我的 Producer 更改为 SessionScope 我没有问题

@Named
@ViewAccessScoped
public class FArtifacts  implements Serializable{

@PostConstruct
public void init()
{
    artifacts= getArtifactController().getArtifact(15);
    System.out.println("[INIT] Get All Art");

}

@Produces
@ViewAccessScoped
@Named("userArtifacts")
public List<Article> getMyArtifacts()
{

    System.out.println("[CUSTOM] Return all");
    return  artifacts;

}

servlet 异常是:

javax.servlet.ServletException
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
    org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

循环的堆栈错误如下所示:

org.jboss.weld.bean.AbstractReceiverBean.getReceiver(AbstractReceiverBean.java:77)
    org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:317)
    org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307)
    org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.createNewInstanceOfBean(CodiUtils.java:69)
    org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.createNewBeanInstance(AbstractConversationBeanEntry.java:139)
    org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.getBeanInstance(AbstractConversationBeanEntry.java:84)
    org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultConversation.getBean(DefaultConversation.java:163)
    org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.GroupedConversationContext.resolveBeanInstance(GroupedConversationContext.java:185)
    org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.AbstractGroupedConversationContext.resolve(AbstractGroupedConversationContext.java:114)
    org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.AbstractGroupedConversationContext.create(AbstractGroupedConversationContext.java:79)
    org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.ConversationContextAdapter.get(ConversationContextAdapter.java:81)
    org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:599)
    org.jboss.weld.bean.AbstractReceiverBean.getReceiver(AbstractReceiverBean.java:77)
    org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:317)
    org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307)
    org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.createNewInstanceOfBean(CodiUtils.java:69)
    org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.createNewBeanInstance(AbstractConversationBeanEntry.java:139)
    org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.getBeanInstance(AbstractConversationBeanEntry.java:84)
    org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultConversation.getBean(DefaultConversation.java:163)
    org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.GroupedConversationContext.resolveBeanInstance(GroupedConversationContext.java:185)
    org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.AbstractGroupedConversationContext.resolve(AbstractGroupedConversationContext.java:114)
    org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.AbstractGroupedConversationContext.create(AbstractGroupedConversationContext.java:79)
    org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.ConversationContextAdapter.get(ConversationContextAdapter.java:81)
    org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:599)
4

1 回答 1

0

PrimeFaces 的旧版本会导致 Window-ID 参数出现问题。如果您使用的是新版本,您应该将问题报告给 PrimeFaces 团队。

于 2012-10-09T22:32:05.207 回答