java.io.NotSerializableException: com.wings.marketingevent.u



我觉得这很简单,但我被这个问题卡住了。其想法是使用救生wizard,如下所示:https://www.primefaces.org/showcase/ui/panel/wizard.xhtml.我在xhtml上有这个:

<h:form id="frmCreate">
    <p:wizard flowListener="#{flowWizard.onFlowProcess}"> 
        <p:tab id="header" title="Header">
            <p:panel>
                /*1*/
            </p:panel>
        </p:tab>
        <p:tab id="detail" title="Detail">
            <p:panel>
                /*2*/
            </p:panel>
        </p:tab>
        <p:tab id="confirmation" title="Confirmation">
            <p:panel>
                /*3*/
            </p:panel>
        </p:tab>
    </p:wizard>
</h:form>

在豆子上:

@ManagedBean
@ViewScoped
public class FlowWizard {
    public String onFlowProcess(FlowEvent event) {
        return event.getNewStep();
    }
}

但当我试图点击NEXT按钮时,它并没有将页面更改为下一个选项卡,我在控制台上收到了以下错误消息:

11:16:21,663 ERROR [ExceptionHandlerAjaxImpl:62] java.io.NotSerializableException: com.wings.marketingevent.util.FlowWizard
javax.faces.FacesException: java.io.NotSerializableException: com.wings.marketingevent.util.FlowWizard
    at com.sun.faces.renderkit.ResponseStateManagerImpl.getViewState(ResponseStateManagerImpl.java:137)
    ...
Caused by: java.io.NotSerializableException: com.wings.marketingevent.util.FlowWizard
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
    ...
Jul 13, 2013 11:16:21 AM org.apache.catalina.core.ApplicationDispatcher invoke

怎么了?谢谢

stacktrace建议您需要在FlowWizard 上实现Serializable

相关内容

  • 没有找到相关文章

最新更新