Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Bob Dietrich
IDE-created portlet doesn't display ICEFaces tabs
May 8, 2011 10:29 AM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 221

Join Date: May 15, 2005

Recent Posts

My ultimate goal is to move an existing ICEFaces 1.82 portlet to ICEFaces 2, plus add some new portlets. But since the latter encounters a strange error, I'm trying to prototype some new features.

I installed the latest (1.2.3) version of the IDE. I updated my SVN copy of Liferay and and created a LR 6.1 compatible SDK directory. I then created a new project called Test2 and picked JSF 2.0 as the portlet framework. The portlet deployed and displayed correctly in LR 6.0.6GA/ Tomcat 6.0.29.

With a functional portlet, I tried adding a simple ICEFaces tab structure to the xhtml page. I used two different methods since the documentation was a little vague. No other files were changed. Here is the content of the resulting file (portletViewMode.xhtml):
 1<?xml version="1.0"?>
 2
 3<f:view
 4     xmlns:f="http://java.sun.com/jsf/core"
 5     xmlns:h="http://java.sun.com/jsf/html"
 6    xmlns:ice="http://www.icesoft.com/icefaces/component"
 7    xmlns:icecore="http://www.icefaces.org/icefaces/core"
 8    xmlns:liferay-ui="http://portletfaces.org/liferayfaces/liferay-ui"
 9    xmlns:liferay-util="http://portletfaces.org/liferayfaces/liferay-util"
10    xmlns:ui="http://java.sun.com/jsf/facelets"
11>
12    <h:head />
13    <h:body>
14        <p>
15            #{i18n['Test2-hello-world']}
16        </p>
17        <ice:form >
18        <ice:panelTabSet>
19            <ice:panelTab label="Tab 1">
20                <ice:outputText>Tab One info</ice:outputText>
21            </ice:panelTab>
22            <ice:panelTab label="Tab 2">
23                <ice:outputText>Tab Two info</ice:outputText>
24            </ice:panelTab>
25            <ice:panelTab label="Tab 3">
26                <ice:outputText>Tab Three info</ice:outputText>
27            </ice:panelTab>
28            <ice:panelTab label="Tab 4">
29                <ice:outputText>Tab Four info</ice:outputText>
30            </ice:panelTab>
31        </ice:panelTabSet>
32        <ice:panelTabSet>
33            <ice:panelTab>
34                <f:facet name="label">
35                    <ice:panelGroup><ice:outputText value="Tab 1" /></ice:panelGroup>
36                </f:facet>
37                <ice:outputText>Tab One info</ice:outputText>
38            </ice:panelTab>
39            <ice:panelTab>
40                <f:facet name="label">
41                    <ice:panelGroup><ice:outputText value="Tab 2" /></ice:panelGroup>
42                </f:facet>
43                <ice:outputText>Tab Two info</ice:outputText>
44            </ice:panelTab>
45            <ice:panelTab>
46                <f:facet name="label">
47                    <ice:panelGroup><ice:outputText value="Tab 3" /></ice:panelGroup>
48                </f:facet>
49                <ice:outputText>Tab Three info</ice:outputText>
50            </ice:panelTab>
51            <ice:panelTab>
52                <f:facet name="label">
53                    <ice:panelGroup><ice:outputText value="Tab 4" /></ice:panelGroup>
54                </f:facet>
55                <ice:outputText>Tab Four info</ice:outputText>
56            </ice:panelTab>
57        </ice:panelTabSet>
58        </ice:form>
59    </h:body>
60</f:view>

Unfortunately, the graphic elements of the tabs do not display. See the attached image from FireFox for an example.

Suggestions? Thanks.
Attachment

Attachments: TabsNotVisible.png (6.1k)
Gregory Amerson
RE: IDE-created portlet doesn't display ICEFaces tabs
May 11, 2011 8:35 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1024

Join Date: February 16, 2010

Recent Posts

I will try to bring in an ICEfaces expert as I don't know off hand how to fix your issue.
Neil Griffin
RE: IDE-created portlet doesn't display ICEFaces tabs
May 13, 2011 5:19 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2336

Join Date: July 26, 2005

Recent Posts

There are example ICEfaces portlets at portletfaces.org that you can find here:
http://www.portletfaces.org/projects/portletfaces-bridge/examples

Regarding the styling problem, make sure you're including an ICEfaces theme on the page, like you can find in the XHTML composition below:
http://svn.portletfaces.org/svn/portletfaces/portlets/examples/icefaces2-compat-portlet/trunk/src/main/webapp/xhtml/styling.xhtml
Bob Dietrich
RE: IDE-created portlet doesn't display ICEFaces tabs
May 13, 2011 3:36 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 221

Join Date: May 15, 2005

Recent Posts

Neil,
Thanks for responding. Regarding the examples, I continue to consult them as I have over the last couple of years.

First question: Can anyone at Liferay take five minutes and try to replicate what I'm doing? It's simple: create an ICEfaces portlet using the Liferay IDE and paste in additional components like I did above.

Second: Are you saying that ICEfaces will display nothing unless a theme is explicitly mentioned on the page? I didn't think that was the case, but I certainly could be wrong.

Third: I tried adding the xp-portlet.css theme explicitly to the the example page, both as a link element and ice:outputStyle. These elements were copied from an example. In both cases I had to add the directive to the body, because adding it within the h:head element caused " org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted." Neither element changed the output - no graphics for the tabs.

Here's the relevant section from the last attempt (I did also try including the portlet context):
1    <h:head/>
2    <h:body>
3    <ice:outputStyle href="/xmlhttp/css/xp/xp-portlet.css" />
4        <p>
5            #{i18n['Test2-hello-world']}
6        </p>

Any other suggestions? Thanks.
lucas theisen
RE: IDE-created portlet doesn't display ICEFaces tabs
July 19, 2011 12:35 PM
Answer

lucas theisen

Rank: New Member

Posts: 19

Join Date: March 1, 2011

Recent Posts

I have the same problem (HIERARCHY_REQUEST_ERR) when trying to add the css to the
1<h:head>
element. This is not a problem when using
1<h:outputStylesheet>
because you can use the target attribute to ensure it gets written to the
1<head>
of the
1<html>
:

1<f:view xmlns:f="http://java.sun.com/jsf/core"
2    xmlns:h="http://java.sun.com/jsf/html"
3    xmlns:ui="http://java.sun.com/jsf/facelets">
4    <h:head />
5    <h:body styleClass="example-icefaces-portlet">
6        <h:outputStylesheet library="css" name="style.css" target="head" />
7    </h:body>
8</f:view>


But
1<ice:outputStyle>
does not have a target. Why does putting it in <h:head> throw that exception, and is there another way to go about this?
Jan Burck
RE: IDE-created portlet doesn't display ICEFaces tabs
July 21, 2011 9:00 AM
Answer

Jan Burck

Rank: New Member

Posts: 1

Join Date: July 21, 2011

Recent Posts

I have exactly the same problem. The only browser that worked was google chrome.
If I try to open the CSS file with firefox or safari it seems that the file is compressed.
So how do one have to import the CSS files?

<ice:outputStyle href="./xmlhttp/css/xp/xp-portlet.css" />

Does not work.

Thanks in advance and best regards Jan
Cesar Quinteiro
RE: IDE-created portlet doesn't display ICEFaces tabs
March 8, 2012 6:30 AM
Answer

Cesar Quinteiro

Rank: Junior Member

Posts: 34

Join Date: October 18, 2011

Recent Posts

I resolve similar problem:

1) copying into web content the folder css/rime then I change this entrance in Liferay-porlet.xml

1<liferay-portlet-app>
2    <portlet>
3        <portlet-name>Asambleas</portlet-name>
4        <icon>/icon.png</icon>
5        <instanceable>false</instanceable>
6        <ajaxable>false</ajaxable>
7<!--         <header-portlet-css>/css/main.css</header-portlet-css> -->
8        [b]<header-portlet-css>/css/rime/rime-portlet.css</header-portlet-css>[/b]



and almost work, the tabs are show but broken horizontally with a white line.

PD: If any body, knows why I get this white horizontal line, please post it the solution
Johann Kneringer
RE: IDE-created portlet doesn't display ICEFaces tabs
March 15, 2012 8:24 AM
Answer

Johann Kneringer

Rank: Junior Member

Posts: 42

Join Date: November 10, 2011

Recent Posts

Do you have the property "speed-filters-enabled=false" in liferay-plugin-packages.properties?