문제

We just upgraded to primefaces 5 and most everything works except:

public String showDialog() {
    RequestContext.getCurrentInstance().update("scheduleDialogID");
    RequestContext.getCurrentInstance().execute("scheduleDialog.show()");
    return "";
}

This is supposed to update and then popup a dialog box. It worked under 4 but it doesn't popup under 5. The method is still being called, it just doesn't do anything. That is, when I click on the button, I see the post go out and I can step thru the method with the debugger. But there is no return traffic showing up and the dialog doesn't popup.

Is this a bug in 5 or have things changed on how to invoke this? I've checked the 5 user's guide and it's not significantly different from 4.

도움이 되었습니까?

해결책

Accessing widgets can only be done in PF5 I believe from PF('scheduleDialog').show().

See the PrimeFaces Migration Documentation

4.0 to 5.0 Widgets must be referenced via "PF". e.g. PF('widgetVarName').show() instead of widgetVarName.show();

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top