阿贾克斯updation和提交使用H:的commandButton [英] Ajax updation and submission using h:commandButton

查看:140
本文介绍了阿贾克斯updation和提交使用H:的commandButton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更新一个div并做使用部分提交< H:的commandButton> ,我有previously使用<电话号码: panelGroup中> &LT:;的commandButton&GT 通过设置AJAX属性为true,更新属性做部分划界案C>是statusBlock。我有&其中一些设计问题;号码:的commandButton> ,所以我不能用它,所以我必须使用< H:的commandButton>

How to update a div and do partial submission using <h:commandButton>, I have previously used <p:commandButton> to do partial submission by setting the ajax attribute to true and the update attribute to :statusBlock, where the id of the <h:panelGroup> is statusBlock. I am having some designing issues with <p:commandButton> so I cannot use it so I have to use <h:commandButton>.

推荐答案

这是要由筑巢做了<一href="http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/f/ajax.html"><$c$c><f:ajax>在其中。

This is to be done by nesting a <f:ajax> in it.

在影响,

<p:commandButton ... process="@form" update=":statusBlock" />

不完全一样

<h:commandButton ...>
    <f:ajax execute="@form" render=":statusBlock" />
</h:commandButton>

请注意,与PrimeFaces相当于细微的不同之处在于PrimeFaces默认为 @form 在这个过程中/执行,而&LT; F: AJAX&GT; 一个默认为 @this ,所以你可能需要明确指定执行=@表过,你没有指定在PrimeFaces组件的过程属性的所有地方。

Note that the subtle difference with the PrimeFaces equivalent is that PrimeFaces defaults to @form in the process/execute, while the <f:ajax> one defaults to @this, so you might need to explicitly specify execute="@form" over all place where you didn't specify the process attribute in the PrimeFaces component.

这篇关于阿贾克斯updation和提交使用H:的commandButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆