Liferay 5.0.1 RC has a bug that doesn't let you use the print portlet mode. Liferay 5.0.2 release is supposed to fix the problem (not sure when that's coming though.) In the meantime, the JIRA issue (http://support.liferay.com/browse/LEP-5673) provides this simple fix:
On your Liferay installation go to
\Liferay5.0.1\server\default\deploy\ROOT.war\html\portal\
And open this file: render_portlet.jsp. Replace
portletDisplay.setURLPrint(urlPrint.toString());
with:
portletDisplay.setURLPrint("javascript: location.href='"+urlPrint.toString()+"';");
Exceptions, errors, problems and issues encountered during java ee development. Of course, the same exception stack trace can often be caused by many problems. I want to keep track of at least some of the possible solutions.
Friday, May 30, 2008
Wednesday, May 7, 2008
ICEfaces 1.7 ice:outputConnectionStatus causes problems
I don't want to go too deep into describing the problem, so in short: the new ICEfaces release (1.7 DR1) managed to introduce a problem for this tiny component. If you use it on multiple pages you will have js errors and unexpected problems.
Scenario: you have a link on the first page that calls an action which returns a navigation case that points to a second page. The second page also has links (or buttons) that call actions. Both pages have the connection status component.
Exceptions: the errors will be seen in icefaces debug window (call from browser by pressing Ctrl+Shift+T) when you click on link on the first page, and will look similar to this:
The second page will be shown, but none of the links will work.
Solution: The solutions is to use the component in one facelet template and build all pages using that template. Then you can have multiple compositions that all use the same connection status component (sort of).
References: JIRA http://jira.icefaces.org/browse/ICE-2973
Forum http://www.icefaces.org/JForum/posts/list/7899.page
Scenario: you have a link on the first page that calls an action which returns a navigation case that points to a second page. The second page also has links (or buttons) that call actions. Both pages have the connection status component.
Exceptions: the errors will be seen in icefaces debug window (call from browser by pressing Ctrl+Shift+T) when you click on link on the first page, and will look similar to this:
[window.Idx0#1.sync-connection] : receive broadcast failed
TypeError: this.elementID.asElement() has no properties
[window.Idx0#1.sync-connection] : [3990373] : connection closed
[window] : Cannot set focus, no element for id [_MyPortlet_WAR_MyPortlet_INSTANCE_plaa_:j_id10:searchpage_results:0:j_id35]
cannot find element with id: '_MyPortlet_WAR_MyPortlet_INSTANCE_plaa_:j_id10:searchpage_results:0:j_id35'
The second page will be shown, but none of the links will work.
Solution: The solutions is to use the component in one facelet template and build all pages using that template. Then you can have multiple compositions that all use the same connection status component (sort of).
References: JIRA http://jira.icefaces.org/browse/ICE-2973
Forum http://www.icefaces.org/JForum/posts/list/7899.page
Monday, May 5, 2008
Environment: ICEFaces 1.7, MyEclipse 6.0.1, Liferay portal server on JBoss.
Problem: Portlet WAR doesn't get picked up from deploy directory by Liferay.
Liferay creates a default directory in the user's Documents and Settings folder where you drop war files to be installed as portlets. Liferay watches this folder and picks up any new files from it when the server is running. I have an Ant scrip for a portlet project which packages the WAR and drops it into the directory. This always works, but today it did not. The WAR just stayed in the directory, and I had to restart the server for it to be deployed.
Solution: My coworker had the same problem and sent me this solution. The portlet wasn't being picked up is because the faces xsd specification site used to read faces-config.xml was taking longer than usual to respond. Instead of using the web site you can put the xsd inside the server's bin directory and change faces-config.xml header to take it from there instead. The faces-config.xml header will then look like this:
Note the space before the xsd file name.
Problem: Portlet WAR doesn't get picked up from deploy directory by Liferay.
Liferay creates a default directory in the user's Documents and Settings folder where you drop war files to be installed as portlets. Liferay watches this folder and picks up any new files from it when the server is running. I have an Ant scrip for a portlet project which packages the WAR and drops it into the directory. This always works, but today it did not. The WAR just stayed in the directory, and I had to restart the server for it to be deployed.
Solution: My coworker had the same problem and sent me this solution. The portlet wasn't being picked up is because the faces xsd specification site used to read faces-config.xml was taking longer than usual to respond. Instead of using the web site you can put the xsd inside the server's bin directory and change faces-config.xml header to take it from there instead. The faces-config.xml header will then look like this:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-facesconfig_1_2.xsd"
version="1.2">
Note the space before the xsd file name.
Subscribe to:
Posts (Atom)