voyent
ice:portlet and 1.7.0-DR2  XML
Forum Index -> Development Build Feedback
Author Message
dimdimych

Joined: 12/Apr/2007 00:00:00
Messages: 4
Offline


Hello everyone,
Is there a bug or something's wrong with my DNA :)

Configuration : JBoss4.2.1, Liferay 4.3.3, Icefaces 1.7.0-DR2

I faced an issue with ice:portlet component in DR2.
When I use it in my page, links inside portlet are not working at all.
Here's the code of the template written in facelets:
Code:
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <f:view xmlns="http://www.w3.org/1999/xhtml"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:ice="http://www.icesoft.com/icefaces/component"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:ui="http://java.sun.com/jsf/facelets">
     <html>
         <head>
         </head>
         <body>
             <f:loadBundle basename="ui" var="ui"/>
             <ice:portlet styleClass="nxpPortlet">
                 <ui:include src="script.inc.xhtml" />
                 <h:panelGroup styleClass="nxp-status" rendered="#{!hideMenu}">
                     <ice:outputConnectionStatus  id="conStatus" />
                 </h:panelGroup>
                 <ice:form id="goForm" partialSubmit="true">
                     <ui:include src="menu.inc.xhtml" />
                 </ice:form>
                 <ui:insert name="content">Default content</ui:insert>
             </ice:portlet>
         </body>
     </html>
 </f:view>
 

When clicking the link inside the portlet the following update comes from the server
Code:
 <body id="document:body">
 ....
 </body>
 

And of course body#document:body cannot be found in page to apply updates

deryk.sinotte


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


I'm not sure which "link" you are referring too. Do you mean that the <ui:include> contents are not being resolved? Or is there something in the included pages that's not working?

If you could provide all the required pages/snippets/contents to reproduce the problem (or a test .war) that might provide more insight.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
garpinc


Joined: 21/Mar/2007 00:00:00
Messages: 44
Offline


What is the need for <ice:portlet styleClass="nxpPortlet">
and if it's needed why can't framework just add it to component tree vs a developer having to add it? That way the page can stay technology agnostic.
deryk.sinotte


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


If you mean the <ice:portlet> component (the style attribute is optional) being added, it was put in to help resolve some issues during navigation with JSF and portlets. We did discuss having the framework add it automagically but the final decision was to let the developer add it in the interest of being transparent (i.e. the framework isn't doing stuff the developer doesn't know about). Currently, the component simply adds a div to the component tree and, in a portlet environment, sets the id attribute to the portlet namespace. It works fine in a regular web app as well for the time being.

In the future, we may add it automatically but for now, the developer will need to do it. For now, if you're not doing any JSF navigation in your portlet, then you can probably get away with not having it in there at all. However, there's a chance that some future functionality may require it. If it's not automatically inserted at that time, then you may need to add it in yourself.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
 
Forum Index -> Development Build Feedback
Go to:   
Powered by JForum 2.1.7ice © JForum Team