Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Rico D'Amore
icefaces3-compat-demo styling implementation
13 de abril de 2012 8:13
Respuesta

Rico D'Amore

Ranking: New Member

Mensajes: 13

Fecha de incorporación: 29 de marzo de 2012

Mensajes recientes

Hi I'm trying to follow the icefaces3-compat-demo styling format, but experiencing some problems

Here are some relevant files from my configuration:

web.xml:
<?xml version="1.0"?>

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
</context-param>
<context-param>
<param-name>org.icefaces.uniqueResourceURLs</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
<!--
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
-->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>ICEfaces Compatibility Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/icefaces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ICEfaces Compatibility Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
</web-app>

styling.xhtml:

<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:remove>
<!--
The benefit of using the link element is that the CSS resource loads faster because it doesn't invoke a
portlet ResourceURL, and therefore doesn't run the JSF lifecycle to obtain the resource's URL. The drawback
is that the CSS resource can't use the #{resource[''} EL-expression inside it.
-->
</ui:remove>
<link href="#{request.contextPath}/xmlhttp/css/xp/xp-portlet.css" rel="stylesheet" type="text/css"/>
<link href="#{request.contextPath}/css/portlet.css" rel="stylesheet" type="text/css"/>

<link href="#{request.contextPath}/css/liferay-theme-override.css" rel="stylesheet" type="text/css"/>
<link href="#{request.contextPath}/css/icefaces-theme-override.css" rel="stylesheet" type="text/css"/>

<ui:remove>
<!--
The benefit of using the h:outputStylesheet tag the CSS resource can use the #{resource['']} EL-expression
inside it.
-->
</ui:remove>
<!--
<h:outputStylesheet library="example" name="example.css"/>
<c:if test="#{!aui.provided}">
<h:outputStylesheet library="aui-skin-classic" name="css/aui-skin-classic-all-min.css" />
</c:if>
-->
</ui:composition>

Join_page.xhtml:

<?xml version="1.0" encoding="UTF-8"?>


<f:view xmlns="http://www.w3.org/1999/xhtml"

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"
xmlns:aui="http://portletfaces.org/alloyfaces/aui"
>

<h:head>

</h:head>
<h:body>
<ui:include src="styling.xhtml" />
<ice:form>
<h2>Join TagMyVideo!</h2>
</ice:form>

<ice:form>
<ice:outputText value="First Name"/>
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<ice:inputText id="firstName" required="true" value="#{kidBackingBean.kidFirstName}"/>
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<ice:outputText value="Last Name"/>
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<ice:inputText id="lastName" required="true" value="#{kidBackingBean.kidLastName}"/>
</ice:form>
<br/>
<ice:form>
<ice:outputLabel value="Email"/>
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<h:outputText value="&#160;" />
<ice:inputText id="email" required="true" immediate="true" value="#{kidBackingBean.kidEmail}"
validatorMessage="#{kidBackingBean.kidEmail} is not a valid email address pleas try again!">
<f:validateRegex pattern="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$"/>
</ice:inputText>
</ice:form>
<br/>
<ice:outputLabel value="Age:"/>
<ice:form>
<ice:selectOneRadio layout="pageDirection">
<f:selectItem itemLabel="0-4" itemValue="0-4"/>
<f:selectItem itemLabel="5-9" itemValue="5-9"/>
<f:selectItem itemLabel="10-14" itemValue="10-14"/>
</ice:selectOneRadio>
</ice:form>
</h:body>
</f:view>

I also have the speed-filters-enabled=false property set in liferay-plugin-package.properties

my css directory contains:
icefaces-theme-override.css
liferay-theme-override.css
portlet.css
main.css-nothing in this file.

So as I mentioned above this is following the icefaces3-compat-demo. and I have the correct jars in the classpath, to be able to find the xp-portlet.css file. So I'm a bit confused as to where my configuration is off. I've noticed that others have gotten this to work with this exact configuration, so I think I'm a bit off.

does anyone have any suggestions?
Robin Wyss
RE: icefaces3-compat-demo styling implementation
16 de abril de 2012 22:58
Respuesta

Robin Wyss

Ranking: New Member

Mensajes: 4

Fecha de incorporación: 8 de enero de 2012

Mensajes recientes

Hi Rico

With firebug (or some other developer tools) you can analyze the traffic, there you can see exactly what resources the browser tries to load and if it was able to do it. Maybe this can help you to find the problem.
Neil Griffin
RE: icefaces3-compat-demo styling implementation
17 de abril de 2012 8:39
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2335

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

Hi Rico,

When you wrote
experiencing some problems
can you provide some error messages or provide more detail about the problems you're having?

Thanks,

Neil
Rico D'Amore
RE: icefaces3-compat-demo styling implementation
17 de abril de 2012 12:21
Respuesta

Rico D'Amore

Ranking: New Member

Mensajes: 13

Fecha de incorporación: 29 de marzo de 2012

Mensajes recientes

There are no error messages accompanied by the configuration.

When I redeploy to the tomcat server and start up the portlet the style is simply not there.

I don't get any info. the page navigation works, and buttons work just fine, just no style present. So that is sort of puzzling.
Neil Griffin
RE: icefaces3-compat-demo styling implementation
17 de abril de 2012 12:55
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2335

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

Some questions for you:

1) Are you sure that you have the following JAR in the deployed version of your portlet?
WEB-INF/lib/icefaces-compat-3.0.1.jar

2) If you do a "View Source" with your browser to see the HTML of the portal page, do you see a <link> tag that references the following?
xmlhttp/css/xp/xp-portlet.css

3) If yes to #2, then using FireBug's "Network" tab, do you see the xp-portlet.css file downloading successfully?
Robert Kornmesser
RE: icefaces3-compat-demo styling implementation
3 de mayo de 2012 2:19
Respuesta

Robert Kornmesser

Ranking: Junior Member

Mensajes: 39

Fecha de incorporación: 3 de noviembre de 2011

Mensajes recientes

I guess you have the same problem like me.

Just add
1speed-filters-enabled=false
at the end of your liferay-plugin-package.properties so that liferay will not try so speed up your icefaces css by just clearing it emoticon