PDA

View Full Version : Portal without initially rendered portlets



raz0r1
17 Apr 2013, 11:41 AM
Hi,
maybe some of you know the Portal Layout by Loiane: http://try.sencha.com/extjs/4.1.0/community/extjs4-mvc-portal/
(http://try.sencha.com/extjs/4.1.0/community/extjs4-mvc-portal/)I like that and try to use it in my application but I don't want the portlets to be rendered on startup.
Instead I try to esablish that I have a panel containing icons, that I can drag into the portal where the "icons" are changed to the final portlets that should be shown.


Now the problem is, that the first time the panel is draged into to portal everything is fine, but if you move the dragged panel into another column it is not shown correctly.

Every help/advice/idea is welcome because my knowledge is at the end^^


You can see the current application here: http://test.ff-fischbek.de/
1. Click on "Dashboard"
2. Expand the "Available widgets" panel
3. Drag the Current Day "Thing" into the panel
4. Move the occuring panel to another column

The problematic part (I think) is can be found in http://test.ff-fischbek.de/js/app/base/PortalDropZone.js line 142 to 148


The files that (I think) are related to the problems cause:
http://test.ff-fischbek.de/js/app/base/Widget.js
http://test.ff-fischbek.de/js/app/modules/tab/dashboard/Portal.js

http://test.ff-fischbek.de/js/app/modules/tab/dashboard/Widget.js

http://test.ff-fischbek.de/js/app/modules/tab/dashboard/widget/DaySummary.js

Thanks in advance!

Christopher

PS: don't blame me for the bad structure and comments in the files. the application is not nearly finished.

slemmon
19 Apr 2013, 8:42 AM
Nothing comes up for me when I click on your example link.

raz0r1
19 Apr 2013, 9:26 AM
mmh on my side it works.
it only take same time because of ext-debug.js usage and the deferred loading of the ext class files.

please try again end let me know

slemmon
19 Apr 2013, 11:05 AM
Perhaps try an updateLayout() on the component once it's dropped?

raz0r1
19 Apr 2013, 12:06 PM
I tried that but every position I put it, it does not solve the problem. Where would you put it?

slemmon
19 Apr 2013, 12:12 PM
Is there an event that is fired when the portlet is added/moved to a new column?

raz0r1
19 Apr 2013, 12:20 PM
Minimum the the self-defined drop event but I tried that and it does not work.
Maybe I can use an event of the columns the is fired when a component is added.

I will try that tomorrow (from germany and its late) and get back here when I know/tried it.

raz0r1
22 Apr 2013, 9:39 AM
sorry that i did not answer earlier.

i tried that. "add", "added" and all similar events but not a single one work.

it kind of a very small issue but i think the problem is deep in extjs. the dd objects miss a method like "update" that changes the component that is dragged.

does someone has another idea?