Java “无法制作”;删除“;在弹出的“面”面板中

Java “无法制作”;删除“;在弹出的“面”面板中,java,jboss,richfaces,Java,Jboss,Richfaces,我正在使用richfaces 3.3.3开发一个简单的应用程序,我想从扩展表中“删除”一项 这是我的bean代码 public void remove(){ System.out.println("suppression effectué" + this.selected); } 这是我的面板代码 <rich:modalPanel domElementAttachment="form" id="confirmation" autosized="true"&g

我正在使用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>

你能帮我吗?

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

onclick="if (!ajaxRequestContainsErrors()) Richfaces.hideModalPanel('confirmation');"
在这里,您会看到
取消
按钮的错误,而不是
删除
按钮的错误。

如果可能的话,用
a4j:commandButton
更改
h:commandButton
以隐藏模型面板而不进行页面刷新

糟糕的英语顺便说一句:p谢谢,有什么答案吗?没有,对不起,没有我的编程语言:p
onclick="if (!ajaxRequestContainsErrors()) Richfaces.hideModalPanel('confirmation');"