带有ICEFaces的java.lang.UnsupportedOperationException

时间:2011-08-21 19:53:39

标签: spring icefaces

我在视图尝试渲染时遇到此异常,我使用icefaces验证器标签以简单的冰形式,我也使用spring实例化托管bean但它在其他页面中正常工作,所以我不觉得春天是问题......这是例外:

  

java.lang.UnsupportedOperationException:实现SWF集成   com.icesoft.util.SeamUtilities.getSpringFlowId(SeamUtilities.java:542)     在   com.icesoft.faces.renderkit.dom_html_basic.FormRenderer.encodeBegin(FormRenderer.java:146)     在   com.icesoft.faces.component.ext.renderkit.FormRenderer.encodeBegin(FormRenderer.java:42)     在   org.icefaces.impl.renderkit.RendererWrapper.encodeBegin(RendererWrapper.java:50)     在   javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:824)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1641)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)     在   com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:389)     在   com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127)     在   com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)     在com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)at   com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)     在javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)     等等......

这是我的页面代码:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:include src="generic-modules/header.xhtml" />
<h:body>
    <ui:include src="generic-modules/header-navigation.xhtml" />
    <div id="bd">
        <div class="registration">
            <div class="form">
                <ice:form>
                    <ice:inputText id="Name" value="#{applicant.name}" partialSubmit="true">
                        <f:validateLength maximum="45" minimum="5" />
                    </ice:inputText>
                    <ice:message style="color: red;" id="nameError" for="name" />
                    <br />
                    <ice:inputText id="Address" value="#{applicant.address}" partialSubmit="true">
                        <f:validateLength maximum="45" minimum="10" />
                    </ice:inputText>
                    <ice:message style="color: red;" id="addressError" for="address" />
                    <br />
                    <ice:inputText id="Workplace" value="#{applicant.workplace}" partialSubmit="true">
                        <f:validateLength maximum="45" minimum="10" />
                    </ice:inputText>
                    <ice:message style="color: red;" id="workplaceError" for="workplace" />
                    <br />
                    <ice:inputText id="Telephone" value="#{applicant.telephone}" partialSubmit="true">
                        <f:validateLength maximum="10" minimum="8" />
                    </ice:inputText>
                    <ice:message style="color: red;" id="telephoneError" for="telephone" />
                    <br/>
                    <ice:inputText id="Photo" value="#{applicant.photo}" partialSubmit="true">
                        <f:validateLength maximum="80" minimum="2" />
                    </ice:inputText>
                    <ice:message style="color: red;" id="photoError" for="photo" />
                    <br/>
                    <ice:inputText id="Username" value="#{applicant.username}" partialSubmit="true">
                        <f:validateLength maximum="10" minimum="8" />
                    </ice:inputText>
                    <ice:message style="color: red;" id="usernameError" for="username" />
                    <br/>
                    <ice:inputText id="Password" value="#{applicant.password}" partialSubmit="true">
                        <f:validateLength maximum="10" minimum="8" />
                    </ice:inputText>
                    <ice:message style="color: red;" id="passwordError" for="password" />
                    <br/>
                    <ice:commandButton value="Register" actionListener="#{applicant.save}" />
                    <br />
                    <!-- <ice:outputText value="Age: " />
                    <ice:outputText value="" /> -->
                </ice:form>
            </div>
        </div>
    </div>
</h:body>
</html>

我不知道出了什么问题,因为我只使用了icefaces教程的代码,如果有人能帮助我我很感激

2 个答案:

答案 0 :(得分:1)

目前,我不相信这个问题有解决方案。我昨天在同样的事情上工作了大约8个小时。请参阅icefaces bug跟踪器上的this页面:。他们实际上已将问题标记为已解决,并且有教程声称icefaces与SWF 2.X集成,但问题的简单事实是seamutilities.java class中的这一小段代码:

if (true)
{
   throw new UnsupportedOperationException("Implement SWF integration");
}

我已尝试在通过当前测试版实现修复程序之前运行各种版本的icefaces,我仍然有问题。我现在要说的是,两者不相容。

答案 1 :(得分:0)

我在冰论坛上遇到这个例外,并且作为一种解决方法,我使用jsf形式而不是iceforums,到目前为止它与我合作。