论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Angeline Chan
PermissionsURL: Preventing page refresh on save
2012年4月13日 上午12:00
答复

Angeline Chan

等级: New Member

帖子: 3

加入日期: 2012年2月21日

最近的帖子

I'm currently showing a permissionsURL in an AUI Dialog box, and every time I click save the whole page reloads, showing just the permissions page (since the window state is POP_UP).

Is there a way to make the permissions page not refresh?
Jelmer Kuperus
RE: PermissionsURL: Preventing page refresh on save
2012年4月14日 上午7:40
答复

Jelmer Kuperus

等级: Liferay Legend

帖子: 1190

加入日期: 2010年3月10日

最近的帖子

The window state shouldn't be POP_UP but exclusive for aui dialogs since POP_UP will include the html head, body etc tags in the output, which you do not want because aui dialogs are really just nodes in the dom of the current page.

The easiest way to solve your problem is : keep the window state POP_UP but instead of opening the url in an aui dialog, open the url in a new window (with javascript and window.open)

If you must absolutely open the dialog in an aui dialog you will need to wait until the dialog has been created and then attach a javascript event listener to the form that listenens for submits, cancels the event and executes the submit as an ajax call. When the call is dont you should refresh only the dialog content based on the response.
This is a fair bit more involved (as well as more brittle)