【问题标题】:Cannot made "delete" in popup richfaces panel无法在弹出的 Richfaces 面板中“删除”
【发布时间】:2013-06-24 14:25:54
【问题描述】:

我正在使用 Richfaces 3.3.3 开发简单的应用程序,我想从扩展表中“删除”一个项目

这是我的 bean 代码

public void  remove(){
        System.out.println("suppression effectué" + this.selected);

    }

这是我的面板代码

<rich:modalPanel domElementAttachment="form" id="confirmation" autosized="true">
            Are you sure you want to delete the row?
            <h:form>
            <h:commandButton value="Cancel" onclick="#{rich:component('confirmation')}.hide(); return false;" />
            <h:commandButton value="Delete" action="#{backGesDS.remove}" />
            </h:form>
        </rich:modalPanel>

但不幸的是我遇到了这个错误

      javax.faces.FacesException: javax.el.ELException: /gesDS.xhtml @53,172 onclick="#{rich:component('confirmation')}.show();return false": Function 'rich:component' not found

你能帮我吗???

【问题讨论】:

  • 糟糕的英语顺便说一句:P
  • 谢谢,有什么答案吗?
  • 不,抱歉不是我的编程语言:p

标签: java jboss richfaces


【解决方案1】:

根据我对您问题的理解回答
使用此代码更改 cancel 按钮中的 onclick 代码

onclick="if (!ajaxRequestContainsErrors()) Richfaces.hideModalPanel('confirmation');"

这里你会得到 cancel 按钮的错误,而不是 delete 按钮的错误。
如果可能的话,将 h:commandButton 更改为 a4j:commandButton 以隐藏模型面板而不刷新页面

【讨论】:

    猜你喜欢
    • 2012-04-02
    • 2014-07-06
    • 2023-03-10
    • 2014-07-20
    • 2011-10-28
    • 2011-10-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多