Fórum

IDE-created portlet doesn't display ICEFaces tabs

fastbob fastbob, modificado 12 Anos atrás.

IDE-created portlet doesn't display ICEFaces tabs

Regular Member Postagens: 221 Data de Entrada: 16/05/05 Postagens Recentes
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):
<!--?xml version="1.0"?-->

<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:icecore="http://www.icefaces.org/icefaces/core" xmlns:liferay-ui="http://portletfaces.org/liferayfaces/liferay-ui" xmlns:liferay-util="http://portletfaces.org/liferayfaces/liferay-util" xmlns:ui="http://java.sun.com/jsf/facelets">
	<h:head />
	<h:body>
		<p>
			#{i18n['Test2-hello-world']}
		</p>
		<ice:form>
		<ice:paneltabset>
			<ice:paneltab label="Tab 1">
				<ice:outputtext>Tab One info</ice:outputtext>
			</ice:paneltab>
			<ice:paneltab label="Tab 2">
				<ice:outputtext>Tab Two info</ice:outputtext>
			</ice:paneltab>
			<ice:paneltab label="Tab 3">
				<ice:outputtext>Tab Three info</ice:outputtext>
			</ice:paneltab>
			<ice:paneltab label="Tab 4">
				<ice:outputtext>Tab Four info</ice:outputtext>
			</ice:paneltab>
		</ice:paneltabset>
		<ice:paneltabset>
			<ice:paneltab>
				<f:facet name="label">
					<ice:panelgroup><ice:outputtext value="Tab 1" /></ice:panelgroup>
				</f:facet>
				<ice:outputtext>Tab One info</ice:outputtext>
			</ice:paneltab>
			<ice:paneltab>
				<f:facet name="label">
					<ice:panelgroup><ice:outputtext value="Tab 2" /></ice:panelgroup>
				</f:facet>
				<ice:outputtext>Tab Two info</ice:outputtext>
			</ice:paneltab>
			<ice:paneltab>
				<f:facet name="label">
					<ice:panelgroup><ice:outputtext value="Tab 3" /></ice:panelgroup>
				</f:facet>
				<ice:outputtext>Tab Three info</ice:outputtext>
			</ice:paneltab>
			<ice:paneltab>
				<f:facet name="label">
					<ice:panelgroup><ice:outputtext value="Tab 4" /></ice:panelgroup>
				</f:facet>
				<ice:outputtext>Tab Four info</ice:outputtext>
			</ice:paneltab>
		</ice:paneltabset>
		</ice:form>
	</h:body>
</f:view>

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

Suggestions? Thanks.
thumbnail
Gregory Amerson, modificado 12 Anos atrás.

RE: IDE-created portlet doesn't display ICEFaces tabs

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
I will try to bring in an ICEfaces expert as I don't know off hand how to fix your issue.
thumbnail
Neil Griffin, modificado 12 Anos atrás.

RE: IDE-created portlet doesn't display ICEFaces tabs

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
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
fastbob fastbob, modificado 12 Anos atrás.

RE: IDE-created portlet doesn't display ICEFaces tabs

Regular Member Postagens: 221 Data de Entrada: 16/05/05 Postagens Recentes
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):
	<h:head />
	<h:body>
	<ice:outputstyle href="/xmlhttp/css/xp/xp-portlet.css" />
		<p>
			#{i18n['Test2-hello-world']}
		</p>
</h:body>

Any other suggestions? Thanks.
thumbnail
lucas theisen, modificado 12 Anos atrás.

RE: IDE-created portlet doesn't display ICEFaces tabs

New Member Postagens: 19 Data de Entrada: 02/03/11 Postagens Recentes
I have the same problem (HIERARCHY_REQUEST_ERR) when trying to add the css to the
<h:head></h:head>
element. This is not a problem when using
<h:outputstylesheet></h:outputstylesheet>
because you can use the target attribute to ensure it gets written to the
of the
:

<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets">
	<h:head />
	<h:body styleclass="example-icefaces-portlet">
		<h:outputstylesheet library="css" name="style.css" target="head" />
	</h:body>
</f:view>


But
<ice:outputstyle></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, modificado 12 Anos atrás.

RE: IDE-created portlet doesn't display ICEFaces tabs

New Member Mensagem: 1 Data de Entrada: 21/07/11 Postagens Recentes
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, modificado 12 Anos atrás.

RE: IDE-created portlet doesn't display ICEFaces tabs

Junior Member Postagens: 34 Data de Entrada: 18/10/11 Postagens Recentes
I resolve similar problem:

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

<liferay-portlet-app>
	<portlet>
		<portlet-name>Asambleas</portlet-name>
		<icon>/icon.png</icon>
		<instanceable>false</instanceable>
		<ajaxable>false</ajaxable>
<!-- 		<header-portlet-css>/css/main.css</header-portlet-css> -->
		[b]<header-portlet-css>/css/rime/rime-portlet.css</header-portlet-css>[/b]</portlet></liferay-portlet-app>



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
thumbnail
Johann Kneringer, modificado 12 Anos atrás.

RE: IDE-created portlet doesn't display ICEFaces tabs

Junior Member Postagens: 42 Data de Entrada: 10/11/11 Postagens Recentes
Do you have the property "speed-filters-enabled=false" in liferay-plugin-packages.properties?