-
1. Re: dojo + jboss portlets
julien1 May 30, 2007 7:54 AM (in response to sonalk.)Try to include dojo in portal pages using the header element in the deployment descriptor of jboss-portlet.xml.
http://cruisecontrol.jboss.com/cc/artifacts//jboss-portal-latest-doc/referenceGuide/html/xmldescriptors.html -
2. Re: dojo + jboss portlets
sonalk. May 31, 2007 12:42 AM (in response to sonalk.)Thanks for ur reply..
As per your suggestion, I put jboss-portlet.xml into my war file.
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE portlet-app PUBLIC
"-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
<portlet-app>
<portlet-name>ImagePortlet1</portlet-name>
<header-content>
dojo.require("dojo.widget.Dialog");
var dlg1;
function byId(id)
{
return document.getElementById(id);
}
dojo.addOnLoad(function init() {
dlg1 = dojo.widget.byId("compareDialog");
var btn1 = document.getElementById("compare");
var btn2 = document.getElementById("cancelcomp");
dlg1.setCloseControl(btn1);
dlg1.setCloseControl(btn2);
});
</header-content>
</portlet-app>
It looks like this. Is it correct??? -
3. Re: dojo + jboss portlets
sonalk. May 31, 2007 12:44 AM (in response to sonalk.)Its not showing my script.
dojo.require("dojo.widget.Dialog");
var dlg1;
function byId(id)
{
return document.getElementById(id);
}
dojo.addOnLoad(function init() {
dlg1 = dojo.widget.byId("compareDialog");
var btn1 = document.getElementById("compare");
var btn2 = document.getElementById("cancelcomp");
dlg1.setCloseControl(btn1);
dlg1.setCloseControl(btn2);
}); -
4. Re: dojo + jboss portlets
angelo.dangelo Oct 12, 2007 2:29 AM (in response to sonalk.)Hi,
I'm using dojo widgets in my jsf portlets (specifying the widget in styleClass attribute of jsf components).
I put dojo initialization inside my custom layout (in index.jsp and in maximized.jsp) and it was ok in JB Portal 2.2.1SP3.
Now I'm porting my application in JB Portal 2.6.1 and I added dojo initialization in the same way as in 2.2.1SP3.
It works fine with Firefox 2.0.0.7 but I have some problems with Microsoft Internet Explorer 6: the pages are loaded very slow and the widgets are not shown.
I tried to include dojo initialization both before and after<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
but the problem was not solved.
Is there someone who faced the same problem? Is there a workaround?
Thanks
Angelo