PrimeFaces: & lt; P: inline & gt; Inside & lt; P: dataTabl…

综合技术 2018-08-19 阅读原文

In my application, I use PrimeFaces's


inside


component to implement update feature as following:

And this is my Managedbean:

@ManagedBean(name = "mrBean")
@ViewScoped
public class MrBean {
   private List menu;
   private boolean    canConfirm;

   public void changeName() {
      this.canConfirm = true;
   }

   public void confirm() {
      System.out.println("Updated database!");
   }
}

When I finished editing name
and clicked Save, my Eat button was not enabled.

I'd be very grateful if you could show me what I have done wrong here. I am using PrimeFaces 3.0.RC2.

Works just fine for me,

I guess you omitted some code from the one you posted on purpose, but if not, will post the one I generated beside the one you posted...

private String  someText ="xxx";

public String getSomeText() {
    return someText;
}

public void setSomeText(String someText) {
    this.someText = someText;
}

 public boolean isReadyToEat() {
    return readyToEat;
 }

public void setReadyToEat(boolean readyToEat) {
    this.readyToEat = readyToEat;
}

and wrapped the code of the xhtml with

and it works 100%

output is

Ready to eat: true
YUMMY!
Hello, buddy!

责编内容by:Hello, buddy!阅读原文】。感谢您的支持!

您可能感兴趣的

WP REST API custom endpoint: only allow access fro... This is a way to discourage direct access to your custom WP REST API endpoint. It will disallow access from other sites...
Laratables: Ajax support of DataTables in Laravel Laratables is a package by Gaurav Makhecha to handle server-side AJAX of DataTables (Table plug-in for jQuery) in...
Displaying multiple images with an ajax response I am trying to display multiple images coming from a remote server on a single page, the page is a html file where pu...
Return information to multiple fields I am attempting to create a simple web element that on request, retrieves the page title / meta description of a webpage...
小白来实现一个ajax跨域请求 写在前面: 本文主要总结整理ajax使用方法背景知识点的详细解析,以及ajax跨域的具体使用方式并且对栗子进行了讲解,需要的朋友可以过来参考下,喜欢的可以点波赞,或者关注一下本人,希望通过本文能够作为一个ajax的查找资料,不懂a...