📅  最后修改于: 2021-01-08 12:15:00             🧑  作者: Mango
我们可以使用render属性来指定要为Ajax更新呈现的组件。 render属性可以指向要更新的特定组件的ID标识符。也可以通过使用表达语言(EL)来识别组件。
render属性接受以下关键字:
Keyword | Function |
---|---|
@all | It is used to update every component. |
@none | It is used for no components are updated. |
@this | It is used for requesting component with the execute attribute is updated. |
@form | It is used to update the form that contains the requested component. |
@region | The region that contains the requesting component is updated. Use the |
我们应该通过设置ajaxRendered =“ true”使用
// index.xhtml
Partial View Update
// User.java
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
@ManagedBean
@RequestScoped
public class User {
String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
输出: