留言板

ICEFaces Portlet Problem

Dmitry Alekseevich Fundak,修改在16 年前。

ICEFaces Portlet Problem

New Member 帖子: 5 加入日期: 08-1-30 最近的帖子
HI I'm newbie to ICEFaces and Liferay.
I'm trying to migrate my JSF Application to ICEFaces and then to Portlet.
At first I have migrated my application to ICEFaces code looks like this:

<f:view xmlns:h="http://java.sun.com/jsf/html" 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="portlet-override.css" />
		<ice:outputstyle href="xmlhttp/css/xp/xp-portlet.css" />
		<ice:paneltabset>
		<ice:paneltab label="IceFacesWells">
		<ice:panelgrid columns="3" styleclass="sitetablebox">
			<ice:outputtext value="Скважины" id="txtwells" />
			<ice:inputtext value="#{wellsBean.well}" size="40" />
			<ice:selectonemenu value="#{wellsBean.condWell}" id="cond1">
				<f:selectitems value="#{wellsBean.allCond}" />
			</ice:selectonemenu>
			<ice:outputtext value="Месторожд." />
			<ice:inputtext id="inputTextareaOilfield" value="#{wellsBean.oilfield}" size="40" />
			<ice:selectonemenu value="#{wellsBean.conOilfield}" id="cond2">
				<f:selectitems value="#{wellsBean.allCond}" />
			</ice:selectonemenu>
			<ice:outputtext value="Площадь" />
			<ice:inputtext id="inputTextareaSquare" value="#{wellsBean.square}" size="40" />
			<ice:selectonemenu value="#{wellsBean.condSquare}" id="cond3">
				<f:selectitems value="#{wellsBean.allCond}" />
			</ice:selectonemenu>
			<ice:commandbutton action="#{wellsBean.doSelectWells}" value="Выполнить" id="submitBt1n" />
		</ice:panelgrid>
		<ice:panelgrid columns="1" rendered="#{wellsBean.tableVisible}">
			<ice:datatable id="WellsList" value="#{wellsBean.model}" var="row" rows="20">

				<ice:column>
					<f:facet name="header">
						<ice:outputtext value="ID" />
					</f:facet>
					<ice:outputtext value="#{row.filter.ID}" rendered="#{row.filter!=null}" converter="wellsBean" escape="false" id="r1" />
				</ice:column>
				...
				<ice:column>
					<f:facet name="header">
						<h:outputtext value="Источник" />
					</f:facet>
					<ice:outputtext value="#{row.filter.sourceName}" rendered="#{row.filter!=null}" converter="wellsBean" escape="false" />
				</ice:column>
			</ice:datatable>
			<ice:datapaginator id="dataScroll_3" for="WellsList" paginator="true" faststep="3" paginatormaxpages="10">
				<f:facet name="first">
					<ice:graphicimage url="./xmlhttp/css/xp/css-images/arrow-first.gif" style="border:none;" title="First Page" />
				</f:facet>
				<f:facet name="last">
					<ice:graphicimage url="./xmlhttp/css/xp/css-images/arrow-last.gif" style="border:none;" title="Last Page" />
				</f:facet>
				<f:facet name="previous">
					<ice:graphicimage url="./xmlhttp/css/xp/css-images/arrow-previous.gif" style="border:none;" title="Previous Page" />
				</f:facet>
				<f:facet name="next">
					<ice:graphicimage url="./xmlhttp/css/xp/css-images/arrow-next.gif" style="border:none;" title="Next Page" />
				</f:facet>
				<f:facet name="fastforward">
					<ice:graphicimage url="./xmlhttp/css/xp/css-images/arrow-ff.gif" style="border:none;" title="Fast Forward" />
				</f:facet>
				<f:facet name="fastrewind">
					<ice:graphicimage url="./xmlhttp/css/xp/css-images/arrow-fr.gif" style="border:none;" title="Fast Backwards" />
				</f:facet>
			</ice:datapaginator>
			<!-- Display counts about the table and the currently displayed page -->
			<ice:datapaginator id="dataScroll_2" for="WellsList" rowscountvar="rowsCount" displayedrowscountvar="displayedRowsCount" firstrowindexvar="firstRowIndex" lastrowindexvar="lastRowIndex" pagecountvar="pageCount" pageindexvar="pageIndex">
				<ice:outputformat value="{0} wells found, displaying {1} (s), from {2} to {3}. Page {4} / {5}." styleclass="standard">
					<f:param value="#{rowsCount}" />
					<f:param value="#{displayedRowsCount}" />
					<f:param value="#{firstRowIndex}" />
					<f:param value="#{lastRowIndex}" />
					<f:param value="#{pageIndex}" />
					<f:param value="#{pageCount}" />
				</ice:outputformat>
			</ice:datapaginator>
		</ice:panelgrid>
		</ice:paneltab>
		</ice:paneltabset>
		</ice:form>
</f:view>

Everithing works perfect.
UI Looks like this:
.
At next step I added liferay-portlet.xml and portlet.xml and created portlet war.
When I deployed it to liferay, everything goes ok.
But when ICEFaces trying to add recieved content there is javascript error:"[window] failed to insert element: <body id="document:body">" occured.
looks like this:
.

Does anyone faces this kind of problem?
Any suggestions.
Thanks.
Dmitriy Fundak,修改在16 年前。

RE: ICEFaces Portlet Problem

New Member 帖子: 5 加入日期: 08-1-30 最近的帖子
see solution <ice:portlet>here.
Seyed Mohammad Hosein Jamali,修改在12 年前。

RE: ICEFaces Portlet Problem

Junior Member 帖子: 77 加入日期: 09-12-13 最近的帖子
I am using ICEFaces 2.0 Portlet integrated with Liferay 6.0.6 by Liferay SDK 6.1.0 . Sometimes after deploy an ICEFaces portlet all "Add new" pages of old native struts portlets don't work properly so that by click on TextBoxes to enter new information the portlet redirect me to view page of it. this bad functionality is added to Liferay after deploy an ICEFaces portlet.

Is there any solution for above problem ?

Thanks in advance
S.M.H.Jamali