RAD v7 problem

View: New views
2 Messages — Rating Filter:   Alert me  

RAD v7 problem

by Augustynowicz, Dawid (Dawid) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After some debug I found solution
 
In RAD v7 JSF implementation IBM introduced some AJAX solution . A4J filter is loaded properly. The problem is because there is colision between A4J renderer and RAD renderkits and it behaves very similar to problems that other people had when Ajax filter wasn't loaded - JavaScripts in header were not generated.  Created by RAD  faces-config contains:
 
I found that in org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter there is some checking od AJAXREQUEST paramenter. Request with parameter: ?AJAXREQUEST=true causes exception:

java.lang.ClassCastException: com.ibm.faces.renderkit.DefaultAjaxRenderer incompatible with org.ajax4jsf.framework.renderer.AjaxContainerRenderer

at org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:570)

at org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:430)

at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:611)

at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:548)

at com.sun.faces.taglib.jsf_core.ViewTag.doEndTag(ViewTag.java:216)

at com.ibm._jsp._sample._jspx_meth_f_view_0(_sample.java:322).

....

Solution is to remove from faces-config.xml piece of code generated by RAD:

 <factory>

<faces-context-factory>

com.ibm.faces.context.AjaxFacesContextFactory</faces-context-factory>

<render-kit-factory>

com.ibm.faces.renderkit.AjaxRenderKitFactory</render-kit-factory>

</factory>

After that everything started working fine.

Thanks


Re: RAD v7 problem

by Macf007 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I have exact the same problem and follow the solution, but it still doesn't work. I am testing the "Greeter" application in RichFaces developer's guide (Chapter3). With your solution, the exception has gone, but the input value still can't be displayed.

If you have solved the problem, can you please let me know the details. Thanks a lot !

J.

Augustynowicz, Dawid (Dawid) wrote:
After some debug I found solution
 
In RAD v7 JSF implementation IBM introduced some AJAX solution . A4J filter
is loaded properly. The problem is because there is colision between A4J
renderer and RAD renderkits and it behaves very similar to problems that
other people had when Ajax filter wasn't loaded - JavaScripts in header were
not generated.  Created by RAD  faces-config contains:
 
I found that in org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter there is
some checking od AJAXREQUEST paramenter. Request with parameter:
?AJAXREQUEST=true causes exception:
java.lang.ClassCastException: com.ibm.faces.renderkit.DefaultAjaxRenderer
incompatible with org.ajax4jsf.framework.renderer.AjaxContainerRenderer

at
org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:570)

at
org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:43
0)

at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:611)

at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:548)

at com.sun.faces.taglib.jsf_core.ViewTag.doEndTag(ViewTag.java:216)

at com.ibm._jsp._sample._jspx_meth_f_view_0(_sample.java:322).

....

Solution is to remove from faces-config.xml piece of code generated by RAD:

 <factory>

<faces-context-factory>

com.ibm.faces.context.AjaxFacesContextFactory</faces-context-factory>

<render-kit-factory>

com.ibm.faces.renderkit.AjaxRenderKitFactory</render-kit-factory>

</factory>

After that everything started working fine.

Thanks