Messages posted by nick@moveiteasy.com
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Messages posted by: nick@moveiteasy.com  XML
Profile for nick@moveiteasy.com -> Messages posted by nick@moveiteasy.com [5]
Author Message
I am sorry but I dont know!
You need two things to get the stylesheets to work correctly. Firstly you will need this in the web.xml file

<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.ResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>

and secondly in the <head> section of your .xhtml file you will need


<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Facelets Template</title>
<h:outputScript name="jsf.js" library="javax.faces"/>
<ice:outputStyle href="/xmlhttp/css/rime/rime.css"/>
</h:head>

And then your stylesheets will be rendered.
In the IceFaces 2.0 Alpha2 Blog the information regarding web.xml is missing some information. It leads you to believe that you do not need to make any changes to web.xml as the standard FacesServlet content will be OK. This is true to get ICEFaces working however you wont be able to use the styles. You need to add the following to web.xml and the styles will be served.

<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.ResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
Hi IceFaces.

I am fairly new to IceFaces but I am very impressed with what I have seen so far. I am using IceFaces 2.0.0.Alpha2-Netbeans-6.8a module.

I have a simple question regarding styling. I understand that there are default styles that are applied to all UIComponents as they are rendered. I am including the following in my <H:head>

<h:outputScript name="jsf.js" library="javax.faces"/>
<ice:outputStyle href="/xmlhttp/css/rime/rime.css"/>

The HTML generated contains the following in the <head> section

<script src="/vrmui_IF/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript"></script>
<link href="/vrmui_IF/xmlhttp/css/rime/rime.css" rel="stylesheet" type="text/css" /><link href="/vrmui_IF/xmlhttp/css/rime/rime_ie7.css" rel="stylesheet" title="_ie7" type="text/css" /><script src='code.icepush.jsf?a32929112' type='text/javascript'></script><script src='/vrmui_IF/javax.faces.resource/bridge.js.jsf?a32929112' type='text/javascript'></script><script src="/vrmui_IF/javax.faces.resource/compat.js.jsf" type="text/javascript"></script>
<script src="/vrmui_IF/javax.faces.resource/icefaces-compat.js.jsf" type="text/javascript"></script>

So I can see that the rime css files are being included.
However no styles are applied to the pages.

If I try and access the stylesheet file directly then I get a 404.
I assume its not being deployed in the application however I dont know what I have to do to deploy it - I thought they were deployed as a matter of course.

Any help much appreciated.

Nick


Hi

I have just installed the Netbeans 6.8a plugin and created my first project.

When I load the page I get a javascript error saying ice.push is null or not an object.

The page is the uusual....

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
<title>ICEfaces 2</title>
<h:outputScript name="jsf.js" library="javax.faces"/>
</h:head>
<h:body>
<div id="header">
<!--
<ui:include src="/header.xhtml" >
<ui:param name="param_name" value="param_value" />
</ui:include>
-->
</div>
<div id="content">
<ice:form id="iceForm">
<ice:outputText value="Welcome to ICEfaces 2. Add ICEfaces 1.8 components"/>
<!--
drop ICEfaces components here
-->
</ice:form>
</div>
</h:body>
</html>

I am including icepush.jar in the project, its there by default.


This is the generated HTML...

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>ICEfaces 2</title>
<script src="/vrmui_IF/javax.faces.resource/jsf.js.jsp?ln=javax.faces&stage=Development" type="text/javascript"></script>
<script src='code.icepush.jsf?a5373376' type='text/javascript'></script><script src='/vrmui_IF/javax.faces.resource/bridge.js.jsp?a5373376' type='text/javascript'></script><script src="/vrmui_IF/javax.faces.resource/compat.js.jsp" type="text/javascript"></script>
<script src="/vrmui_IF/javax.faces.resource/icefaces-compat.js.jsp" type="text/javascript"></script></head>
<body>
<div id="header">

</div>
<div id="content"><form action="/vrmui_IF/welcomeICEfaces.jsp" class="iceFrm" enctype="application/x-www-form-urlencoded" id="iceForm" method="post" onsubmit="return false;"><input name="iceForm" type="hidden" value="iceForm" /><input name="icefacesCssUpdates" type="hidden" value="" /><input name="javax.faces.ViewState" type="hidden" value="5642761686802518960:439205869540462320" /><span class="iceOutTxt" id="iceForm:j_idt9">Welcome to ICEfaces 2. Add ICEfaces 1.8 components</span>
<div id="iceFormhdnFldsDiv" style="display:none;"></div>
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-315332338692277675:1484088986245385010" autocomplete="off" /></form>
</div>
<script type="text/javascript">window.ice.window = 1267031535479;</script><script type="text/javascript">ice.push.register(['1267031535479'], ice.retrieveUpdate);</script><script type="text/javascript">ice.DefaultIndicators({blockUI: false,connectionLostRedirectURI: null,sessionExpiredRedirectURI: null,connection: { context: '/vrmui_IF/'},messages: {sessionExpired: 'User Session Expired',connectionLost: 'Network Connection Interrupted',serverError: 'Server Internal Error',description: 'To reconnect click the Reload button on the browser or click the button below',buttonText: 'Reload'}}, document.body);</script></body>
</html>

The one thing I notice is the javascript 'src' for the code.icepush.jsf does not reference the application path - i.e. it is not prefixed with /vrmui_IF/ in my case - it is 'code.icepush.jsf?a5373376'. When I try to access the URL i get a 404 error.

I have just moved from PrimeFaces2 and am hoping that ICEFaces is a little more robust!


 
Profile for nick@moveiteasy.com -> Messages posted by nick@moveiteasy.com [5]
Go to:   
Powered by JForum 2.1.7ice © JForum Team