Saturday, January 24, 2009

Building Collaborative CRUD Applications With ICEfaces and NetBeans Tutorial

I spent yesterday afternoon getting the ICEFaces modules installed in NetBeans 6.5 and trying the Building Collaborative CRUD Applications With ICEfaces and NetBeans tutorial on the ICEFaces site. This time, unlike the last time I tried it, it worked with some minor issues.

Note: Read the instructions carefully. The images do not show how to do everything.

When creating the Editing Form make sure that when you drag a new ice:form is NOT inside the first ice:form. Dragging and dropping the form on the page will automatically embed it in the other form. Use the Navigator tab in NetBeans to drag it outside of the first form.



Adding AJAX Push

Items #3 and #4: has you create a bean called RenderManager, and then use it in Item#4. The problem is that in one case it is called RenderManager and the other is called renderManager. A big difference. Fix it by calling the bean renderManager.

Configure The Grizzly ARP Engine

I was using GlassFish version 2.1 so I did not need to configure the Grizzly engine. I did however need to Comet support to the http-listener in the domain.xml file.

<property name="cometSupport" value="true"></property>

Thoughts

I was impressed with the ease of doing the tutorial. I would suggest that the ICEFaces folks update the tutorial for NetBeans 6.5 and fix some of the minor deficiencies as I noted above.

4 comments :

Anonymous said...

John,

Thanks for the feedback. We are continually updating tutorials as we move forward with our releases. Haven't gotten to this one yet, but it is on the list, so should be updated soon. We will be sure to incorporate your findings.

Steve

Anonymous said...

I was wondering if you can help.

I have been following the example on both the Netbeans and ICEfaces websites.

The only difference is that im running a Netbeans 6.5 IDE.

When I get to Step 4 of "Add the Editing Logic", I get the following expecptions thrown when I click on a row of the table:-

javax.el.ELException: Identity 'Page1' does not reference a MethodExpression instance, returned type: CollaborativeCRUD.Page1
javax.faces.el.EvaluationException: javax.el.ELException: Identity 'Page1' does not reference a MethodExpression instance, returned type: CollaborativeCRUD.Page1
at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
at com.icesoft.faces.component.ext.RowSelector.broadcast(RowSelector.java:360)


executePhase(APPLY_REQUEST_VALUES 2,com.icesoft.faces.context.BridgeFacesContext@90c1ee) threw exception
javax.faces.FacesException: javax.el.ELException: Identity 'Page1' does not reference a MethodExpression instance, returned type: CollaborativeCRUD.Page1
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:109)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)


Caused by: javax.faces.el.EvaluationException: javax.el.ELException: Identity 'Page1' does not reference a MethodExpression instance, returned type: CollaborativeCRUD.Page1
at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
at com.icesoft.faces.component.ext.RowSelector.broadcast(RowSelector.java:360)
at com.icesoft.faces.component.panelseries.UISeries$RowEvent.broadcast(UISeries.java:559)


Caused by: javax.el.ELException: Identity 'Page1' does not reference a MethodExpression instance, returned type: CollaborativeCRUD.Page1
at com.sun.el.parser.AstIdentifier.getMethodExpression(AstIdentifier.java:188)
at com.sun.el.parser.AstIdentifier.invoke(AstIdentifier.java:150)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)


StandardWrapperValve[Blocking Servlet]: PWC1406: Servlet.service() for servlet Blocking Servlet threw exception
javax.el.ELException: Identity 'Page1' does not reference a MethodExpression instance, returned type: CollaborativeCRUD.Page1
at com.sun.el.parser.AstIdentifier.getMethodExpression(AstIdentifier.java:188)
at com.sun.el.parser.AstIdentifier.invoke(AstIdentifier.java:150)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)


Its a long stack trace but have cut it down a bit.

John Yeary said...

It looks like the JSP page has a reference to a binding on the backing bean that does not exist.

Are you sure you added all of the bindings?

I must admit the first time I tried the example it did not work because I missed a binding that is in the text and had no images.

Anonymous said...

Hi John,

Thought I would update you in that I found where the problem was.

In Step 4 of "Connecting an ice:DataTable to a Database Table", I thought that the text "simply accept the defaults and close", meant I had to click Apply and then Close.

However that was incorrect, and all you need to do is to click Close.

The example now works. Thanks for your assistance.

Popular Posts