Messages posted by otomar
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Messages posted by: otomar  XML
Profile for otomar -> Messages posted by otomar [3]
Author Message
Ok, I can get the servletContext by using:
Code:
 RenderManager.getInstance().getServletContext()
 

But is this the right servletContext?
I keep getting:
Code:
 08:51:41||WARN |render.MessagingBroadcastRenderer$RenderMessageHandler|Could not find name renderer ...
 


In my server log
I have a problem with using EPS with Liferay.

Wiki says that I need to add the following lines to my setRenderManager method:
Code:
 ServletContext servletContext =
     (ServletContext)FacesContext.getCurrentInstance()
                                 .getExternalContext().getContext();
   renderManager.setBroadcastRenderer(new MessagingBroadcastRenderer(servletContext));
 


But then I get the following exception:
java.lang.ClassCastException: com.liferay.portlet.PortletContextImpl cannot be cast to javax.servlet.ServletContext

Is there any way I can get ServletContext when my application is a portlet?
Can anyone tell me why relationBean getSusgs method gets called getSusgs.size() times? :) (getSusgs loads a List of objects from database on first call and from instance variable after. relationBean scope is request)
Code:
 <ice:selectOneRadio id="susg" styleClass="modal-select data2" layout="spread" value="#{relationBean.susgRefNum}">
 	<c:forEach var="susg" items="#{relationBean.susgs}">
 		<f:selectItem id="si#{susg.susgRefNum}" itemValue="#{susg.susgRefNum}" itemLabel=""/>
 	</c:forEach>
 </ice:selectOneRadio>
 
 <ice:dataTable value="#{relationBean.susgs}" var="susg" styleClass="modal-select data2" columnClasses="w1p noclass" varStatus="varStatus" columnWidths="13px,100px,auto">
 	<h:column><ice:radio for="susg" id="s#{susg.susgRefNum}" index="#{varStatus.index}"/></h:column>
 	<h:column>
 		<f:facet name="header">
 			<h:column>#{ef:t_p('label-number')}</h:column>
 		</f:facet>
 		<ice:outputLabel value="#{susg.senuMobileNum}" for="s#{susg.susgRefNum}"/>
 	</h:column>
 	<h:column>
 		<f:facet name="header">
 			<h:column>#{ef:t_p('label-user')}</h:column>
 		</f:facet>
 		<ice:outputLabel value="#{susg.suinName}" for="s#{susg.susgRefNum}"/>
 	</h:column>
 </ice:dataTable>
 


This is the only place in my code where getSusgs method is used.
 
Profile for otomar -> Messages posted by otomar [3]
Go to:   
Powered by JForum 2.1.7ice © JForum Team