voyent
Tree component of ICEfaces-1.6.0-DR5 with Liferay 4.3 CR  XML
Forum Index -> Portals & Portlets
Author Message
minhlb

Joined: 16/May/2007 00:00:00
Messages: 3
Offline


I am trying to create a simple tree component with ICEfaces-1.6.0-DR5 and Liferay 4.3 CR. In the first time the tree is shown correctly but after refreshing or click on the tree the following error message is thrown :

2007-06-20 17:13:16,040 ERROR [com.icesoft.faces.webapp.parser.Parser] Failed to execute JSP lifecycle.
javax.servlet.jsp.JspException: The tree tag requires a single child treeNode tag. Found [2]
at com.icesoft.faces.component.tree.TreeTag.doEndTag(TreeTag.java:316)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:203)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:186)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:186)


Here is the content of jspx file:

<f:view xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<ice:outputDeclaration doctypeRoot="HTML"
doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
doctypeSystem="http://www.w3.org/TR/html4/loose.dtd"/>

<ice:form>
<ice:outputStyle href="xmlhttp/css/xp/xp-portlet.css"/>
<ice:tree
value="#{treeNavigation.model}"
var="item"
hideRootNode="false"
binding="#{treeNavigation.treeComponent}"
imageDir="#{styleBean.imageDirectory}">
<ice:treeNode>
<f:facet name="icon">
<ice:panelGroup style="display: inline">
<ice:graphicImage value="#{item.userObject.icon}"/>
</ice:panelGroup>
</f:facet>

<f:facet name="content">
<ice:panelGroup style="display: inline">
<ice:commandLink
actionListener="#{item.userObject.contentVisibleAction}">
<ice:outputText
value="#{item.userObject.menuDisplayText}"/>
</ice:commandLink>
</ice:panelGroup>
</f:facet>

</ice:treeNode>
</ice:tree>
</ice:form>

</f:view>


Does anyone implement a tree with ICEfaces-1.6.0-DR5 and Liferay 4.3 CR ?

deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


I took the Tree example provided in the Component Showcase and was able to run it without difficulty on Liferay 4.3.0 RC 1. I added in an additional 'binding' attribute for good measure to align better with the example you provided but couldn't reproduce the error you are seeing. I was able to navigate and refresh the page successfully.

If you want to attach a small war to this thread that shows the issue (including the beans, configuration files, etc) , I can try it on my end.


Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
minhlb

Joined: 16/May/2007 00:00:00
Messages: 3
Offline


Deryk, Thanks for your reply!

Without the binding, the tree is rendered correctly all time but when trying to expand the tree, I saw the same error.

Please have a look on my small war file. Thanks in advances!
 Filename ICEFaceTree.war [Disk] Download
 Description
 Filesize 39 Kbytes
 Downloaded:  463 time(s)

deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


I can expand and collapse the tree in your app fine. One thing that you'll want to add until we get things worked out is the following extra parameters to the portlet in the liferay-portlet.xml configuration:

<portlet>
<portlet-name>ICEFaceTree</portlet-name>
<instanceable>false</instanceable>
<render-weight>1</render-weight>
<ajaxable>false</ajaxable>
</portlet>

The problem right now is that the ICEfaces JavaScript bridge relies on some logic in the onload handler. Without the above parameters, when you add a new portlet instance to the page, the onload handler does not get executed. Adding the above parameters ensures that the page is refreshed when new instance is added. If you don't add these, then the first time you add a new instance of an ICEfaces portlet, you'll need to refresh the page manually.

In any event, after I added the required libraries to the WEB-INF/lib directory, I was able to expand and collapse the tree many times without any errors.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
minhlb

Joined: 16/May/2007 00:00:00
Messages: 3
Offline


Thank you your help.

After add extra parameters to the liferay-portlet.xml configuration, the tree works well. But after changing the name of portlet I saw the same error, It is very weird. Event I changed back to the old portlet name and use Directory compare tool but not found any difference but the old war file work well but the new one didn't work. The same old error was thrown. I tried to clear cache but not any success.

It may be a Liferay issue, Now the version 4.3.0 RC2 of Liferay is available, I should try it.

Thank you again.



Telpochyaotl

Joined: 23/Apr/2007 00:00:00
Messages: 21
Offline


are you able to use your portlet when a struts based portlet is in the same page?

I can't...

And ICEFaces portlets brake MyFaces ones... Can you verify yours works?

Thanks!
dkohl

Joined: 02/Jun/2007 00:00:00
Messages: 13
Offline


hi all,

did one of you solve this problem? i'm running on Liferay 4.2 and ran also in this problem. Changing to 4.3 doesn't solve it too.....

greetings


 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team