2

我定义了以下表格:

<ui:define name="body">
    <h:form
        id="posForm"
        styleClass="well span12">
....
        <o:commandScript
            id="createTransactionCommandScript"
            rendered="#{multiTenantBean.currentAccount.stripePublishableKey != null}"
            name="createTransaction"
            actionListener="#{posMB.createTransaction}"
            execute="@form"
            render="@form" />
    </h:form>
</ui:define>

当我加载我的页面时,我会反复向 Stdout 吐出这个错误:

Apr 11, 2013 6:31:53 PM org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
WARNING: Unsupported component-family/renderer-type: org.omnifaces.component.script/javax.faces.Button
Apr 11, 2013 6:31:53 PM javax.faces.component.UIComponentBase getRenderer
WARNING: No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /pos.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_m][Class: javax.faces.component.html.HtmlForm,Id: posForm][Class: org.omnifaces.component.script.CommandScript,Id: createTransactionCommandScript]} (component-family=org.omnifaces.component.script, renderer-type=javax.faces.Button)
Apr 11, 2013 6:31:53 PM org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
WARNING: Unsupported component-family/renderer-type: org.omnifaces.component.script/javax.faces.Button
Apr 11, 2013 6:31:53 PM javax.faces.component.UIComponentBase getRenderer
WARNING: No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /pos.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_m][Class: javax.faces.component.html.HtmlForm,Id: posForm][Class: org.omnifaces.component.script.CommandScript,Id: createTransactionCommandScript]} (component-family=org.omnifaces.component.script, renderer-type=javax.faces.Button)
Apr 11, 2013 6:31:53 PM org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
WARNING: Unsupported component-family/renderer-type: org.omnifaces.component.script/javax.faces.Button
Apr 11, 2013 6:31:53 PM javax.faces.component.UIComponentBase getRenderer
WARNING: No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /pos.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_m][Class: javax.faces.component.html.HtmlForm,Id: posForm][Class: org.omnifaces.component.script.CommandScript,Id: createTransactionCommandScript]} (component-family=org.omnifaces.component.script, renderer-type=javax.faces.Button)
Apr 11, 2013 6:31:53 PM org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
WARNING: Unsupported component-family/renderer-type: org.omnifaces.component.script/javax.faces.Button
Apr 11, 2013 6:31:53 PM javax.faces.component.UIComponentBase getRenderer
WARNING: No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /pos.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_m][Class: javax.faces.component.html.HtmlForm,Id: posForm][Class: org.omnifaces.component.script.CommandScript,Id: createTransactionCommandScript]} (component-family=org.omnifaces.component.script, renderer-type=javax.faces.Button)

我在这里做错了什么?

4

1 回答 1

3

你没有做错什么。已经从它扩展的类继承了渲染器类型,而它实际上CommandScript应该自己设置为渲染器。MyFaces 只是警告无法解析相关的渲染器实现。这在 OmniFaces 1.5 中已修复。javax.faces.ButtonUICommandnullCommandScript

于 2013-04-12T00:01:32.230 回答