0

我认为这很简单,但我被困住了。这个想法是想使用 liferay 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

怎么了?谢谢。

4

1 回答 1

3

堆栈跟踪建议您需要SerializableFlowWizard

于 2013-07-13T05:14:24.570 回答