19 Sep 2008 1:59 AM #1
Ext in a JSR-168 Compliant Portlet
I am trying to embed Ext components inside a JSR-168 compliant portlet. The issue I am having is when the portlet is initially added to the page, there is no page refresh, and therefore the Ext.onReady() function is not executed.
Has anyone had any experience with getting around this issue?
19 Sep 2008 2:02 AM #2
- Join Date
- Apr 2007
- Sydney, Australia
- Vote Rating
Can't you just get rid of the onReady block then?
Moving this to help.Evan Trimboli
Twitter - @evantrimboli
Don't be afraid of the source code!
19 Sep 2008 2:13 AM #3
When I try that, IE gives me an unspecific error: "Internet Explorer cannot open the Internet site... Operation aborted."
Note that this works in Firefox.
Last edited by randymay; 19 Sep 2008 at 2:13 AM. Reason: Additional information
19 Sep 2008 3:45 AM #4
- Join Date
- Mar 2007
- The Netherlands
- Vote Rating
I'm not very into portals (I'm misusing WebSphere Portal soley for content management)...
How are portlets rendered by the browser? As an IFRAME or as dynamically inserted HTML?
Ext 2.2 does have some problems with IFRAMEs and onReady() in IE.
13 Oct 2008 2:17 PM #5
The Portal I am using (Liferay), adds Portlets as <div> tags. The challenge I am having is that when I add the Ext libraries using the <script> tags, IE (works in FF), throws an error ('null' is null or not an object). IE is not loading ext-base.js, and throws the error when the <script> tag ext-all.js file is executed.
I realize that the proper place for this question is probably the Liferay forum, but they tell me to load the .js files in a Liferay specific manor (add them to a Liferay specific xml file). I am hoping that someone using Ext in a JSR-168 or JSR-286 portlet has resolved, or worked around this problem, and can give me a heads up.
I REALLY want to use Ext, but if I cannot get this running in IE 6, then I will be forced to use another tool set.
13 Oct 2008 2:29 PM #6
I worked with websphere for a period of time.
can you not add the main ExtJs Libraries into the Theme of the site ?
13 Oct 2008 3:47 PM #7
Is there a Portal agnostic way of adding to the theme? In an XML file that would be deployed in the .war? I am hoping to make a complete JSR-168 compliant .war file that can be deployed in any compliant Portal, and work without any additional installation steps.
13 Oct 2008 3:58 PM #8
@randymay -- If your WAR resource file (which the "Liferay specific xml file implies") loads the Ext framework after the initial page is rendered, the traditional Ext.EventManager code is going to stop you cold (as it document.writes a <script> tag during initialization to support Ext.onReady for IE) effectively wiping out your start page.
This proposed replacement solves that problem with a more modern mechanism for detecting IE-DOM onReady for Ext 2.2.
Good luck with it.
14 Oct 2008 11:48 AM #9