フォーラム

ホーム » Alloy UI » English

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
Drew Blessing
Alloy instance not persisting
2012/08/02 8:53
答え

Drew Blessing

ランク: Junior Member

投稿: 79

参加年月日: 2011/01/27

最近の投稿

I'm trying to manipulate a dialog in Alloy that mimics the way it is done in the Tasks and Microblogs portlets. There is also a Gist that shows how to set up the JS file to start with - https://gist.github.com/1054306

So, I basically set that up in main.js and changed the namespace as appropriate. Then, in my JSP of my portlet I have a click listener. On click, I call "Liferay.MyPlugin.displayPopup('url','title');" Boom...the dialog displays. Yay!

However, then I do some processing in the dialog. On success, I call "Liferay.MyPlugin.closePopup();" However, it summons a new popup and closes that one. I then added a test function to the main.js file to see what was up. I simply had the function alert the value of "instance._popup." So, when I call "Liferay.MyPlugin.testFunction();" it alerts "undefined" in the browser. It appears that my instance object is not persisting. Any ideas on why I am not able to access the same instance object?

If you need specific code examples to see exactly what I'm doing, I will create Gists. Just ask. Thanks for your help