voyent
dataTable only rendering as text  XML
Forum Index -> Woodstock to ICEfaces Migration
Author Message
vblack

Joined: 05/Jan/2009 00:00:00
Messages: 12
Offline




I am adding a iceFaces page to an existing woodstock sandbox application - the page has a simple dataTable - when it renders - it just renders text - no table borders etc - it looks like what I have below:


Last Name First Name
Jacobs Max
Everret Jane
Sealey Richard

What am I missing to get a proper table to render?
Here are the jars deployed with the application:


351226 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/backport-util-concurrent.jar
188671 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/commons-beanutils.jar
571259 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/commons-collections.jar
143602 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/commons-digester.jar
89532 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/commons-fileupload.jar
44598 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/commons-logging-api.jar
52915 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/commons-logging.jar
24454 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/console-webui-beans.jar
101509 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/dataprovider.jar
1789414 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/icefaces-comps.jar
557529 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/jhall.jar
338561 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/jsf-api.jar
6621 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/jsf-extensions-common-0.1-SNAPSHOT.jar
141995 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/jsf-extensions-dynamic-faces-0.1-SNAPSHOT.jar
786666 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/jsf-impl.jar
38239 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/json-2.jar
414240 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/jstl.jar
1013241 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/just-ice.jar
154581 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/krysalis-jCharts-1.0.0-alpha-1.jar
2073 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/phaseTracker.jar
7949 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/registrationservlet.jar
57344 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/serviceapi.jar
91104 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/serviceimpl.jar
27467 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/solaris_impl.jar
6352 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/solaris_implx.jar
3383713 Wed Jan 14 16:15:00 MST 2009 WEB-INF/lib/webui-jsf-suntheme.jar
3593854 Wed Jan 14 16:15:02 MST 2009 WEB-INF/lib/webui-jsf.jar

Here is the jsp:

<jsp:root version="2.0" xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<jsp:directive.page contentType="text/html"/>

<f:view>

<ice:outputHtml id="html1">
<ice:outputHead id="head1" >
<title> Simple Table </title>
</ice:outputHead>
<ice:outputBody id="body1" >
<ice:form id="form1">
<div style="margin:2%">
<h1><ice:outputText id="header" value="Simple Table" /></h1>
<br/> <br/>
<ice:dataTable id="simple" value="#{TableBeanIce.people}" var="person">

<ice:column id="lastNameCol" >
<f:facet name="header">
<ice:outputText id="headerLastName" value="Last Name" />
</f:facet>
<ice:outputText id="lastNameCell" value="#{person.lastName}"/>
</ice:column>
<ice:column id="firstNameCol" >
<f:facet name="header">
<ice:outputText id="headerFirstName" value="First Name" />
</f:facet>
<ice:outputText id="firstNameCell" value="#{person.firstName}"/>
</ice:column>

</ice:dataTable>
</div>
</ice:form>
</ice:outputBody>
</ice:outputHtml>

</f:view>
</jsp:root>

frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


using the following one for default style.
<ice:outputStyle href="./xmlhttp/css/xp/xp.css" id="outputStyle2"/>
or create custom style
[Email]
vblack

Joined: 05/Jan/2009 00:00:00
Messages: 12
Offline



I added what you suggested with no change to the table - still text only.


I added this page below and the related bean (from the basicTable tutorial) into my app and the table renders without any graphics - just the text. In the tutorial they show a graphic table Something seems to be missing from my environment.

<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"/>

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"></meta>
<title>DataTable Component Tutorial</title>
<link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css"/>
</head>

<body>
<h2>Basic dataTable Component</h2>

<p>This is a very basic table comprising four columns. Each
row represents an inventory item. Each column represents a
inventory item property. </p>
<ice:form>
<!--
This is a very basic table comprising four columns. Each
row represents an inventory item. Each column represents a
inventory item property.
-->
<ice:dataTable
value="#{inventoryList.carInventory}"
var="item">

<!-- Stock number -->
<ice:column>
<f:facet name="header">
<ice:outputText value="Stock #"/>
</f:facet>
<ice:outputText value="#{item.stock}"/>
</ice:column>

<!-- Model number -->
<ice:column>
<f:facet name="header">
<ice:outputText value="Model"/>
</f:facet>
<ice:outputText value="#{item.model}"/>
</ice:column>

<!-- Description -->
<ice:column>
<f:facet name="header">
<ice:outputText value="Description"/>
</f:facet>
<ice:outputText value="#{item.description}"/>
</ice:column>

<!-- Odometer reading -->
<ice:column>
<f:facet name="header">
<ice:outputText value="Odometer"/>
</f:facet>
<ice:outputText value="#{item.odometer}"/>
</ice:column>

<!-- Price number -->
<ice:column>
<f:facet name="header">
<ice:outputText value="Price"/>
</f:facet>
<ice:outputText value="#{item.price}"/>
</ice:column>

</ice:dataTable>

</ice:form>
</body>
</html>
</f:view>
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


the "/xmlhttp/css/" is a servlet mapping to take the default style sheet. so has to use ice:outputStyle.

What is your environment? Solaris 10? and what is sandbox application?




[Email]
vblack

Joined: 05/Jan/2009 00:00:00
Messages: 12
Offline


Where exactly should <ice:outputStyle href="./xmlhttp/css/xp/xp.css" id="outputStyle2"/> go?
I put it in the ice:outputHead - but it makes no difference to the way the table renders in my original simple table example.


<ice:outputHead id="head1" >
<title> Simple Table </title>
<ice:outputStyle href="./xmlhttp/css/xp/xp.css" id="outputStyle2"/>

</ice:outputHead>

My OS is Solaris 11. My application I call a sandbox because this is an app that I created where I have various pages to try out Woodstock components when I was first developing with it. It is a good candidate to try an iceFaces porting exercise with.
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


as an example xml format JSP page:

<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="2.1" 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:jsp="http://java.sun.com/JSP/Page">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<html id="outputHtml1">
<head id="outputHead1">
<ice:outputStyle href="./resources/stylesheet.css" id="outputStyle1"/>
<ice:outputStyle href="./xmlhttp/css/xp/xp.css" id="outputStyle2"/>
</head>
[Email]
vblack

Joined: 05/Jan/2009 00:00:00
Messages: 12
Offline


Still no difference.

I'll try putting this page in a simple iceFaces-only app. And I'll see if the table renders graphically.

vblack

Joined: 05/Jan/2009 00:00:00
Messages: 12
Offline


Ok - so when I create a Netbeans project with only the IceFaces framework option selected (did not select the JSF framework) - and I added those table pages in - the table pages render graphically.

These are the jars that were used.

351226 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/backport-util-concurrent.jar
116021 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/commons-beanutils.jar
165640 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/commons-collections.jar
106929 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/commons-digester.jar
89532 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/commons-fileupload.jar
30914 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/commons-logging.jar
1789414 Thu Jan 15 14:47:54 MST 2009 WEB-INF/lib/icefaces-comps.jar
1014004 Thu Jan 15 14:47:54 MST 2009 WEB-INF/lib/icefaces.jar
361732 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/jsf-api.jar
832542 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/jsf-impl.jar
20512 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/jstl.jar
154581 Thu Jan 15 14:47:52 MST 2009 WEB-INF/lib/krysalis-jCharts-1.0.0-alpha-1.jar


I'll try adding needed Woodstock jars and web.xml entries to see if I can add a page with a Woodstock table to this simple project. I'll report back

vblack

Joined: 05/Jan/2009 00:00:00
Messages: 12
Offline


Ok here is the issue, when the iceFaces jspx containing the dataTable is in under a "jsp" directory the graphical part of the table rendering fails.

So this renders as a text table
http://localhost:8084/Sandbox/jsp/table.iface

This renders as a graphical table - when I place a copy of the jspx above the jsp directory.
http://localhost:8084/Sandbox/table.iface

Any insights why this is and what we should do if we want to continue organizing our jsps under a jsp directory? Is this a bug?
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


instead of "./xmlhttp/" by using "/xmlhttp/"
for example:
<ice:outputStyle href="/xmlhttp/css/xp/xp.css" id="outputStyle2"/>
[Email]
vblack

Joined: 05/Jan/2009 00:00:00
Messages: 12
Offline


Ok that works - I applied that change to files both under jsp directory and above and it worked for both cases.

So it looks like one should use "/xmlhttp/" instead of "./xmlhttp/" in all cases.
Thanks Frank.
 
Forum Index -> Woodstock to ICEfaces Migration
Go to:   
Powered by JForum 2.1.7ice © JForum Team