The method update(String) from the type RequestContext is deprecated

依然范特西╮ 提交于 2019-12-24 07:44:20

问题


When I use next code part in my code : RequestContext.getCurrentInstance().update("growl");

there is a warning as "The method update(String) from the type RequestContext is deprecated" and in code part and crossed of "update".

RequestContext.getCurrentInstance().update("growl");

there is a warning as "The method update(String) from the type RequestContext is deprecated" and in code part and crossed of "update".

It is clear that this way is overdue. What is the modern way of doing this.


回答1:


It has been replaced with:

PrimeFaces.current().ajax().update(expressions);

See also:

  • https://github.com/primefaces/primefaces/wiki/Migration-Guide#62-to-70
  • https://primefaces.github.io/primefaces/7_0/#/ajax/rendering?id=dynamicruntime-updates


来源:https://stackoverflow.com/questions/56309757/the-method-updatestring-from-the-type-requestcontext-is-deprecated

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!