| Author |
Message |
|
|
Hi
Thanks for your reply, but I didn't receive your email and file.
Could you please send it again or upload it to this site.
Thanks,
Eyal.
|
 |
|
|
Hi
I have tried your datatable demo which looks very powerful with IBM
Rational App. Developer V7 and it works ok, but if I tried to add
only your datatable to my jsf page then I got this exception:
FacesException: Can't instantiate class:
'ecruiser.advanced.datatable.DataTable'.
BTW: I had your temporary license file to my WEB-INF.
I think that the problem is because the "factory" param in the
faces-config.xml:
<factory>
<faces-context-factory>
com.ibm.faces.context.AjaxFacesContextFactory</faces-context-factory>
<render-kit-factory>
com.ibm.faces.renderkit.AjaxRenderKitFactory</render-kit-factory>
</factory>
If I remove it from the faces-config.xml , then it works ok but if it
exists in the faces-config.xml then it won't work. (IBM writes it in
the file by default when the project is created).
Here are the exceptions I got from the WebSphere:
See the "java.lang.ClassCastException:
com.ibm.faces.renderkit.AjaxRenderKit incompatible with
ecruiser.render.ECRenderKit" exception which I got if the "factory"
param is exists.
[3/14/07 12:36:06:624 GMT] 00000020 WebApp E [Servlet
Error]-[Faces Servlet]: java.lang.ClassCastException:
com.ibm.faces.renderkit.AjaxRenderKit incompatible with
ecruiser.render.ECRenderKit
at ecruiser.control.SessionManager.getECRenderKit(Unknown
Source)
at ecruiser.component.ECComponent.getRenderer(Unknown Source)
at
ecruiser.component.ClientEventSource.getClientEventTypes(Unknown Source)
at
ecruiser.component.ClientEventSource.setBindingAttribute(Unknown Source)
at ecruiser.component.ECComponent.setAttribute(Unknown Source)
at ecruiser.tag.ECTag.setProperties(Unknown Source)
at
javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:
10
21)
at
javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1040)
at
javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:753)
at
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:433)
at ecruiser.tag.ECTag.doStartTag(Unknown Source)
at com.ibm._jsp._basic._jspx_meth_e_select_0(_basic.java:199)
at com.ibm._jsp._basic._jspx_meth_h_panelGrid_0(_basic.java:383)
at com.ibm._jsp._basic._jspx_meth_h_form_0(_basic.java:846)
at com.ibm._jsp._basic._jspx_meth_f_view_0(_basic.java:877)
at com.ibm._jsp._basic._jspService(_basic.java:95)
at
com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
ja
va:966)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
ap
per.java:47
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(Servlet
Wr
apper.java:463)
at
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest
(G
enericServletWrapper.java:115)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.hand
le
Request(AbstractJSPExtensionServletWrapper.java:16
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppR
eq
uestDispatcher.java:30
at
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl
.j
ava:325)
at
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.j
av
a:249)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.
java:87)
at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:11
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:19
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
ja
va:966)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
ap
per.java:47
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(Servlet
Wr
apper.java:463)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:23
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:8
11
)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java
:1
433)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java
:9
3)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminat
io
n(HttpInboundLink.java:465)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformat
io
n(HttpInboundLink.java:394)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInbound
Li
nk.java:274)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDis
cr
iminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(
Ne
wConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(
Ai
oReadCompletionListener.java:152)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.
java:213)
at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsy
nc
Future.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.ja
va
:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
[3/14/07 12:21:06:678 GMT] 00000021 WebApp E [Servlet
Error]-[Faces Servlet]: javax.faces.FacesException: Can't instantiate
class: 'ecruiser.advanced.datatable.DataTable'.
at
com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:
770)
at
com.sun.faces.application.ApplicationImpl.createComponent(ApplicationI
mp
l.java:353)
at
com.sun.faces.application.ApplicationImpl.createComponent(ApplicationI
mp
l.java:393)
at
javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:
10
13)
at
javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1040)
at
javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:753)
at
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:433)
at ecruiser.tag.ECTag.doStartTag(Unknown Source)
at
com.ibm._jsp._MyPage._jspx_meth_e_datatable_0(_MyPage.java:522)
at com.ibm._jsp._MyPage._jspx_meth_h_form_0(_MyPage.java:570)
at
com.ibm._jsp._MyPage._jspx_meth_hx_scriptCollector_0(_MyPage.java:596)
at com.ibm._jsp._MyPage._jspx_meth_f_view_0(_MyPage.java:624)
at com.ibm._jsp._MyPage._jspService(_MyPage.java:92)
at
com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
ja
va:966)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
ap
per.java:47
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(Servlet
Wr
apper.java:463)
at
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest
(G
enericServletWrapper.java:115)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.hand
le
Request(AbstractJSPExtensionServletWrapper.java:16
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppR
eq
uestDispatcher.java:30
at
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl
.j
ava:325)
at
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.j
av
a:249)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.
java:87)
at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:11
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:19
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
ja
va:966)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
ap
per.java:47
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(Servlet
Wr
apper.java:463)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:23
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:8
11
)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java
:1
433)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java
:9
3)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminat
io
n(HttpInboundLink.java:465)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformat
io
n(HttpInboundLink.java:394)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInbound
Li
nk.java:274)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDis
cr
iminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(
Ne
wConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(
Ai
oReadCompletionListener.java:152)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.
java:213)
at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsy
nc
Future.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.ja
va
:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
**********************************************************************
**
**************************************************************
Here is my faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<application>
<state-manager>
com.ibm.faces.application.DevelopmentStateManager</state-manager>
<property-resolver>
com.ibm.faces.databind.SelectItemsPropResolver</property-resolver>
<variable-resolver>
com.ibm.faces.databind.SelectItemsVarResolver</variable-resolver>
</application>
<factory>
<faces-context-factory>
com.ibm.faces.context.AjaxFacesContextFactory</faces-context-factory>
<render-kit-factory>
com.ibm.faces.renderkit.AjaxRenderKitFactory</render-kit-factory>
</factory>
<managed-bean>
<managed-bean-name>basicTableBean</managed-bean-name>
<managed-bean-class>simplica.demo.datatable.BasicBean</managed-bean-cl
as
s>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>dragDropBean</managed-bean-name>
<managed-bean-class>simplica.demo.datatable.DragDropBean</managed-bean
-c
lass>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>ajaxLoadingBean</managed-bean-name>
<managed-bean-class>simplica.demo.datatable.AjaxLoadingBean</managed-b
ea
n-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>selectBean</managed-bean-name>
<managed-bean-class>simplica.demo.datatable.SelectBean</managed-bean-c
la
ss>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>multirowBean</managed-bean-name>
<managed-bean-class>simplica.demo.datatable.MultirowBean</managed-bean
-c
lass>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>pc_MyPage</managed-bean-name>
<managed-bean-class>pagecode.MyPage</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<lifecycle>
<phase-listener>
com.ibm.faces.webapp.ValueResourcePhaseListener</phase-listener>
</lifecycle>
</faces-config>
*********************************************************************
**
**************************************************************
Here is my jsp page:
I have added my page to your demo project , so I'm using your classes
and beans.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%-- jsf:pagecode language="java" location="/src/pagecode/MyPage.java"
--%><%-- /jsf:pagecode --%>
<%@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%<%@taglib
uri="http://java.sun.com/jsf/html" prefix="h"%<%@taglib
uri="http://www.simplica.com/jsf/ecruiser" prefix="e" %<%@taglib
uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%<html<head
<title>MyPage</title<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1"<meta name="GENERATOR"
content="Rational Application Developer"<link rel="stylesheet"
type="text/css" href="styles.css"<link rel="stylesheet"
type="text/css" href="bluegray.css"</head<f:view>
<body>
<hx:scriptCollector id="scriptCollector1">
<h:form id="form1" styleClass="form">
<e:datatable
binding="#{basicTableBean.dataTable}"
dataModel="#{basicTableBean.dataModel}"
title="ECruiser DataTable"
styleClass="dataTableMain" width="550px"
innerCellpadding="5"
innerCellspacing="0"
fixedColumnCount="3" pageSize="10" ajax="true">
<e:dataTr>
<e:dataTd id="cancelCol"
labelText=" " align="center"
width="70"
sortable="false">
<e:button ajax="true"
id="cancelButton" style="font-size:10px"
value="Delete"
actionListener="#{basicTableBean.cancelOrder}" />
</e:dataTd>
<e:dataTd id="orderId"
labelText="Order ID" align="center"
width="80" />
<e:dataTd id="status"
labelText="Status" align="center" width="90"
sortable="false">
<e:select
id="statusSelect" style="font-size:10px"
value="#{ROW.status}" onchange="true" ajax="true">
<f:selectItem
itemLabel="OK" itemValue="ok" />
<f:selectItem
itemLabel="Late" itemValue="late" />
<f:selectItem
itemLabel="Problem" itemValue="problem" />
</e:select>
</e:dataTd>
<e:dataTd id="statusIcon"
labelText=" " align="center"
width="25"
sortable="false">
<h:graphicImage
id="statusImage"
url="#{basicTableBean.statusImage}" />
</e:dataTd>
<e:dataTd id="orderDate"
labelText="Order Date" align="center"
width="100">
<f:convertDateTime
type="date" />
</e:dataTd>
<e:dataTd id="customer"
labelText="Customer" width="140"
nowrap="true" />
<e:dataTd id="city"
labelText="City" width="100" nowrap="true" />
<e:dataTd id="region"
labelText="Region" width="50" nowrap="true" />
<e:dataTd id="country"
labelText="Country" width="100"
nowrap="true" />
</e:dataTr>
</e:datatable>
</h:form>
</hx:scriptCollector>
</body>
</f:view>
</html>
**********************************************************************
Please help, I would like to buy your components.
Thanks
Eyal
|
 |
|
|
|
|